Thanks, Erik!

http://codereview.chromium.org/149195/diff/1/7
File test/mjsunit/tools/tickprocessor.js (right):

http://codereview.chromium.org/149195/diff/1/7#newcode29
Line 29: // Files: tools/splaytree.js tools/codemap.js
tools/csvparser.js tools/consarray.js tools/profile.js
tools/profile_view.js tools/logreader.js tools/tickprocessor.js
On 2009/07/07 11:15:32, Erik Corry wrote:
> Over-long line.

This is an instruction to testcfg.py script to load these files. To fix
this, I've modified the script to search for several lines of files.

http://codereview.chromium.org/149195/diff/1/10
File tools/tickprocessor.js (right):

http://codereview.chromium.org/149195/diff/1/10#newcode520
Line 520: 'Show only ticks from JS VM state'],
On 2009/07/07 11:15:32, Erik Corry wrote:
> It would be better if this was an object with keys instead of an
array.  Then
> you could use dispatch.key, dispatch.default and dispatch.helpText
instead of
> dispatch[0], dispatch[1] etc. below.  You can defer this change to
another
> changelist if you like.

The downside of using a map here is that the definition will become too
wordy: several lines containing repetitive 'key', 'default', etc. Array
is just briefer. Since this is internal data, I would prefer to leave it
as is.

http://codereview.chromium.org/149195/diff/1/10#newcode596
Line 596: s = s + (new Array(len - s.length + 1).join(' '));
On 2009/07/07 11:15:32, Erik Corry wrote:
> I hope this part isn't performance critical in any way!  Couldn't you
just keep
> a long string of spaces around and use substring to chop off as many
as you need
> to pad.

No, this is just for printing an usage message.

But I also have a twin of this: padLeft which is used for printing
statistics. I've changed it to use memoization, so previously generated
paddings are reused.

http://codereview.chromium.org/149195

--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to