deps: fix up v8 postmortem codegen
Fix up overzealous parses, strip whitespace from class and field names.
This commit is contained in:
parent
67e078094b
commit
5e24adbb90
10
deps/v8/tools/gen-postmortem-metadata.py
vendored
10
deps/v8/tools/gen-postmortem-metadata.py
vendored
@ -434,9 +434,13 @@ def load_fields():
|
|||||||
# Emit a block of constants.
|
# Emit a block of constants.
|
||||||
#
|
#
|
||||||
def emit_set(out, consts):
|
def emit_set(out, consts):
|
||||||
for ii in range(0, len(consts)):
|
# Fix up overzealous parses. This could be done inside the
|
||||||
out.write('int v8dbg_%s = %s;\n' %
|
# parsers but as there are several, it's easiest to do it here.
|
||||||
(consts[ii]['name'], consts[ii]['value']));
|
ws = re.compile('\s+')
|
||||||
|
for const in consts:
|
||||||
|
name = ws.sub('', const['name'])
|
||||||
|
value = ws.sub('', str(const['value'])) # Can be a number.
|
||||||
|
out.write('int v8dbg_%s = %s;\n' % (name, value))
|
||||||
out.write('\n');
|
out.write('\n');
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user