Make HToFastProperties GC safe.

The runtime call can cause a GC, so the instruction must have proper flags set.

R=mstarzinger@chromium.org

Review URL: https://codereview.chromium.org/22980003

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16173 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
jkummerow@chromium.org 2013-08-13 16:26:53 +00:00
parent 145f240060
commit b9d8275ba0

View File

@ -6550,8 +6550,11 @@ class HToFastProperties: public HUnaryOperation {
private:
explicit HToFastProperties(HValue* value) : HUnaryOperation(value) {
// This instruction is not marked as having side effects, but
// changes the map of the input operand. Use it only when creating
set_representation(Representation::Tagged());
SetGVNFlag(kChangesNewSpacePromotion);
// This instruction is not marked as kChangesMaps, but does
// change the map of the input operand. Use it only when creating
// object literals via a runtime call.
ASSERT(value->IsCallRuntime());
#ifdef DEBUG
@ -6559,7 +6562,6 @@ class HToFastProperties: public HUnaryOperation {
ASSERT(function->function_id == Runtime::kCreateObjectLiteral ||
function->function_id == Runtime::kCreateObjectLiteralShallow);
#endif
set_representation(Representation::Tagged());
}
virtual bool IsDeletable() const { return true; }