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,
if (parse_info->is_eval()) MarkAsEval();
if (parse_info->is_native()) MarkAsNative();
if (parse_info->will_serialize()) MarkAsSerializing();
if (parse_info->collect_type_profile()) MarkAsCollectTypeProfile();
}
......
......@@ -39,16 +39,15 @@ class V8_EXPORT_PRIVATE CompilationInfo final {
enum Flag {
kIsEval = 1 << 0,
kIsNative = 1 << 1,
kSerializing = 1 << 2,
kCollectTypeProfile = 1 << 3,
kAccessorInliningEnabled = 1 << 4,
kFunctionContextSpecializing = 1 << 5,
kInliningEnabled = 1 << 6,
kDisableFutureOptimization = 1 << 7,
kSplittingEnabled = 1 << 8,
kSourcePositionsEnabled = 1 << 9,
kBailoutOnUninitialized = 1 << 10,
kLoopPeelingEnabled = 1 << 11,
kCollectTypeProfile = 1 << 2,
kAccessorInliningEnabled = 1 << 3,
kFunctionContextSpecializing = 1 << 4,
kInliningEnabled = 1 << 5,
kDisableFutureOptimization = 1 << 6,
kSplittingEnabled = 1 << 7,
kSourcePositionsEnabled = 1 << 8,
kBailoutOnUninitialized = 1 << 9,
kLoopPeelingEnabled = 1 << 10,
};
// Construct a compilation info for unoptimized compilation.
......@@ -109,9 +108,6 @@ class V8_EXPORT_PRIVATE CompilationInfo final {
// Flags used by unoptimized compilation.
void MarkAsSerializing() { SetFlag(kSerializing); }
bool will_serialize() const { return GetFlag(kSerializing); }
void MarkAsEval() { SetFlag(kIsEval); }
bool is_eval() const { return GetFlag(kIsEval); }
......
......@@ -1528,11 +1528,8 @@ MaybeHandle<SharedFunctionInfo> Compiler::GetSharedFunctionInfoForScript(
if (!context->IsNativeContext()) {
parse_info.set_outer_scope_info(handle(context->scope_info()));
}
if (ShouldProduceCodeCache(compile_options)) {
parse_info.set_will_serialize();
parse_info.set_eager(compile_options ==
ScriptCompiler::kProduceFullCodeCache);
}
parse_info.set_eager(compile_options ==
ScriptCompiler::kProduceFullCodeCache);
parse_info.set_language_mode(
stricter_language_mode(parse_info.language_mode(), language_mode));
......
......@@ -1509,7 +1509,7 @@ struct InstructionSelectionPhase {
FLAG_turbo_instruction_scheduling
? InstructionSelector::kEnableScheduling
: InstructionSelector::kDisableScheduling,
data->info()->will_serialize()
data->info()->isolate()->serializer_enabled()
? InstructionSelector::kEnableSerialization
: InstructionSelector::kDisableSerialization);
if (!selector.SelectInstructions()) {
......@@ -1929,7 +1929,6 @@ Handle<Code> Pipeline::GenerateCodeForCodeStub(
Schedule* schedule, Code::Kind kind, const char* debug_name,
uint32_t stub_key, JumpOptimizationInfo* jump_opt) {
CompilationInfo info(CStrVector(debug_name), isolate, graph->zone(), kind);
if (isolate->serializer_enabled()) info.MarkAsSerializing();
info.set_stub_key(stub_key);
// Construct a pipeline for scheduling and code generation.
......
......@@ -75,7 +75,6 @@ class V8_EXPORT_PRIVATE ParseInfo {
FLAG_ACCESSOR(kAllowLazyParsing, allow_lazy_parsing, set_allow_lazy_parsing)
FLAG_ACCESSOR(kIsNamedExpression, 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(kCollectTypeProfile, collect_type_profile,
set_collect_type_profile)
......@@ -252,11 +251,10 @@ class V8_EXPORT_PRIVATE ParseInfo {
kModule = 1 << 6,
kAllowLazyParsing = 1 << 7,
kIsNamedExpression = 1 << 8,
kSerializing = 1 << 9,
kLazyCompile = 1 << 10,
kCollectTypeProfile = 1 << 11,
kBlockCoverageEnabled = 1 << 12,
kIsAsmWasmBroken = 1 << 13,
kLazyCompile = 1 << 9,
kCollectTypeProfile = 1 << 10,
kBlockCoverageEnabled = 1 << 11,
kIsAsmWasmBroken = 1 << 12,
};
//------------- 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