http://codereview.chromium.org/1694011/diff/9001/10002
File include/v8.h (right):

http://codereview.chromium.org/1694011/diff/9001/10002#newcode772
include/v8.h:772: * This method will return 0 if it is unable to
retrieve the line number,
It's better to use a named constant for the "unable to retrieve" case.
E.g. look at the "Function" class.

http://codereview.chromium.org/1694011/diff/9001/10002#newcode781
include/v8.h:781: * This method will return 0 if it is unable to
retrieve the line number,
The same here.

http://codereview.chromium.org/1694011/diff/9001/10003
File src/top.cc (right):

http://codereview.chromium.org/1694011/diff/9001/10003#newcode380
src/top.cc:380: Handle<JSArray> stackTrace =
Factory::NewJSArray(frame_limit);
JSArray can be a bit slow because of dynamic expansion support. An
alternative approach is to count frames number first, then allocate a
fixed array.

http://codereview.chromium.org/1694011/diff/9001/10003#newcode408
src/top.cc:408: CStrVector(kColumnKeyData));
You could pre-allocate those strings as symbols (see SYMBOL_LIST in
heap.h) to avoid creating them every time. Or, at least, move their
allocation out of the loop.

http://codereview.chromium.org/1694011/show

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

Reply via email to