OLD | NEW |
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 28 matching lines...) Expand all Loading... |
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 MaybeHandle<LiteralsArray>(), zone()); |
43 return reducer.Reduce(node); | 43 return reducer.Reduce(node); |
44 } | 44 } |
45 | 45 |
46 Node* FrameState(Handle<SharedFunctionInfo> shared, Node* outer_frame_state) { | 46 Node* FrameState(Handle<SharedFunctionInfo> shared, Node* outer_frame_state) { |
47 Node* state_values = graph()->NewNode(common()->StateValues(0)); | 47 Node* state_values = graph()->NewNode(common()->StateValues(0)); |
48 return graph()->NewNode( | 48 return graph()->NewNode( |
49 common()->FrameState(BailoutId::None(), | 49 common()->FrameState( |
50 OutputFrameStateCombine::Ignore(), | 50 BailoutId::None(), OutputFrameStateCombine::Ignore(), |
51 common()->CreateFrameStateFunctionInfo( | 51 common()->CreateFrameStateFunctionInfo( |
52 FrameStateType::kJavaScriptFunction, 1, 0, | 52 FrameStateType::kJavaScriptFunction, 1, 0, shared)), |
53 shared, CALL_MAINTAINS_NATIVE_CONTEXT)), | |
54 state_values, state_values, state_values, NumberConstant(0), | 53 state_values, state_values, state_values, NumberConstant(0), |
55 UndefinedConstant(), outer_frame_state); | 54 UndefinedConstant(), outer_frame_state); |
56 } | 55 } |
57 | 56 |
58 JSOperatorBuilder* javascript() { return &javascript_; } | 57 JSOperatorBuilder* javascript() { return &javascript_; } |
59 | 58 |
60 private: | 59 private: |
61 JSOperatorBuilder javascript_; | 60 JSOperatorBuilder javascript_; |
62 CompilationDependencies deps_; | 61 CompilationDependencies deps_; |
63 }; | 62 }; |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 EXPECT_THAT(r.replacement(), | 227 EXPECT_THAT(r.replacement(), |
229 IsFinishRegion(IsAllocate(IsNumberConstant(Context::SizeFor( | 228 IsFinishRegion(IsAllocate(IsNumberConstant(Context::SizeFor( |
230 Context::MIN_CONTEXT_SLOTS + 1)), | 229 Context::MIN_CONTEXT_SLOTS + 1)), |
231 IsBeginRegion(_), control), | 230 IsBeginRegion(_), control), |
232 _)); | 231 _)); |
233 } | 232 } |
234 | 233 |
235 } // namespace compiler | 234 } // namespace compiler |
236 } // namespace internal | 235 } // namespace internal |
237 } // namespace v8 | 236 } // namespace v8 |
OLD | NEW |