Index: src/hydrogen-instructions.cc |
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc |
index 9f962023572b38d3b2f879933171eccb0f13c49d..91bd01e5145ee9e35c1c7e4949913d0906ac6286 100644 |
--- a/src/hydrogen-instructions.cc |
+++ b/src/hydrogen-instructions.cc |
@@ -4269,6 +4269,29 @@ HObjectAccess HObjectAccess::ForJSObjectOffset(int offset, |
} |
+HObjectAccess HObjectAccess::ForAllocationSiteOffset(int offset) { |
Benedikt Meurer
2013/12/04 06:05:07
I'd prefer to have one method per allocation site
Hannes Payer (out of office)
2013/12/04 07:25:50
Breaking is intended. Michael, wdyt?
|
+ 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) { |
ASSERT(index >= 0); |
Portion portion = kInobject; |