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)); |