| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index 5af771828999fc9b9a0370c6e2736e298f93c019..a65d9ac45e8a2d164056ed86ec76c232dc483f38 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -4994,6 +4994,9 @@ class SharedFunctionInfo: public HeapObject {
|
| inline Smi* deopt_counter();
|
| inline void set_deopt_counter(Smi* counter);
|
|
|
| + inline int call_counter();
|
| + inline void set_call_counter(int count);
|
| +
|
| // Add information on assignments of the form this.x = ...;
|
| void SetThisPropertyAssignmentsInfo(
|
| bool has_only_simple_this_property_assignments,
|
| @@ -5154,6 +5157,13 @@ class SharedFunctionInfo: public HeapObject {
|
| // Constants.
|
| static const int kDontAdaptArgumentsSentinel = -1;
|
|
|
| + // Number of calls until a "primitive" function triggers its own optimization.
|
| +#if defined(V8_TARGET_ARCH_IA32) || defined(V8_TARGET_ARCH_X64)
|
| + static const int kCallsUntilPrimitiveOptimization = 20000;
|
| +#elif defined(V8_TARGET_ARCH_ARM) || defined(V8_TARGET_ARCH_MIPS)
|
| + static const int kCallsUntilPrimitiveOptimization = 1000;
|
| +#endif
|
| +
|
| // Layout description.
|
| // Pointer fields.
|
| static const int kNameOffset = HeapObject::kHeaderSize;
|
| @@ -5171,8 +5181,10 @@ class SharedFunctionInfo: public HeapObject {
|
| kInferredNameOffset + kPointerSize;
|
| static const int kThisPropertyAssignmentsOffset =
|
| kInitialMapOffset + kPointerSize;
|
| - static const int kDeoptCounterOffset =
|
| + static const int kCallCounterOffset =
|
| kThisPropertyAssignmentsOffset + kPointerSize;
|
| + static const int kDeoptCounterOffset =
|
| + kCallCounterOffset + kPointerSize;
|
| #if V8_HOST_ARCH_32_BIT
|
| // Smi fields.
|
| static const int kLengthOffset =
|
| @@ -5461,6 +5473,9 @@ class JSFunction: public JSObject {
|
| // a weak list by the GC.
|
| DECL_ACCESSORS(next_function_link, Object)
|
|
|
| + inline int profiler_ticks();
|
| + inline void set_profiler_ticks(int ticks);
|
| +
|
| // Prints the name of the function using PrintF.
|
| inline void PrintName() {
|
| PrintName(stdout);
|
| @@ -5500,7 +5515,9 @@ class JSFunction: public JSObject {
|
| kPrototypeOrInitialMapOffset + kPointerSize;
|
| static const int kContextOffset = kSharedFunctionInfoOffset + kPointerSize;
|
| static const int kLiteralsOffset = kContextOffset + kPointerSize;
|
| - static const int kNonWeakFieldsEndOffset = kLiteralsOffset + kPointerSize;
|
| + static const int kProfilerTicksOffset = kLiteralsOffset + kPointerSize;
|
| + static const int kNonWeakFieldsEndOffset =
|
| + kProfilerTicksOffset + kPointerSize;
|
| static const int kNextFunctionLinkOffset = kNonWeakFieldsEndOffset;
|
| static const int kSize = kNextFunctionLinkOffset + kPointerSize;
|
|
|
|
|