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

Unified Diff: src/objects-visiting.h

Issue 11028016: Move code flushing support into shared visitor. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments by Ulan Degenbaev. Created 8 years, 2 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 | « src/mark-compact.cc ('k') | src/objects-visiting-inl.h » ('j') | 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 407611b20d42f06fa0091aa89faddf0e845600f7..d01d88b08f7635a648ce81882773339c4e4c45e3 100644
--- a/src/objects-visiting.h
+++ b/src/objects-visiting.h
@@ -402,9 +402,16 @@ class StaticMarkingVisitor : public StaticVisitorBase {
// TODO(mstarzinger): This should be made protected once refactoring is done.
static inline void VisitNativeContext(Map* map, HeapObject* object);
+ // TODO(mstarzinger): This should be made protected once refactoring is done.
+ // Mark non-optimize code for functions inlined into the given optimized
+ // code. This will prevent it from being flushed.
+ 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);
// Mark pointers in a Map and its TransitionArray together, possibly
@@ -412,6 +419,17 @@ class StaticMarkingVisitor : public StaticVisitorBase {
static void MarkMapContents(Heap* heap, Map* map);
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);
+
+ // Helpers used by code flushing support that visit pointer fields and treat
+ // references to code objects either strongly or weakly.
+ static void VisitSharedFunctionInfoStrongCode(Heap* heap, HeapObject* object);
+ static void VisitSharedFunctionInfoWeakCode(Heap* heap, HeapObject* object);
+ static void VisitJSFunctionStrongCode(Heap* heap, HeapObject* object);
+ static void VisitJSFunctionWeakCode(Heap* heap, HeapObject* object);
+
class DataObjectVisitor {
public:
template<int size>
« no previous file with comments | « src/mark-compact.cc ('k') | src/objects-visiting-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698