Commit 8411f8f9 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[turbofan] Remove obsolete CodeGenerator::MakeCodeEpilogue.

R=bmeurer@chromium.org
BUG=v8:6792

Change-Id: I8ed3e6ec06bfba117781efc63d79bc7641b7ec24
Reviewed-on: https://chromium-review.googlesource.com/722641Reviewed-by: 's avatarBenedikt Meurer <bmeurer@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48633}
parent 9fe36eca
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include "src/compilation-info.h" #include "src/compilation-info.h"
#include "src/counters.h" #include "src/counters.h"
#include "src/debug/debug.h" #include "src/debug/debug.h"
#include "src/eh-frame.h"
#include "src/objects-inl.h" #include "src/objects-inl.h"
#include "src/runtime/runtime.h" #include "src/runtime/runtime.h"
...@@ -67,24 +66,6 @@ UNARY_MATH_FUNCTION(sqrt, CreateSqrtFunction) ...@@ -67,24 +66,6 @@ UNARY_MATH_FUNCTION(sqrt, CreateSqrtFunction)
#undef UNARY_MATH_FUNCTION #undef UNARY_MATH_FUNCTION
Handle<Code> CodeGenerator::MakeCodeEpilogue(TurboAssembler* tasm,
EhFrameWriter* eh_frame_writer,
CompilationInfo* info,
Handle<Object> self_reference) {
Isolate* isolate = info->isolate();
// Allocate and install the code.
CodeDesc desc;
tasm->GetCode(isolate, &desc);
if (eh_frame_writer) eh_frame_writer->GetEhFrame(&desc);
Handle<Code> code = isolate->factory()->NewCode(desc, info->code_kind(),
self_reference, false);
isolate->counters()->total_compiled_code_size()->Increment(
code->instruction_size());
return code;
}
// Print function's source if it was not printed before. // Print function's source if it was not printed before.
// Return a sequential id under which this function was printed. // Return a sequential id under which this function was printed.
static int PrintFunctionSource(CompilationInfo* info, static int PrintFunctionSource(CompilationInfo* info,
......
...@@ -7,41 +7,6 @@ ...@@ -7,41 +7,6 @@
#include "src/code-stubs.h" #include "src/code-stubs.h"
#include "src/globals.h" #include "src/globals.h"
#include "src/macro-assembler.h"
#include "src/runtime/runtime.h"
// Include the declaration of the architecture defined class CodeGenerator.
// The contract to the shared code is that the the CodeGenerator is a subclass
// of Visitor and that the following methods are available publicly:
// MakeCode
// MakeCodeEpilogue
// masm
// frame
// script
// has_valid_frame
// SetFrame
// DeleteFrame
// allocator
// AddDeferred
// in_spilled_code
// set_in_spilled_code
// RecordPositions
//
// These methods are either used privately by the shared code or implemented as
// shared code:
// CodeGenerator
// ~CodeGenerator
// Generate
// ComputeLazyCompile
// ProcessDeclarations
// DeclareGlobals
// CheckForInlineRuntimeCall
// AnalyzeCondition
// CodeForFunctionPosition
// CodeForReturnPosition
// CodeForStatementPosition
// CodeForDoWhileConditionPosition
// CodeForSourcePosition
#if V8_TARGET_ARCH_X64 #if V8_TARGET_ARCH_X64
#include "src/x64/codegen-x64.h" // NOLINT #include "src/x64/codegen-x64.h" // NOLINT
...@@ -51,16 +16,9 @@ namespace v8 { ...@@ -51,16 +16,9 @@ namespace v8 {
namespace internal { namespace internal {
class CompilationInfo; class CompilationInfo;
class EhFrameWriter;
class CodeGenerator { class CodeGenerator {
public: public:
// Allocate and install the code.
static Handle<Code> MakeCodeEpilogue(TurboAssembler* tasm,
EhFrameWriter* unwinding,
CompilationInfo* info,
Handle<Object> self_reference);
// Print the code after compiling it. // Print the code after compiling it.
static void PrintCode(Handle<Code> code, CompilationInfo* info); static void PrintCode(Handle<Code> code, CompilationInfo* info);
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "src/compiler/code-generator-impl.h" #include "src/compiler/code-generator-impl.h"
#include "src/compiler/linkage.h" #include "src/compiler/linkage.h"
#include "src/compiler/pipeline.h" #include "src/compiler/pipeline.h"
#include "src/eh-frame.h"
#include "src/frames.h" #include "src/frames.h"
#include "src/macro-assembler-inl.h" #include "src/macro-assembler-inl.h"
...@@ -277,9 +278,17 @@ void CodeGenerator::AssembleCode() { ...@@ -277,9 +278,17 @@ void CodeGenerator::AssembleCode() {
Handle<Code> CodeGenerator::FinalizeCode() { Handle<Code> CodeGenerator::FinalizeCode() {
if (result_ != kSuccess) return Handle<Code>(); if (result_ != kSuccess) return Handle<Code>();
Handle<Code> result = v8::internal::CodeGenerator::MakeCodeEpilogue( // Allocate and install the code.
tasm(), unwinding_info_writer_.eh_frame_writer(), info(), CodeDesc desc;
Handle<Object>()); tasm()->GetCode(isolate(), &desc);
if (unwinding_info_writer_.eh_frame_writer()) {
unwinding_info_writer_.eh_frame_writer()->GetEhFrame(&desc);
}
Handle<Code> result = isolate()->factory()->NewCode(desc, info()->code_kind(),
Handle<Object>(), false);
isolate()->counters()->total_compiled_code_size()->Increment(
result->instruction_size());
result->set_is_turbofanned(true); result->set_is_turbofanned(true);
result->set_stack_slots(frame()->GetTotalFrameSlotCount()); result->set_stack_slots(frame()->GetTotalFrameSlotCount());
result->set_safepoint_table_offset(safepoints()->GetCodeOffset()); result->set_safepoint_table_offset(safepoints()->GetCodeOffset());
......
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