summaryrefslogtreecommitdiff
path: root/tools/js2c.py
diff options
context:
space:
mode:
authorScott Blomquist <sblom@microsoft.com>2012-11-21 00:27:22 +0100
committerBert Belder <bertbelder@gmail.com>2012-11-21 01:21:53 +0100
commitf657ce685dddc1bf2d5b42f56d728df9176cceb9 (patch)
treeff03ca0dcd8c3260257c9b8c9e842829e7372db8 /tools/js2c.py
parentbc9388342f59ed5c69d69c7095e5a17fcbd80ba8 (diff)
downloadnodejs-f657ce685dddc1bf2d5b42f56d728df9176cceb9.tar.gz
nodejs-f657ce685dddc1bf2d5b42f56d728df9176cceb9.tar.bz2
nodejs-f657ce685dddc1bf2d5b42f56d728df9176cceb9.zip
windows: add tracing with performance counters
Patch by Henry Rawas and Scott Blomquist.
Diffstat (limited to 'tools/js2c.py')
-rwxr-xr-xtools/js2c.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/js2c.py b/tools/js2c.py
index 3406373b7..7c83c67ba 100755
--- a/tools/js2c.py
+++ b/tools/js2c.py
@@ -266,13 +266,17 @@ def JS2C(source, target):
# Locate the macros file name.
consts = {}
macros = {}
+ macro_lines = []
for s in source:
- if 'macros.py' == (os.path.split(str(s))[1]):
- (consts, macros) = ReadMacros(ReadLines(str(s)))
+ if (os.path.split(str(s))[1]).endswith('macros.py'):
+ macro_lines.extend(ReadLines(str(s)))
else:
modules.append(s)
+ # Process input from all *macro.py files
+ (consts, macros) = ReadMacros(macro_lines)
+
# Build source code lines
source_lines = [ ]
source_lines_empty = []