OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <limits> | 5 #include <limits> |
6 | 6 |
7 #include "src/compiler/control-builders.h" | 7 #include "src/compiler/control-builders.h" |
8 #include "src/compiler/generic-node-inl.h" | 8 #include "src/compiler/generic-node-inl.h" |
9 #include "src/compiler/graph-visualizer.h" | 9 #include "src/compiler/graph-visualizer.h" |
10 #include "src/compiler/node-properties-inl.h" | 10 #include "src/compiler/node-properties-inl.h" |
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
607 class TestingGraph : public HandleAndZoneScope, public GraphAndBuilders { | 607 class TestingGraph : public HandleAndZoneScope, public GraphAndBuilders { |
608 public: | 608 public: |
609 Typer typer; | 609 Typer typer; |
610 JSGraph jsgraph; | 610 JSGraph jsgraph; |
611 Node* p0; | 611 Node* p0; |
612 Node* p1; | 612 Node* p1; |
613 Node* start; | 613 Node* start; |
614 Node* end; | 614 Node* end; |
615 Node* ret; | 615 Node* ret; |
616 | 616 |
617 TestingGraph(Type* p0_type, Type* p1_type = Type::None()) | 617 explicit TestingGraph(Type* p0_type, Type* p1_type = Type::None()) |
618 : GraphAndBuilders(main_zone()), | 618 : GraphAndBuilders(main_zone()), |
619 typer(main_zone()), | 619 typer(main_zone()), |
620 jsgraph(graph(), common(), &typer) { | 620 jsgraph(graph(), common(), &typer) { |
621 start = graph()->NewNode(common()->Start(2)); | 621 start = graph()->NewNode(common()->Start(2)); |
622 graph()->SetStart(start); | 622 graph()->SetStart(start); |
623 ret = | 623 ret = |
624 graph()->NewNode(common()->Return(), jsgraph.Constant(0), start, start); | 624 graph()->NewNode(common()->Return(), jsgraph.Constant(0), start, start); |
625 end = graph()->NewNode(common()->End(), ret); | 625 end = graph()->NewNode(common()->End(), ret); |
626 graph()->SetEnd(end); | 626 graph()->SetEnd(end); |
627 p0 = graph()->NewNode(common()->Parameter(0), start); | 627 p0 = graph()->NewNode(common()->Parameter(0), start); |
(...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1363 | 1363 |
1364 Node* store = t.graph()->NewNode(t.simplified()->StoreField(access), t.p0, | 1364 Node* store = t.graph()->NewNode(t.simplified()->StoreField(access), t.p0, |
1365 t.p1, t.start, t.start); | 1365 t.p1, t.start, t.start); |
1366 t.Effect(store); | 1366 t.Effect(store); |
1367 t.Lower(); | 1367 t.Lower(); |
1368 | 1368 |
1369 CHECK_EQ(IrOpcode::kStore, store->opcode()); | 1369 CHECK_EQ(IrOpcode::kStore, store->opcode()); |
1370 CHECK_EQ(t.p0, store->InputAt(0)); | 1370 CHECK_EQ(t.p0, store->InputAt(0)); |
1371 CheckChangeOf(IrOpcode::kChangeTaggedToFloat64, t.p1, store->InputAt(2)); | 1371 CheckChangeOf(IrOpcode::kChangeTaggedToFloat64, t.p1, store->InputAt(2)); |
1372 } | 1372 } |
OLD | NEW |