| 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 520002c1661fa2a4dac0573b496bd4ede41ea73a..2378622b9dd85040fda843901c0e0f759361113d 100644
|
| --- a/test/cctest/compiler/test-js-typed-lowering.cc
|
| +++ b/test/cctest/compiler/test-js-typed-lowering.cc
|
| @@ -41,7 +41,7 @@ class JSTypedLoweringTester : public HandleAndZoneScope {
|
| typer(main_isolate(), &graph),
|
| context_node(NULL) {
|
| graph.SetStart(graph.NewNode(common.Start(num_parameters)));
|
| - graph.SetEnd(graph.NewNode(common.End(1)));
|
| + graph.SetEnd(graph.NewNode(common.End(1), graph.start()));
|
| typer.Run();
|
| }
|
|
|
| @@ -79,7 +79,7 @@ class JSTypedLoweringTester : public HandleAndZoneScope {
|
| Node* state_node = graph.NewNode(
|
| common.FrameState(BailoutId::None(), OutputFrameStateCombine::Ignore(),
|
| nullptr),
|
| - parameters, locals, stack, context, UndefinedConstant());
|
| + parameters, locals, stack, context, UndefinedConstant(), graph.start());
|
|
|
| return state_node;
|
| }
|
| @@ -125,16 +125,23 @@ class JSTypedLoweringTester : public HandleAndZoneScope {
|
|
|
| Node* Binop(const Operator* op, Node* left, Node* right) {
|
| // JS binops also require context, effect, and control
|
| - 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());
|
| + 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()));
|
| }
|
|
|
| Node* Unop(const Operator* op, Node* input) {
|
| @@ -828,15 +835,18 @@ void CheckEqualityReduction(JSTypedLoweringTester* R, bool strict, Node* l,
|
| Node* p1 = j == 1 ? l : r;
|
|
|
| {
|
| - Node* eq = strict ? R->graph.NewNode(R->javascript.StrictEqual(), p0, p1)
|
| - : R->Binop(R->javascript.Equal(), p0, p1);
|
| + Node* eq = strict
|
| + ? R->graph.NewNode(R->javascript.StrictEqual(), p0, p1,
|
| + R->context())
|
| + : 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->graph.NewNode(R->javascript.StrictNotEqual(), p0, p1,
|
| + R->context())
|
| : R->Binop(R->javascript.NotEqual(), p0, p1);
|
| Node* n = R->reduce(ne);
|
| CHECK_EQ(IrOpcode::kBooleanNot, n->opcode());
|
|
|