From: bmeurer@chromium.org Date: Thu, 30 Jan 2014 13:32:05 +0000 (+0000) Subject: Use HType::NonPrimitive() for non primitive HConstants. X-Git-Tag: upstream/4.7.83~10953 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fd9eade93a3b8361e682a675b1ed39375d59ee57;p=platform%2Fupstream%2Fv8.git Use HType::NonPrimitive() for non primitive HConstants. This allows us to use the faster write barrier, omitting the smi check when storing constant heap objects. R=hpayer@chromium.org Review URL: https://codereview.chromium.org/150303002 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18947 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc index 889ebfd05..73404b94b 100644 --- a/src/hydrogen-instructions.cc +++ b/src/hydrogen-instructions.cc @@ -361,6 +361,10 @@ HType HType::TypeFromValue(Handle value) { result = HType::JSObject(); } else if (value->IsJSArray()) { result = HType::JSArray(); + } else if (value->IsHeapObject()) { + // TODO(bmeurer): This is currently a work-around until the new type system + // is in place, where we have more precise types. + result = HType::NonPrimitive(); } return result; }