Commit 10d47da6 authored by mstarzinger's avatar mstarzinger Committed by Commit bot

[turbofan] Add test to keep generic pipeline on life support.

R=bmeurer@chromium.org
TEST=cctest/test-pipeline

Review URL: https://codereview.chromium.org/1193543002

Cr-Commit-Position: refs/heads/master@{#29098}
parent a940eb8a
......@@ -1037,12 +1037,6 @@ FrameStateDescriptor* InstructionSelector::GetFrameStateDescriptor(
Node* state) {
DCHECK(state->opcode() == IrOpcode::kFrameState);
DCHECK_EQ(kFrameStateInputCount, state->InputCount());
DCHECK_EQ(IrOpcode::kTypedStateValues,
state->InputAt(kFrameStateParametersInput)->opcode());
DCHECK_EQ(IrOpcode::kTypedStateValues,
state->InputAt(kFrameStateLocalsInput)->opcode());
DCHECK_EQ(IrOpcode::kTypedStateValues,
state->InputAt(kFrameStateStackInput)->opcode());
FrameStateCallInfo state_info = OpParameter<FrameStateCallInfo>(state);
int parameters = static_cast<int>(
......@@ -1094,10 +1088,6 @@ void InstructionSelector::AddFrameStateInputs(
Node* context = state->InputAt(kFrameStateContextInput);
Node* function = state->InputAt(kFrameStateFunctionInput);
DCHECK_EQ(IrOpcode::kTypedStateValues, parameters->op()->opcode());
DCHECK_EQ(IrOpcode::kTypedStateValues, locals->op()->opcode());
DCHECK_EQ(IrOpcode::kTypedStateValues, stack->op()->opcode());
DCHECK_EQ(descriptor->parameters_count(),
StateValuesAccess(parameters).size());
DCHECK_EQ(descriptor->locals_count(), StateValuesAccess(locals).size());
......
......@@ -54,7 +54,6 @@ Reduction JSGenericLowering::Reduce(Node* node) {
Node* test = graph()->NewNode(machine()->WordEqual(), condition,
jsgraph()->TrueConstant());
node->ReplaceInput(0, test);
break;
}
// Fall-through.
default:
......
......@@ -5,23 +5,18 @@
#include "src/v8.h"
#include "test/cctest/cctest.h"
#include "src/ast-numbering.h"
#include "src/compiler.h"
#include "src/compiler/pipeline.h"
#include "src/handles.h"
#include "src/parser.h"
#include "src/rewriter.h"
#include "src/scopes.h"
using namespace v8::internal;
using namespace v8::internal::compiler;
TEST(PipelineAdd) {
HandleAndZoneScope handles;
const char* source = "(function(a,b) { return a + b; })";
static void RunPipeline(Zone* zone, const char* source) {
Handle<JSFunction> function = v8::Utils::OpenHandle(
*v8::Handle<v8::Function>::Cast(CompileRun(source)));
ParseInfo parse_info(handles.main_zone(), function);
ParseInfo parse_info(zone, function);
CHECK(Compiler::ParseAndAnalyze(&parse_info));
CompilationInfo info(&parse_info);
......@@ -34,3 +29,17 @@ TEST(PipelineAdd) {
USE(pipeline);
#endif
}
TEST(PipelineTyped) {
HandleAndZoneScope handles;
FLAG_turbo_types = true;
RunPipeline(handles.main_zone(), "(function(a,b) { return a + b; })");
}
TEST(PipelineGeneric) {
HandleAndZoneScope handles;
FLAG_turbo_types = false;
RunPipeline(handles.main_zone(), "(function(a,b) { return a + b; })");
}
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