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

Side by Side Diff: test/unittests/compiler/js-context-relaxation-unittest.cc

Issue 1314473007: [turbofan] Remove usage of Unique<T> from graph. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased and fixed. Created 5 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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 "src/compiler/js-context-relaxation.h" 5 #include "src/compiler/js-context-relaxation.h"
6 #include "src/compiler/js-graph.h" 6 #include "src/compiler/js-graph.h"
7 #include "test/unittests/compiler/graph-unittest.h" 7 #include "test/unittests/compiler/graph-unittest.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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 EXPECT_FALSE(r.Changed()); 145 EXPECT_FALSE(r.Changed());
146 EXPECT_EQ(context, NodeProperties::GetContextInput(node)); 146 EXPECT_EQ(context, NodeProperties::GetContextInput(node));
147 } 147 }
148 148
149 TEST_F(JSContextRelaxationTest, 149 TEST_F(JSContextRelaxationTest,
150 RelaxJSCallFunctionDeepContextChainFullRelaxForCatch) { 150 RelaxJSCallFunctionDeepContextChainFullRelaxForCatch) {
151 Node* const input0 = Parameter(0); 151 Node* const input0 = Parameter(0);
152 Node* const input1 = Parameter(1); 152 Node* const input1 = Parameter(1);
153 Node* const context = Parameter(2); 153 Node* const context = Parameter(2);
154 Node* const outer_context = Parameter(3); 154 Node* const outer_context = Parameter(3);
155 const Operator* op = javascript()->CreateCatchContext(Unique<String>()); 155 const Operator* op = javascript()->CreateCatchContext(Handle<String>());
156 Node* const frame_state_1 = 156 Node* const frame_state_1 =
157 ShallowFrameStateChain(outer_context, CALL_MAINTAINS_NATIVE_CONTEXT); 157 ShallowFrameStateChain(outer_context, CALL_MAINTAINS_NATIVE_CONTEXT);
158 Node* const effect = graph()->start(); 158 Node* const effect = graph()->start();
159 Node* const control = graph()->start(); 159 Node* const control = graph()->start();
160 Node* nested_context = 160 Node* nested_context =
161 graph()->NewNode(op, graph()->start(), graph()->start(), outer_context, 161 graph()->NewNode(op, graph()->start(), graph()->start(), outer_context,
162 frame_state_1, effect, control); 162 frame_state_1, effect, control);
163 Node* const frame_state_2 = 163 Node* const frame_state_2 =
164 ShallowFrameStateChain(nested_context, CALL_MAINTAINS_NATIVE_CONTEXT); 164 ShallowFrameStateChain(nested_context, CALL_MAINTAINS_NATIVE_CONTEXT);
165 Node* node = 165 Node* node =
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
297 STRICT, VectorSlotPair()), 297 STRICT, VectorSlotPair()),
298 input0, input1, context, frame_state_2, effect, control); 298 input0, input1, context, frame_state_2, effect, control);
299 Reduction const r = Reduce(node); 299 Reduction const r = Reduce(node);
300 EXPECT_FALSE(r.Changed()); 300 EXPECT_FALSE(r.Changed());
301 EXPECT_EQ(context, NodeProperties::GetContextInput(node)); 301 EXPECT_EQ(context, NodeProperties::GetContextInput(node));
302 } 302 }
303 303
304 } // namespace compiler 304 } // namespace compiler
305 } // namespace internal 305 } // namespace internal
306 } // namespace v8 306 } // namespace v8
OLDNEW
« no previous file with comments | « test/unittests/compiler/js-builtin-reducer-unittest.cc ('k') | test/unittests/compiler/js-type-feedback-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698