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 | 9 |
10 #include "src/assert-scope.h" | 10 #include "src/assert-scope.h" |
(...skipping 6710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6721 // - a FunctionTemplateInfo to make benefit the API [IsApiFunction()]. | 6721 // - a FunctionTemplateInfo to make benefit the API [IsApiFunction()]. |
6722 // - a Smi identifying a builtin function [HasBuiltinFunctionId()]. | 6722 // - a Smi identifying a builtin function [HasBuiltinFunctionId()]. |
6723 // - a BytecodeArray for the interpreter [HasBytecodeArray()]. | 6723 // - a BytecodeArray for the interpreter [HasBytecodeArray()]. |
6724 // In the long run we don't want all functions to have this field but | 6724 // In the long run we don't want all functions to have this field but |
6725 // we can fix that when we have a better model for storing hidden data | 6725 // we can fix that when we have a better model for storing hidden data |
6726 // on objects. | 6726 // on objects. |
6727 DECL_ACCESSORS(function_data, Object) | 6727 DECL_ACCESSORS(function_data, Object) |
6728 | 6728 |
6729 inline bool IsApiFunction(); | 6729 inline bool IsApiFunction(); |
6730 inline FunctionTemplateInfo* get_api_func_data(); | 6730 inline FunctionTemplateInfo* get_api_func_data(); |
| 6731 inline void set_api_func_data(FunctionTemplateInfo* data); |
6731 inline bool HasBuiltinFunctionId(); | 6732 inline bool HasBuiltinFunctionId(); |
6732 inline BuiltinFunctionId builtin_function_id(); | 6733 inline BuiltinFunctionId builtin_function_id(); |
| 6734 inline void set_builtin_function_id(BuiltinFunctionId id); |
6733 inline bool HasBytecodeArray(); | 6735 inline bool HasBytecodeArray(); |
6734 inline BytecodeArray* bytecode_array(); | 6736 inline BytecodeArray* bytecode_array(); |
| 6737 inline void set_bytecode_array(BytecodeArray* bytecode); |
| 6738 inline void ClearBytecodeArray(); |
6735 | 6739 |
6736 // [script info]: Script from which the function originates. | 6740 // [script info]: Script from which the function originates. |
6737 DECL_ACCESSORS(script, Object) | 6741 DECL_ACCESSORS(script, Object) |
6738 | 6742 |
6739 // [num_literals]: Number of literals used by this function. | 6743 // [num_literals]: Number of literals used by this function. |
6740 inline int num_literals() const; | 6744 inline int num_literals() const; |
6741 inline void set_num_literals(int value); | 6745 inline void set_num_literals(int value); |
6742 | 6746 |
6743 // [start_position_and_type]: Field used to store both the source code | 6747 // [start_position_and_type]: Field used to store both the source code |
6744 // position, whether or not the function is a function expression, | 6748 // position, whether or not the function is a function expression, |
(...skipping 4088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10833 } | 10837 } |
10834 return value; | 10838 return value; |
10835 } | 10839 } |
10836 }; | 10840 }; |
10837 | 10841 |
10838 | 10842 |
10839 } // NOLINT, false-positive due to second-order macros. | 10843 } // NOLINT, false-positive due to second-order macros. |
10840 } // NOLINT, false-positive due to second-order macros. | 10844 } // NOLINT, false-positive due to second-order macros. |
10841 | 10845 |
10842 #endif // V8_OBJECTS_H_ | 10846 #endif // V8_OBJECTS_H_ |
OLD | NEW |