Commit ef2fd24e authored by mstarzinger's avatar mstarzinger Committed by Commit bot

Deprecate semi-correct CompilationInfo::flags predicate.

R=titzer@chromium.org

Review URL: https://codereview.chromium.org/1304053004

Cr-Commit-Position: refs/heads/master@{#30308}
parent 843d5d5c
......@@ -149,10 +149,18 @@ void CodeGenerator::MakeCodePrologue(CompilationInfo* info, const char* kind) {
Handle<Code> CodeGenerator::MakeCodeEpilogue(MacroAssembler* masm,
Code::Flags flags,
CompilationInfo* info) {
Isolate* isolate = info->isolate();
Code::Flags flags =
info->code_stub() != nullptr
? Code::ComputeFlags(info->code_stub()->GetCodeKind(),
info->code_stub()->GetICState(),
info->code_stub()->GetExtraICState(),
info->code_stub()->GetStubType())
: Code::ComputeFlags(info->IsOptimizing() ? Code::OPTIMIZED_FUNCTION
: Code::FUNCTION);
// Allocate and install the code.
CodeDesc desc;
bool is_crankshafted =
......
......@@ -76,7 +76,6 @@ class CodeGenerator {
// Allocate and install the code.
static Handle<Code> MakeCodeEpilogue(MacroAssembler* masm,
Code::Flags flags,
CompilationInfo* info);
// Print the code after compiling it.
......
......@@ -215,15 +215,6 @@ int CompilationInfo::num_heap_slots() const {
}
Code::Flags CompilationInfo::flags() const {
return code_stub() != nullptr
? Code::ComputeFlags(
code_stub()->GetCodeKind(), code_stub()->GetICState(),
code_stub()->GetExtraICState(), code_stub()->GetStubType())
: Code::ComputeFlags(Code::OPTIMIZED_FUNCTION);
}
// Primitive functions are unlikely to be picked up by the stack-walking
// profiler, so they trigger their own optimization when they're called
// for the SharedFunctionInfo::kCallsUntilPrimitiveOptimization-th time.
......
......@@ -173,7 +173,6 @@ class CompilationInfo {
int num_parameters_including_this() const;
bool is_this_defined() const;
int num_heap_slots() const;
Code::Flags flags() const;
void set_parameter_count(int parameter_count) {
DCHECK(IsStub());
......
......@@ -167,8 +167,8 @@ Handle<Code> CodeGenerator::GenerateCode() {
safepoints()->Emit(masm(), frame()->GetSpillSlotCount());
Handle<Code> result = v8::internal::CodeGenerator::MakeCodeEpilogue(
masm(), info->flags(), info);
Handle<Code> result =
v8::internal::CodeGenerator::MakeCodeEpilogue(masm(), info);
result->set_is_turbofanned(true);
result->set_stack_slots(frame()->GetSpillSlotCount());
result->set_safepoint_table_offset(safepoints()->GetCodeOffset());
......
......@@ -50,8 +50,7 @@ bool FullCodeGenerator::MakeCode(CompilationInfo* info) {
}
unsigned table_offset = cgen.EmitBackEdgeTable();
Code::Flags flags = Code::ComputeFlags(Code::FUNCTION);
Handle<Code> code = CodeGenerator::MakeCodeEpilogue(&masm, flags, info);
Handle<Code> code = CodeGenerator::MakeCodeEpilogue(&masm, info);
cgen.PopulateDeoptimizationData(code);
cgen.PopulateTypeFeedbackInfo(code);
cgen.PopulateHandlerTable(code);
......
......@@ -520,9 +520,7 @@ Handle<Code> LChunk::Codegen() {
if (generator.GenerateCode()) {
generator.CheckEnvironmentUsage();
CodeGenerator::MakeCodePrologue(info(), "optimized");
Code::Flags flags = info()->flags();
Handle<Code> code =
CodeGenerator::MakeCodeEpilogue(&assembler, flags, info());
Handle<Code> code = CodeGenerator::MakeCodeEpilogue(&assembler, info());
generator.FinishCode(code);
CommitDependencies(code);
code->set_is_crankshafted(true);
......
......@@ -19,6 +19,7 @@ static void RunPipeline(Zone* zone, const char* source) {
ParseInfo parse_info(zone, function);
CHECK(Compiler::ParseAndAnalyze(&parse_info));
CompilationInfo info(&parse_info);
info.SetOptimizing(BailoutId::None(), Handle<Code>(function->code()));
Pipeline pipeline(&info);
Handle<Code> code = pipeline.GenerateCode();
......
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