| 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/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 22 matching lines...) Expand all Loading... |
| 33 | 33 |
| 34 protected: | 34 protected: |
| 35 Reduction Reduce(Node* node) { | 35 Reduction Reduce(Node* node) { |
| 36 MachineOperatorBuilder machine(zone()); | 36 MachineOperatorBuilder machine(zone()); |
| 37 SimplifiedOperatorBuilder simplified(zone()); | 37 SimplifiedOperatorBuilder simplified(zone()); |
| 38 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &simplified, | 38 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &simplified, |
| 39 &machine); | 39 &machine); |
| 40 // TODO(titzer): mock the GraphReducer here for better unit testing. | 40 // TODO(titzer): mock the GraphReducer here for better unit testing. |
| 41 GraphReducer graph_reducer(zone(), graph()); | 41 GraphReducer graph_reducer(zone(), graph()); |
| 42 JSCreateLowering reducer(&graph_reducer, &deps_, &jsgraph, | 42 JSCreateLowering reducer(&graph_reducer, &deps_, &jsgraph, |
| 43 MaybeHandle<LiteralsArray>(), zone()); | 43 MaybeHandle<LiteralsArray>(), |
| 44 MaybeHandle<Context>(), zone()); |
| 44 return reducer.Reduce(node); | 45 return reducer.Reduce(node); |
| 45 } | 46 } |
| 46 | 47 |
| 47 Node* FrameState(Handle<SharedFunctionInfo> shared, Node* outer_frame_state) { | 48 Node* FrameState(Handle<SharedFunctionInfo> shared, Node* outer_frame_state) { |
| 48 Node* state_values = graph()->NewNode(common()->StateValues(0)); | 49 Node* state_values = graph()->NewNode(common()->StateValues(0)); |
| 49 return graph()->NewNode( | 50 return graph()->NewNode( |
| 50 common()->FrameState( | 51 common()->FrameState( |
| 51 BailoutId::None(), OutputFrameStateCombine::Ignore(), | 52 BailoutId::None(), OutputFrameStateCombine::Ignore(), |
| 52 common()->CreateFrameStateFunctionInfo( | 53 common()->CreateFrameStateFunctionInfo( |
| 53 FrameStateType::kJavaScriptFunction, 1, 0, shared)), | 54 FrameStateType::kJavaScriptFunction, 1, 0, shared)), |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 EXPECT_THAT(r.replacement(), | 210 EXPECT_THAT(r.replacement(), |
| 210 IsFinishRegion(IsAllocate(IsNumberConstant(Context::SizeFor( | 211 IsFinishRegion(IsAllocate(IsNumberConstant(Context::SizeFor( |
| 211 Context::MIN_CONTEXT_SLOTS + 1)), | 212 Context::MIN_CONTEXT_SLOTS + 1)), |
| 212 IsBeginRegion(_), control), | 213 IsBeginRegion(_), control), |
| 213 _)); | 214 _)); |
| 214 } | 215 } |
| 215 | 216 |
| 216 } // namespace compiler | 217 } // namespace compiler |
| 217 } // namespace internal | 218 } // namespace internal |
| 218 } // namespace v8 | 219 } // namespace v8 |
| OLD | NEW |