| Index: src/contexts.h
|
| diff --git a/src/contexts.h b/src/contexts.h
|
| index c3e08abab9419d3758208c915de9c2fce38e68f4..9f44afeebbe3e4f917518c20308aadd9ed64331e 100644
|
| --- a/src/contexts.h
|
| +++ b/src/contexts.h
|
| @@ -228,12 +228,13 @@ class Context: public FixedArray {
|
|
|
| // Properties from here are treated as weak references by the full GC.
|
| // Scavenge treats them as strong references.
|
| - NEXT_CONTEXT_LINK,
|
| + OPTIMIZED_FUNCTIONS_LIST, // Weak.
|
| + NEXT_CONTEXT_LINK, // Weak.
|
|
|
| // Total number of slots.
|
| GLOBAL_CONTEXT_SLOTS,
|
|
|
| - FIRST_WEAK_SLOT = NEXT_CONTEXT_LINK
|
| + FIRST_WEAK_SLOT = OPTIMIZED_FUNCTIONS_LIST
|
| };
|
|
|
| // Direct slot access.
|
| @@ -286,6 +287,12 @@ class Context: public FixedArray {
|
| return IsCatchContext() && extension() == object;
|
| }
|
|
|
| + // A global context hold a list of all functions which have been optimized.
|
| + void AddOptimizedFunction(JSFunction* function);
|
| + void RemoveOptimizedFunction(JSFunction* function);
|
| + Object* OptimizedFunctionsListHead();
|
| + void ClearOptimizedFunctions();
|
| +
|
| #define GLOBAL_CONTEXT_FIELD_ACCESSORS(index, type, name) \
|
| void set_##name(type* value) { \
|
| ASSERT(IsGlobalContext()); \
|
|
|