https://codereview.chromium.org/1288773007/diff/40001/src/ast-expression-visitor.cc
File src/ast-expression-visitor.cc (right):
https://codereview.chromium.org/1288773007/diff/40001/src/ast-expression-visitor.cc#newcode167
src/ast-expression-visitor.cc:167: ++depth_;
IIUC, you are using the depth counter as the expression depth, since you
don't increment the depth when you recurse on statements. Could you make
Recurse(Statement) and a Recurse(Expression) methods that do the stack
check, with the latter incrementing the depth?
https://codereview.chromium.org/1288773007/diff/40001/src/ast-expression-visitor.h
File src/ast-expression-visitor.h (right):
https://codereview.chromium.org/1288773007/diff/40001/src/ast-expression-visitor.h#newcode26
src/ast-expression-visitor.h:26: void* operator new(size_t size, Zone*
zone) { return zone->New(size); }
I don't think you want to define your own new here. I think you want to
extend ZoneObject and use "new (zone)". It's not safer, but it's the V8
way.
https://codereview.chromium.org/1288773007/diff/40001/test/cctest/expression-type-collector.cc
File test/cctest/expression-type-collector.cc (right):
https://codereview.chromium.org/1288773007/diff/40001/test/cctest/expression-type-collector.cc#newcode38
test/cctest/expression-type-collector.cc:38: void
ExpressionTypeCollector::VisitExpression(Expression* expression) {
Collecting the types as a string is nice for debugging, but for testing
purposes maybe it'd be better to collect a tree or something that's
easier to programmatically check? E.g. if these tests fail, we'll want
to debug why.
https://codereview.chromium.org/1288773007/
--
--
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.