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

Unified Diff: src/objects.h

Issue 2065453002: [module] Track script "module code" status Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Use idiomatic variable names Created 4 years, 6 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/compiler.cc ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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,
« no previous file with comments | « src/compiler.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698