Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Unified Diff: src/typing.cc

Issue 1303843003: Don't allocate AstTyper with the zone allocator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: revised Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/typing.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/typing.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698