From: rmcilroy Date: Mon, 24 Aug 2015 10:23:39 +0000 (-0700) Subject: Add CompileInfo::GetDebugName() X-Git-Tag: upstream/4.7.83~716 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=53ac9fe8f9fa57f0f6d2960d5de92b9236bd871a;p=platform%2Fupstream%2Fv8.git Add CompileInfo::GetDebugName() Replaces all instances of the code which computed the debug name of a stub or function with calls to CompileInfo::GetDebugName instead. Also: - Removes useless parameter on CodeStub::GetMajorName - Removes FakeStubForTesting since it is no longer required - Adds CompileInfo::ShouldEnsureSpaceForLazyDeopt() to replace unclear calls to IsStub(). Review URL: https://codereview.chromium.org/1297203002 Cr-Commit-Position: refs/heads/master@{#30324} --- diff --git a/src/code-stubs-hydrogen.cc b/src/code-stubs-hydrogen.cc index 12e242be4..0a48ad468 100644 --- a/src/code-stubs-hydrogen.cc +++ b/src/code-stubs-hydrogen.cc @@ -131,7 +131,7 @@ bool CodeStubGraphBuilderBase::BuildGraph() { isolate()->counters()->code_stubs()->Increment(); if (FLAG_trace_hydrogen_stubs) { - const char* name = CodeStub::MajorName(stub()->MajorKey(), false); + const char* name = CodeStub::MajorName(stub()->MajorKey()); PrintF("-----------------------------------------------------------\n"); PrintF("Compiling stub %s using hydrogen\n", name); isolate()->GetHTracer()->TraceCompilation(info()); diff --git a/src/code-stubs.cc b/src/code-stubs.cc index e398d70ea..75b12e1db 100644 --- a/src/code-stubs.cc +++ b/src/code-stubs.cc @@ -187,8 +187,7 @@ Handle CodeStub::GetCode() { } -const char* CodeStub::MajorName(CodeStub::Major major_key, - bool allow_unknown_keys) { +const char* CodeStub::MajorName(CodeStub::Major major_key) { switch (major_key) { #define DEF_CASE(name) case name: return #name "Stub"; CODE_STUB_LIST(DEF_CASE) @@ -204,7 +203,7 @@ const char* CodeStub::MajorName(CodeStub::Major major_key, void CodeStub::PrintBaseName(std::ostream& os) const { // NOLINT - os << MajorName(MajorKey(), false); + os << MajorName(MajorKey()); } @@ -481,7 +480,7 @@ Handle GetFunction(Isolate* isolate, const char* name) { Handle TurboFanCodeStub::GenerateCode() { // Get the outer ("stub generator") function. - const char* name = CodeStub::MajorName(MajorKey(), false); + const char* name = CodeStub::MajorName(MajorKey()); Handle outer = GetFunction(isolate(), name); DCHECK_EQ(2, outer->shared()->length()); diff --git a/src/code-stubs.h b/src/code-stubs.h index c7de00b85..2e8f1076b 100644 --- a/src/code-stubs.h +++ b/src/code-stubs.h @@ -199,7 +199,7 @@ class CodeStub BASE_EMBEDDED { static uint32_t NoCacheKey() { return MajorKeyBits::encode(NoCache); } - static const char* MajorName(Major major_key, bool allow_unknown_keys); + static const char* MajorName(Major major_key); explicit CodeStub(Isolate* isolate) : minor_key_(0), isolate_(isolate) {} virtual ~CodeStub() {} @@ -316,29 +316,6 @@ class CodeStub BASE_EMBEDDED { }; -// TODO(svenpanne) This class is only used to construct a more or less sensible -// CompilationInfo for testing purposes, basically pretending that we are -// currently compiling some kind of code stub. Remove this when the pipeline and -// testing machinery is restructured in such a way that we don't have to come up -// with a CompilationInfo out of thin air, although we only need a few parts of -// it. -struct FakeStubForTesting : public CodeStub { - explicit FakeStubForTesting(Isolate* isolate) : CodeStub(isolate) {} - - // Only used by pipeline.cc's GetDebugName in DEBUG mode. - Major MajorKey() const override { return CodeStub::NoCache; } - - CallInterfaceDescriptor GetCallInterfaceDescriptor() const override { - return ContextOnlyDescriptor(isolate()); - } - - Handle GenerateCode() override { - UNREACHABLE(); - return Handle(); - } -}; - - #define DEFINE_CODE_STUB_BASE(NAME, SUPER) \ public: \ NAME(uint32_t key, Isolate* isolate) : SUPER(key, isolate) {} \ diff --git a/src/codegen.cc b/src/codegen.cc index cc5495bc1..0b130e987 100644 --- a/src/codegen.cc +++ b/src/codegen.cc @@ -121,16 +121,8 @@ void CodeGenerator::MakeCodePrologue(CompilationInfo* info, const char* kind) { } if (FLAG_trace_codegen || print_source || print_ast) { - PrintF("[generating %s code for %s function: ", kind, ftype); - if (info->IsStub()) { - const char* name = - CodeStub::MajorName(info->code_stub()->MajorKey(), true); - PrintF("%s", name == NULL ? "" : name); - } else { - AllowDeferredHandleDereference allow_deference_for_trace; - PrintF("%s", info->literal()->debug_name()->ToCString().get()); - } - PrintF("]\n"); + base::SmartArrayPointer name = info->GetDebugName(); + PrintF("[generating %s code for %s function: %s]", kind, ftype, name.get()); } #ifdef DEBUG @@ -153,11 +145,13 @@ Handle CodeGenerator::MakeCodeEpilogue(MacroAssembler* masm, 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()) + info->IsStub() + ? info->code_stub() + ? Code::ComputeFlags(info->code_stub()->GetCodeKind(), + info->code_stub()->GetICState(), + info->code_stub()->GetExtraICState(), + info->code_stub()->GetStubType()) + : Code::ComputeFlags(Code::STUB) : Code::ComputeFlags(info->IsOptimizing() ? Code::OPTIMIZED_FUNCTION : Code::FUNCTION); @@ -189,16 +183,7 @@ void CodeGenerator::PrintCode(Handle code, CompilationInfo* info) { (info->IsStub() && FLAG_print_code_stubs) || (info->IsOptimizing() && FLAG_print_opt_code)); if (print_code) { - const char* debug_name; - base::SmartArrayPointer debug_name_holder; - if (info->IsStub()) { - CodeStub::Major major_key = info->code_stub()->MajorKey(); - debug_name = CodeStub::MajorName(major_key, false); - } else { - debug_name_holder = info->literal()->debug_name()->ToCString(); - debug_name = debug_name_holder.get(); - } - + base::SmartArrayPointer debug_name = info->GetDebugName(); CodeTracer::Scope tracing_scope(info->isolate()->GetCodeTracer()); OFStream os(tracing_scope.file()); @@ -228,7 +213,7 @@ void CodeGenerator::PrintCode(Handle code, CompilationInfo* info) { if (info->IsOptimizing()) { if (FLAG_print_unopt_code && info->parse_info()) { os << "--- Unoptimized code ---\n"; - info->closure()->shared()->code()->Disassemble(debug_name, os); + info->closure()->shared()->code()->Disassemble(debug_name.get(), os); } os << "--- Optimized code ---\n" << "optimization_id = " << info->optimization_id() << "\n"; @@ -239,7 +224,7 @@ void CodeGenerator::PrintCode(Handle code, CompilationInfo* info) { FunctionLiteral* literal = info->literal(); os << "source_position = " << literal->start_position() << "\n"; } - code->Disassemble(debug_name, os); + code->Disassemble(debug_name.get(), os); os << "--- End code ---\n"; } #endif // ENABLE_DISASSEMBLER diff --git a/src/compiler.cc b/src/compiler.cc index 8879490e3..b391bf1a7 100644 --- a/src/compiler.cc +++ b/src/compiler.cc @@ -119,7 +119,7 @@ bool CompilationInfo::has_scope() const { CompilationInfo::CompilationInfo(ParseInfo* parse_info) - : CompilationInfo(parse_info, nullptr, BASE, parse_info->isolate(), + : CompilationInfo(parse_info, nullptr, nullptr, BASE, parse_info->isolate(), parse_info->zone()) { // Compiling for the snapshot typically results in different code than // compiling later on. This means that code recompiled with deoptimization @@ -148,11 +148,16 @@ CompilationInfo::CompilationInfo(ParseInfo* parse_info) CompilationInfo::CompilationInfo(CodeStub* stub, Isolate* isolate, Zone* zone) - : CompilationInfo(nullptr, stub, STUB, isolate, zone) {} + : CompilationInfo(nullptr, stub, CodeStub::MajorName(stub->MajorKey()), + STUB, isolate, zone) {} +CompilationInfo::CompilationInfo(const char* debug_name, Isolate* isolate, + Zone* zone) + : CompilationInfo(nullptr, nullptr, debug_name, STUB, isolate, zone) {} CompilationInfo::CompilationInfo(ParseInfo* parse_info, CodeStub* code_stub, - Mode mode, Isolate* isolate, Zone* zone) + const char* code_stub_debug_name, Mode mode, + Isolate* isolate, Zone* zone) : parse_info_(parse_info), isolate_(isolate), flags_(0), @@ -173,7 +178,8 @@ CompilationInfo::CompilationInfo(ParseInfo* parse_info, CodeStub* code_stub, parameter_count_(0), optimization_id_(-1), osr_expr_stack_height_(0), - function_type_(nullptr) { + function_type_(nullptr), + code_stub_debug_name_(code_stub_debug_name) { // Parameter count is number of stack parameters. if (code_stub_ != NULL) { CodeStubDescriptor descriptor(code_stub_); @@ -197,6 +203,13 @@ CompilationInfo::~CompilationInfo() { } +void CompilationInfo::SetStub(CodeStub* code_stub) { + SetMode(STUB); + code_stub_ = code_stub; + code_stub_debug_name_ = CodeStub::MajorName(code_stub->MajorKey()); +} + + int CompilationInfo::num_parameters() const { return has_scope() ? scope()->num_parameters() : parameter_count_; } @@ -302,6 +315,19 @@ void CompilationInfo::LogDeoptCallPosition(int pc_offset, int inlining_id) { } +base::SmartArrayPointer CompilationInfo::GetDebugName() const { + if (IsStub()) { + size_t len = strlen(code_stub_debug_name_) + 1; + base::SmartArrayPointer name(new char[len]); + memcpy(name.get(), code_stub_debug_name_, len); + return name; + } else { + AllowHandleDereference allow_deref; + return literal()->debug_name()->ToCString(); + } +} + + class HOptimizedGraphBuilderWithPositions: public HOptimizedGraphBuilder { public: explicit HOptimizedGraphBuilderWithPositions(CompilationInfo* info) diff --git a/src/compiler.h b/src/compiler.h index 7f7933301..66b8274f8 100644 --- a/src/compiler.h +++ b/src/compiler.h @@ -135,6 +135,8 @@ class CompilationInfo { explicit CompilationInfo(ParseInfo* parse_info); CompilationInfo(CodeStub* stub, Isolate* isolate, Zone* zone); + CompilationInfo(const char* code_stub_debug_name, Isolate* isolate, + Zone* zone); virtual ~CompilationInfo(); ParseInfo* parse_info() const { return parse_info_; } @@ -306,10 +308,7 @@ class CompilationInfo { } Type::FunctionType* function_type() const { return function_type_; } - void SetStub(CodeStub* code_stub) { - SetMode(STUB); - code_stub_ = code_stub; - } + void SetStub(CodeStub* code_stub); // Deoptimization support. bool HasDeoptimizationSupport() const { @@ -319,6 +318,7 @@ class CompilationInfo { DCHECK_EQ(BASE, mode_); SetFlag(kDeoptimizationSupport); } + bool ShouldEnsureSpaceForLazyDeopt() { return !IsStub(); } // Determines whether or not to insert a self-optimization header. bool ShouldSelfOptimize(); @@ -410,6 +410,8 @@ class CompilationInfo { inlined_functions_.push_back(inlined_function); } + base::SmartArrayPointer GetDebugName() const; + protected: ParseInfo* parse_info_; @@ -429,8 +431,9 @@ class CompilationInfo { STUB }; - CompilationInfo(ParseInfo* parse_info, CodeStub* code_stub, Mode mode, - Isolate* isolate, Zone* zone); + CompilationInfo(ParseInfo* parse_info, CodeStub* code_stub, + const char* code_stub_debug_name, Mode mode, Isolate* isolate, + Zone* zone); Isolate* isolate_; @@ -499,6 +502,8 @@ class CompilationInfo { Type::FunctionType* function_type_; + const char* code_stub_debug_name_; + DISALLOW_COPY_AND_ASSIGN(CompilationInfo); }; diff --git a/src/compiler/arm/code-generator-arm.cc b/src/compiler/arm/code-generator-arm.cc index dca6d4e3e..08d7426ad 100644 --- a/src/compiler/arm/code-generator-arm.cc +++ b/src/compiler/arm/code-generator-arm.cc @@ -1240,20 +1240,22 @@ void CodeGenerator::AddNopForSmiCodeInlining() { void CodeGenerator::EnsureSpaceForLazyDeopt() { + if (!info()->ShouldEnsureSpaceForLazyDeopt()) { + return; + } + int space_needed = Deoptimizer::patch_size(); - if (!info()->IsStub()) { - // Ensure that we have enough space after the previous lazy-bailout - // instruction for patching the code here. - int current_pc = masm()->pc_offset(); - if (current_pc < last_lazy_deopt_pc_ + space_needed) { - // Block literal pool emission for duration of padding. - v8::internal::Assembler::BlockConstPoolScope block_const_pool(masm()); - int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; - DCHECK_EQ(0, padding_size % v8::internal::Assembler::kInstrSize); - while (padding_size > 0) { - __ nop(); - padding_size -= v8::internal::Assembler::kInstrSize; - } + // Ensure that we have enough space after the previous lazy-bailout + // instruction for patching the code here. + int current_pc = masm()->pc_offset(); + if (current_pc < last_lazy_deopt_pc_ + space_needed) { + // Block literal pool emission for duration of padding. + v8::internal::Assembler::BlockConstPoolScope block_const_pool(masm()); + int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; + DCHECK_EQ(0, padding_size % v8::internal::Assembler::kInstrSize); + while (padding_size > 0) { + __ nop(); + padding_size -= v8::internal::Assembler::kInstrSize; } } } diff --git a/src/compiler/arm64/code-generator-arm64.cc b/src/compiler/arm64/code-generator-arm64.cc index 1b6857777..1559c8062 100644 --- a/src/compiler/arm64/code-generator-arm64.cc +++ b/src/compiler/arm64/code-generator-arm64.cc @@ -1346,22 +1346,24 @@ void CodeGenerator::AddNopForSmiCodeInlining() { __ movz(xzr, 0); } void CodeGenerator::EnsureSpaceForLazyDeopt() { + if (!info()->ShouldEnsureSpaceForLazyDeopt()) { + return; + } + int space_needed = Deoptimizer::patch_size(); - if (!info()->IsStub()) { - // Ensure that we have enough space after the previous lazy-bailout - // instruction for patching the code here. - intptr_t current_pc = masm()->pc_offset(); - - if (current_pc < (last_lazy_deopt_pc_ + space_needed)) { - intptr_t padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; - DCHECK((padding_size % kInstructionSize) == 0); - InstructionAccurateScope instruction_accurate( - masm(), padding_size / kInstructionSize); - - while (padding_size > 0) { - __ nop(); - padding_size -= kInstructionSize; - } + // Ensure that we have enough space after the previous lazy-bailout + // instruction for patching the code here. + intptr_t current_pc = masm()->pc_offset(); + + if (current_pc < (last_lazy_deopt_pc_ + space_needed)) { + intptr_t padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; + DCHECK((padding_size % kInstructionSize) == 0); + InstructionAccurateScope instruction_accurate( + masm(), padding_size / kInstructionSize); + + while (padding_size > 0) { + __ nop(); + padding_size -= kInstructionSize; } } } diff --git a/src/compiler/code-generator.cc b/src/compiler/code-generator.cc index 26683859b..12746b82a 100644 --- a/src/compiler/code-generator.cc +++ b/src/compiler/code-generator.cc @@ -147,7 +147,7 @@ Handle CodeGenerator::GenerateCode() { } // Ensure there is space for lazy deoptimization in the code. - if (!info->IsStub()) { + if (info->ShouldEnsureSpaceForLazyDeopt()) { int target_offset = masm()->pc_offset() + Deoptimizer::patch_size(); while (masm()->pc_offset() < target_offset) { masm()->nop(); @@ -193,7 +193,7 @@ Handle CodeGenerator::GenerateCode() { PopulateDeoptimizationData(result); // Ensure there is space for lazy deoptimization in the relocation info. - if (!info->IsStub()) { + if (!info->ShouldEnsureSpaceForLazyDeopt()) { Deoptimizer::EnsureRelocSpaceForLazyDeoptimization(result); } diff --git a/src/compiler/graph-visualizer.cc b/src/compiler/graph-visualizer.cc index bf3d8edea..527469686 100644 --- a/src/compiler/graph-visualizer.cc +++ b/src/compiler/graph-visualizer.cc @@ -18,6 +18,7 @@ #include "src/compiler/register-allocator.h" #include "src/compiler/schedule.h" #include "src/compiler/scheduler.h" +#include "src/interpreter/bytecodes.h" #include "src/ostreams.h" namespace v8 { @@ -28,14 +29,11 @@ namespace compiler { FILE* OpenVisualizerLogFile(CompilationInfo* info, const char* phase, const char* suffix, const char* mode) { EmbeddedVector filename(0); - base::SmartArrayPointer function_name; - if (info->has_shared_info()) { - function_name = info->shared_info()->DebugName()->ToCString(); - if (strlen(function_name.get()) > 0) { - SNPrintF(filename, "turbo-%s", function_name.get()); - } else { - SNPrintF(filename, "turbo-%p", static_cast(info)); - } + base::SmartArrayPointer debug_name = info->GetDebugName(); + if (strlen(debug_name.get()) > 0) { + SNPrintF(filename, "turbo-%s", debug_name.get()); + } else if (info->has_shared_info()) { + SNPrintF(filename, "turbo-%p", static_cast(info)); } else { SNPrintF(filename, "turbo-none-%s", phase); } @@ -491,15 +489,14 @@ void GraphC1Visualizer::PrintIntProperty(const char* name, int value) { void GraphC1Visualizer::PrintCompilation(const CompilationInfo* info) { Tag tag(this, "compilation"); + base::SmartArrayPointer name = info->GetDebugName(); if (info->IsOptimizing()) { - Handle name = info->literal()->debug_name(); - PrintStringProperty("name", name->ToCString().get()); + PrintStringProperty("name", name.get()); PrintIndent(); - os_ << "method \"" << name->ToCString().get() << ":" - << info->optimization_id() << "\"\n"; + os_ << "method \"" << name.get() << ":" << info->optimization_id() + << "\"\n"; } else { - CodeStub::Major major_key = info->code_stub()->MajorKey(); - PrintStringProperty("name", CodeStub::MajorName(major_key, false)); + PrintStringProperty("name", name.get()); PrintStringProperty("method", "stub"); } PrintLongProperty("date", diff --git a/src/compiler/ia32/code-generator-ia32.cc b/src/compiler/ia32/code-generator-ia32.cc index 4241a5e98..f102ef5cf 100644 --- a/src/compiler/ia32/code-generator-ia32.cc +++ b/src/compiler/ia32/code-generator-ia32.cc @@ -1518,15 +1518,17 @@ void CodeGenerator::AddNopForSmiCodeInlining() { __ nop(); } void CodeGenerator::EnsureSpaceForLazyDeopt() { + if (!info()->ShouldEnsureSpaceForLazyDeopt()) { + return; + } + int space_needed = Deoptimizer::patch_size(); - if (!info()->IsStub()) { - // Ensure that we have enough space after the previous lazy-bailout - // instruction for patching the code here. - int current_pc = masm()->pc_offset(); - if (current_pc < last_lazy_deopt_pc_ + space_needed) { - int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; - __ Nop(padding_size); - } + // Ensure that we have enough space after the previous lazy-bailout + // instruction for patching the code here. + int current_pc = masm()->pc_offset(); + if (current_pc < last_lazy_deopt_pc_ + space_needed) { + int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; + __ Nop(padding_size); } } diff --git a/src/compiler/mips/code-generator-mips.cc b/src/compiler/mips/code-generator-mips.cc index 560ef2669..cdd8bdb33 100644 --- a/src/compiler/mips/code-generator-mips.cc +++ b/src/compiler/mips/code-generator-mips.cc @@ -1361,21 +1361,23 @@ void CodeGenerator::AddNopForSmiCodeInlining() { void CodeGenerator::EnsureSpaceForLazyDeopt() { + if (!info()->ShouldEnsureSpaceForLazyDeopt()) { + return; + } + int space_needed = Deoptimizer::patch_size(); - if (!info()->IsStub()) { - // Ensure that we have enough space after the previous lazy-bailout - // instruction for patching the code here. - int current_pc = masm()->pc_offset(); - if (current_pc < last_lazy_deopt_pc_ + space_needed) { - // Block tramoline pool emission for duration of padding. - v8::internal::Assembler::BlockTrampolinePoolScope block_trampoline_pool( - masm()); - int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; - DCHECK_EQ(0, padding_size % v8::internal::Assembler::kInstrSize); - while (padding_size > 0) { - __ nop(); - padding_size -= v8::internal::Assembler::kInstrSize; - } + // Ensure that we have enough space after the previous lazy-bailout + // instruction for patching the code here. + int current_pc = masm()->pc_offset(); + if (current_pc < last_lazy_deopt_pc_ + space_needed) { + // Block tramoline pool emission for duration of padding. + v8::internal::Assembler::BlockTrampolinePoolScope block_trampoline_pool( + masm()); + int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; + DCHECK_EQ(0, padding_size % v8::internal::Assembler::kInstrSize); + while (padding_size > 0) { + __ nop(); + padding_size -= v8::internal::Assembler::kInstrSize; } } } diff --git a/src/compiler/mips64/code-generator-mips64.cc b/src/compiler/mips64/code-generator-mips64.cc index c72d9789b..670bd6743 100644 --- a/src/compiler/mips64/code-generator-mips64.cc +++ b/src/compiler/mips64/code-generator-mips64.cc @@ -1428,21 +1428,23 @@ void CodeGenerator::AddNopForSmiCodeInlining() { void CodeGenerator::EnsureSpaceForLazyDeopt() { + if (!info()->ShouldEnsureSpaceForLazyDeopt()) { + return; + } + int space_needed = Deoptimizer::patch_size(); - if (!info()->IsStub()) { - // Ensure that we have enough space after the previous lazy-bailout - // instruction for patching the code here. - int current_pc = masm()->pc_offset(); - if (current_pc < last_lazy_deopt_pc_ + space_needed) { - // Block tramoline pool emission for duration of padding. - v8::internal::Assembler::BlockTrampolinePoolScope block_trampoline_pool( - masm()); - int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; - DCHECK_EQ(0, padding_size % v8::internal::Assembler::kInstrSize); - while (padding_size > 0) { - __ nop(); - padding_size -= v8::internal::Assembler::kInstrSize; - } + // Ensure that we have enough space after the previous lazy-bailout + // instruction for patching the code here. + int current_pc = masm()->pc_offset(); + if (current_pc < last_lazy_deopt_pc_ + space_needed) { + // Block tramoline pool emission for duration of padding. + v8::internal::Assembler::BlockTrampolinePoolScope block_trampoline_pool( + masm()); + int padding_size = last_lazy_deopt_pc_ + space_needed - current_pc; + DCHECK_EQ(0, padding_size % v8::internal::Assembler::kInstrSize); + while (padding_size > 0) { + __ nop(); + padding_size -= v8::internal::Assembler::kInstrSize; } } } diff --git a/src/compiler/pipeline.cc b/src/compiler/pipeline.cc index a528cceea..b627f25ed 100644 --- a/src/compiler/pipeline.cc +++ b/src/compiler/pipeline.cc @@ -349,21 +349,6 @@ void TraceSchedule(CompilationInfo* info, Schedule* schedule) { } -base::SmartArrayPointer GetDebugName(CompilationInfo* info) { - if (info->code_stub() != NULL) { - CodeStub::Major major_key = info->code_stub()->MajorKey(); - const char* major_name = CodeStub::MajorName(major_key, false); - size_t len = strlen(major_name) + 1; - base::SmartArrayPointer name(new char[len]); - memcpy(name.get(), major_name, len); - return name; - } else { - AllowHandleDereference allow_deref; - return info->literal()->debug_name()->ToCString(); - } -} - - class AstGraphBuilderWithPositions final : public AstGraphBuilder { public: AstGraphBuilderWithPositions(Zone* local_zone, CompilationInfo* info, @@ -1015,8 +1000,7 @@ Handle Pipeline::GenerateCode() { OFStream json_of(json_file); Handle