Revision: 16173
Author:   [email protected]
Date:     Tue Aug 13 09:26:53 2013
Log:      Make HToFastProperties GC safe.

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

[email protected]

Review URL: https://codereview.chromium.org/22980003
http://code.google.com/p/v8/source/detail?r=16173

Modified:
 /branches/bleeding_edge/src/hydrogen-instructions.h

=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.h Tue Aug 13 02:38:46 2013 +++ /branches/bleeding_edge/src/hydrogen-instructions.h Tue Aug 13 09:26:53 2013
@@ -6550,8 +6550,11 @@

  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 @@
     ASSERT(function->function_id == Runtime::kCreateObjectLiteral ||
            function->function_id == Runtime::kCreateObjectLiteralShallow);
 #endif
-    set_representation(Representation::Tagged());
   }

   virtual bool IsDeletable() const { return true; }

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to