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

Unified Diff: src/compiler.h

Issue 881623002: Begin modernization of --harmony-modules (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Dealt with rossberg comments Created 5 years, 11 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-value-factory.h ('k') | src/parser.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « src/ast-value-factory.h ('k') | src/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698