summaryrefslogtreecommitdiff
path: root/deps/v8/tools/gcmole/gcmole.lua
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2014-05-12 05:07:46 +0200
committerFedor Indutny <fedor@indutny.com>2014-06-12 17:46:17 -0700
commit3a280b2034e3ea438cd3a2e7acd1a4cd40112ac5 (patch)
treeae194faf83fd22ad890b421c2ebd537db1a52534 /deps/v8/tools/gcmole/gcmole.lua
parent5413d9abe0df7e22bdb650a65f4c0ac462bbe147 (diff)
downloadnode-new-3a280b2034e3ea438cd3a2e7acd1a4cd40112ac5.tar.gz
deps: upgrade v8 to 3.26.33
Signed-off-by: Fedor Indutny <fedor@indutny.com>
Diffstat (limited to 'deps/v8/tools/gcmole/gcmole.lua')
-rw-r--r--deps/v8/tools/gcmole/gcmole.lua21
1 files changed, 14 insertions, 7 deletions
diff --git a/deps/v8/tools/gcmole/gcmole.lua b/deps/v8/tools/gcmole/gcmole.lua
index cd91a913d3..f1980a4596 100644
--- a/deps/v8/tools/gcmole/gcmole.lua
+++ b/deps/v8/tools/gcmole/gcmole.lua
@@ -116,7 +116,7 @@ function InvokeClangPluginForEachFile(filenames, cfg, func)
cfg.arch_define)
for _, filename in ipairs(filenames) do
log("-- %s", filename)
- local action = cmd_line .. " src/" .. filename .. " 2>&1"
+ local action = cmd_line .. " " .. filename .. " 2>&1"
if FLAGS.verbose then print('popen ', action) end
local pipe = io.popen(action)
func(filename, pipe:lines())
@@ -129,19 +129,26 @@ end
-- GYP file parsing
local function ParseGYPFile()
- local f = assert(io.open("tools/gyp/v8.gyp"), "failed to open GYP file")
- local gyp = f:read('*a')
- f:close()
+ local gyp = ""
+ local gyp_files = { "tools/gyp/v8.gyp", "test/cctest/cctest.gyp" }
+ for i = 1, #gyp_files do
+ local f = assert(io.open(gyp_files[i]), "failed to open GYP file")
+ local t = f:read('*a')
+ gyp = gyp .. t
+ f:close()
+ end
local result = {}
for condition, sources in
gyp:gmatch "'sources': %[.-### gcmole%((.-)%) ###(.-)%]" do
- local files = {}
+ if result[condition] == nil then result[condition] = {} end
for file in sources:gmatch "'%.%./%.%./src/([^']-%.cc)'" do
- table.insert(files, file)
+ table.insert(result[condition], "src/" .. file)
+ end
+ for file in sources:gmatch "'(test-[^']-%.cc)'" do
+ table.insert(result[condition], "test/cctest/" .. file)
end
- result[condition] = files
end
return result