OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 6876 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6887 DECL_ACCESSORS(name, Object) | 6887 DECL_ACCESSORS(name, Object) |
6888 | 6888 |
6889 // [code]: Function code. | 6889 // [code]: Function code. |
6890 DECL_ACCESSORS(code, Code) | 6890 DECL_ACCESSORS(code, Code) |
6891 | 6891 |
6892 // Get the abstract code associated with the function, which will either be | 6892 // Get the abstract code associated with the function, which will either be |
6893 // a Code object or a BytecodeArray. | 6893 // a Code object or a BytecodeArray. |
6894 inline AbstractCode* abstract_code(); | 6894 inline AbstractCode* abstract_code(); |
6895 | 6895 |
6896 inline void ReplaceCode(Code* code); | 6896 inline void ReplaceCode(Code* code); |
| 6897 inline bool HasBaselineCode() const; |
6897 | 6898 |
6898 // [optimized_code_map]: Map from native context to optimized code | 6899 // [optimized_code_map]: Map from native context to optimized code |
6899 // and a shared literals array. | 6900 // and a shared literals array. |
6900 DECL_ACCESSORS(optimized_code_map, FixedArray) | 6901 DECL_ACCESSORS(optimized_code_map, FixedArray) |
6901 | 6902 |
6902 // Returns entry from optimized code map for specified context and OSR entry. | 6903 // Returns entry from optimized code map for specified context and OSR entry. |
6903 // Note that {code == nullptr, literals == nullptr} indicates no matching | 6904 // Note that {code == nullptr, literals == nullptr} indicates no matching |
6904 // entry has been found, whereas {code, literals == nullptr} indicates that | 6905 // entry has been found, whereas {code, literals == nullptr} indicates that |
6905 // code is context-independent. | 6906 // code is context-independent. |
6906 CodeAndLiterals SearchOptimizedCodeMap(Context* native_context, | 6907 CodeAndLiterals SearchOptimizedCodeMap(Context* native_context, |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6973 DECL_ACCESSORS(scope_info, ScopeInfo) | 6974 DECL_ACCESSORS(scope_info, ScopeInfo) |
6974 | 6975 |
6975 // [construct stub]: Code stub for constructing instances of this function. | 6976 // [construct stub]: Code stub for constructing instances of this function. |
6976 DECL_ACCESSORS(construct_stub, Code) | 6977 DECL_ACCESSORS(construct_stub, Code) |
6977 | 6978 |
6978 // Sets the given code as the construct stub, and marks builtin code objects | 6979 // Sets the given code as the construct stub, and marks builtin code objects |
6979 // as a construct stub. | 6980 // as a construct stub. |
6980 void SetConstructStub(Code* code); | 6981 void SetConstructStub(Code* code); |
6981 | 6982 |
6982 // Returns if this function has been compiled to native code yet. | 6983 // Returns if this function has been compiled to native code yet. |
6983 inline bool is_compiled(); | 6984 inline bool is_compiled() const; |
6984 | 6985 |
6985 // [length]: The function length - usually the number of declared parameters. | 6986 // [length]: The function length - usually the number of declared parameters. |
6986 // Use up to 2^30 parameters. | 6987 // Use up to 2^30 parameters. |
6987 inline int length() const; | 6988 inline int length() const; |
6988 inline void set_length(int value); | 6989 inline void set_length(int value); |
6989 | 6990 |
6990 // [internal formal parameter count]: The declared number of parameters. | 6991 // [internal formal parameter count]: The declared number of parameters. |
6991 // For subclass constructors, also includes new.target. | 6992 // For subclass constructors, also includes new.target. |
6992 // The size of function's frame is internal_formal_parameter_count + 1. | 6993 // The size of function's frame is internal_formal_parameter_count + 1. |
6993 inline int internal_formal_parameter_count() const; | 6994 inline int internal_formal_parameter_count() const; |
(...skipping 4082 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11076 } | 11077 } |
11077 return value; | 11078 return value; |
11078 } | 11079 } |
11079 }; | 11080 }; |
11080 | 11081 |
11081 | 11082 |
11082 } // NOLINT, false-positive due to second-order macros. | 11083 } // NOLINT, false-positive due to second-order macros. |
11083 } // NOLINT, false-positive due to second-order macros. | 11084 } // NOLINT, false-positive due to second-order macros. |
11084 | 11085 |
11085 #endif // V8_OBJECTS_H_ | 11086 #endif // V8_OBJECTS_H_ |
OLD | NEW |