Index: src/typing.cc |
diff --git a/src/typing.cc b/src/typing.cc |
index 204ace6c9688e0bff9089ad16c462d95018c3393..22e4b219d9d05ffdacfba20d3278f8b852326465 100644 |
--- a/src/typing.cc |
+++ b/src/typing.cc |
@@ -26,24 +26,6 @@ AstTyper::AstTyper(CompilationInfo* info) |
} |
-#define RECURSE(call) \ |
- do { \ |
- DCHECK(!visitor->HasStackOverflow()); \ |
- call; \ |
- if (visitor->HasStackOverflow()) return; \ |
- } while (false) |
- |
-void AstTyper::Run(CompilationInfo* info) { |
- AstTyper* visitor = new(info->zone()) AstTyper(info); |
- Scope* scope = info->scope(); |
- |
- RECURSE(visitor->VisitDeclarations(scope->declarations())); |
- RECURSE(visitor->VisitStatements(info->literal()->body())); |
-} |
- |
-#undef RECURSE |
- |
- |
#ifdef OBJECT_PRINT |
static void PrintObserved(Variable* var, Object* value, Type* type) { |
OFStream os(stdout); |
@@ -122,6 +104,13 @@ void AstTyper::ObserveTypesAtOsrEntry(IterationStatement* stmt) { |
} while (false) |
+void AstTyper::Run() { |
+ Scope* scope = info_->scope(); |
+ RECURSE(VisitDeclarations(scope->declarations())); |
+ RECURSE(VisitStatements(info_->literal()->body())); |
+} |
+ |
+ |
void AstTyper::VisitStatements(ZoneList<Statement*>* stmts) { |
for (int i = 0; i < stmts->length(); ++i) { |
Statement* stmt = stmts->at(i); |