| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index b376bcc30e2b7c9727f69d0481962ccdfe83ffbf..a0987517a740660e9d0fb38a7f933c16c3916f9f 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -5028,6 +5028,17 @@ class SharedFunctionInfo: public HeapObject {
|
| // To be called if generation failed for any reason.
|
| void ForbidInlineConstructor();
|
|
|
| + // Contains the number of AST nodes in the function or kAstNodeCountMask
|
| + // if the number of nodes is larger than kAstNodeCountMask.
|
| + // Returns 0 if the function was parsed lazily.
|
| + inline int ast_node_count();
|
| + inline void set_ast_node_count(int age);
|
| +
|
| + // Indicates whether the function is primitive or not. See the comment of
|
| + // FunctionLiteral::is_primitive for definition of "primitive".
|
| + // Returns false if the function was parsed lazily.
|
| + DECL_BOOLEAN_ACCESSORS(is_primitive)
|
| +
|
| // For functions which only contains this property assignments this provides
|
| // access to the names for the properties assigned.
|
| DECL_ACCESSORS(this_property_assignments, Object)
|
| @@ -5191,6 +5202,10 @@ class SharedFunctionInfo: public HeapObject {
|
| static const int kCodeAgeSize = 3;
|
| static const int kCodeAgeMask = (1 << kCodeAgeSize) - 1;
|
|
|
| + // Make sure that kAstNodeCountMask > HGraphBuilder::kMaxInlinedSize.
|
| + static const int kAstNodeCountSize = 8;
|
| + static const int kAstNodeCountMask = (1 << kAstNodeCountSize) - 1;
|
| +
|
| enum CompilerHints {
|
| kHasOnlySimpleThisPropertyAssignments,
|
| kAllowLazyCompilation,
|
| @@ -5204,6 +5219,8 @@ class SharedFunctionInfo: public HeapObject {
|
| kBoundFunction,
|
| kIsAnonymous,
|
| kNameShouldPrintAsAnonymous,
|
| + kAstNodeCountShift,
|
| + kIsPrimitive = kAstNodeCountShift + kAstNodeCountSize,
|
| kCompilerHintsCount // Pseudo entry
|
| };
|
|
|
| @@ -5218,8 +5235,9 @@ class SharedFunctionInfo: public HeapObject {
|
| static const int kCompilerHintsSize = kIntSize;
|
| #endif
|
|
|
| + // One byte is reserved for the inobject slack counter.
|
| STATIC_ASSERT(SharedFunctionInfo::kCompilerHintsCount <=
|
| - SharedFunctionInfo::kCompilerHintsSize * kBitsPerByte);
|
| + (SharedFunctionInfo::kCompilerHintsSize - 1) * kBitsPerByte);
|
|
|
| public:
|
| // Constants for optimizing codegen for strict mode function and
|
|
|