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