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

Unified Diff: src/full-codegen.cc

Issue 918373002: Strip Interface class of most of its logic, make it all about Module exports (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Properly freeze interface at the end of ParseModule Created 5 years, 10 months 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/contexts.cc ('k') | src/globals.h » ('j') | no next file with comments »
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 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(
« no previous file with comments | « src/contexts.cc ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698