AllocationSite::memento_found_count() and friends need Smi access.

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

R=hpayer@chromium.org

Review URL: https://codereview.chromium.org/101783005

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@18253 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 7a42629b
......@@ -4269,6 +4269,29 @@ HObjectAccess HObjectAccess::ForJSObjectOffset(int offset,
}
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) {
ASSERT(index >= 0);
Portion portion = kInobject;
......
......@@ -5961,10 +5961,7 @@ class HObjectAccess V8_FINAL {
? 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());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment