Revision: 11980
Author:   [email protected]
Date:     Tue Jul  3 03:42:03 2012
Log: Don't actually create Handles for the constant hole, the true value and the false value. This is required to have some parts of Crankshaft run without creating Handles.

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/10699052
http://code.google.com/p/v8/source/detail?r=11980

Modified:
 /branches/bleeding_edge/src/hydrogen.cc
 /branches/bleeding_edge/src/hydrogen.h

=======================================
--- /branches/bleeding_edge/src/hydrogen.cc     Fri Jun 29 15:27:25 2012
+++ /branches/bleeding_edge/src/hydrogen.cc     Tue Jul  3 03:42:03 2012
@@ -568,9 +568,9 @@


 HConstant* HGraph::GetConstant(SetOncePointer<HConstant>* pointer,
-                               Object* value) {
+                               Handle<Object> value) {
   if (!pointer->is_set()) {
-    HConstant* constant = new(zone()) HConstant(Handle<Object>(value),
+    HConstant* constant = new(zone()) HConstant(value,
                                                 Representation::Tagged());
     constant->InsertAfter(GetConstantUndefined());
     pointer->set(constant);
@@ -580,27 +580,27 @@


 HConstant* HGraph::GetConstant1() {
-  return GetConstant(&constant_1_, Smi::FromInt(1));
+  return GetConstant(&constant_1_, Handle<Smi>(Smi::FromInt(1)));
 }


 HConstant* HGraph::GetConstantMinus1() {
-  return GetConstant(&constant_minus1_, Smi::FromInt(-1));
+  return GetConstant(&constant_minus1_, Handle<Smi>(Smi::FromInt(-1)));
 }


 HConstant* HGraph::GetConstantTrue() {
-  return GetConstant(&constant_true_, isolate()->heap()->true_value());
+  return GetConstant(&constant_true_, isolate()->factory()->true_value());
 }


 HConstant* HGraph::GetConstantFalse() {
-  return GetConstant(&constant_false_, isolate()->heap()->false_value());
+ return GetConstant(&constant_false_, isolate()->factory()->false_value());
 }


 HConstant* HGraph::GetConstantHole() {
-  return GetConstant(&constant_hole_, isolate()->heap()->the_hole_value());
+ return GetConstant(&constant_hole_, isolate()->factory()->the_hole_value());
 }


=======================================
--- /branches/bleeding_edge/src/hydrogen.h      Fri Jun 29 15:27:25 2012
+++ /branches/bleeding_edge/src/hydrogen.h      Tue Jul  3 03:42:03 2012
@@ -347,7 +347,7 @@

  private:
   HConstant* GetConstant(SetOncePointer<HConstant>* pointer,
-                         Object* value);
+                         Handle<Object> value);

   void MarkAsDeoptimizingRecursively(HBasicBlock* block);
   void InsertTypeConversions(HInstruction* instr);

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to