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
parent 22e3c0ae
...@@ -1430,10 +1430,6 @@ class MarkCompactMarkingVisitor ...@@ -1430,10 +1430,6 @@ class MarkCompactMarkingVisitor
} }
#define SLOT_ADDR(obj, offset) \
reinterpret_cast<Object**>((obj)->address() + offset)
static inline void VisitJSFunctionFields(Map* map, static inline void VisitJSFunctionFields(Map* map,
JSFunction* object, JSFunction* object,
bool flush_code_candidate) { bool flush_code_candidate) {
...@@ -1469,27 +1465,29 @@ class MarkCompactMarkingVisitor ...@@ -1469,27 +1465,29 @@ class MarkCompactMarkingVisitor
heap, heap,
HeapObject::RawField(object, HeapObject::RawField(object,
JSFunction::kCodeEntryOffset + kPointerSize), JSFunction::kCodeEntryOffset + kPointerSize),
HeapObject::RawField(object, HeapObject::RawField(object, JSFunction::kNonWeakFieldsEndOffset));
JSFunction::kNonWeakFieldsEndOffset));
} }
static void VisitSharedFunctionInfoFields(Heap* heap, static void VisitSharedFunctionInfoFields(Heap* heap,
HeapObject* object, HeapObject* object,
bool flush_code_candidate) { bool flush_code_candidate) {
VisitPointer(heap, SLOT_ADDR(object, SharedFunctionInfo::kNameOffset)); VisitPointer(heap,
HeapObject::RawField(object, SharedFunctionInfo::kNameOffset));
if (!flush_code_candidate) { if (!flush_code_candidate) {
VisitPointer(heap, SLOT_ADDR(object, SharedFunctionInfo::kCodeOffset)); VisitPointer(heap,
HeapObject::RawField(object,
SharedFunctionInfo::kCodeOffset));
} }
VisitPointers(heap, VisitPointers(
SLOT_ADDR(object, SharedFunctionInfo::kOptimizedCodeMapOffset), heap,
SLOT_ADDR(object, SharedFunctionInfo::kSize)); HeapObject::RawField(object,
SharedFunctionInfo::kOptimizedCodeMapOffset),
HeapObject::RawField(object, SharedFunctionInfo::kSize));
} }
#undef SLOT_ADDR
static VisitorDispatchTable<Callback> non_count_table_; static VisitorDispatchTable<Callback> non_count_table_;
}; };
......
...@@ -5359,14 +5359,13 @@ void ExternalTwoByteString::ExternalTwoByteStringIterateBody() { ...@@ -5359,14 +5359,13 @@ void ExternalTwoByteString::ExternalTwoByteStringIterateBody() {
reinterpret_cast<Resource**>(FIELD_ADDR(this, kResourceOffset))); 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> template<int start_offset, int end_offset, int size>
void FixedBodyDescriptor<start_offset, end_offset, size>::IterateBody( void FixedBodyDescriptor<start_offset, end_offset, size>::IterateBody(
HeapObject* obj, HeapObject* obj,
ObjectVisitor* v) { 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> ...@@ -5374,10 +5373,10 @@ template<int start_offset>
void FlexibleBodyDescriptor<start_offset>::IterateBody(HeapObject* obj, void FlexibleBodyDescriptor<start_offset>::IterateBody(HeapObject* obj,
int object_size, int object_size,
ObjectVisitor* v) { 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 TYPE_CHECKER
#undef CAST_ACCESSOR #undef CAST_ACCESSOR
......
...@@ -1254,9 +1254,6 @@ class HeapObject: public Object { ...@@ -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 // 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) // in which all pointer fields are located in the [start_offset, end_offset)
// interval. // interval.
...@@ -1271,8 +1268,8 @@ class FixedBodyDescriptor { ...@@ -1271,8 +1268,8 @@ class FixedBodyDescriptor {
template<typename StaticVisitor> template<typename StaticVisitor>
static inline void IterateBody(HeapObject* obj) { static inline void IterateBody(HeapObject* obj) {
StaticVisitor::VisitPointers(SLOT_ADDR(obj, start_offset), StaticVisitor::VisitPointers(HeapObject::RawField(obj, start_offset),
SLOT_ADDR(obj, end_offset)); HeapObject::RawField(obj, end_offset));
} }
}; };
...@@ -1291,13 +1288,11 @@ class FlexibleBodyDescriptor { ...@@ -1291,13 +1288,11 @@ class FlexibleBodyDescriptor {
template<typename StaticVisitor> template<typename StaticVisitor>
static inline void IterateBody(HeapObject* obj, int object_size) { static inline void IterateBody(HeapObject* obj, int object_size) {
StaticVisitor::VisitPointers(SLOT_ADDR(obj, start_offset), StaticVisitor::VisitPointers(HeapObject::RawField(obj, start_offset),
SLOT_ADDR(obj, object_size)); HeapObject::RawField(obj, object_size));
} }
}; };
#undef SLOT_ADDR
// The HeapNumber class describes heap allocated numbers that cannot be // The HeapNumber class describes heap allocated numbers that cannot be
// represented in a Smi (small integer) // represented in a Smi (small integer)
......
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