| Index: src/ast.cc
|
| diff --git a/src/ast.cc b/src/ast.cc
|
| index e63ebdc09a6edee005d1e9fb902b44ea14d1dc42..8835fbb25bb01f96713a7d288e9c1bce5fdd308a 100644
|
| --- a/src/ast.cc
|
| +++ b/src/ast.cc
|
| @@ -47,11 +47,8 @@ Call Call::sentinel_(NULL, NULL, 0);
|
| // ----------------------------------------------------------------------------
|
| // All the Accept member functions for each syntax tree node type.
|
|
|
| -#define DECL_ACCEPT(type) \
|
| - void type::Accept(AstVisitor* v) { \
|
| - if (v->CheckStackOverflow()) return; \
|
| - v->Visit##type(this); \
|
| - }
|
| +#define DECL_ACCEPT(type) \
|
| + void type::Accept(AstVisitor* v) { v->Visit##type(this); }
|
| AST_NODE_LIST(DECL_ACCEPT)
|
| #undef DECL_ACCEPT
|
|
|
| @@ -241,6 +238,13 @@ bool Expression::GuaranteedSmiResult() {
|
| // ----------------------------------------------------------------------------
|
| // Implementation of AstVisitor
|
|
|
| +bool AstVisitor::CheckStackOverflow() {
|
| + if (stack_overflow_) return true;
|
| + StackLimitCheck check;
|
| + if (!check.HasOverflowed()) return false;
|
| + return (stack_overflow_ = true);
|
| +}
|
| +
|
|
|
| void AstVisitor::VisitDeclarations(ZoneList<Declaration*>* declarations) {
|
| for (int i = 0; i < declarations->length(); i++) {
|
|
|