drive-by comments:

https://chromiumcodereview.appspot.com/9221011/diff/4001/src/ast.h
File src/ast.h (right):

https://chromiumcodereview.appspot.com/9221011/diff/4001/src/ast.h#newcode2349
src/ast.h:2349: class AstNodeFactory {
maybe make it BASE_EMBEDDED.

https://chromiumcodereview.appspot.com/9221011/diff/4001/src/parser.h
File src/parser.h (right):

https://chromiumcodereview.appspot.com/9221011/diff/4001/src/parser.h#newcode797
src/parser.h:797: AstNodeFactory* ast_node_factory_;
Embedded instance

AstNodeFactory ast_node_factory_;

instead of malloced with new/delete would be better.

https://chromiumcodereview.appspot.com/9221011/diff/4001/src/rewriter.cc
File src/rewriter.cc (right):

https://chromiumcodereview.appspot.com/9221011/diff/4001/src/rewriter.cc#newcode46
src/rewriter.cc:46: factory_ = new AstNodeFactory(isolate());
Why not just embed it in the instance? Then there is no need to call
new/delete (which is expensive if it is malloced)

https://chromiumcodereview.appspot.com/9221011/diff/4001/src/rewriter.cc#newcode57
src/rewriter.cc:57: return factory_;
return &factory_;

https://chromiumcodereview.appspot.com/9221011/diff/4001/src/rewriter.cc#newcode76
src/rewriter.cc:76: AstNodeFactory* factory_;
AstNodeFactory factory_;

https://chromiumcodereview.appspot.com/9221011/

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

Reply via email to