Skip to content

Commit d9d050d

Browse files
indutnyofrobots
authored andcommitted
deps: cherry-pick 68e89fb from v8's upstream
Original commit message: This commit adds some postmortem data that is otherwise unavailable. I have discovered need in those values when writing: https://github.com/indutny/llnode BUG= Review URL: https://codereview.chromium.org/1436473002 Cr-Commit-Position: refs/heads/master@{#31947} This postmortem information is useful for both object inspection, and function's context variables inspection. Ref: #3779 PR-URL: #4106 Reviewed-By: bnoordhuis - Ben Noordhuis <[email protected]> Reviewed-By: targos - Michaël Zasso <[email protected]> Reviewed-By: rvagg - Rod Vagg <[email protected]>
1 parent edfc8cd commit d9d050d

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

deps/v8/tools/gen-postmortem-metadata.py

+47
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,30 @@
9898
'value': 'PropertyDetails::FieldIndexField::kMask' },
9999
{ 'name': 'prop_index_shift',
100100
'value': 'PropertyDetails::FieldIndexField::kShift' },
101+
{ 'name': 'prop_representation_mask',
102+
'value': 'PropertyDetails::RepresentationField::kMask' },
103+
{ 'name': 'prop_representation_shift',
104+
'value': 'PropertyDetails::RepresentationField::kShift' },
105+
{ 'name': 'prop_representation_integer8',
106+
'value': 'Representation::Kind::kInteger8' },
107+
{ 'name': 'prop_representation_uinteger8',
108+
'value': 'Representation::Kind::kUInteger8' },
109+
{ 'name': 'prop_representation_integer16',
110+
'value': 'Representation::Kind::kInteger16' },
111+
{ 'name': 'prop_representation_uinteger16',
112+
'value': 'Representation::Kind::kUInteger16' },
113+
{ 'name': 'prop_representation_smi',
114+
'value': 'Representation::Kind::kSmi' },
115+
{ 'name': 'prop_representation_integer32',
116+
'value': 'Representation::Kind::kInteger32' },
117+
{ 'name': 'prop_representation_double',
118+
'value': 'Representation::Kind::kDouble' },
119+
{ 'name': 'prop_representation_heapobject',
120+
'value': 'Representation::Kind::kHeapObject' },
121+
{ 'name': 'prop_representation_tagged',
122+
'value': 'Representation::Kind::kTagged' },
123+
{ 'name': 'prop_representation_external',
124+
'value': 'Representation::Kind::kExternal' },
101125

102126
{ 'name': 'prop_desc_key',
103127
'value': 'DescriptorArray::kDescriptorKey' },
@@ -121,6 +145,10 @@
121145
'value': 'Map::ElementsKindBits::kShift' },
122146
{ 'name': 'bit_field3_dictionary_map_shift',
123147
'value': 'Map::DictionaryMap::kShift' },
148+
{ 'name': 'bit_field3_number_of_own_descriptors_mask',
149+
'value': 'Map::NumberOfOwnDescriptorsBits::kMask' },
150+
{ 'name': 'bit_field3_number_of_own_descriptors_shift',
151+
'value': 'Map::NumberOfOwnDescriptorsBits::kShift' },
124152

125153
{ 'name': 'off_fp_context',
126154
'value': 'StandardFrameConstants::kContextOffset' },
@@ -139,14 +167,31 @@
139167
'value': 'ScopeInfo::kStackLocalCount' },
140168
{ 'name': 'scopeinfo_idx_ncontextlocals',
141169
'value': 'ScopeInfo::kContextLocalCount' },
170+
{ 'name': 'scopeinfo_idx_ncontextglobals',
171+
'value': 'ScopeInfo::kContextGlobalCount' },
142172
{ 'name': 'scopeinfo_idx_first_vars',
143173
'value': 'ScopeInfo::kVariablePartIndex' },
174+
175+
{ 'name': 'sharedfunctioninfo_start_position_mask',
176+
'value': 'SharedFunctionInfo::kStartPositionMask' },
177+
{ 'name': 'sharedfunctioninfo_start_position_shift',
178+
'value': 'SharedFunctionInfo::kStartPositionShift' },
179+
180+
{ 'name': 'jsarray_buffer_was_neutered_mask',
181+
'value': 'JSArrayBuffer::WasNeutered::kMask' },
182+
{ 'name': 'jsarray_buffer_was_neutered_shift',
183+
'value': 'JSArrayBuffer::WasNeutered::kShift' },
144184
];
145185

146186
#
147187
# The following useful fields are missing accessors, so we define fake ones.
148188
#
149189
extras_accessors = [
190+
'JSFunction, context, Context, kContextOffset',
191+
'Context, closure_index, int, CLOSURE_INDEX',
192+
'Context, global_object_index, int, GLOBAL_OBJECT_INDEX',
193+
'Context, previous_index, int, PREVIOUS_INDEX',
194+
'Context, min_context_slots, int, MIN_CONTEXT_SLOTS',
150195
'HeapObject, map, Map, kMapOffset',
151196
'JSObject, elements, Object, kElementsOffset',
152197
'FixedArray, data, uintptr_t, kHeaderSize',
@@ -162,6 +207,7 @@
162207
'Map, prototype, Object, kPrototypeOffset',
163208
'NameDictionaryShape, prefix_size, int, kPrefixSize',
164209
'NameDictionaryShape, entry_size, int, kEntrySize',
210+
'NameDictionary, prefix_start_index, int, kPrefixStartIndex',
165211
'SeededNumberDictionaryShape, prefix_size, int, kPrefixSize',
166212
'UnseededNumberDictionaryShape, prefix_size, int, kPrefixSize',
167213
'NumberDictionaryShape, entry_size, int, kEntrySize',
@@ -173,6 +219,7 @@
173219
'SeqOneByteString, chars, char, kHeaderSize',
174220
'SeqTwoByteString, chars, char, kHeaderSize',
175221
'SharedFunctionInfo, code, Code, kCodeOffset',
222+
'SharedFunctionInfo, scope_info, ScopeInfo, kScopeInfoOffset',
176223
'SlicedString, parent, String, kParentOffset',
177224
'Code, instruction_start, uintptr_t, kHeaderSize',
178225
'Code, instruction_size, int, kInstructionSizeOffset',

0 commit comments

Comments
 (0)