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

Unified Diff: src/objects-visiting.h

Issue 12049033: Force inlining of object visiting functions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 11 months 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects-visiting.h
diff --git a/src/objects-visiting.h b/src/objects-visiting.h
index 29f3cbc5982e3874e029f2d8e95026c6654de00e..9b2422ca221abd0bc4aac4560874f48faeae57da 100644
--- a/src/objects-visiting.h
+++ b/src/objects-visiting.h
@@ -221,7 +221,7 @@ class BodyVisitorBase : public AllStatic {
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(),
@@ -247,7 +247,7 @@ class FlexibleBodyVisitor : public BodyVisitorBase<StaticVisitor> {
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,
@@ -279,16 +279,16 @@ class StaticNewSpaceVisitor : public StaticVisitorBase {
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),
@@ -305,30 +305,30 @@ class StaticNewSpaceVisitor : public StaticVisitorBase {
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();
}
@@ -339,7 +339,7 @@ class StaticNewSpaceVisitor : public StaticVisitorBase {
return object_size;
}
- static inline int Visit(Map* map, HeapObject* object) {
+ INLINE(static int Visit(Map* map, HeapObject* object)) {
return map->instance_size();
}
};
@@ -382,18 +382,18 @@ class StaticMarkingVisitor : public StaticVisitorBase {
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
@@ -401,12 +401,12 @@ class StaticMarkingVisitor : public StaticVisitorBase {
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.
@@ -414,8 +414,8 @@ class StaticMarkingVisitor : public StaticVisitorBase {
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.
@@ -430,7 +430,7 @@ class StaticMarkingVisitor : public StaticVisitorBase {
static inline void VisitSpecialized(Map* map, HeapObject* object) {
}
- static inline void Visit(Map* map, HeapObject* object) {
+ INLINE(static void Visit(Map* map, HeapObject* object)) {
}
};
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698