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 @@
#include "src/compilation-info.h"
#include "src/counters.h"
#include "src/debug/debug.h"
#include "src/eh-frame.h"
#include "src/objects-inl.h"
#include "src/runtime/runtime.h"
......@@ -67,24 +66,6 @@ UNARY_MATH_FUNCTION(sqrt, CreateSqrtFunction)
#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.
// Return a sequential id under which this function was printed.
static int PrintFunctionSource(CompilationInfo* info,
......
......@@ -7,41 +7,6 @@
#include "src/code-stubs.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
#include "src/x64/codegen-x64.h" // NOLINT
......@@ -51,16 +16,9 @@ namespace v8 {
namespace internal {
class CompilationInfo;
class EhFrameWriter;
class CodeGenerator {
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.
static void PrintCode(Handle<Code> code, CompilationInfo* info);
......
......@@ -11,6 +11,7 @@
#include "src/compiler/code-generator-impl.h"
#include "src/compiler/linkage.h"
#include "src/compiler/pipeline.h"
#include "src/eh-frame.h"
#include "src/frames.h"
#include "src/macro-assembler-inl.h"
......@@ -277,9 +278,17 @@ void CodeGenerator::AssembleCode() {
Handle<Code> CodeGenerator::FinalizeCode() {
if (result_ != kSuccess) return Handle<Code>();
Handle<Code> result = v8::internal::CodeGenerator::MakeCodeEpilogue(
tasm(), unwinding_info_writer_.eh_frame_writer(), info(),
Handle<Object>());
// Allocate and install the code.
CodeDesc desc;
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_stack_slots(frame()->GetTotalFrameSlotCount());
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