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

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

Issue 2007943002: [runtime] Fix number of literals for builtin functions. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix unittest. Created 4 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/runtime/runtime-function.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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-create-lowering.h" 5 #include "src/compiler/js-create-lowering.h"
6 #include "src/code-factory.h" 6 #include "src/code-factory.h"
7 #include "src/compiler/access-builder.h" 7 #include "src/compiler/access-builder.h"
8 #include "src/compiler/js-graph.h" 8 #include "src/compiler/js-graph.h"
9 #include "src/compiler/js-operator.h" 9 #include "src/compiler/js-operator.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 IsFinishRegion(IsAllocate(IsNumberConstant(JSArray::kSize), _, _), _)); 132 IsFinishRegion(IsAllocate(IsNumberConstant(JSArray::kSize), _, _), _));
133 } 133 }
134 134
135 // ----------------------------------------------------------------------------- 135 // -----------------------------------------------------------------------------
136 // JSCreateClosure 136 // JSCreateClosure
137 137
138 TEST_F(JSCreateLoweringTest, JSCreateClosureViaInlinedAllocation) { 138 TEST_F(JSCreateLoweringTest, JSCreateClosureViaInlinedAllocation) {
139 Node* const context = UndefinedConstant(); 139 Node* const context = UndefinedConstant();
140 Node* const effect = graph()->start(); 140 Node* const effect = graph()->start();
141 Node* const control = graph()->start(); 141 Node* const control = graph()->start();
142 Handle<SharedFunctionInfo> shared(isolate()->object_function()->shared()); 142 Handle<SharedFunctionInfo> shared(isolate()->number_function()->shared());
143 Reduction r = 143 Reduction r =
144 Reduce(graph()->NewNode(javascript()->CreateClosure(shared, NOT_TENURED), 144 Reduce(graph()->NewNode(javascript()->CreateClosure(shared, NOT_TENURED),
145 context, effect, control)); 145 context, effect, control));
146 ASSERT_TRUE(r.Changed()); 146 ASSERT_TRUE(r.Changed());
147 EXPECT_THAT(r.replacement(), 147 EXPECT_THAT(r.replacement(),
148 IsFinishRegion(IsAllocate(IsNumberConstant(JSFunction::kSize), 148 IsFinishRegion(IsAllocate(IsNumberConstant(JSFunction::kSize),
149 IsBeginRegion(_), control), 149 IsBeginRegion(_), control),
150 _)); 150 _));
151 } 151 }
152 152
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 EXPECT_THAT(r.replacement(), 206 EXPECT_THAT(r.replacement(),
207 IsFinishRegion(IsAllocate(IsNumberConstant(Context::SizeFor( 207 IsFinishRegion(IsAllocate(IsNumberConstant(Context::SizeFor(
208 Context::MIN_CONTEXT_SLOTS + 1)), 208 Context::MIN_CONTEXT_SLOTS + 1)),
209 IsBeginRegion(_), control), 209 IsBeginRegion(_), control),
210 _)); 210 _));
211 } 211 }
212 212
213 } // namespace compiler 213 } // namespace compiler
214 } // namespace internal 214 } // namespace internal
215 } // namespace v8 215 } // namespace v8
OLDNEW
« no previous file with comments | « src/runtime/runtime-function.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698