| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index f065d76dfa3007e3cc001d2957e9c6762a39915c..1f6ca5e631fc48545b2037287fce44379f980a80 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -146,6 +146,7 @@
|
| // - BreakPointInfo
|
| // - StackFrameInfo
|
| // - StackTraceInfo
|
| +// - SourcePositionTableWithFrameCache
|
| // - CodeCache
|
| // - PrototypeInfo
|
| // - Module
|
| @@ -361,6 +362,7 @@ const int kStubMinorKeyBits = kSmiValueSize - kStubMajorKeyBits - 1;
|
| V(BREAK_POINT_INFO_TYPE) \
|
| V(STACK_FRAME_INFO_TYPE) \
|
| V(STACK_TRACE_INFO_TYPE) \
|
| + V(SOURCE_POSITION_TABLE_WITH_FRAME_CACHE_TYPE) \
|
| V(PROTOTYPE_INFO_TYPE) \
|
| V(TUPLE2_TYPE) \
|
| V(TUPLE3_TYPE) \
|
| @@ -513,34 +515,36 @@ 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(STACK_TRACE_INFO, StackTraceInfo, stack_trace_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(STACK_TRACE_INFO, StackTraceInfo, stack_trace_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
|
| @@ -707,6 +711,7 @@ enum InstanceType {
|
| BREAK_POINT_INFO_TYPE,
|
| STACK_FRAME_INFO_TYPE,
|
| STACK_TRACE_INFO_TYPE,
|
| + SOURCE_POSITION_TABLE_WITH_FRAME_CACHE_TYPE,
|
| PROTOTYPE_INFO_TYPE,
|
| TUPLE2_TYPE,
|
| TUPLE3_TYPE,
|
| @@ -3298,8 +3303,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)
|
|
|
| @@ -3711,8 +3718,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.
|
| @@ -4244,6 +4254,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();
|
|
|
| @@ -10161,6 +10176,26 @@ class StackTraceInfo : public Struct {
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(StackTraceInfo);
|
| };
|
|
|
| +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)") \
|
|
|