Remove obsolete SLOT_ADDR macro usages.

R=yangguo@chromium.org

Review URL: https://chromiumcodereview.appspot.com/10823254

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@12285 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
mstarzinger@chromium.org 2012-08-09 12:25:03 +00:00
parent 22e3c0ae04
commit 6cfc3f4c18
3 changed files with 19 additions and 27 deletions

View File

@ -1430,10 +1430,6 @@ class MarkCompactMarkingVisitor
}
#define SLOT_ADDR(obj, offset) \
reinterpret_cast<Object**>((obj)->address() + offset)
static inline void VisitJSFunctionFields(Map* map,
JSFunction* object,
bool flush_code_candidate) {
@ -1469,27 +1465,29 @@ class MarkCompactMarkingVisitor
heap,
HeapObject::RawField(object,
JSFunction::kCodeEntryOffset + kPointerSize),
HeapObject::RawField(object,
JSFunction::kNonWeakFieldsEndOffset));
HeapObject::RawField(object, JSFunction::kNonWeakFieldsEndOffset));
}
static void VisitSharedFunctionInfoFields(Heap* heap,
HeapObject* object,
bool flush_code_candidate) {
VisitPointer(heap, SLOT_ADDR(object, SharedFunctionInfo::kNameOffset));
VisitPointer(heap,
HeapObject::RawField(object, SharedFunctionInfo::kNameOffset));
if (!flush_code_candidate) {
VisitPointer(heap, SLOT_ADDR(object, SharedFunctionInfo::kCodeOffset));
VisitPointer(heap,
HeapObject::RawField(object,
SharedFunctionInfo::kCodeOffset));
}
VisitPointers(heap,
SLOT_ADDR(object, SharedFunctionInfo::kOptimizedCodeMapOffset),
SLOT_ADDR(object, SharedFunctionInfo::kSize));
VisitPointers(
heap,
HeapObject::RawField(object,
SharedFunctionInfo::kOptimizedCodeMapOffset),
HeapObject::RawField(object, SharedFunctionInfo::kSize));
}
#undef SLOT_ADDR
static VisitorDispatchTable<Callback> non_count_table_;
};

View File

@ -5359,14 +5359,13 @@ void ExternalTwoByteString::ExternalTwoByteStringIterateBody() {
reinterpret_cast<Resource**>(FIELD_ADDR(this, kResourceOffset)));
}
#define SLOT_ADDR(obj, offset) \
reinterpret_cast<Object**>((obj)->address() + offset)
template<int start_offset, int end_offset, int size>
void FixedBodyDescriptor<start_offset, end_offset, size>::IterateBody(
HeapObject* obj,
ObjectVisitor* v) {
v->VisitPointers(SLOT_ADDR(obj, start_offset), SLOT_ADDR(obj, end_offset));
v->VisitPointers(HeapObject::RawField(obj, start_offset),
HeapObject::RawField(obj, end_offset));
}
@ -5374,10 +5373,10 @@ template<int start_offset>
void FlexibleBodyDescriptor<start_offset>::IterateBody(HeapObject* obj,
int object_size,
ObjectVisitor* v) {
v->VisitPointers(SLOT_ADDR(obj, start_offset), SLOT_ADDR(obj, object_size));
v->VisitPointers(HeapObject::RawField(obj, start_offset),
HeapObject::RawField(obj, object_size));
}
#undef SLOT_ADDR
#undef TYPE_CHECKER
#undef CAST_ACCESSOR

View File

@ -1254,9 +1254,6 @@ class HeapObject: public Object {
};
#define SLOT_ADDR(obj, offset) \
reinterpret_cast<Object**>((obj)->address() + offset)
// This class describes a body of an object of a fixed size
// in which all pointer fields are located in the [start_offset, end_offset)
// interval.
@ -1271,8 +1268,8 @@ class FixedBodyDescriptor {
template<typename StaticVisitor>
static inline void IterateBody(HeapObject* obj) {
StaticVisitor::VisitPointers(SLOT_ADDR(obj, start_offset),
SLOT_ADDR(obj, end_offset));
StaticVisitor::VisitPointers(HeapObject::RawField(obj, start_offset),
HeapObject::RawField(obj, end_offset));
}
};
@ -1291,13 +1288,11 @@ class FlexibleBodyDescriptor {
template<typename StaticVisitor>
static inline void IterateBody(HeapObject* obj, int object_size) {
StaticVisitor::VisitPointers(SLOT_ADDR(obj, start_offset),
SLOT_ADDR(obj, object_size));
StaticVisitor::VisitPointers(HeapObject::RawField(obj, start_offset),
HeapObject::RawField(obj, object_size));
}
};
#undef SLOT_ADDR
// The HeapNumber class describes heap allocated numbers that cannot be
// represented in a Smi (small integer)