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

Side by Side Diff: test/unittests/compiler/graph-unittest.cc

Issue 1160863003: [turbofan] Remove the JSGraph dependency from the ControlFlowOptimizer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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
« no previous file with comments | « test/unittests/compiler/graph-unittest.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "test/unittests/compiler/graph-unittest.h" 5 #include "test/unittests/compiler/graph-unittest.h"
6 6
7 #include "src/compiler/node-properties.h" 7 #include "src/compiler/node-properties.h"
8 #include "test/unittests/compiler/node-test-utils.h" 8 #include "test/unittests/compiler/node-test-utils.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 Unique<HeapObject>::CreateImmovable(factory()->true_value())); 74 Unique<HeapObject>::CreateImmovable(factory()->true_value()));
75 } 75 }
76 76
77 77
78 Node* GraphTest::UndefinedConstant() { 78 Node* GraphTest::UndefinedConstant() {
79 return HeapConstant( 79 return HeapConstant(
80 Unique<HeapObject>::CreateImmovable(factory()->undefined_value())); 80 Unique<HeapObject>::CreateImmovable(factory()->undefined_value()));
81 } 81 }
82 82
83 83
84 Node* GraphTest::EmptyFrameState() {
85 Node* state_values = graph()->NewNode(common()->StateValues(0));
86 return graph()->NewNode(
87 common()->FrameState(JS_FRAME, BailoutId::None(),
88 OutputFrameStateCombine::Ignore()),
89 state_values, state_values, state_values, NumberConstant(0),
90 UndefinedConstant(), graph()->start());
91 }
92
93
84 Matcher<Node*> GraphTest::IsFalseConstant() { 94 Matcher<Node*> GraphTest::IsFalseConstant() {
85 return IsHeapConstant( 95 return IsHeapConstant(
86 Unique<HeapObject>::CreateImmovable(factory()->false_value())); 96 Unique<HeapObject>::CreateImmovable(factory()->false_value()));
87 } 97 }
88 98
89 99
90 Matcher<Node*> GraphTest::IsTrueConstant() { 100 Matcher<Node*> GraphTest::IsTrueConstant() {
91 return IsHeapConstant( 101 return IsHeapConstant(
92 Unique<HeapObject>::CreateImmovable(factory()->true_value())); 102 Unique<HeapObject>::CreateImmovable(factory()->true_value()));
93 } 103 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 EXPECT_LT(0, n0->id()); 139 EXPECT_LT(0, n0->id());
130 EXPECT_LT(0, n1->id()); 140 EXPECT_LT(0, n1->id());
131 EXPECT_NE(n0->id(), n1->id()); 141 EXPECT_NE(n0->id(), n1->id());
132 EXPECT_EQ(&kDummyOperator, n0->op()); 142 EXPECT_EQ(&kDummyOperator, n0->op());
133 EXPECT_EQ(&kDummyOperator, n1->op()); 143 EXPECT_EQ(&kDummyOperator, n1->op());
134 } 144 }
135 145
136 } // namespace compiler 146 } // namespace compiler
137 } // namespace internal 147 } // namespace internal
138 } // namespace v8 148 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/graph-unittest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698