| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index b376bcc30e2b7c9727f69d0481962ccdfe83ffbf..04a907e037a5d6876613fe219cca1a50bc66b840 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -5028,6 +5028,16 @@ 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.
|
| + inline int ast_node_count();
|
| + inline void set_ast_node_count(int age);
|
| +
|
| + // Indicates whether the function is primitive or not.
|
| + DECL_BOOLEAN_ACCESSORS(is_primitive)
|
| +
|
| + DECL_BOOLEAN_ACCESSORS(is_inlineable)
|
| +
|
| // 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 +5201,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 +5218,9 @@ class SharedFunctionInfo: public HeapObject {
|
| kBoundFunction,
|
| kIsAnonymous,
|
| kNameShouldPrintAsAnonymous,
|
| + kIsInlineable,
|
| + 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
|
|
|