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

Side by Side Diff: test/cctest/compiler/test-simplified-lowering.cc

Issue 1410003002: [turbofan] Remove locally constructed simplified builders. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 2 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 unified diff | Download patch
OLDNEW
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/access-builder.h" 7 #include "src/compiler/access-builder.h"
8 #include "src/compiler/change-lowering.h" 8 #include "src/compiler/change-lowering.h"
9 #include "src/compiler/control-builders.h" 9 #include "src/compiler/control-builders.h"
10 #include "src/compiler/graph-reducer.h" 10 #include "src/compiler/graph-reducer.h"
(...skipping 20 matching lines...) Expand all
31 31
32 template <typename ReturnType> 32 template <typename ReturnType>
33 class SimplifiedLoweringTester : public GraphBuilderTester<ReturnType> { 33 class SimplifiedLoweringTester : public GraphBuilderTester<ReturnType> {
34 public: 34 public:
35 SimplifiedLoweringTester(MachineType p0 = kMachNone, 35 SimplifiedLoweringTester(MachineType p0 = kMachNone,
36 MachineType p1 = kMachNone) 36 MachineType p1 = kMachNone)
37 : GraphBuilderTester<ReturnType>(p0, p1), 37 : GraphBuilderTester<ReturnType>(p0, p1),
38 typer(this->isolate(), this->graph()), 38 typer(this->isolate(), this->graph()),
39 javascript(this->zone()), 39 javascript(this->zone()),
40 jsgraph(this->isolate(), this->graph(), this->common(), &javascript, 40 jsgraph(this->isolate(), this->graph(), this->common(), &javascript,
41 nullptr, this->machine()), 41 this->simplified(), this->machine()),
42 source_positions(jsgraph.graph()), 42 source_positions(jsgraph.graph()),
43 lowering(&jsgraph, this->zone(), &source_positions) {} 43 lowering(&jsgraph, this->zone(), &source_positions) {}
44 44
45 Typer typer; 45 Typer typer;
46 JSOperatorBuilder javascript; 46 JSOperatorBuilder javascript;
47 JSGraph jsgraph; 47 JSGraph jsgraph;
48 SourcePositionTable source_positions; 48 SourcePositionTable source_positions;
49 SimplifiedLowering lowering; 49 SimplifiedLowering lowering;
50 50
51 void LowerAllNodes() { 51 void LowerAllNodes() {
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 Node* p2; 669 Node* p2;
670 Node* start; 670 Node* start;
671 Node* end; 671 Node* end;
672 Node* ret; 672 Node* ret;
673 673
674 explicit TestingGraph(Type* p0_type, Type* p1_type = Type::None(), 674 explicit TestingGraph(Type* p0_type, Type* p1_type = Type::None(),
675 Type* p2_type = Type::None()) 675 Type* p2_type = Type::None())
676 : GraphAndBuilders(main_zone()), 676 : GraphAndBuilders(main_zone()),
677 typer(main_isolate(), graph()), 677 typer(main_isolate(), graph()),
678 javascript(main_zone()), 678 javascript(main_zone()),
679 jsgraph(main_isolate(), graph(), common(), &javascript, nullptr, 679 jsgraph(main_isolate(), graph(), common(), &javascript, simplified(),
680 machine()) { 680 machine()) {
681 start = graph()->NewNode(common()->Start(2)); 681 start = graph()->NewNode(common()->Start(2));
682 graph()->SetStart(start); 682 graph()->SetStart(start);
683 ret = 683 ret =
684 graph()->NewNode(common()->Return(), jsgraph.Constant(0), start, start); 684 graph()->NewNode(common()->Return(), jsgraph.Constant(0), start, start);
685 end = graph()->NewNode(common()->End(1), ret); 685 end = graph()->NewNode(common()->End(1), ret);
686 graph()->SetEnd(end); 686 graph()->SetEnd(end);
687 p0 = graph()->NewNode(common()->Parameter(0), start); 687 p0 = graph()->NewNode(common()->Parameter(0), start);
688 p1 = graph()->NewNode(common()->Parameter(1), start); 688 p1 = graph()->NewNode(common()->Parameter(1), start);
689 p2 = graph()->NewNode(common()->Parameter(2), start); 689 p2 = graph()->NewNode(common()->Parameter(2), start);
(...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after
1996 Type* phi_type = Type::Union(d.arg1, d.arg2, z); 1996 Type* phi_type = Type::Union(d.arg1, d.arg2, z);
1997 NodeProperties::SetType(phi, phi_type); 1997 NodeProperties::SetType(phi, phi_type);
1998 1998
1999 Node* use = t.Use(phi, d.use); 1999 Node* use = t.Use(phi, d.use);
2000 t.Return(use); 2000 t.Return(use);
2001 t.Lower(); 2001 t.Lower();
2002 2002
2003 CHECK_EQ(d.expected, OpParameter<MachineType>(phi)); 2003 CHECK_EQ(d.expected, OpParameter<MachineType>(phi));
2004 } 2004 }
2005 } 2005 }
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-js-typed-lowering.cc ('k') | test/unittests/compiler/js-builtin-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698