Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index 947198b9caba452be8f2102519ae4849c7e15b2f..55f03f886f3007c5eea472fea3e6371d2534cfd5 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -145,6 +145,7 @@ |
// - DebugInfo |
// - BreakPointInfo |
// - StackFrameInfo |
+// - SourcePositionTableWithFrameCache |
// - CodeCache |
// - PrototypeInfo |
// - Module |
@@ -359,6 +360,7 @@ const int kStubMinorKeyBits = kSmiValueSize - kStubMajorKeyBits - 1; |
V(DEBUG_INFO_TYPE) \ |
V(BREAK_POINT_INFO_TYPE) \ |
V(STACK_FRAME_INFO_TYPE) \ |
+ V(SOURCE_POSITION_TABLE_WITH_FRAME_CACHE_TYPE) \ |
V(PROTOTYPE_INFO_TYPE) \ |
V(TUPLE2_TYPE) \ |
V(TUPLE3_TYPE) \ |
@@ -511,33 +513,35 @@ const int kStubMinorKeyBits = kSmiValueSize - kStubMajorKeyBits - 1; |
// Note that for subtle reasons related to the ordering or numerical values of |
// type tags, elements in this list have to be added to the INSTANCE_TYPE_LIST |
// manually. |
-#define STRUCT_LIST(V) \ |
- V(ACCESSOR_INFO, AccessorInfo, accessor_info) \ |
- V(ACCESSOR_PAIR, AccessorPair, accessor_pair) \ |
- V(ACCESS_CHECK_INFO, AccessCheckInfo, access_check_info) \ |
- V(INTERCEPTOR_INFO, InterceptorInfo, interceptor_info) \ |
- V(CALL_HANDLER_INFO, CallHandlerInfo, call_handler_info) \ |
- V(FUNCTION_TEMPLATE_INFO, FunctionTemplateInfo, function_template_info) \ |
- V(OBJECT_TEMPLATE_INFO, ObjectTemplateInfo, object_template_info) \ |
- V(ALLOCATION_SITE, AllocationSite, allocation_site) \ |
- V(ALLOCATION_MEMENTO, AllocationMemento, allocation_memento) \ |
- V(SCRIPT, Script, script) \ |
- V(TYPE_FEEDBACK_INFO, TypeFeedbackInfo, type_feedback_info) \ |
- V(ALIASED_ARGUMENTS_ENTRY, AliasedArgumentsEntry, aliased_arguments_entry) \ |
- V(PROMISE_RESOLVE_THENABLE_JOB_INFO, PromiseResolveThenableJobInfo, \ |
- promise_resolve_thenable_job_info) \ |
- V(PROMISE_REACTION_JOB_INFO, PromiseReactionJobInfo, \ |
- promise_reaction_job_info) \ |
- V(DEBUG_INFO, DebugInfo, debug_info) \ |
- V(BREAK_POINT_INFO, BreakPointInfo, break_point_info) \ |
- V(STACK_FRAME_INFO, StackFrameInfo, stack_frame_info) \ |
- V(PROTOTYPE_INFO, PrototypeInfo, prototype_info) \ |
- V(TUPLE2, Tuple2, tuple2) \ |
- V(TUPLE3, Tuple3, tuple3) \ |
- V(CONTEXT_EXTENSION, ContextExtension, context_extension) \ |
- V(CONSTANT_ELEMENTS_PAIR, ConstantElementsPair, constant_elements_pair) \ |
- V(MODULE, Module, module) \ |
- V(MODULE_INFO_ENTRY, ModuleInfoEntry, module_info_entry) \ |
+#define STRUCT_LIST(V) \ |
+ V(ACCESSOR_INFO, AccessorInfo, accessor_info) \ |
+ V(ACCESSOR_PAIR, AccessorPair, accessor_pair) \ |
+ V(ACCESS_CHECK_INFO, AccessCheckInfo, access_check_info) \ |
+ V(INTERCEPTOR_INFO, InterceptorInfo, interceptor_info) \ |
+ V(CALL_HANDLER_INFO, CallHandlerInfo, call_handler_info) \ |
+ V(FUNCTION_TEMPLATE_INFO, FunctionTemplateInfo, function_template_info) \ |
+ V(OBJECT_TEMPLATE_INFO, ObjectTemplateInfo, object_template_info) \ |
+ V(ALLOCATION_SITE, AllocationSite, allocation_site) \ |
+ V(ALLOCATION_MEMENTO, AllocationMemento, allocation_memento) \ |
+ V(SCRIPT, Script, script) \ |
+ V(TYPE_FEEDBACK_INFO, TypeFeedbackInfo, type_feedback_info) \ |
+ V(ALIASED_ARGUMENTS_ENTRY, AliasedArgumentsEntry, aliased_arguments_entry) \ |
+ V(PROMISE_RESOLVE_THENABLE_JOB_INFO, PromiseResolveThenableJobInfo, \ |
+ promise_resolve_thenable_job_info) \ |
+ V(PROMISE_REACTION_JOB_INFO, PromiseReactionJobInfo, \ |
+ promise_reaction_job_info) \ |
+ V(DEBUG_INFO, DebugInfo, debug_info) \ |
+ V(BREAK_POINT_INFO, BreakPointInfo, break_point_info) \ |
+ V(STACK_FRAME_INFO, StackFrameInfo, stack_frame_info) \ |
+ V(SOURCE_POSITION_TABLE_WITH_FRAME_CACHE, SourcePositionTableWithFrameCache, \ |
+ source_position_table_with_frame_cache) \ |
+ V(PROTOTYPE_INFO, PrototypeInfo, prototype_info) \ |
+ V(TUPLE2, Tuple2, tuple2) \ |
+ V(TUPLE3, Tuple3, tuple3) \ |
+ V(CONTEXT_EXTENSION, ContextExtension, context_extension) \ |
+ V(CONSTANT_ELEMENTS_PAIR, ConstantElementsPair, constant_elements_pair) \ |
+ V(MODULE, Module, module) \ |
+ V(MODULE_INFO_ENTRY, ModuleInfoEntry, module_info_entry) \ |
V(ASYNC_GENERATOR_REQUEST, AsyncGeneratorRequest, async_generator_request) |
// We use the full 8 bits of the instance_type field to encode heap object |
@@ -703,6 +707,7 @@ enum InstanceType { |
DEBUG_INFO_TYPE, |
BREAK_POINT_INFO_TYPE, |
STACK_FRAME_INFO_TYPE, |
+ SOURCE_POSITION_TABLE_WITH_FRAME_CACHE_TYPE, |
PROTOTYPE_INFO_TYPE, |
TUPLE2_TYPE, |
TUPLE3_TYPE, |
@@ -3294,8 +3299,10 @@ class BytecodeArray : public FixedArrayBase { |
DECL_ACCESSORS(handler_table, FixedArray) |
// Accessors for source position table containing mappings between byte code |
- // offset and source position. |
- DECL_ACCESSORS(source_position_table, ByteArray) |
+ // offset and source position or SourcePositionTableWithFrameCache. |
+ DECL_ACCESSORS(source_position_table, Object) |
+ |
+ inline ByteArray* SourcePositionTable(); |
DECLARE_CAST(BytecodeArray) |
@@ -3707,8 +3714,11 @@ class Code: public HeapObject { |
// [deoptimization_data]: Array containing data for deopt. |
DECL_ACCESSORS(deoptimization_data, FixedArray) |
- // [source_position_table]: ByteArray for the source positions table. |
- DECL_ACCESSORS(source_position_table, ByteArray) |
+ // [source_position_table]: ByteArray for the source positions table or |
+ // SourcePositionTableWithFrameCache. |
+ DECL_ACCESSORS(source_position_table, Object) |
+ |
+ inline ByteArray* SourcePositionTable(); |
// [trap_handler_index]: An index into the trap handler's master list of code |
// objects. |
@@ -4240,6 +4250,11 @@ class AbstractCode : public HeapObject { |
// Set the source position table. |
inline void set_source_position_table(ByteArray* source_position_table); |
+ inline Object* stack_frame_cache(); |
+ static void SetStackFrameCache(Handle<AbstractCode> abstract_code, |
+ Handle<UnseededNumberDictionary> cache); |
+ void DropStackFrameCache(); |
+ |
// Returns the size of instructions and the metadata. |
inline int SizeIncludingMetadata(); |
@@ -10143,6 +10158,26 @@ class StackFrameInfo : public Struct { |
DISALLOW_IMPLICIT_CONSTRUCTORS(StackFrameInfo); |
}; |
+class SourcePositionTableWithFrameCache : public Struct { |
+ public: |
+ DECL_ACCESSORS(source_position_table, ByteArray) |
+ DECL_ACCESSORS(stack_frame_cache, UnseededNumberDictionary) |
+ |
+ DECLARE_CAST(SourcePositionTableWithFrameCache) |
+ |
+ // Dispatched behavior. |
+ DECLARE_PRINTER(SourcePositionTableWithFrameCache) |
+ DECLARE_VERIFIER(SourcePositionTableWithFrameCache) |
+ |
+ static const int kSourcePositionTableIndex = Struct::kHeaderSize; |
+ static const int kStackFrameCacheIndex = |
+ kSourcePositionTableIndex + kPointerSize; |
+ static const int kSize = kStackFrameCacheIndex + kPointerSize; |
+ |
+ private: |
+ DISALLOW_IMPLICIT_CONSTRUCTORS(SourcePositionTableWithFrameCache); |
+}; |
+ |
#define VISITOR_SYNCHRONIZATION_TAGS_LIST(V) \ |
V(kStringTable, "string_table", "(Internalized strings)") \ |
V(kExternalStringsTable, "external_strings_table", "(External strings)") \ |