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

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

Issue 1380113002: [turbofan] Call FastNewContextStub for function context. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comment. 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
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | test/unittests/compiler/js-operator-unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 EXPECT_EQ(nested_context, NodeProperties::GetContextInput(node)); 267 EXPECT_EQ(nested_context, NodeProperties::GetContextInput(node));
268 } 268 }
269 269
270 270
271 TEST_F(JSContextRelaxationTest, 271 TEST_F(JSContextRelaxationTest,
272 RelaxJSCallFunctionDeepContextChainPartialNoRelax) { 272 RelaxJSCallFunctionDeepContextChainPartialNoRelax) {
273 Node* const input0 = Parameter(0); 273 Node* const input0 = Parameter(0);
274 Node* const input1 = Parameter(1); 274 Node* const input1 = Parameter(1);
275 Node* const context = Parameter(2); 275 Node* const context = Parameter(2);
276 Node* const outer_context = Parameter(3); 276 Node* const outer_context = Parameter(3);
277 const Operator* op = javascript()->CreateFunctionContext(); 277 const Operator* op = javascript()->CreateFunctionContext(0);
278 Node* const effect = graph()->start(); 278 Node* const effect = graph()->start();
279 Node* const control = graph()->start(); 279 Node* const control = graph()->start();
280 Node* nested_context = 280 Node* nested_context =
281 graph()->NewNode(op, graph()->start(), outer_context, effect, control); 281 graph()->NewNode(op, graph()->start(), outer_context, effect, control);
282 Node* const frame_state_2 = 282 Node* const frame_state_2 =
283 ShallowFrameStateChain(nested_context, CALL_MAINTAINS_NATIVE_CONTEXT); 283 ShallowFrameStateChain(nested_context, CALL_MAINTAINS_NATIVE_CONTEXT);
284 Node* node = 284 Node* node =
285 graph()->NewNode(javascript()->CallFunction(2, NO_CALL_FUNCTION_FLAGS, 285 graph()->NewNode(javascript()->CallFunction(2, NO_CALL_FUNCTION_FLAGS,
286 STRICT, VectorSlotPair()), 286 STRICT, VectorSlotPair()),
287 input0, input1, context, frame_state_2, effect, control); 287 input0, input1, context, frame_state_2, effect, control);
288 Reduction const r = Reduce(node); 288 Reduction const r = Reduce(node);
289 EXPECT_FALSE(r.Changed()); 289 EXPECT_FALSE(r.Changed());
290 EXPECT_EQ(context, NodeProperties::GetContextInput(node)); 290 EXPECT_EQ(context, NodeProperties::GetContextInput(node));
291 } 291 }
292 292
293 } // namespace compiler 293 } // namespace compiler
294 } // namespace internal 294 } // namespace internal
295 } // namespace v8 295 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | test/unittests/compiler/js-operator-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698