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

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

Issue 1698783002: [turbofan] Lower object and array literals in JSCreateLowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Work-around for hole NaN on x86. Created 4 years, 10 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/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 20 matching lines...) Expand all
31 ~JSCreateLoweringTest() override {} 31 ~JSCreateLoweringTest() override {}
32 32
33 protected: 33 protected:
34 Reduction Reduce(Node* node) { 34 Reduction Reduce(Node* node) {
35 MachineOperatorBuilder machine(zone()); 35 MachineOperatorBuilder machine(zone());
36 SimplifiedOperatorBuilder simplified(zone()); 36 SimplifiedOperatorBuilder simplified(zone());
37 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &simplified, 37 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &simplified,
38 &machine); 38 &machine);
39 // TODO(titzer): mock the GraphReducer here for better unit testing. 39 // TODO(titzer): mock the GraphReducer here for better unit testing.
40 GraphReducer graph_reducer(zone(), graph()); 40 GraphReducer graph_reducer(zone(), graph());
41 JSCreateLowering reducer(&graph_reducer, &deps_, &jsgraph); 41 JSCreateLowering reducer(&graph_reducer, &deps_, &jsgraph,
42 MaybeHandle<LiteralsArray>(), zone());
42 return reducer.Reduce(node); 43 return reducer.Reduce(node);
43 } 44 }
44 45
45 Node* FrameState(Handle<SharedFunctionInfo> shared, Node* outer_frame_state) { 46 Node* FrameState(Handle<SharedFunctionInfo> shared, Node* outer_frame_state) {
46 Node* state_values = graph()->NewNode(common()->StateValues(0)); 47 Node* state_values = graph()->NewNode(common()->StateValues(0));
47 return graph()->NewNode( 48 return graph()->NewNode(
48 common()->FrameState(BailoutId::None(), 49 common()->FrameState(BailoutId::None(),
49 OutputFrameStateCombine::Ignore(), 50 OutputFrameStateCombine::Ignore(),
50 common()->CreateFrameStateFunctionInfo( 51 common()->CreateFrameStateFunctionInfo(
51 FrameStateType::kJavaScriptFunction, 1, 0, 52 FrameStateType::kJavaScriptFunction, 1, 0,
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 EXPECT_THAT(r.replacement(), 228 EXPECT_THAT(r.replacement(),
228 IsFinishRegion(IsAllocate(IsNumberConstant(Context::SizeFor( 229 IsFinishRegion(IsAllocate(IsNumberConstant(Context::SizeFor(
229 Context::MIN_CONTEXT_SLOTS + 1)), 230 Context::MIN_CONTEXT_SLOTS + 1)),
230 IsBeginRegion(_), control), 231 IsBeginRegion(_), control),
231 _)); 232 _));
232 } 233 }
233 234
234 } // namespace compiler 235 } // namespace compiler
235 } // namespace internal 236 } // namespace internal
236 } // namespace v8 237 } // 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