Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(271)

Unified Diff: test/cctest/compiler/test-js-typed-lowering.cc

Issue 1362783004: Revert of [turbofan] Checking of input counts on node creation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/cctest/compiler/test-js-typed-lowering.cc
diff --git a/test/cctest/compiler/test-js-typed-lowering.cc b/test/cctest/compiler/test-js-typed-lowering.cc
index 2378622b9dd85040fda843901c0e0f759361113d..520002c1661fa2a4dac0573b496bd4ede41ea73a 100644
--- a/test/cctest/compiler/test-js-typed-lowering.cc
+++ b/test/cctest/compiler/test-js-typed-lowering.cc
@@ -41,7 +41,7 @@
typer(main_isolate(), &graph),
context_node(NULL) {
graph.SetStart(graph.NewNode(common.Start(num_parameters)));
- graph.SetEnd(graph.NewNode(common.End(1), graph.start()));
+ graph.SetEnd(graph.NewNode(common.End(1)));
typer.Run();
}
@@ -79,7 +79,7 @@
Node* state_node = graph.NewNode(
common.FrameState(BailoutId::None(), OutputFrameStateCombine::Ignore(),
nullptr),
- parameters, locals, stack, context, UndefinedConstant(), graph.start());
+ parameters, locals, stack, context, UndefinedConstant());
return state_node;
}
@@ -125,23 +125,16 @@
Node* Binop(const Operator* op, Node* left, Node* right) {
// JS binops also require context, effect, and control
- std::vector<Node*> inputs;
- inputs.push_back(left);
- inputs.push_back(right);
- if (OperatorProperties::HasContextInput(op)) {
- inputs.push_back(context());
- }
- for (int i = 0; i < OperatorProperties::GetFrameStateInputCount(op); i++) {
- inputs.push_back(EmptyFrameState(context()));
- }
- if (op->EffectInputCount() > 0) {
- inputs.push_back(start());
- }
- if (op->ControlInputCount() > 0) {
- inputs.push_back(control());
- }
- return graph.NewNode(op, static_cast<int>(inputs.size()),
- &(inputs.front()));
+ if (OperatorProperties::GetFrameStateInputCount(op) == 1) {
+ return graph.NewNode(op, left, right, context(),
+ EmptyFrameState(context()), start(), control());
+ } else if (OperatorProperties::GetFrameStateInputCount(op) == 2) {
+ return graph.NewNode(op, left, right, context(),
+ EmptyFrameState(context()),
+ EmptyFrameState(context()), start(), control());
+ } else {
+ return graph.NewNode(op, left, right, context(), start(), control());
+ }
}
Node* Unop(const Operator* op, Node* input) {
@@ -835,18 +828,15 @@
Node* p1 = j == 1 ? l : r;
{
- Node* eq = strict
- ? R->graph.NewNode(R->javascript.StrictEqual(), p0, p1,
- R->context())
- : R->Binop(R->javascript.Equal(), p0, p1);
+ Node* eq = strict ? R->graph.NewNode(R->javascript.StrictEqual(), p0, p1)
+ : R->Binop(R->javascript.Equal(), p0, p1);
Node* r = R->reduce(eq);
R->CheckPureBinop(expected, r);
}
{
Node* ne = strict
- ? R->graph.NewNode(R->javascript.StrictNotEqual(), p0, p1,
- R->context())
+ ? R->graph.NewNode(R->javascript.StrictNotEqual(), p0, p1)
: R->Binop(R->javascript.NotEqual(), p0, p1);
Node* n = R->reduce(ne);
CHECK_EQ(IrOpcode::kBooleanNot, n->opcode());
« no previous file with comments | « test/cctest/compiler/test-js-context-specialization.cc ('k') | test/cctest/compiler/test-machine-operator-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698