Chromium Code Reviews| Index: src/full-codegen.cc |
| diff --git a/src/full-codegen.cc b/src/full-codegen.cc |
| index 01f2fafefa6429e66ca7644893a368c9bdde0dc6..2f4b7f9adb466e71ec0a7e5fafb770c89fcff4f8 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,7 +644,7 @@ 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 |
| +// (innermost) enclosing script scope. To deal with recursion, nested modules |
|
rossberg
2014/11/12 09:49:27
Nit: can remove the "(innermost)"
Dmitry Lomov (no reviews)
2014/11/12 10:16:26
Done.
|
| // are hosted by the same scope as global ones. |
| // |
| // For every (global or nested) module literal, the hosting context has an |
| @@ -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; |