Revision: 16355
Author:   [email protected]
Date:     Tue Aug 27 11:51:03 2013 UTC
Log:      Filler sizes have to be Smis, fix x64 breakage.

BUG=
[email protected]

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

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

=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.cc Tue Aug 27 07:42:23 2013 UTC +++ /branches/bleeding_edge/src/hydrogen-instructions.cc Tue Aug 27 11:51:03 2013 UTC
@@ -3296,7 +3296,11 @@
   }

HInstruction* new_dominator_size_constant = HConstant::CreateAndInsertBefore(
-      zone, context(), new_dominator_size, dominator_allocate);
+      zone,
+      context(),
+      new_dominator_size,
+      Representation::None(),
+      dominator_allocate);
   dominator_allocate->UpdateSize(new_dominator_size_constant);

 #ifdef VERIFY_HEAP
@@ -3389,11 +3393,15 @@
 void HAllocate::UpdateFreeSpaceFiller(int32_t free_space_size) {
   ASSERT(filler_free_space_size_ != NULL);
   Zone* zone = block()->zone();
+  // We must explicitly force Smi representation here because on x64 we
+  // would otherwise automatically choose int32, but the actual store
+  // requires a Smi-tagged value.
   HConstant* new_free_space_size = HConstant::CreateAndInsertBefore(
       zone,
       context(),
       filler_free_space_size_->value()->GetInteger32Constant() +
           free_space_size,
+      Representation::Smi(),
       filler_free_space_size_);
   filler_free_space_size_->UpdateValue(new_free_space_size);
 }
@@ -3419,10 +3427,15 @@
   store_map->SetFlag(HValue::kHasNoObservableSideEffects);
   store_map->InsertAfter(filler_map);

+  // We must explicitly force Smi representation here because on x64 we
+  // would otherwise automatically choose int32, but the actual store
+  // requires a Smi-tagged value.
   HConstant* filler_size = HConstant::CreateAndInsertAfter(
-      zone, context(), free_space_size, store_map);
+      zone, context(), free_space_size, Representation::Smi(), store_map);
+  // Must force Smi representation for x64 (see comment above).
   HObjectAccess access =
-      HObjectAccess::ForJSObjectOffset(FreeSpace::kSizeOffset);
+      HObjectAccess::ForJSObjectOffset(FreeSpace::kSizeOffset,
+          Representation::Smi());
   HStoreNamedField* store_size = HStoreNamedField::New(zone, context(),
       free_space_instr, access, filler_size);
   store_size->SetFlag(HValue::kHasNoObservableSideEffects);
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.h Tue Aug 27 07:42:23 2013 UTC +++ /branches/bleeding_edge/src/hydrogen-instructions.h Tue Aug 27 11:51:03 2013 UTC
@@ -3246,8 +3246,10 @@
   static HConstant* CreateAndInsertAfter(Zone* zone,
                                          HValue* context,
                                          int32_t value,
+                                         Representation representation,
                                          HInstruction* instruction) {
-    HConstant* new_constant = HConstant::New(zone, context, value);
+    HConstant* new_constant =
+        HConstant::New(zone, context, value, representation);
     new_constant->InsertAfter(instruction);
     return new_constant;
   }
@@ -3255,8 +3257,10 @@
   static HConstant* CreateAndInsertBefore(Zone* zone,
                                           HValue* context,
                                           int32_t value,
+                                          Representation representation,
                                           HInstruction* instruction) {
-    HConstant* new_constant = HConstant::New(zone, context, value);
+    HConstant* new_constant =
+        HConstant::New(zone, context, value, representation);
     new_constant->InsertBefore(instruction);
     return new_constant;
   }

--
--
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