template<typename StaticVisitor, typename BodyDescriptor, typename ReturnType>
class FlexibleBodyVisitor : public BodyVisitorBase<StaticVisitor> {
public:
- static inline ReturnType Visit(Map* map, HeapObject* object) {
+ INLINE(static ReturnType Visit(Map* map, HeapObject* object)) {
int object_size = BodyDescriptor::SizeOf(map, object);
BodyVisitorBase<StaticVisitor>::IteratePointers(
map->GetHeap(),
template<typename StaticVisitor, typename BodyDescriptor, typename ReturnType>
class FixedBodyVisitor : public BodyVisitorBase<StaticVisitor> {
public:
- static inline ReturnType Visit(Map* map, HeapObject* object) {
+ INLINE(static ReturnType Visit(Map* map, HeapObject* object)) {
BodyVisitorBase<StaticVisitor>::IteratePointers(
map->GetHeap(),
object,
public:
static void Initialize();
- static inline int IterateBody(Map* map, HeapObject* obj) {
+ INLINE(static int IterateBody(Map* map, HeapObject* obj)) {
return table_.GetVisitor(map)(map, obj);
}
- static inline void VisitPointers(Heap* heap, Object** start, Object** end) {
+ INLINE(static void VisitPointers(Heap* heap, Object** start, Object** end)) {
for (Object** p = start; p < end; p++) StaticVisitor::VisitPointer(heap, p);
}
private:
- static inline int VisitJSFunction(Map* map, HeapObject* object) {
+ INLINE(static int VisitJSFunction(Map* map, HeapObject* object)) {
Heap* heap = map->GetHeap();
VisitPointers(heap,
HeapObject::RawField(object, JSFunction::kPropertiesOffset),
return JSFunction::kSize;
}
- static inline int VisitByteArray(Map* map, HeapObject* object) {
+ INLINE(static int VisitByteArray(Map* map, HeapObject* object)) {
return reinterpret_cast<ByteArray*>(object)->ByteArraySize();
}
- static inline int VisitFixedDoubleArray(Map* map, HeapObject* object) {
+ INLINE(static int VisitFixedDoubleArray(Map* map, HeapObject* object)) {
int length = reinterpret_cast<FixedDoubleArray*>(object)->length();
return FixedDoubleArray::SizeFor(length);
}
- static inline int VisitJSObject(Map* map, HeapObject* object) {
+ INLINE(static int VisitJSObject(Map* map, HeapObject* object)) {
return JSObjectVisitor::Visit(map, object);
}
- static inline int VisitSeqOneByteString(Map* map, HeapObject* object) {
+ INLINE(static int VisitSeqOneByteString(Map* map, HeapObject* object)) {
return SeqOneByteString::cast(object)->
SeqOneByteStringSize(map->instance_type());
}
- static inline int VisitSeqTwoByteString(Map* map, HeapObject* object) {
+ INLINE(static int VisitSeqTwoByteString(Map* map, HeapObject* object)) {
return SeqTwoByteString::cast(object)->
SeqTwoByteStringSize(map->instance_type());
}
- static inline int VisitFreeSpace(Map* map, HeapObject* object) {
+ INLINE(static int VisitFreeSpace(Map* map, HeapObject* object)) {
return FreeSpace::cast(object)->Size();
}
return object_size;
}
- static inline int Visit(Map* map, HeapObject* object) {
+ INLINE(static int Visit(Map* map, HeapObject* object)) {
return map->instance_size();
}
};
public:
static void Initialize();
- static inline void IterateBody(Map* map, HeapObject* obj) {
+ INLINE(static void IterateBody(Map* map, HeapObject* obj)) {
table_.GetVisitor(map)(map, obj);
}
- static inline void VisitCodeEntry(Heap* heap, Address entry_address);
- static inline void VisitEmbeddedPointer(Heap* heap, RelocInfo* rinfo);
- static inline void VisitGlobalPropertyCell(Heap* heap, RelocInfo* rinfo);
- static inline void VisitDebugTarget(Heap* heap, RelocInfo* rinfo);
- static inline void VisitCodeTarget(Heap* heap, RelocInfo* rinfo);
- static inline void VisitCodeAgeSequence(Heap* heap, RelocInfo* rinfo);
- static inline void VisitExternalReference(RelocInfo* rinfo) { }
- static inline void VisitRuntimeEntry(RelocInfo* rinfo) { }
+ INLINE(static void VisitCodeEntry(Heap* heap, Address entry_address));
+ INLINE(static void VisitEmbeddedPointer(Heap* heap, RelocInfo* rinfo));
+ INLINE(static void VisitGlobalPropertyCell(Heap* heap, RelocInfo* rinfo));
+ INLINE(static void VisitDebugTarget(Heap* heap, RelocInfo* rinfo));
+ INLINE(static void VisitCodeTarget(Heap* heap, RelocInfo* rinfo));
+ INLINE(static void VisitCodeAgeSequence(Heap* heap, RelocInfo* rinfo));
+ INLINE(static void VisitExternalReference(RelocInfo* rinfo)) { }
+ INLINE(static void VisitRuntimeEntry(RelocInfo* rinfo)) { }
// TODO(mstarzinger): This should be made protected once refactoring is done.
// Mark non-optimize code for functions inlined into the given optimized
static void MarkInlinedFunctionsCode(Heap* heap, Code* code);
protected:
- static inline void VisitMap(Map* map, HeapObject* object);
- static inline void VisitCode(Map* map, HeapObject* object);
- static inline void VisitSharedFunctionInfo(Map* map, HeapObject* object);
- static inline void VisitJSFunction(Map* map, HeapObject* object);
- static inline void VisitJSRegExp(Map* map, HeapObject* object);
- static inline void VisitNativeContext(Map* map, HeapObject* object);
+ INLINE(static void VisitMap(Map* map, HeapObject* object));
+ INLINE(static void VisitCode(Map* map, HeapObject* object));
+ INLINE(static void VisitSharedFunctionInfo(Map* map, HeapObject* object));
+ INLINE(static void VisitJSFunction(Map* map, HeapObject* object));
+ INLINE(static void VisitJSRegExp(Map* map, HeapObject* object));
+ INLINE(static void VisitNativeContext(Map* map, HeapObject* object));
// Mark pointers in a Map and its TransitionArray together, possibly
// treating transitions or back pointers weak.
static void MarkTransitionArray(Heap* heap, TransitionArray* transitions);
// Code flushing support.
- static inline bool IsFlushable(Heap* heap, JSFunction* function);
- static inline bool IsFlushable(Heap* heap, SharedFunctionInfo* shared_info);
+ INLINE(static bool IsFlushable(Heap* heap, JSFunction* function));
+ INLINE(static bool IsFlushable(Heap* heap, SharedFunctionInfo* shared_info));
// Helpers used by code flushing support that visit pointer fields and treat
// references to code objects either strongly or weakly.
static inline void VisitSpecialized(Map* map, HeapObject* object) {
}
- static inline void Visit(Map* map, HeapObject* object) {
+ INLINE(static void Visit(Map* map, HeapObject* object)) {
}
};