Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(381)

Unified Diff: src/heap/mark-compact.cc

Issue 1440243002: Object's body descriptors refactoring. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@new-visitor-base
Patch Set: New files added to the lists Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « BUILD.gn ('k') | src/heap/objects-visiting.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index ffda9f159d263d2c40e22c3c013881ef1be7f106..1a67ccd2eed6e94e7df4ca21824a84e2fd2f262b 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -1809,7 +1809,7 @@ void MarkCompactCollector::ProcessTopOptimizedFrame(ObjectVisitor* visitor) {
if (it.frame()->type() == StackFrame::OPTIMIZED) {
Code* code = it.frame()->LookupCode();
if (!code->CanDeoptAt(it.frame()->pc())) {
- code->CodeIterateBody(visitor);
+ Code::BodyDescriptor::IterateBody(code, visitor);
}
ProcessMarkingDeque();
return;
@@ -2718,8 +2718,7 @@ void MarkCompactCollector::MigrateObjectMixed(
heap()->MoveBlock(dst->address(), src->address(), size);
// Visit inherited JSObject properties and byte length of ArrayBuffer
- Address regular_slot =
- dst->address() + JSArrayBuffer::BodyDescriptor::kStartOffset;
+ Address regular_slot = dst->address() + JSArrayBuffer::kPropertiesOffset;
Address regular_slots_end =
dst->address() + JSArrayBuffer::kByteLengthOffset + kPointerSize;
while (regular_slot < regular_slots_end) {
@@ -2788,7 +2787,7 @@ static inline void UpdateSlot(Isolate* isolate, ObjectVisitor* v,
}
case SlotsBuffer::RELOCATED_CODE_OBJECT: {
HeapObject* obj = HeapObject::FromAddress(addr);
- Code::cast(obj)->CodeIterateBody(v);
+ Code::BodyDescriptor::IterateBody(obj, v);
break;
}
case SlotsBuffer::DEBUG_TARGET_SLOT: {
@@ -3135,7 +3134,7 @@ bool MarkCompactCollector::IsSlotInLiveObject(Address slot) {
BytecodeArray::kConstantPoolOffset;
} else if (object->IsJSArrayBuffer()) {
int off = static_cast<int>(slot - object->address());
- return (off >= JSArrayBuffer::BodyDescriptor::kStartOffset &&
+ return (off >= JSArrayBuffer::kPropertiesOffset &&
off <= JSArrayBuffer::kByteLengthOffset) ||
(off >= JSArrayBuffer::kSize &&
off < JSArrayBuffer::kSizeWithInternalFields);
« no previous file with comments | « BUILD.gn ('k') | src/heap/objects-visiting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698