Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index 98351eaa39562a57e22a25812f8cbd866d96cf8b..7e5f80b25d1d157221c001167f631c5b152f5498 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -6597,6 +6597,11 @@ class Script: public Struct { |
inline v8::ScriptOriginOptions origin_options(); |
inline void set_origin_options(ScriptOriginOptions origin_options); |
+ // [is_module]: determines whether the script is an ES2015 module. Encoded in |
+ // the 'flags' field. |
+ inline bool is_module(); |
+ inline void set_is_module(bool value); |
+ |
DECLARE_CAST(Script) |
// If script source is an external string, check that the underlying |
@@ -6694,6 +6699,7 @@ class Script: public Struct { |
static const int kOriginOptionsSize = 3; |
static const int kOriginOptionsMask = ((1 << kOriginOptionsSize) - 1) |
<< kOriginOptionsShift; |
+ static const int kIsModuleBit = kOriginOptionsShift + kOriginOptionsSize; |
DISALLOW_IMPLICIT_CONSTRUCTORS(Script); |
}; |
@@ -8253,16 +8259,18 @@ class CompilationCacheTable: public HashTable<CompilationCacheTable, |
HashTableKey*> { |
public: |
// Find cached value for a string key, otherwise return null. |
- Handle<Object> Lookup( |
- Handle<String> src, Handle<Context> context, LanguageMode language_mode); |
+ Handle<Object> Lookup(Handle<String> src, Handle<Context> context, |
+ LanguageMode language_mode, bool is_module); |
Handle<Object> LookupEval( |
Handle<String> src, Handle<SharedFunctionInfo> shared, |
LanguageMode language_mode, int scope_position); |
Handle<Object> LookupRegExp(Handle<String> source, JSRegExp::Flags flags); |
- static Handle<CompilationCacheTable> Put( |
- Handle<CompilationCacheTable> cache, Handle<String> src, |
- Handle<Context> context, LanguageMode language_mode, |
- Handle<Object> value); |
+ static Handle<CompilationCacheTable> Put(Handle<CompilationCacheTable> cache, |
+ Handle<String> src, |
+ Handle<Context> context, |
+ LanguageMode language_mode, |
+ bool is_module, |
+ Handle<Object> value); |
static Handle<CompilationCacheTable> PutEval( |
Handle<CompilationCacheTable> cache, Handle<String> src, |
Handle<SharedFunctionInfo> context, Handle<SharedFunctionInfo> value, |