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

Unified Diff: src/ast/scopes.h

Issue 2199283002: [modules] Introduce new VariableLocation for module imports/exports. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comment Created 4 years, 4 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
Index: src/ast/scopes.h
diff --git a/src/ast/scopes.h b/src/ast/scopes.h
index 304b877bfacdf803319401502cea2d43778da90c..bcf61fe9ba2e146dbb0b8811ff73c4bc6fe9b0cb 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -578,6 +578,9 @@ class Scope: public ZoneObject {
// a context) or declaring temporaries.
Scope* ClosureScope();
+ // Find the module scope if there is one.
+ Scope* ModuleScope();
+
// Find the first (non-arrow) function or script scope. This is where
// 'this' is bound, and what determines the function kind.
Scope* ReceiverScope();
@@ -826,6 +829,9 @@ class Scope: public ZoneObject {
void AllocateVariablesRecursively(AstValueFactory* ast_value_factory);
void AllocateParameter(Variable* var, int index);
void AllocateReceiver();
+ // Set MODULE as VariableLocation for all variables that will live in some
+ // module's export table.
+ void AllocateModuleVariables();
// Resolve and fill in the allocation information for all variables
// in this scopes. Must be called *after* all scopes have been

Powered by Google App Engine
This is Rietveld 408576698