From b9d8275ba03d2d676461a2c3a47205096d46090a Mon Sep 17 00:00:00 2001 From: "jkummerow@chromium.org" Date: Tue, 13 Aug 2013 16:26:53 +0000 Subject: [PATCH] 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 --- src/hydrogen-instructions.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/hydrogen-instructions.h b/src/hydrogen-instructions.h index 257233b..6987188 100644 --- a/src/hydrogen-instructions.h +++ b/src/hydrogen-instructions.h @@ -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; } -- 2.7.4