Skip to content

Commit

Permalink
[postmortem] update Symbol and *String metadata
Browse files Browse the repository at this point in the history
Symbol and *String classes are now declared on Torque with
generateCppClass, which means they don't use macro accessors anymore. As
such, the gen-postmortem-metadata script is not able to automatically
detect fields for those classes. Define metadata for those fields
manually for now. In the future we might want to generate it from Torque
for consistency.

Also renamed a few *String fields metadata to match the expected format
(className__fieldName__fieldType). For more context:
nodejs/llnode#287 (comment).

R=bmeurer@chromium.org, hpayer@chromium.org, verwaest@chromium.org, yangguo@chromium.org

Change-Id: I82fe8315cdbfd1b8c64c6a8d5dc011b1edaec39e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1847783
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Cr-Commit-Position: refs/heads/master@{#64313}
  • Loading branch information
mmarchini authored and Commit Bot committed Oct 16, 2019
1 parent 0e40cf7 commit b38dfaf
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions tools/gen-postmortem-metadata.py
Expand Up @@ -229,15 +229,6 @@

{ 'name': 'class_SharedFunctionInfo__function_data__Object',
'value': 'SharedFunctionInfo::kFunctionDataOffset' },

{ 'name': 'class_ConsString__first_offset__int',
'value': 'ConsString::kFirstOffset' },
{ 'name': 'class_ConsString__second_offset__int',
'value': 'ConsString::kSecondOffset' },
{ 'name': 'class_SlicedString__offset_offset__int',
'value': 'SlicedString::kOffsetOffset' },
{ 'name': 'class_ThinString__actual_offset__int',
'value': 'ThinString::kActualOffset' },
];

#
Expand Down Expand Up @@ -286,6 +277,11 @@
'Code, instruction_size, int, kInstructionSizeOffset',
'String, length, int32_t, kLengthOffset',
'DescriptorArray, header_size, uintptr_t, kHeaderSize',
'ConsString, first, String, kFirstOffset',
'ConsString, second, String, kSecondOffset',
'SlicedString, offset, SMI, kOffsetOffset',
'ThinString, actual, String, kActualOffset',
'Symbol, name, Object, kNameOffset',
];

#
Expand Down

0 comments on commit b38dfaf

Please sign in to comment.