Revision: 18253
Author:   mvstan...@chromium.org
Date:     Wed Dec  4 09:54:23 2013 UTC
Log:      AllocationSite::memento_found_count() and friends need Smi access.

Some new AllocationSite fields weren't accessed with the correct
representation.

R=hpa...@chromium.org

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

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

=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.cc Mon Dec 2 11:24:31 2013 UTC +++ /branches/bleeding_edge/src/hydrogen-instructions.cc Wed Dec 4 09:54:23 2013 UTC
@@ -4267,6 +4267,29 @@
   }
   return HObjectAccess(portion, offset, representation);
 }
+
+
+HObjectAccess HObjectAccess::ForAllocationSiteOffset(int offset) {
+  switch (offset) {
+    case AllocationSite::kTransitionInfoOffset:
+      return HObjectAccess(kInobject, offset, Representation::Tagged());
+    case AllocationSite::kNestedSiteOffset:
+      return HObjectAccess(kInobject, offset, Representation::Tagged());
+    case AllocationSite::kMementoFoundCountOffset:
+      return HObjectAccess(kInobject, offset, Representation::Smi());
+    case AllocationSite::kMementoCreateCountOffset:
+      return HObjectAccess(kInobject, offset, Representation::Smi());
+    case AllocationSite::kPretenureDecisionOffset:
+      return HObjectAccess(kInobject, offset, Representation::Smi());
+    case AllocationSite::kDependentCodeOffset:
+      return HObjectAccess(kInobject, offset, Representation::Tagged());
+    case AllocationSite::kWeakNextOffset:
+      return HObjectAccess(kInobject, offset, Representation::Tagged());
+    default:
+      UNREACHABLE();
+  }
+  return HObjectAccess(kInobject, offset);
+}


 HObjectAccess HObjectAccess::ForContextSlot(int index) {
=======================================
--- /branches/bleeding_edge/src/hydrogen-instructions.h Wed Dec 4 06:06:57 2013 UTC +++ /branches/bleeding_edge/src/hydrogen-instructions.h Wed Dec 4 09:54:23 2013 UTC
@@ -5961,10 +5961,7 @@
                 ? Representation::Smi() : Representation::Tagged());
   }

-  static HObjectAccess ForAllocationSiteOffset(int offset) {
- ASSERT(offset >= HeapObject::kHeaderSize && offset < AllocationSite::kSize);
-    return HObjectAccess(kInobject, offset);
-  }
+  static HObjectAccess ForAllocationSiteOffset(int offset);

   static HObjectAccess ForAllocationSiteList() {
     return HObjectAccess(kExternalMemory, 0, Representation::Tagged());

--
--
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to