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

Unified Diff: src/full-codegen.cc

Issue 716833002: Various clean-ups after top-level lexical declarations are done. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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/factory.cc ('k') | src/globals.h » ('j') | src/globals.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/factory.cc ('k') | src/globals.h » ('j') | src/globals.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698