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

Unified Diff: src/parsing/parser.cc

Issue 2065453002: [module] Track script "module code" status Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Extend compilation cache to recognize module code 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
Index: src/parsing/parser.cc
diff --git a/src/parsing/parser.cc b/src/parsing/parser.cc
index f17520a092672e2cb52b4e75a3498fe772ea9fd4..1f6190e3bc7aee60769b369d9d6a4a8cb33df022 100644
--- a/src/parsing/parser.cc
+++ b/src/parsing/parser.cc
@@ -75,6 +75,11 @@ ParseInfo::ParseInfo(Zone* zone, Handle<SharedFunctionInfo> shared)
Handle<Script> script(Script::cast(shared->script()));
set_script(script);
+
+ if (script->is_module()) {
+ set_module();
+ }
+
if (!script.is_null() && script->type() == Script::TYPE_NATIVE) {
set_native();
}
@@ -89,6 +94,10 @@ ParseInfo::ParseInfo(Zone* zone, Handle<Script> script) : ParseInfo(zone) {
set_unicode_cache(isolate_->unicode_cache());
set_script(script);
+ if (script->is_module()) {
+ set_module();
+ }
+
if (script->type() == Script::TYPE_NATIVE) {
set_native();
}

Powered by Google App Engine
This is Rietveld 408576698