Index: src/full-codegen.cc |
diff --git a/src/full-codegen.cc b/src/full-codegen.cc |
index 01f2fafefa6429e66ca7644893a368c9bdde0dc6..c437280659d708d1d846601d7b8d085dff98a2a1 100644 |
--- a/src/full-codegen.cc |
+++ b/src/full-codegen.cc |
@@ -603,7 +603,7 @@ void FullCodeGenerator::DoTest(const TestContext* context) { |
void FullCodeGenerator::AllocateModules(ZoneList<Declaration*>* declarations) { |
- DCHECK(scope_->is_global_scope()); |
+ DCHECK(scope_->is_script_scope()); |
for (int i = 0; i < declarations->length(); i++) { |
ModuleDeclaration* declaration = declarations->at(i)->AsModuleDeclaration(); |
@@ -644,8 +644,8 @@ void FullCodeGenerator::AllocateModules(ZoneList<Declaration*>* declarations) { |
// modules themselves, however, are simple data properties.) |
// |
// All modules have a _hosting_ scope/context, which (currently) is the |
-// (innermost) enclosing global scope. To deal with recursion, nested modules |
-// are hosted by the same scope as global ones. |
+// enclosing script scope. To deal with recursion, nested modules are hosted |
+// by the same scope as global ones. |
// |
// For every (global or nested) module literal, the hosting context has an |
// internal slot that points directly to the respective module context. This |
@@ -675,7 +675,7 @@ void FullCodeGenerator::AllocateModules(ZoneList<Declaration*>* declarations) { |
// |
// To deal with arbitrary recursion and aliases between modules, |
// they are created and initialized in several stages. Each stage applies to |
-// all modules in the hosting global scope, including nested ones. |
+// all modules in the hosting script scope, including nested ones. |
// |
// 1. Allocate: for each module _literal_, allocate the module contexts and |
// respective instance object and wire them up. This happens in the |
@@ -710,7 +710,7 @@ void FullCodeGenerator::VisitDeclarations( |
// This is a scope hosting modules. Allocate a descriptor array to pass |
// to the runtime for initialization. |
Comment cmnt(masm_, "[ Allocate modules"); |
- DCHECK(scope_->is_global_scope()); |
+ DCHECK(scope_->is_script_scope()); |
modules_ = |
isolate()->factory()->NewFixedArray(scope_->num_modules(), TENURED); |
module_index_ = 0; |