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 7345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7356 | 7356 |
7357 // A function has debug code if the compiled code has debug break slots. | 7357 // A function has debug code if the compiled code has debug break slots. |
7358 inline bool HasDebugCode(); | 7358 inline bool HasDebugCode(); |
7359 | 7359 |
7360 // [debug info]: Debug information. | 7360 // [debug info]: Debug information. |
7361 DECL_ACCESSORS(debug_info, Object) | 7361 DECL_ACCESSORS(debug_info, Object) |
7362 | 7362 |
7363 // The function's name if it is non-empty, otherwise the inferred name. | 7363 // The function's name if it is non-empty, otherwise the inferred name. |
7364 String* DebugName(); | 7364 String* DebugName(); |
7365 | 7365 |
| 7366 // The function cannot cause any side effects. |
| 7367 bool IsReadOnly(); |
| 7368 |
7366 // Used for flags such as --hydrogen-filter. | 7369 // Used for flags such as --hydrogen-filter. |
7367 bool PassesFilter(const char* raw_filter); | 7370 bool PassesFilter(const char* raw_filter); |
7368 | 7371 |
7369 // Position of the 'function' token in the script source. | 7372 // Position of the 'function' token in the script source. |
7370 inline int function_token_position() const; | 7373 inline int function_token_position() const; |
7371 inline void set_function_token_position(int function_token_position); | 7374 inline void set_function_token_position(int function_token_position); |
7372 | 7375 |
7373 // Position of this function in the script source. | 7376 // Position of this function in the script source. |
7374 inline int start_position() const; | 7377 inline int start_position() const; |
7375 inline void set_start_position(int start_position); | 7378 inline void set_start_position(int start_position); |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7465 | 7468 |
7466 // Whether this function was created from a FunctionDeclaration. | 7469 // Whether this function was created from a FunctionDeclaration. |
7467 DECL_BOOLEAN_ACCESSORS(is_declaration) | 7470 DECL_BOOLEAN_ACCESSORS(is_declaration) |
7468 | 7471 |
7469 // Whether this function was marked to be tiered up. | 7472 // Whether this function was marked to be tiered up. |
7470 DECL_BOOLEAN_ACCESSORS(marked_for_tier_up) | 7473 DECL_BOOLEAN_ACCESSORS(marked_for_tier_up) |
7471 | 7474 |
7472 // Indicates that asm->wasm conversion failed and should not be re-attempted. | 7475 // Indicates that asm->wasm conversion failed and should not be re-attempted. |
7473 DECL_BOOLEAN_ACCESSORS(is_asm_wasm_broken) | 7476 DECL_BOOLEAN_ACCESSORS(is_asm_wasm_broken) |
7474 | 7477 |
| 7478 // Indicates that the function cannot cause side-effects. |
| 7479 DECL_BOOLEAN_ACCESSORS(is_readonly) |
| 7480 |
| 7481 // Indicates that |is_readonly| has been computed and set. |
| 7482 DECL_BOOLEAN_ACCESSORS(is_readonly_computed) |
| 7483 |
7475 inline FunctionKind kind() const; | 7484 inline FunctionKind kind() const; |
7476 inline void set_kind(FunctionKind kind); | 7485 inline void set_kind(FunctionKind kind); |
7477 | 7486 |
7478 // Indicates whether or not the code in the shared function support | 7487 // Indicates whether or not the code in the shared function support |
7479 // deoptimization. | 7488 // deoptimization. |
7480 inline bool has_deoptimization_support(); | 7489 inline bool has_deoptimization_support(); |
7481 | 7490 |
7482 // Enable deoptimization support through recompiled code. | 7491 // Enable deoptimization support through recompiled code. |
7483 void EnableDeoptimizationSupport(Code* recompiled); | 7492 void EnableDeoptimizationSupport(Code* recompiled); |
7484 | 7493 |
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7751 kIsFunction, | 7760 kIsFunction, |
7752 kMustUseIgnitionTurbo, | 7761 kMustUseIgnitionTurbo, |
7753 kDontFlush, | 7762 kDontFlush, |
7754 kIsDeclaration, | 7763 kIsDeclaration, |
7755 // byte 2 | 7764 // byte 2 |
7756 kFunctionKind, | 7765 kFunctionKind, |
7757 // rest of byte 2 and first two bits of byte 3 are used by FunctionKind | 7766 // rest of byte 2 and first two bits of byte 3 are used by FunctionKind |
7758 // byte 3 | 7767 // byte 3 |
7759 kDeserialized = kFunctionKind + 10, | 7768 kDeserialized = kFunctionKind + 10, |
7760 kIsAsmWasmBroken, | 7769 kIsAsmWasmBroken, |
| 7770 kIsReadOnly, |
| 7771 kIsReadOnlyComputed, |
7761 kCompilerHintsCount, // Pseudo entry | 7772 kCompilerHintsCount, // Pseudo entry |
7762 }; | 7773 }; |
7763 // kFunctionKind has to be byte-aligned | 7774 // kFunctionKind has to be byte-aligned |
7764 STATIC_ASSERT((kFunctionKind % kBitsPerByte) == 0); | 7775 STATIC_ASSERT((kFunctionKind % kBitsPerByte) == 0); |
7765 | 7776 |
7766 class FunctionKindBits : public BitField<FunctionKind, kFunctionKind, 10> {}; | 7777 class FunctionKindBits : public BitField<FunctionKind, kFunctionKind, 10> {}; |
7767 | 7778 |
7768 class DeoptCountBits : public BitField<int, 0, 4> {}; | 7779 class DeoptCountBits : public BitField<int, 0, 4> {}; |
7769 class OptReenableTriesBits : public BitField<int, 4, 18> {}; | 7780 class OptReenableTriesBits : public BitField<int, 4, 18> {}; |
7770 class ICAgeBits : public BitField<int, 22, 8> {}; | 7781 class ICAgeBits : public BitField<int, 22, 8> {}; |
(...skipping 3980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11751 } | 11762 } |
11752 }; | 11763 }; |
11753 | 11764 |
11754 | 11765 |
11755 } // NOLINT, false-positive due to second-order macros. | 11766 } // NOLINT, false-positive due to second-order macros. |
11756 } // NOLINT, false-positive due to second-order macros. | 11767 } // NOLINT, false-positive due to second-order macros. |
11757 | 11768 |
11758 #include "src/objects/object-macros-undef.h" | 11769 #include "src/objects/object-macros-undef.h" |
11759 | 11770 |
11760 #endif // V8_OBJECTS_H_ | 11771 #endif // V8_OBJECTS_H_ |
OLD | NEW |