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

Unified Diff: src/ast/variables.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/scopes.cc ('k') | src/contexts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ast/variables.h
diff --git a/src/ast/variables.h b/src/ast/variables.h
index e7f53eba8e78c57b92cdf93f9cd0100faf13d08d..dd99cac678ef8087d7225325c0d807a45be136a1 100644
--- a/src/ast/variables.h
+++ b/src/ast/variables.h
@@ -102,6 +102,11 @@ class Variable final : public ZoneObject {
int index() const { return index_; }
+ bool IsExport() const {
+ DCHECK(location() == VariableLocation::MODULE);
+ return index() == 0;
+ }
+
void AllocateTo(VariableLocation location, int index) {
DCHECK(IsUnallocated() ||
(this->location() == location && this->index() == index));
« no previous file with comments | « src/ast/scopes.cc ('k') | src/contexts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698