Revision: 20438
Author:   [email protected]
Date:     Wed Apr  2 13:36:43 2014 UTC
Log:      Merged r20436 into 3.25 branch.

tools: strip whitespace in gen-postmortem-metadata.py

[email protected]
BUG=

Review URL: https://codereview.chromium.org/222133004
http://code.google.com/p/v8/source/detail?r=20438

Modified:
 /branches/3.25/src/version.cc
 /branches/3.25/tools/gen-postmortem-metadata.py

=======================================
--- /branches/3.25/src/version.cc       Tue Apr  1 18:39:50 2014 UTC
+++ /branches/3.25/src/version.cc       Wed Apr  2 13:36:43 2014 UTC
@@ -35,7 +35,7 @@
 #define MAJOR_VERSION     3
 #define MINOR_VERSION     25
 #define BUILD_NUMBER      28
-#define PATCH_LEVEL       2
+#define PATCH_LEVEL       3
 // Use 1 for candidates and 0 otherwise.
 // (Boolean macro values are not supported by all preprocessors.)
 #define IS_CANDIDATE_VERSION 0
=======================================
--- /branches/3.25/tools/gen-postmortem-metadata.py Thu Jan 2 12:10:54 2014 UTC +++ /branches/3.25/tools/gen-postmortem-metadata.py Wed Apr 2 13:36:43 2014 UTC
@@ -434,9 +434,13 @@
 # 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');

 #

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to