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

Side by Side Diff: test/unittests/compiler/js-intrinsic-lowering-unittest.cc

Issue 2862213002: [turbofan] Optimized support for CreateGeneratorObject. (Closed)
Patch Set: Add control input. Created 3 years, 7 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/verifier.cc ('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 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/access-builder.h" 5 #include "src/compiler/access-builder.h"
6 #include "src/compiler/diamond.h" 6 #include "src/compiler/diamond.h"
7 #include "src/compiler/js-graph.h" 7 #include "src/compiler/js-graph.h"
8 #include "src/compiler/js-intrinsic-lowering.h" 8 #include "src/compiler/js-intrinsic-lowering.h"
9 #include "src/compiler/js-operator.h" 9 #include "src/compiler/js-operator.h"
10 #include "test/unittests/compiler/graph-unittest.h" 10 #include "test/unittests/compiler/graph-unittest.h"
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 Node* const context = Parameter(1); 137 Node* const context = Parameter(1);
138 Node* const effect = graph()->start(); 138 Node* const effect = graph()->start();
139 Node* const control = graph()->start(); 139 Node* const control = graph()->start();
140 Reduction const r = Reduce(graph()->NewNode( 140 Reduction const r = Reduce(graph()->NewNode(
141 javascript()->CallRuntime(Runtime::kInlineIsJSReceiver, 1), input, 141 javascript()->CallRuntime(Runtime::kInlineIsJSReceiver, 1), input,
142 context, effect, control)); 142 context, effect, control));
143 ASSERT_TRUE(r.Changed()); 143 ASSERT_TRUE(r.Changed());
144 EXPECT_THAT(r.replacement(), IsObjectIsReceiver(input)); 144 EXPECT_THAT(r.replacement(), IsObjectIsReceiver(input));
145 } 145 }
146 146
147 // -----------------------------------------------------------------------------
148 // %_CreateJSGeneratorObject
149
150 TEST_F(JSIntrinsicLoweringTest, InlineCreateJSGeneratorObject) {
151 Node* const function = Parameter(0);
152 Node* const receiver = Parameter(1);
153 Node* const context = Parameter(2);
154 Node* const effect = graph()->start();
155 Node* const control = graph()->start();
156 Reduction const r = Reduce(graph()->NewNode(
157 javascript()->CallRuntime(Runtime::kInlineCreateJSGeneratorObject, 2),
158 function, receiver, context, effect, control));
159 ASSERT_TRUE(r.Changed());
160 EXPECT_EQ(IrOpcode::kJSCreateGeneratorObject,
161 r.replacement()->op()->opcode());
162 }
163
147 } // namespace compiler 164 } // namespace compiler
148 } // namespace internal 165 } // namespace internal
149 } // namespace v8 166 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/verifier.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698