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

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

Issue 1197703002: Use big-boy Types to annotate interface descriptor parameters (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Latest Created 5 years, 6 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 17 matching lines...) Expand all
28 28
29 using namespace v8::internal; 29 using namespace v8::internal;
30 using namespace v8::internal::compiler; 30 using namespace v8::internal::compiler;
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(), MaybeHandle<Context>()), 38 typer(this->isolate(), this->graph(), nullptr, MaybeHandle<Context>()),
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 this->machine()), 41 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;
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 Node* p0; 703 Node* p0;
704 Node* p1; 704 Node* p1;
705 Node* p2; 705 Node* p2;
706 Node* start; 706 Node* start;
707 Node* end; 707 Node* end;
708 Node* ret; 708 Node* ret;
709 709
710 explicit TestingGraph(Type* p0_type, Type* p1_type = Type::None(), 710 explicit TestingGraph(Type* p0_type, Type* p1_type = Type::None(),
711 Type* p2_type = Type::None()) 711 Type* p2_type = Type::None())
712 : GraphAndBuilders(main_zone()), 712 : GraphAndBuilders(main_zone()),
713 typer(main_isolate(), graph(), MaybeHandle<Context>()), 713 typer(main_isolate(), graph(), nullptr, MaybeHandle<Context>()),
714 javascript(main_zone()), 714 javascript(main_zone()),
715 jsgraph(main_isolate(), graph(), common(), &javascript, machine()) { 715 jsgraph(main_isolate(), graph(), common(), &javascript, machine()) {
716 start = graph()->NewNode(common()->Start(2)); 716 start = graph()->NewNode(common()->Start(2));
717 graph()->SetStart(start); 717 graph()->SetStart(start);
718 ret = 718 ret =
719 graph()->NewNode(common()->Return(), jsgraph.Constant(0), start, start); 719 graph()->NewNode(common()->Return(), jsgraph.Constant(0), start, start);
720 end = graph()->NewNode(common()->End(1), ret); 720 end = graph()->NewNode(common()->End(1), ret);
721 graph()->SetEnd(end); 721 graph()->SetEnd(end);
722 p0 = graph()->NewNode(common()->Parameter(0), start); 722 p0 = graph()->NewNode(common()->Parameter(0), start);
723 p1 = graph()->NewNode(common()->Parameter(1), start); 723 p1 = graph()->NewNode(common()->Parameter(1), start);
(...skipping 1372 matching lines...) Expand 10 before | Expand all | Expand 10 after
2096 Bounds phi_bounds = Bounds::Either(Bounds(d.arg1), Bounds(d.arg2), z); 2096 Bounds phi_bounds = Bounds::Either(Bounds(d.arg1), Bounds(d.arg2), z);
2097 NodeProperties::SetBounds(phi, phi_bounds); 2097 NodeProperties::SetBounds(phi, phi_bounds);
2098 2098
2099 Node* use = t.Use(phi, d.use); 2099 Node* use = t.Use(phi, d.use);
2100 t.Return(use); 2100 t.Return(use);
2101 t.Lower(); 2101 t.Lower();
2102 2102
2103 CHECK_EQ(d.expected, OpParameter<MachineType>(phi)); 2103 CHECK_EQ(d.expected, OpParameter<MachineType>(phi));
2104 } 2104 }
2105 } 2105 }
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-machine-operator-reducer.cc ('k') | test/unittests/compiler/graph-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698