| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index a9cb8e0db6bebb65dd3fb145df8583b29b5b6e93..7d0bbe3becf9014ce858c70c9a40ff0d02ecc648 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -4423,6 +4423,7 @@ class Code: public HeapObject {
|
| #ifdef DEBUG
|
| void CodeVerify();
|
| #endif
|
| + void ClearInlineCaches();
|
|
|
| // Max loop nesting marker used to postpose OSR. We don't take loop
|
| // nesting that is deeper than 5 levels into account.
|
| @@ -5323,6 +5324,9 @@ class SharedFunctionInfo: public HeapObject {
|
| inline int compiler_hints();
|
| inline void set_compiler_hints(int value);
|
|
|
| + inline int ast_node_count();
|
| + inline void set_ast_node_count(int count);
|
| +
|
| // A counter used to determine when to stress the deoptimizer with a
|
| // deopt.
|
| inline int deopt_counter();
|
| @@ -5331,8 +5335,10 @@ class SharedFunctionInfo: public HeapObject {
|
| inline int profiler_ticks();
|
| inline void set_profiler_ticks(int ticks);
|
|
|
| - inline int ast_node_count();
|
| - inline void set_ast_node_count(int count);
|
| + // Inline cache age is used to infer whether the function survived a context
|
| + // disposal or not. In the former case we reset the opt_count.
|
| + inline int ic_age();
|
| + inline void set_ic_age(int age);
|
|
|
| // Add information on assignments of the form this.x = ...;
|
| void SetThisPropertyAssignmentsInfo(
|
| @@ -5478,6 +5484,8 @@ class SharedFunctionInfo: public HeapObject {
|
| void SharedFunctionInfoVerify();
|
| #endif
|
|
|
| + void ResetForNewContext(int new_ic_age);
|
| +
|
| // Helpers to compile the shared code. Returns true on success, false on
|
| // failure (e.g., stack overflow during compilation).
|
| static bool EnsureCompiled(Handle<SharedFunctionInfo> shared,
|
| @@ -5508,12 +5516,10 @@ class SharedFunctionInfo: public HeapObject {
|
| kInferredNameOffset + kPointerSize;
|
| static const int kThisPropertyAssignmentsOffset =
|
| kInitialMapOffset + kPointerSize;
|
| - static const int kProfilerTicksOffset =
|
| - kThisPropertyAssignmentsOffset + kPointerSize;
|
| #if V8_HOST_ARCH_32_BIT
|
| // Smi fields.
|
| static const int kLengthOffset =
|
| - kProfilerTicksOffset + kPointerSize;
|
| + kThisPropertyAssignmentsOffset + kPointerSize;
|
| static const int kFormalParameterCountOffset = kLengthOffset + kPointerSize;
|
| static const int kExpectedNofPropertiesOffset =
|
| kFormalParameterCountOffset + kPointerSize;
|
| @@ -5532,10 +5538,12 @@ class SharedFunctionInfo: public HeapObject {
|
| static const int kOptCountOffset =
|
| kThisPropertyAssignmentsCountOffset + kPointerSize;
|
| static const int kAstNodeCountOffset = kOptCountOffset + kPointerSize;
|
| - static const int kDeoptCounterOffset =
|
| - kAstNodeCountOffset + kPointerSize;
|
| + static const int kDeoptCounterOffset = kAstNodeCountOffset + kPointerSize;
|
| + static const int kProfilerTicksOffset = kDeoptCounterOffset + kPointerSize;
|
| + static const int kICAgeOffset = kProfilerTicksOffset + kPointerSize;
|
| +
|
| // Total size.
|
| - static const int kSize = kDeoptCounterOffset + kPointerSize;
|
| + static const int kSize = kICAgeOffset + kPointerSize;
|
| #else
|
| // The only reason to use smi fields instead of int fields
|
| // is to allow iteration without maps decoding during
|
| @@ -5547,7 +5555,7 @@ class SharedFunctionInfo: public HeapObject {
|
| // word is not set and thus this word cannot be treated as pointer
|
| // to HeapObject during old space traversal.
|
| static const int kLengthOffset =
|
| - kProfilerTicksOffset + kPointerSize;
|
| + kThisPropertyAssignmentsOffset + kPointerSize;
|
| static const int kFormalParameterCountOffset =
|
| kLengthOffset + kIntSize;
|
|
|
| @@ -5574,8 +5582,12 @@ class SharedFunctionInfo: public HeapObject {
|
| static const int kAstNodeCountOffset = kOptCountOffset + kIntSize;
|
| static const int kDeoptCounterOffset = kAstNodeCountOffset + kIntSize;
|
|
|
| +
|
| + static const int kProfilerTicksOffset = kDeoptCounterOffset + kIntSize;
|
| + static const int kICAgeOffset = kProfilerTicksOffset + kIntSize;
|
| +
|
| // Total size.
|
| - static const int kSize = kDeoptCounterOffset + kIntSize;
|
| + static const int kSize = kICAgeOffset + kIntSize;
|
|
|
| #endif
|
|
|
|
|