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

Unified Diff: src/ast/scopes.cc

Issue 1485053002: [cleanup] Remove modules-related cruft from Scope (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 1 month 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/ast/scopes.h ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.cc
diff --git a/src/ast/scopes.cc b/src/ast/scopes.cc
index 1eb5b66a9377df597dca77325581b715479281c1..1a1767c410a38115cc62b64695fc843c38448465 100644
--- a/src/ast/scopes.cc
+++ b/src/ast/scopes.cc
@@ -202,8 +202,6 @@ void Scope::SetDefaults(ScopeType scope_type, Scope* outer_scope,
num_stack_slots_ = 0;
num_heap_slots_ = 0;
num_global_slots_ = 0;
- num_modules_ = 0;
- module_var_ = NULL;
arity_ = 0;
has_simple_parameters_ = true;
rest_parameter_ = NULL;
@@ -718,16 +716,10 @@ bool Scope::AllocateVariables(ParseInfo* info, AstNodeFactory* factory) {
}
PropagateScopeInfo(outer_scope_calls_sloppy_eval);
- // 2) Allocate module instances.
- if (FLAG_harmony_modules && is_script_scope()) {
- DCHECK(num_modules_ == 0);
- AllocateModules();
- }
-
- // 3) Resolve variables.
+ // 2) Resolve variables.
if (!ResolveVariablesRecursively(info, factory)) return false;
- // 4) Allocate variables.
+ // 3) Allocate variables.
AllocateVariablesRecursively(info->isolate());
return true;
@@ -1636,23 +1628,6 @@ void Scope::AllocateVariablesRecursively(Isolate* isolate) {
}
-void Scope::AllocateModules() {
- DCHECK(is_script_scope());
- DCHECK(!already_resolved());
- for (int i = 0; i < inner_scopes_.length(); i++) {
- Scope* scope = inner_scopes_.at(i);
- if (scope->is_module_scope()) {
- DCHECK(!scope->already_resolved());
- DCHECK(scope->module_descriptor_->IsFrozen());
- DCHECK_NULL(scope->module_var_);
- scope->module_var_ =
- NewTemporary(ast_value_factory_->dot_module_string());
- ++num_modules_;
- }
- }
-}
-
-
int Scope::StackLocalCount() const {
return num_stack_slots() -
(function_ != NULL && function_->proxy()->var()->IsStackLocal() ? 1 : 0);
« no previous file with comments | « src/ast/scopes.h ('k') | test/cctest/test-parsing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698