| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index a7aabe23e0f856b18734e09f3fe4f40c7b4b508d..1d81c8452c08de860451339f04eb834e4d90d8a0 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -6456,6 +6456,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
|
| @@ -6553,6 +6558,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);
|
| };
|
| @@ -8105,16 +8111,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,
|
|
|