diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2014-03-31 15:07:59 +0200 |
---|---|---|
committer | Fedor Indutny <fedor@indutny.com> | 2014-04-02 00:05:25 +0400 |
commit | 5e24adbb90d085e6ac0e37ad6f016b1c94ce01d6 (patch) | |
tree | 994ccdc0f08196efbb442b1e241e81f87e64ebba /deps | |
parent | 67e078094b53861a5aa7e9354e33487d0bd4f73b (diff) | |
download | android-node-v8-5e24adbb90d085e6ac0e37ad6f016b1c94ce01d6.tar.gz android-node-v8-5e24adbb90d085e6ac0e37ad6f016b1c94ce01d6.tar.bz2 android-node-v8-5e24adbb90d085e6ac0e37ad6f016b1c94ce01d6.zip |
deps: fix up v8 postmortem codegen
Fix up overzealous parses, strip whitespace from class and field names.
Diffstat (limited to 'deps')
-rw-r--r-- | deps/v8/tools/gen-postmortem-metadata.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/deps/v8/tools/gen-postmortem-metadata.py b/deps/v8/tools/gen-postmortem-metadata.py index 2a42da5355..fff2e34b7c 100644 --- a/deps/v8/tools/gen-postmortem-metadata.py +++ b/deps/v8/tools/gen-postmortem-metadata.py @@ -434,9 +434,13 @@ def load_fields(): # Emit a block of constants. # def emit_set(out, consts): - for ii in range(0, len(consts)): - out.write('int v8dbg_%s = %s;\n' % - (consts[ii]['name'], consts[ii]['value'])); + # Fix up overzealous parses. This could be done inside the + # parsers but as there are several, it's easiest to do it here. + 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'); # |