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-create-lowering-unittest.cc

Issue 2636493002: [turbofan] Disable inline allocation of closures. (Closed)
Patch Set: Fix unit test. Created 3 years, 11 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/flag-definitions.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 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/compilation-dependencies.h" 7 #include "src/compilation-dependencies.h"
8 #include "src/compiler/access-builder.h" 8 #include "src/compiler/access-builder.h"
9 #include "src/compiler/js-graph.h" 9 #include "src/compiler/js-graph.h"
10 #include "src/compiler/js-operator.h" 10 #include "src/compiler/js-operator.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 ASSERT_TRUE(r.Changed()); 133 ASSERT_TRUE(r.Changed());
134 EXPECT_THAT( 134 EXPECT_THAT(
135 r.replacement(), 135 r.replacement(),
136 IsFinishRegion(IsAllocate(IsNumberConstant(JSArray::kSize), _, _), _)); 136 IsFinishRegion(IsAllocate(IsNumberConstant(JSArray::kSize), _, _), _));
137 } 137 }
138 138
139 // ----------------------------------------------------------------------------- 139 // -----------------------------------------------------------------------------
140 // JSCreateClosure 140 // JSCreateClosure
141 141
142 TEST_F(JSCreateLoweringTest, JSCreateClosureViaInlinedAllocation) { 142 TEST_F(JSCreateLoweringTest, JSCreateClosureViaInlinedAllocation) {
143 if (!FLAG_turbo_lower_create_closure) return;
143 Node* const context = UndefinedConstant(); 144 Node* const context = UndefinedConstant();
144 Node* const effect = graph()->start(); 145 Node* const effect = graph()->start();
145 Node* const control = graph()->start(); 146 Node* const control = graph()->start();
146 Handle<SharedFunctionInfo> shared(isolate()->number_function()->shared()); 147 Handle<SharedFunctionInfo> shared(isolate()->number_function()->shared());
147 148
148 // Create a mock feedback vector. It just has to be an array with an array 149 // Create a mock feedback vector. It just has to be an array with an array
149 // in slot 0. 150 // in slot 0.
150 Handle<FixedArray> array = isolate()->factory()->NewFixedArray( 151 Handle<FixedArray> array = isolate()->factory()->NewFixedArray(
151 TypeFeedbackVector::kReservedIndexCount + 1); 152 TypeFeedbackVector::kReservedIndexCount + 1);
152 array->set_map_no_write_barrier( 153 array->set_map_no_write_barrier(
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 EXPECT_THAT(r.replacement(), 225 EXPECT_THAT(r.replacement(),
225 IsFinishRegion(IsAllocate(IsNumberConstant(Context::SizeFor( 226 IsFinishRegion(IsAllocate(IsNumberConstant(Context::SizeFor(
226 Context::MIN_CONTEXT_SLOTS + 1)), 227 Context::MIN_CONTEXT_SLOTS + 1)),
227 IsBeginRegion(_), control), 228 IsBeginRegion(_), control),
228 _)); 229 _));
229 } 230 }
230 231
231 } // namespace compiler 232 } // namespace compiler
232 } // namespace internal 233 } // namespace internal
233 } // namespace v8 234 } // namespace v8
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698