Done. Andrii do you have time to review the python part?


https://codereview.chromium.org/931233002/diff/60001/tools/gcmole/gcmole.lua
File tools/gcmole/gcmole.lua (right):

https://codereview.chromium.org/931233002/diff/60001/tools/gcmole/gcmole.lua#newcode117
tools/gcmole/gcmole.lua:117: function IterTable(t)
On 2015/02/18 10:56:49, Vyacheslav Egorov (Google) wrote:
I'd write it

local function IterTable(t)
   return coroutine.wrap(function ()
     for i, v in ipairs(t) do
       coroutine.yield(v)
     end
   end)
end

or (which arguably is uglier)

local function IterTable(t)
   local f, n = ipairs(t), 0
   return function ()
     local v
     n, v = ipairs(t, n)
     return n
   end
end

but see the suggestion below which can eliminate the need for it
entirely.

Done.

https://codereview.chromium.org/931233002/diff/60001/tools/gcmole/gcmole.lua#newcode182
tools/gcmole/gcmole.lua:182: action = table.concat(parallel_cmd_line, "
")
On 2015/02/18 10:56:49, Vyacheslav Egorov (Google) wrote:
arguably you can just do

action = table.concat(parallel_cmd_line, " ") .. " " ..
table.concat(filenames,
" ")

and kill the loop above

Made it even shorter.

https://codereview.chromium.org/931233002/diff/60001/tools/gcmole/gcmole.lua#newcode185
tools/gcmole/gcmole.lua:185: local success = SplitResults(pipe:lines(),
func) and pipe:close()
On 2015/02/18 10:56:49, Vyacheslav Egorov (Google) wrote:
pipe will not be closed if SplitResults returns false.

Done.

https://codereview.chromium.org/931233002/

--
--
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