Reviewers: Benedikt Meurer,

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

[email protected]
TEST=cctest/test-pipeline

Please review this at https://codereview.chromium.org/1193543002/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+16, -18 lines):
  M src/compiler/instruction-selector.cc
  M src/compiler/js-generic-lowering.cc
  M test/cctest/compiler/test-pipeline.cc


Index: src/compiler/instruction-selector.cc
diff --git a/src/compiler/instruction-selector.cc b/src/compiler/instruction-selector.cc index 13a76da12ae0c6f090b288395dec147cf707b45e..3ea316fd95f0525421440e71ca533543b2c13646 100644
--- a/src/compiler/instruction-selector.cc
+++ b/src/compiler/instruction-selector.cc
@@ -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());
Index: src/compiler/js-generic-lowering.cc
diff --git a/src/compiler/js-generic-lowering.cc b/src/compiler/js-generic-lowering.cc index 60df598d7057fccb51140969f7255fc65cfdbf28..9132a3987b506dfb231b812eba862f060f1fc056 100644
--- a/src/compiler/js-generic-lowering.cc
+++ b/src/compiler/js-generic-lowering.cc
@@ -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:
Index: test/cctest/compiler/test-pipeline.cc
diff --git a/test/cctest/compiler/test-pipeline.cc b/test/cctest/compiler/test-pipeline.cc index b67af6ecf7d0047f45b1d689b3c3b1ca6fc02e9b..84550d502a5f5c7c311d3a8603bf5cbafd81eb23 100644
--- a/test/cctest/compiler/test-pipeline.cc
+++ b/test/cctest/compiler/test-pipeline.cc
@@ -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; })");
+}


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to