| 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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 V(TYPE_SWITCH_INFO_TYPE) \ | 396 V(TYPE_SWITCH_INFO_TYPE) \ |
| 397 V(ALLOCATION_MEMENTO_TYPE) \ | 397 V(ALLOCATION_MEMENTO_TYPE) \ |
| 398 V(ALLOCATION_SITE_TYPE) \ | 398 V(ALLOCATION_SITE_TYPE) \ |
| 399 V(SCRIPT_TYPE) \ | 399 V(SCRIPT_TYPE) \ |
| 400 V(TYPE_FEEDBACK_INFO_TYPE) \ | 400 V(TYPE_FEEDBACK_INFO_TYPE) \ |
| 401 V(ALIASED_ARGUMENTS_ENTRY_TYPE) \ | 401 V(ALIASED_ARGUMENTS_ENTRY_TYPE) \ |
| 402 V(BOX_TYPE) \ | 402 V(BOX_TYPE) \ |
| 403 V(PROMISE_RESOLVE_THENABLE_JOB_INFO_TYPE) \ | 403 V(PROMISE_RESOLVE_THENABLE_JOB_INFO_TYPE) \ |
| 404 V(PROMISE_REACTION_JOB_INFO_TYPE) \ | 404 V(PROMISE_REACTION_JOB_INFO_TYPE) \ |
| 405 V(PROTOTYPE_INFO_TYPE) \ | 405 V(PROTOTYPE_INFO_TYPE) \ |
| 406 V(TUPLE3_TYPE) \ |
| 406 V(CONTEXT_EXTENSION_TYPE) \ | 407 V(CONTEXT_EXTENSION_TYPE) \ |
| 407 V(MODULE_TYPE) \ | 408 V(MODULE_TYPE) \ |
| 408 \ | 409 \ |
| 409 V(FIXED_ARRAY_TYPE) \ | 410 V(FIXED_ARRAY_TYPE) \ |
| 410 V(FIXED_DOUBLE_ARRAY_TYPE) \ | 411 V(FIXED_DOUBLE_ARRAY_TYPE) \ |
| 411 V(SHARED_FUNCTION_INFO_TYPE) \ | 412 V(SHARED_FUNCTION_INFO_TYPE) \ |
| 412 V(WEAK_CELL_TYPE) \ | 413 V(WEAK_CELL_TYPE) \ |
| 413 V(TRANSITION_ARRAY_TYPE) \ | 414 V(TRANSITION_ARRAY_TYPE) \ |
| 414 \ | 415 \ |
| 415 V(JS_MESSAGE_OBJECT_TYPE) \ | 416 V(JS_MESSAGE_OBJECT_TYPE) \ |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 V(FUNCTION_TEMPLATE_INFO, FunctionTemplateInfo, function_template_info) \ | 521 V(FUNCTION_TEMPLATE_INFO, FunctionTemplateInfo, function_template_info) \ |
| 521 V(OBJECT_TEMPLATE_INFO, ObjectTemplateInfo, object_template_info) \ | 522 V(OBJECT_TEMPLATE_INFO, ObjectTemplateInfo, object_template_info) \ |
| 522 V(SCRIPT, Script, script) \ | 523 V(SCRIPT, Script, script) \ |
| 523 V(ALLOCATION_SITE, AllocationSite, allocation_site) \ | 524 V(ALLOCATION_SITE, AllocationSite, allocation_site) \ |
| 524 V(ALLOCATION_MEMENTO, AllocationMemento, allocation_memento) \ | 525 V(ALLOCATION_MEMENTO, AllocationMemento, allocation_memento) \ |
| 525 V(TYPE_FEEDBACK_INFO, TypeFeedbackInfo, type_feedback_info) \ | 526 V(TYPE_FEEDBACK_INFO, TypeFeedbackInfo, type_feedback_info) \ |
| 526 V(ALIASED_ARGUMENTS_ENTRY, AliasedArgumentsEntry, aliased_arguments_entry) \ | 527 V(ALIASED_ARGUMENTS_ENTRY, AliasedArgumentsEntry, aliased_arguments_entry) \ |
| 527 V(DEBUG_INFO, DebugInfo, debug_info) \ | 528 V(DEBUG_INFO, DebugInfo, debug_info) \ |
| 528 V(BREAK_POINT_INFO, BreakPointInfo, break_point_info) \ | 529 V(BREAK_POINT_INFO, BreakPointInfo, break_point_info) \ |
| 529 V(PROTOTYPE_INFO, PrototypeInfo, prototype_info) \ | 530 V(PROTOTYPE_INFO, PrototypeInfo, prototype_info) \ |
| 531 V(TUPLE3, Tuple3, tuple3) \ |
| 530 V(MODULE, Module, module) \ | 532 V(MODULE, Module, module) \ |
| 531 V(CONTEXT_EXTENSION, ContextExtension, context_extension) | 533 V(CONTEXT_EXTENSION, ContextExtension, context_extension) |
| 532 | 534 |
| 533 // We use the full 8 bits of the instance_type field to encode heap object | 535 // We use the full 8 bits of the instance_type field to encode heap object |
| 534 // instance types. The high-order bit (bit 7) is set if the object is not a | 536 // instance types. The high-order bit (bit 7) is set if the object is not a |
| 535 // string, and cleared if it is a string. | 537 // string, and cleared if it is a string. |
| 536 const uint32_t kIsNotStringMask = 0x80; | 538 const uint32_t kIsNotStringMask = 0x80; |
| 537 const uint32_t kStringTag = 0x0; | 539 const uint32_t kStringTag = 0x0; |
| 538 const uint32_t kNotStringTag = 0x80; | 540 const uint32_t kNotStringTag = 0x80; |
| 539 | 541 |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 697 PROMISE_REACTION_JOB_INFO_TYPE, | 699 PROMISE_REACTION_JOB_INFO_TYPE, |
| 698 DEBUG_INFO_TYPE, | 700 DEBUG_INFO_TYPE, |
| 699 BREAK_POINT_INFO_TYPE, | 701 BREAK_POINT_INFO_TYPE, |
| 700 FIXED_ARRAY_TYPE, | 702 FIXED_ARRAY_TYPE, |
| 701 SHARED_FUNCTION_INFO_TYPE, | 703 SHARED_FUNCTION_INFO_TYPE, |
| 702 CELL_TYPE, | 704 CELL_TYPE, |
| 703 WEAK_CELL_TYPE, | 705 WEAK_CELL_TYPE, |
| 704 TRANSITION_ARRAY_TYPE, | 706 TRANSITION_ARRAY_TYPE, |
| 705 PROPERTY_CELL_TYPE, | 707 PROPERTY_CELL_TYPE, |
| 706 PROTOTYPE_INFO_TYPE, | 708 PROTOTYPE_INFO_TYPE, |
| 709 TUPLE3_TYPE, |
| 707 CONTEXT_EXTENSION_TYPE, | 710 CONTEXT_EXTENSION_TYPE, |
| 708 MODULE_TYPE, | 711 MODULE_TYPE, |
| 709 | 712 |
| 710 // All the following types are subtypes of JSReceiver, which corresponds to | 713 // All the following types are subtypes of JSReceiver, which corresponds to |
| 711 // objects in the JS sense. The first and the last type in this range are | 714 // objects in the JS sense. The first and the last type in this range are |
| 712 // the two forms of function. This organization enables using the same | 715 // the two forms of function. This organization enables using the same |
| 713 // compares for checking the JS_RECEIVER and the NONCALLABLE_JS_OBJECT range. | 716 // compares for checking the JS_RECEIVER and the NONCALLABLE_JS_OBJECT range. |
| 714 JS_PROXY_TYPE, // FIRST_JS_RECEIVER_TYPE | 717 JS_PROXY_TYPE, // FIRST_JS_RECEIVER_TYPE |
| 715 JS_GLOBAL_OBJECT_TYPE, // FIRST_JS_OBJECT_TYPE | 718 JS_GLOBAL_OBJECT_TYPE, // FIRST_JS_OBJECT_TYPE |
| 716 JS_GLOBAL_PROXY_TYPE, | 719 JS_GLOBAL_PROXY_TYPE, |
| (...skipping 6086 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6803 | 6806 |
| 6804 // Bit field usage. | 6807 // Bit field usage. |
| 6805 static const int kShouldBeFastBit = 0; | 6808 static const int kShouldBeFastBit = 0; |
| 6806 | 6809 |
| 6807 private: | 6810 private: |
| 6808 DECL_ACCESSORS(object_create_map, Object) | 6811 DECL_ACCESSORS(object_create_map, Object) |
| 6809 | 6812 |
| 6810 DISALLOW_IMPLICIT_CONSTRUCTORS(PrototypeInfo); | 6813 DISALLOW_IMPLICIT_CONSTRUCTORS(PrototypeInfo); |
| 6811 }; | 6814 }; |
| 6812 | 6815 |
| 6816 class Tuple3 : public Struct { |
| 6817 public: |
| 6818 DECL_ACCESSORS(value1, Object) |
| 6819 DECL_ACCESSORS(value2, Object) |
| 6820 DECL_ACCESSORS(value3, Object) |
| 6821 |
| 6822 DECLARE_CAST(Tuple3) |
| 6823 |
| 6824 // Dispatched behavior. |
| 6825 DECLARE_PRINTER(Tuple3) |
| 6826 DECLARE_VERIFIER(Tuple3) |
| 6827 |
| 6828 static const int kValue1Offset = HeapObject::kHeaderSize; |
| 6829 static const int kValue2Offset = kValue1Offset + kPointerSize; |
| 6830 static const int kValue3Offset = kValue2Offset + kPointerSize; |
| 6831 static const int kSize = kValue3Offset + kPointerSize; |
| 6832 |
| 6833 private: |
| 6834 DISALLOW_IMPLICIT_CONSTRUCTORS(Tuple3); |
| 6835 }; |
| 6813 | 6836 |
| 6814 // Pair used to store both a ScopeInfo and an extension object in the extension | 6837 // Pair used to store both a ScopeInfo and an extension object in the extension |
| 6815 // slot of a block, catch, or with context. Needed in the rare case where a | 6838 // slot of a block, catch, or with context. Needed in the rare case where a |
| 6816 // declaration block scope (a "varblock" as used to desugar parameter | 6839 // declaration block scope (a "varblock" as used to desugar parameter |
| 6817 // destructuring) also contains a sloppy direct eval, or for with and catch | 6840 // destructuring) also contains a sloppy direct eval, or for with and catch |
| 6818 // scopes. (In no other case both are needed at the same time.) | 6841 // scopes. (In no other case both are needed at the same time.) |
| 6819 class ContextExtension : public Struct { | 6842 class ContextExtension : public Struct { |
| 6820 public: | 6843 public: |
| 6821 // [scope_info]: Scope info. | 6844 // [scope_info]: Scope info. |
| 6822 DECL_ACCESSORS(scope_info, ScopeInfo) | 6845 DECL_ACCESSORS(scope_info, ScopeInfo) |
| (...skipping 4671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11494 } | 11517 } |
| 11495 return value; | 11518 return value; |
| 11496 } | 11519 } |
| 11497 }; | 11520 }; |
| 11498 | 11521 |
| 11499 | 11522 |
| 11500 } // NOLINT, false-positive due to second-order macros. | 11523 } // NOLINT, false-positive due to second-order macros. |
| 11501 } // NOLINT, false-positive due to second-order macros. | 11524 } // NOLINT, false-positive due to second-order macros. |
| 11502 | 11525 |
| 11503 #endif // V8_OBJECTS_H_ | 11526 #endif // V8_OBJECTS_H_ |
| OLD | NEW |