Commit 7a0d098c authored by Yang Guo's avatar Yang Guo Committed by Commit Bot

[snapshot] no longer pass serialize flag to compiler.

Bytecode compilation is not affected by whether it needs to
be serialized. Only TF-generated code objects included in the
snapshot are part of the startup snapshot. We therefore do
not need to pass the flag through the compilation info.

R=mstarzinger@chromium.org, verwaest@chromium.org

Change-Id: I761971febc5b6c27602c21cd5b0b2bffdd80bd5b
Reviewed-on: https://chromium-review.googlesource.com/758413Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
Reviewed-by: 's avatarToon Verwaest <verwaest@chromium.org>
Commit-Queue: Yang Guo <yangguo@chromium.org>
Cr-Commit-Position: refs/heads/master@{#49355}
parent 8de2e6db
...@@ -34,7 +34,6 @@ CompilationInfo::CompilationInfo(Zone* zone, Isolate* isolate, ...@@ -34,7 +34,6 @@ CompilationInfo::CompilationInfo(Zone* zone, Isolate* isolate,
if (parse_info->is_eval()) MarkAsEval(); if (parse_info->is_eval()) MarkAsEval();
if (parse_info->is_native()) MarkAsNative(); if (parse_info->is_native()) MarkAsNative();
if (parse_info->will_serialize()) MarkAsSerializing();
if (parse_info->collect_type_profile()) MarkAsCollectTypeProfile(); if (parse_info->collect_type_profile()) MarkAsCollectTypeProfile();
} }
......
...@@ -39,16 +39,15 @@ class V8_EXPORT_PRIVATE CompilationInfo final { ...@@ -39,16 +39,15 @@ class V8_EXPORT_PRIVATE CompilationInfo final {
enum Flag { enum Flag {
kIsEval = 1 << 0, kIsEval = 1 << 0,
kIsNative = 1 << 1, kIsNative = 1 << 1,
kSerializing = 1 << 2, kCollectTypeProfile = 1 << 2,
kCollectTypeProfile = 1 << 3, kAccessorInliningEnabled = 1 << 3,
kAccessorInliningEnabled = 1 << 4, kFunctionContextSpecializing = 1 << 4,
kFunctionContextSpecializing = 1 << 5, kInliningEnabled = 1 << 5,
kInliningEnabled = 1 << 6, kDisableFutureOptimization = 1 << 6,
kDisableFutureOptimization = 1 << 7, kSplittingEnabled = 1 << 7,
kSplittingEnabled = 1 << 8, kSourcePositionsEnabled = 1 << 8,
kSourcePositionsEnabled = 1 << 9, kBailoutOnUninitialized = 1 << 9,
kBailoutOnUninitialized = 1 << 10, kLoopPeelingEnabled = 1 << 10,
kLoopPeelingEnabled = 1 << 11,
}; };
// Construct a compilation info for unoptimized compilation. // Construct a compilation info for unoptimized compilation.
...@@ -109,9 +108,6 @@ class V8_EXPORT_PRIVATE CompilationInfo final { ...@@ -109,9 +108,6 @@ class V8_EXPORT_PRIVATE CompilationInfo final {
// Flags used by unoptimized compilation. // Flags used by unoptimized compilation.
void MarkAsSerializing() { SetFlag(kSerializing); }
bool will_serialize() const { return GetFlag(kSerializing); }
void MarkAsEval() { SetFlag(kIsEval); } void MarkAsEval() { SetFlag(kIsEval); }
bool is_eval() const { return GetFlag(kIsEval); } bool is_eval() const { return GetFlag(kIsEval); }
......
...@@ -1528,11 +1528,8 @@ MaybeHandle<SharedFunctionInfo> Compiler::GetSharedFunctionInfoForScript( ...@@ -1528,11 +1528,8 @@ MaybeHandle<SharedFunctionInfo> Compiler::GetSharedFunctionInfoForScript(
if (!context->IsNativeContext()) { if (!context->IsNativeContext()) {
parse_info.set_outer_scope_info(handle(context->scope_info())); parse_info.set_outer_scope_info(handle(context->scope_info()));
} }
if (ShouldProduceCodeCache(compile_options)) { parse_info.set_eager(compile_options ==
parse_info.set_will_serialize(); ScriptCompiler::kProduceFullCodeCache);
parse_info.set_eager(compile_options ==
ScriptCompiler::kProduceFullCodeCache);
}
parse_info.set_language_mode( parse_info.set_language_mode(
stricter_language_mode(parse_info.language_mode(), language_mode)); stricter_language_mode(parse_info.language_mode(), language_mode));
......
...@@ -1509,7 +1509,7 @@ struct InstructionSelectionPhase { ...@@ -1509,7 +1509,7 @@ struct InstructionSelectionPhase {
FLAG_turbo_instruction_scheduling FLAG_turbo_instruction_scheduling
? InstructionSelector::kEnableScheduling ? InstructionSelector::kEnableScheduling
: InstructionSelector::kDisableScheduling, : InstructionSelector::kDisableScheduling,
data->info()->will_serialize() data->info()->isolate()->serializer_enabled()
? InstructionSelector::kEnableSerialization ? InstructionSelector::kEnableSerialization
: InstructionSelector::kDisableSerialization); : InstructionSelector::kDisableSerialization);
if (!selector.SelectInstructions()) { if (!selector.SelectInstructions()) {
...@@ -1929,7 +1929,6 @@ Handle<Code> Pipeline::GenerateCodeForCodeStub( ...@@ -1929,7 +1929,6 @@ Handle<Code> Pipeline::GenerateCodeForCodeStub(
Schedule* schedule, Code::Kind kind, const char* debug_name, Schedule* schedule, Code::Kind kind, const char* debug_name,
uint32_t stub_key, JumpOptimizationInfo* jump_opt) { uint32_t stub_key, JumpOptimizationInfo* jump_opt) {
CompilationInfo info(CStrVector(debug_name), isolate, graph->zone(), kind); CompilationInfo info(CStrVector(debug_name), isolate, graph->zone(), kind);
if (isolate->serializer_enabled()) info.MarkAsSerializing();
info.set_stub_key(stub_key); info.set_stub_key(stub_key);
// Construct a pipeline for scheduling and code generation. // Construct a pipeline for scheduling and code generation.
......
...@@ -75,7 +75,6 @@ class V8_EXPORT_PRIVATE ParseInfo { ...@@ -75,7 +75,6 @@ class V8_EXPORT_PRIVATE ParseInfo {
FLAG_ACCESSOR(kAllowLazyParsing, allow_lazy_parsing, set_allow_lazy_parsing) FLAG_ACCESSOR(kAllowLazyParsing, allow_lazy_parsing, set_allow_lazy_parsing)
FLAG_ACCESSOR(kIsNamedExpression, is_named_expression, FLAG_ACCESSOR(kIsNamedExpression, is_named_expression,
set_is_named_expression) set_is_named_expression)
FLAG_ACCESSOR(kSerializing, will_serialize, set_will_serialize)
FLAG_ACCESSOR(kLazyCompile, lazy_compile, set_lazy_compile) FLAG_ACCESSOR(kLazyCompile, lazy_compile, set_lazy_compile)
FLAG_ACCESSOR(kCollectTypeProfile, collect_type_profile, FLAG_ACCESSOR(kCollectTypeProfile, collect_type_profile,
set_collect_type_profile) set_collect_type_profile)
...@@ -252,11 +251,10 @@ class V8_EXPORT_PRIVATE ParseInfo { ...@@ -252,11 +251,10 @@ class V8_EXPORT_PRIVATE ParseInfo {
kModule = 1 << 6, kModule = 1 << 6,
kAllowLazyParsing = 1 << 7, kAllowLazyParsing = 1 << 7,
kIsNamedExpression = 1 << 8, kIsNamedExpression = 1 << 8,
kSerializing = 1 << 9, kLazyCompile = 1 << 9,
kLazyCompile = 1 << 10, kCollectTypeProfile = 1 << 10,
kCollectTypeProfile = 1 << 11, kBlockCoverageEnabled = 1 << 11,
kBlockCoverageEnabled = 1 << 12, kIsAsmWasmBroken = 1 << 12,
kIsAsmWasmBroken = 1 << 13,
}; };
//------------- Inputs to parsing and scope analysis ----------------------- //------------- Inputs to parsing and scope analysis -----------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment