| 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 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 // - AccessorPair | 137 // - AccessorPair |
| 138 // - AccessCheckInfo | 138 // - AccessCheckInfo |
| 139 // - InterceptorInfo | 139 // - InterceptorInfo |
| 140 // - CallHandlerInfo | 140 // - CallHandlerInfo |
| 141 // - TemplateInfo | 141 // - TemplateInfo |
| 142 // - FunctionTemplateInfo | 142 // - FunctionTemplateInfo |
| 143 // - ObjectTemplateInfo | 143 // - ObjectTemplateInfo |
| 144 // - Script | 144 // - Script |
| 145 // - DebugInfo | 145 // - DebugInfo |
| 146 // - BreakPointInfo | 146 // - BreakPointInfo |
| 147 // - StackFrameInfo |
| 147 // - CodeCache | 148 // - CodeCache |
| 148 // - PrototypeInfo | 149 // - PrototypeInfo |
| 149 // - Module | 150 // - Module |
| 150 // - ModuleInfoEntry | 151 // - ModuleInfoEntry |
| 151 // - WeakCell | 152 // - WeakCell |
| 152 // | 153 // |
| 153 // Formats of Object*: | 154 // Formats of Object*: |
| 154 // Smi: [31 bit signed int] 0 | 155 // Smi: [31 bit signed int] 0 |
| 155 // HeapObject: [32 bit direct pointer] (4 byte aligned) | 01 | 156 // HeapObject: [32 bit direct pointer] (4 byte aligned) | 01 |
| 156 | 157 |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 V(OBJECT_TEMPLATE_INFO_TYPE) \ | 351 V(OBJECT_TEMPLATE_INFO_TYPE) \ |
| 351 V(ALLOCATION_SITE_TYPE) \ | 352 V(ALLOCATION_SITE_TYPE) \ |
| 352 V(ALLOCATION_MEMENTO_TYPE) \ | 353 V(ALLOCATION_MEMENTO_TYPE) \ |
| 353 V(SCRIPT_TYPE) \ | 354 V(SCRIPT_TYPE) \ |
| 354 V(TYPE_FEEDBACK_INFO_TYPE) \ | 355 V(TYPE_FEEDBACK_INFO_TYPE) \ |
| 355 V(ALIASED_ARGUMENTS_ENTRY_TYPE) \ | 356 V(ALIASED_ARGUMENTS_ENTRY_TYPE) \ |
| 356 V(PROMISE_RESOLVE_THENABLE_JOB_INFO_TYPE) \ | 357 V(PROMISE_RESOLVE_THENABLE_JOB_INFO_TYPE) \ |
| 357 V(PROMISE_REACTION_JOB_INFO_TYPE) \ | 358 V(PROMISE_REACTION_JOB_INFO_TYPE) \ |
| 358 V(DEBUG_INFO_TYPE) \ | 359 V(DEBUG_INFO_TYPE) \ |
| 359 V(BREAK_POINT_INFO_TYPE) \ | 360 V(BREAK_POINT_INFO_TYPE) \ |
| 361 V(STACK_FRAME_INFO_TYPE) \ |
| 360 V(PROTOTYPE_INFO_TYPE) \ | 362 V(PROTOTYPE_INFO_TYPE) \ |
| 361 V(TUPLE2_TYPE) \ | 363 V(TUPLE2_TYPE) \ |
| 362 V(TUPLE3_TYPE) \ | 364 V(TUPLE3_TYPE) \ |
| 363 V(CONTEXT_EXTENSION_TYPE) \ | 365 V(CONTEXT_EXTENSION_TYPE) \ |
| 364 V(CONSTANT_ELEMENTS_PAIR_TYPE) \ | 366 V(CONSTANT_ELEMENTS_PAIR_TYPE) \ |
| 365 V(MODULE_TYPE) \ | 367 V(MODULE_TYPE) \ |
| 366 V(MODULE_INFO_ENTRY_TYPE) \ | 368 V(MODULE_INFO_ENTRY_TYPE) \ |
| 367 V(ASYNC_GENERATOR_REQUEST_TYPE) \ | 369 V(ASYNC_GENERATOR_REQUEST_TYPE) \ |
| 368 V(FIXED_ARRAY_TYPE) \ | 370 V(FIXED_ARRAY_TYPE) \ |
| 369 V(TRANSITION_ARRAY_TYPE) \ | 371 V(TRANSITION_ARRAY_TYPE) \ |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 V(ALLOCATION_MEMENTO, AllocationMemento, allocation_memento) \ | 523 V(ALLOCATION_MEMENTO, AllocationMemento, allocation_memento) \ |
| 522 V(SCRIPT, Script, script) \ | 524 V(SCRIPT, Script, script) \ |
| 523 V(TYPE_FEEDBACK_INFO, TypeFeedbackInfo, type_feedback_info) \ | 525 V(TYPE_FEEDBACK_INFO, TypeFeedbackInfo, type_feedback_info) \ |
| 524 V(ALIASED_ARGUMENTS_ENTRY, AliasedArgumentsEntry, aliased_arguments_entry) \ | 526 V(ALIASED_ARGUMENTS_ENTRY, AliasedArgumentsEntry, aliased_arguments_entry) \ |
| 525 V(PROMISE_RESOLVE_THENABLE_JOB_INFO, PromiseResolveThenableJobInfo, \ | 527 V(PROMISE_RESOLVE_THENABLE_JOB_INFO, PromiseResolveThenableJobInfo, \ |
| 526 promise_resolve_thenable_job_info) \ | 528 promise_resolve_thenable_job_info) \ |
| 527 V(PROMISE_REACTION_JOB_INFO, PromiseReactionJobInfo, \ | 529 V(PROMISE_REACTION_JOB_INFO, PromiseReactionJobInfo, \ |
| 528 promise_reaction_job_info) \ | 530 promise_reaction_job_info) \ |
| 529 V(DEBUG_INFO, DebugInfo, debug_info) \ | 531 V(DEBUG_INFO, DebugInfo, debug_info) \ |
| 530 V(BREAK_POINT_INFO, BreakPointInfo, break_point_info) \ | 532 V(BREAK_POINT_INFO, BreakPointInfo, break_point_info) \ |
| 533 V(STACK_FRAME_INFO, StackFrameInfo, stack_frame_info) \ |
| 531 V(PROTOTYPE_INFO, PrototypeInfo, prototype_info) \ | 534 V(PROTOTYPE_INFO, PrototypeInfo, prototype_info) \ |
| 532 V(TUPLE2, Tuple2, tuple2) \ | 535 V(TUPLE2, Tuple2, tuple2) \ |
| 533 V(TUPLE3, Tuple3, tuple3) \ | 536 V(TUPLE3, Tuple3, tuple3) \ |
| 534 V(CONTEXT_EXTENSION, ContextExtension, context_extension) \ | 537 V(CONTEXT_EXTENSION, ContextExtension, context_extension) \ |
| 535 V(CONSTANT_ELEMENTS_PAIR, ConstantElementsPair, constant_elements_pair) \ | 538 V(CONSTANT_ELEMENTS_PAIR, ConstantElementsPair, constant_elements_pair) \ |
| 536 V(MODULE, Module, module) \ | 539 V(MODULE, Module, module) \ |
| 537 V(MODULE_INFO_ENTRY, ModuleInfoEntry, module_info_entry) \ | 540 V(MODULE_INFO_ENTRY, ModuleInfoEntry, module_info_entry) \ |
| 538 V(ASYNC_GENERATOR_REQUEST, AsyncGeneratorRequest, async_generator_request) | 541 V(ASYNC_GENERATOR_REQUEST, AsyncGeneratorRequest, async_generator_request) |
| 539 | 542 |
| 540 // We use the full 8 bits of the instance_type field to encode heap object | 543 // We use the full 8 bits of the instance_type field to encode heap object |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 OBJECT_TEMPLATE_INFO_TYPE, | 695 OBJECT_TEMPLATE_INFO_TYPE, |
| 693 ALLOCATION_SITE_TYPE, | 696 ALLOCATION_SITE_TYPE, |
| 694 ALLOCATION_MEMENTO_TYPE, | 697 ALLOCATION_MEMENTO_TYPE, |
| 695 SCRIPT_TYPE, | 698 SCRIPT_TYPE, |
| 696 TYPE_FEEDBACK_INFO_TYPE, | 699 TYPE_FEEDBACK_INFO_TYPE, |
| 697 ALIASED_ARGUMENTS_ENTRY_TYPE, | 700 ALIASED_ARGUMENTS_ENTRY_TYPE, |
| 698 PROMISE_RESOLVE_THENABLE_JOB_INFO_TYPE, | 701 PROMISE_RESOLVE_THENABLE_JOB_INFO_TYPE, |
| 699 PROMISE_REACTION_JOB_INFO_TYPE, | 702 PROMISE_REACTION_JOB_INFO_TYPE, |
| 700 DEBUG_INFO_TYPE, | 703 DEBUG_INFO_TYPE, |
| 701 BREAK_POINT_INFO_TYPE, | 704 BREAK_POINT_INFO_TYPE, |
| 705 STACK_FRAME_INFO_TYPE, |
| 702 PROTOTYPE_INFO_TYPE, | 706 PROTOTYPE_INFO_TYPE, |
| 703 TUPLE2_TYPE, | 707 TUPLE2_TYPE, |
| 704 TUPLE3_TYPE, | 708 TUPLE3_TYPE, |
| 705 CONTEXT_EXTENSION_TYPE, | 709 CONTEXT_EXTENSION_TYPE, |
| 706 CONSTANT_ELEMENTS_PAIR_TYPE, | 710 CONSTANT_ELEMENTS_PAIR_TYPE, |
| 707 MODULE_TYPE, | 711 MODULE_TYPE, |
| 708 MODULE_INFO_ENTRY_TYPE, | 712 MODULE_INFO_ENTRY_TYPE, |
| 709 ASYNC_GENERATOR_REQUEST_TYPE, | 713 ASYNC_GENERATOR_REQUEST_TYPE, |
| 710 FIXED_ARRAY_TYPE, | 714 FIXED_ARRAY_TYPE, |
| 711 TRANSITION_ARRAY_TYPE, | 715 TRANSITION_ARRAY_TYPE, |
| (...skipping 10564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11276 | 11280 |
| 11277 static const int kSourcePositionIndex = Struct::kHeaderSize; | 11281 static const int kSourcePositionIndex = Struct::kHeaderSize; |
| 11278 static const int kBreakPointObjectsIndex = | 11282 static const int kBreakPointObjectsIndex = |
| 11279 kSourcePositionIndex + kPointerSize; | 11283 kSourcePositionIndex + kPointerSize; |
| 11280 static const int kSize = kBreakPointObjectsIndex + kPointerSize; | 11284 static const int kSize = kBreakPointObjectsIndex + kPointerSize; |
| 11281 | 11285 |
| 11282 private: | 11286 private: |
| 11283 DISALLOW_IMPLICIT_CONSTRUCTORS(BreakPointInfo); | 11287 DISALLOW_IMPLICIT_CONSTRUCTORS(BreakPointInfo); |
| 11284 }; | 11288 }; |
| 11285 | 11289 |
| 11290 class StackFrameInfo : public Struct { |
| 11291 public: |
| 11292 DECL_INT_ACCESSORS(line_number) |
| 11293 DECL_INT_ACCESSORS(column_number) |
| 11294 DECL_INT_ACCESSORS(script_id) |
| 11295 DECL_ACCESSORS(script_name, Object) |
| 11296 DECL_ACCESSORS(script_name_or_source_url, Object) |
| 11297 DECL_ACCESSORS(function_name, Object) |
| 11298 DECL_BOOLEAN_ACCESSORS(is_eval) |
| 11299 DECL_BOOLEAN_ACCESSORS(is_constructor) |
| 11300 DECL_INT_ACCESSORS(flag) |
| 11301 |
| 11302 DECLARE_CAST(StackFrameInfo) |
| 11303 |
| 11304 // Dispatched behavior. |
| 11305 DECLARE_PRINTER(StackFrameInfo) |
| 11306 DECLARE_VERIFIER(StackFrameInfo) |
| 11307 |
| 11308 static const int kLineNumberIndex = Struct::kHeaderSize; |
| 11309 static const int kColumnNumberIndex = kLineNumberIndex + kPointerSize; |
| 11310 static const int kScriptIdIndex = kColumnNumberIndex + kPointerSize; |
| 11311 static const int kScriptNameIndex = kScriptIdIndex + kPointerSize; |
| 11312 static const int kScriptNameOrSourceUrlIndex = |
| 11313 kScriptNameIndex + kPointerSize; |
| 11314 static const int kFunctionNameIndex = |
| 11315 kScriptNameOrSourceUrlIndex + kPointerSize; |
| 11316 static const int kFlagIndex = kFunctionNameIndex + kPointerSize; |
| 11317 static const int kSize = kFlagIndex + kPointerSize; |
| 11318 |
| 11319 private: |
| 11320 // Bit position in the flag, from least significant bit position. |
| 11321 static const int kIsEvalBit = 0; |
| 11322 static const int kIsConstructorBit = 1; |
| 11323 |
| 11324 DISALLOW_IMPLICIT_CONSTRUCTORS(StackFrameInfo); |
| 11325 }; |
| 11286 | 11326 |
| 11287 #define VISITOR_SYNCHRONIZATION_TAGS_LIST(V) \ | 11327 #define VISITOR_SYNCHRONIZATION_TAGS_LIST(V) \ |
| 11288 V(kStringTable, "string_table", "(Internalized strings)") \ | 11328 V(kStringTable, "string_table", "(Internalized strings)") \ |
| 11289 V(kExternalStringsTable, "external_strings_table", "(External strings)") \ | 11329 V(kExternalStringsTable, "external_strings_table", "(External strings)") \ |
| 11290 V(kStrongRootList, "strong_root_list", "(Strong roots)") \ | 11330 V(kStrongRootList, "strong_root_list", "(Strong roots)") \ |
| 11291 V(kSmiRootList, "smi_root_list", "(Smi roots)") \ | 11331 V(kSmiRootList, "smi_root_list", "(Smi roots)") \ |
| 11292 V(kBootstrapper, "bootstrapper", "(Bootstrapper)") \ | 11332 V(kBootstrapper, "bootstrapper", "(Bootstrapper)") \ |
| 11293 V(kTop, "top", "(Isolate)") \ | 11333 V(kTop, "top", "(Isolate)") \ |
| 11294 V(kRelocatable, "relocatable", "(Relocatable)") \ | 11334 V(kRelocatable, "relocatable", "(Relocatable)") \ |
| 11295 V(kDebug, "debug", "(Debugger)") \ | 11335 V(kDebug, "debug", "(Debugger)") \ |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11399 } | 11439 } |
| 11400 }; | 11440 }; |
| 11401 | 11441 |
| 11402 | 11442 |
| 11403 } // NOLINT, false-positive due to second-order macros. | 11443 } // NOLINT, false-positive due to second-order macros. |
| 11404 } // NOLINT, false-positive due to second-order macros. | 11444 } // NOLINT, false-positive due to second-order macros. |
| 11405 | 11445 |
| 11406 #include "src/objects/object-macros-undef.h" | 11446 #include "src/objects/object-macros-undef.h" |
| 11407 | 11447 |
| 11408 #endif // V8_OBJECTS_H_ | 11448 #endif // V8_OBJECTS_H_ |
| OLD | NEW |