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

Unified Diff: src/scopes.cc

Issue 679943004: Remove AstConstructionVisitor/AstNullVisitor (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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/scopes.h ('k') | test/cctest/test-ast.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/scopes.cc
diff --git a/src/scopes.cc b/src/scopes.cc
index 51c00653c6165a6adc5832040bd27ab090467272..b90936ce480e69ca98d34b9624dc02216fb3bc6e 100644
--- a/src/scopes.cc
+++ b/src/scopes.cc
@@ -275,7 +275,7 @@ bool Scope::Analyze(CompilationInfo* info) {
// Allocate the variables.
{
- AstNodeFactory<AstNullVisitor> ast_node_factory(info->ast_value_factory());
+ AstNodeFactory ast_node_factory(info->ast_value_factory());
if (!top->AllocateVariables(info, &ast_node_factory)) return false;
}
@@ -417,7 +417,7 @@ Variable* Scope::LookupLocal(const AstRawString* name) {
Variable* Scope::LookupFunctionVar(const AstRawString* name,
- AstNodeFactory<AstNullVisitor>* factory) {
+ AstNodeFactory* factory) {
if (function_ != NULL && function_->proxy()->raw_name() == name) {
return function_->proxy()->var();
} else if (!scope_info_.is_null()) {
@@ -636,8 +636,7 @@ void Scope::CollectStackAndContextLocals(ZoneList<Variable*>* stack_locals,
}
-bool Scope::AllocateVariables(CompilationInfo* info,
- AstNodeFactory<AstNullVisitor>* factory) {
+bool Scope::AllocateVariables(CompilationInfo* info, AstNodeFactory* factory) {
// 1) Propagate scope information.
bool outer_scope_calls_sloppy_eval = false;
if (outer_scope_ != NULL) {
@@ -972,7 +971,7 @@ Variable* Scope::NonLocal(const AstRawString* name, VariableMode mode) {
Variable* Scope::LookupRecursive(VariableProxy* proxy,
BindingKind* binding_kind,
- AstNodeFactory<AstNullVisitor>* factory) {
+ AstNodeFactory* factory) {
DCHECK(binding_kind != NULL);
if (already_resolved() && is_with_scope()) {
// Short-cut: if the scope is deserialized from a scope info, variable
@@ -1034,9 +1033,8 @@ Variable* Scope::LookupRecursive(VariableProxy* proxy,
}
-bool Scope::ResolveVariable(CompilationInfo* info,
- VariableProxy* proxy,
- AstNodeFactory<AstNullVisitor>* factory) {
+bool Scope::ResolveVariable(CompilationInfo* info, VariableProxy* proxy,
+ AstNodeFactory* factory) {
DCHECK(info->global_scope()->is_global_scope());
// If the proxy is already resolved there's nothing to do
@@ -1143,9 +1141,8 @@ bool Scope::ResolveVariable(CompilationInfo* info,
}
-bool Scope::ResolveVariablesRecursively(
- CompilationInfo* info,
- AstNodeFactory<AstNullVisitor>* factory) {
+bool Scope::ResolveVariablesRecursively(CompilationInfo* info,
+ AstNodeFactory* factory) {
DCHECK(info->global_scope()->is_global_scope());
// Resolve unresolved variables for this scope.
« no previous file with comments | « src/scopes.h ('k') | test/cctest/test-ast.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698