Commit 86bdb100 authored by Michael Starzinger's avatar Michael Starzinger Committed by Commit Bot

[turbofan] Remove obsolete {GenerateCodeForTesting} method.

R=jarin@chromium.org

Change-Id: I3a6759468f1a21b84ab9a294a2ca41d70b9cec99
Reviewed-on: https://chromium-review.googlesource.com/1123829Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#54222}
parent 70b838c1
......@@ -2154,15 +2154,6 @@ MaybeHandle<Code> Pipeline::GenerateCodeForTesting(
return pipeline.FinalizeCode();
}
// static
MaybeHandle<Code> Pipeline::GenerateCodeForTesting(
OptimizedCompilationInfo* info, Isolate* isolate, Graph* graph,
Schedule* schedule) {
auto call_descriptor = Linkage::ComputeIncoming(info->zone(), info);
return GenerateCodeForTesting(info, isolate, call_descriptor, graph,
schedule);
}
// static
MaybeHandle<Code> Pipeline::GenerateCodeForTesting(
OptimizedCompilationInfo* info, Isolate* isolate,
......
......@@ -10,7 +10,6 @@
#include "src/globals.h"
#include "src/objects.h"
#include "src/objects/code.h"
#include "src/zone/zone-containers.h"
namespace v8 {
namespace internal {
......@@ -40,7 +39,7 @@ class WasmCompilationData;
class Pipeline : public AllStatic {
public:
// Returns a new compilation job for the given function.
// Returns a new compilation job for the given JavaScript function.
static OptimizedCompilationJob* NewCompilationJob(Isolate* isolate,
Handle<JSFunction> function,
bool has_script);
......@@ -62,21 +61,13 @@ class Pipeline : public AllStatic {
uint32_t stub_key, int32_t builtin_index, JumpOptimizationInfo* jump_opt,
PoisoningMitigationLevel poisoning_level);
// Run the entire pipeline and generate a handle to a code object suitable for
// testing.
static MaybeHandle<Code> GenerateCodeForTesting(
OptimizedCompilationInfo* info, Isolate* isolate);
// ---------------------------------------------------------------------------
// The following methods are for testing purposes only. Avoid production use.
// ---------------------------------------------------------------------------
// Run the pipeline on a machine graph and generate code. If {schedule} is
// {nullptr}, then compute a new schedule for code generation.
// Run the pipeline on JavaScript bytecode and generate code.
static MaybeHandle<Code> GenerateCodeForTesting(
OptimizedCompilationInfo* info, Isolate* isolate, Graph* graph,
Schedule* schedule = nullptr);
// Run just the register allocator phases.
V8_EXPORT_PRIVATE static bool AllocateRegistersForTesting(
const RegisterConfiguration* config, InstructionSequence* sequence,
bool run_verifier);
OptimizedCompilationInfo* info, Isolate* isolate);
// Run the pipeline on a machine graph and generate code. If {schedule} is
// {nullptr}, then compute a new schedule for code generation.
......@@ -86,6 +77,11 @@ class Pipeline : public AllStatic {
Schedule* schedule = nullptr,
SourcePositionTable* source_positions = nullptr);
// Run just the register allocator phases.
V8_EXPORT_PRIVATE static bool AllocateRegistersForTesting(
const RegisterConfiguration* config, InstructionSequence* sequence,
bool run_verifier);
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(Pipeline);
};
......
......@@ -166,8 +166,10 @@ Handle<JSFunction> FunctionTester::CompileGraph(Graph* graph) {
Zone zone(isolate->allocator(), ZONE_NAME);
OptimizedCompilationInfo info(&zone, isolate, shared, function);
auto call_descriptor = Linkage::ComputeIncoming(&zone, &info);
Handle<Code> code =
Pipeline::GenerateCodeForTesting(&info, isolate, graph).ToHandleChecked();
Pipeline::GenerateCodeForTesting(&info, isolate, call_descriptor, graph)
.ToHandleChecked();
function->set_code(*code);
return function;
}
......
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