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

Unified Diff: src/ast/scopes.h

Issue 2302783002: [modules] Basic support of exports (Closed)
Patch Set: Disable module tests for deopt fuzzer. Created 4 years, 3 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/ast/scopeinfo.cc ('k') | src/ast/scopes.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/scopes.h
diff --git a/src/ast/scopes.h b/src/ast/scopes.h
index 0c10633e02fdc387cd7e238dafe9b98839b82744..1bec87f6636aeb1857d0217350b14c77adf907b9 100644
--- a/src/ast/scopes.h
+++ b/src/ast/scopes.h
@@ -371,6 +371,9 @@ class Scope: public ZoneObject {
// 'this' is bound, and what determines the function kind.
DeclarationScope* GetReceiverScope();
+ // Find the module scope, assuming there is one.
+ ModuleScope* GetModuleScope();
+
// Analyze() must have been called once to create the ScopeInfo.
Handle<ScopeInfo> scope_info() {
DCHECK(!scope_info_.is_null());
@@ -677,9 +680,9 @@ class DeclarationScope : public Scope {
}
// Parameters. The left-most parameter has index 0.
- // Only valid for function scopes.
+ // Only valid for function and module scopes.
Variable* parameter(int index) const {
- DCHECK(is_function_scope());
+ DCHECK(is_function_scope() || is_module_scope());
return params_[index];
}
« no previous file with comments | « src/ast/scopeinfo.cc ('k') | src/ast/scopes.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698