Index: src/compiler.h |
diff --git a/src/compiler.h b/src/compiler.h |
index bd9b98c74507cb0a887ce8d38dcfe6eb930ba6cf..f56d40a8f943e67f896ca681d14699cff35ad060 100644 |
--- a/src/compiler.h |
+++ b/src/compiler.h |
@@ -89,7 +89,8 @@ class CompilationInfo { |
kInliningEnabled = 1 << 17, |
kTypingEnabled = 1 << 18, |
kDisableFutureOptimization = 1 << 19, |
- kToplevel = 1 << 20 |
+ kModule = 1 << 20, |
+ kToplevel = 1 << 21 |
}; |
CompilationInfo(Handle<JSFunction> closure, Zone* zone); |
@@ -105,6 +106,7 @@ class CompilationInfo { |
bool is_lazy() const { return GetFlag(kLazy); } |
bool is_eval() const { return GetFlag(kEval); } |
bool is_global() const { return GetFlag(kGlobal); } |
+ bool is_module() const { return GetFlag(kModule); } |
StrictMode strict_mode() const { |
return GetFlag(kStrictMode) ? STRICT : SLOPPY; |
} |
@@ -146,6 +148,11 @@ class CompilationInfo { |
SetFlag(kGlobal); |
} |
+ void MarkAsModule() { |
+ DCHECK(!is_lazy()); |
+ SetFlag(kModule); |
+ } |
+ |
void set_parameter_count(int parameter_count) { |
DCHECK(IsStub()); |
parameter_count_ = parameter_count; |