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

Side by Side Diff: test/cctest/compiler/test-representation-change.cc

Issue 552653003: [turbofan] Fix the node matchers. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address nit. Created 6 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 unified diff | Download patch | Annotate | Revision Log
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/v8.h" 7 #include "src/v8.h"
8 #include "test/cctest/cctest.h" 8 #include "test/cctest/cctest.h"
9 #include "test/cctest/compiler/graph-builder-tester.h" 9 #include "test/cctest/compiler/graph-builder-tester.h"
10 10
(...skipping 25 matching lines...) Expand all
36 RepresentationChanger changer_; 36 RepresentationChanger changer_;
37 37
38 Isolate* isolate() { return main_isolate(); } 38 Isolate* isolate() { return main_isolate(); }
39 Graph* graph() { return main_graph_; } 39 Graph* graph() { return main_graph_; }
40 CommonOperatorBuilder* common() { return &main_common_; } 40 CommonOperatorBuilder* common() { return &main_common_; }
41 JSGraph* jsgraph() { return &jsgraph_; } 41 JSGraph* jsgraph() { return &jsgraph_; }
42 RepresentationChanger* changer() { return &changer_; } 42 RepresentationChanger* changer() { return &changer_; }
43 43
44 // TODO(titzer): use ValueChecker / ValueUtil 44 // TODO(titzer): use ValueChecker / ValueUtil
45 void CheckInt32Constant(Node* n, int32_t expected) { 45 void CheckInt32Constant(Node* n, int32_t expected) {
46 ValueMatcher<int32_t> m(n); 46 Int32Matcher m(n);
47 CHECK(m.HasValue()); 47 CHECK(m.HasValue());
48 CHECK_EQ(expected, m.Value()); 48 CHECK_EQ(expected, m.Value());
49 } 49 }
50 50
51 void CheckHeapConstant(Node* n, Object* expected) { 51 void CheckHeapConstant(Node* n, HeapObject* expected) {
52 ValueMatcher<Handle<Object> > m(n); 52 HeapObjectMatcher<HeapObject> m(n);
53 CHECK(m.HasValue()); 53 CHECK(m.HasValue());
54 CHECK_EQ(expected, *m.Value()); 54 CHECK_EQ(expected, *m.Value().handle());
55 } 55 }
56 56
57 void CheckNumberConstant(Node* n, double expected) { 57 void CheckNumberConstant(Node* n, double expected) {
58 ValueMatcher<double> m(n); 58 NumberMatcher m(n);
59 CHECK_EQ(IrOpcode::kNumberConstant, n->opcode()); 59 CHECK_EQ(IrOpcode::kNumberConstant, n->opcode());
60 CHECK(m.HasValue()); 60 CHECK(m.HasValue());
61 CHECK_EQ(expected, m.Value()); 61 CHECK_EQ(expected, m.Value());
62 } 62 }
63 63
64 Node* Parameter(int index = 0) { 64 Node* Parameter(int index = 0) {
65 return graph()->NewNode(common()->Parameter(index), graph()->start()); 65 return graph()->NewNode(common()->Parameter(index), graph()->start());
66 } 66 }
67 67
68 void CheckTypeError(MachineTypeUnion from, MachineTypeUnion to) { 68 void CheckTypeError(MachineTypeUnion from, MachineTypeUnion to) {
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 // rW64 294 // rW64
295 // tIrW64 295 // tIrW64
296 // tUrW64 296 // tUrW64
297 // rF64 297 // rF64
298 // tIrF64 298 // tIrF64
299 // tUrF64 299 // tUrF64
300 // tArF64 300 // tArF64
301 // rT 301 // rT
302 // tArT 302 // tArT
303 } 303 }
OLDNEW
« no previous file with comments | « test/cctest/compiler/test-machine-operator-reducer.cc ('k') | test/cctest/compiler/value-helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698