Make HToFastProperties GC safe.
authorjkummerow@chromium.org <jkummerow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 13 Aug 2013 16:26:53 +0000 (16:26 +0000)
committerjkummerow@chromium.org <jkummerow@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Tue, 13 Aug 2013 16:26:53 +0000 (16:26 +0000)
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

index 257233b..6987188 100644 (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; }