Index: src/full-codegen.cc |
diff --git a/src/full-codegen.cc b/src/full-codegen.cc |
index 349626b0e08181dcf90781cbc91c51464a384f94..8cc7f8205941b16a4294d704f4e1f1d62a06a79e 100644 |
--- a/src/full-codegen.cc |
+++ b/src/full-codegen.cc |
@@ -60,10 +60,6 @@ void BreakableStatementChecker::VisitModuleLiteral(ModuleLiteral* module) { |
} |
-void BreakableStatementChecker::VisitModuleVariable(ModuleVariable* module) { |
-} |
- |
- |
void BreakableStatementChecker::VisitModulePath(ModulePath* module) { |
} |
@@ -615,7 +611,7 @@ void FullCodeGenerator::AllocateModules(ZoneList<Declaration*>* declarations) { |
Comment cmnt(masm_, "[ Link nested modules"); |
Scope* scope = module->body()->scope(); |
Interface* interface = scope->interface(); |
- DCHECK(interface->IsModule() && interface->IsFrozen()); |
+ DCHECK(interface->IsFrozen()); |
interface->Allocate(scope->module_var()->index()); |
@@ -789,12 +785,6 @@ void FullCodeGenerator::VisitModuleLiteral(ModuleLiteral* module) { |
} |
-void FullCodeGenerator::VisitModuleVariable(ModuleVariable* module) { |
- // Nothing to do. |
- // The instance object is resolved statically through the module's interface. |
-} |
- |
- |
void FullCodeGenerator::VisitModulePath(ModulePath* module) { |
// Nothing to do. |
// The instance object is resolved statically through the module's interface. |
@@ -806,7 +796,7 @@ void FullCodeGenerator::VisitModuleUrl(ModuleUrl* module) { |
Scope* scope = module->body()->scope(); |
Interface* interface = scope_->interface(); |
- DCHECK(interface->IsModule() && interface->IsFrozen()); |
+ DCHECK(interface->IsFrozen()); |
DCHECK(!modules_.is_null()); |
DCHECK(module_index_ < modules_->length()); |
interface->Allocate(scope->module_var()->index()); |
@@ -1103,7 +1093,9 @@ void FullCodeGenerator::VisitBlock(Block* stmt) { |
void FullCodeGenerator::VisitModuleStatement(ModuleStatement* stmt) { |
Comment cmnt(masm_, "[ Module context"); |
- __ Push(Smi::FromInt(stmt->proxy()->interface()->Index())); |
+ DCHECK(stmt->body()->scope()->is_module_scope()); |
+ |
+ __ Push(Smi::FromInt(stmt->body()->scope()->interface()->Index())); |
__ Push(Smi::FromInt(0)); |
__ CallRuntime(Runtime::kPushModuleContext, 2); |
StoreToFrameField( |