| 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 23 matching lines...) Expand all Loading... |
| 34 | 34 |
| 35 protected: | 35 protected: |
| 36 Reduction Reduce(Node* node) { | 36 Reduction Reduce(Node* node) { |
| 37 MachineOperatorBuilder machine(zone()); | 37 MachineOperatorBuilder machine(zone()); |
| 38 SimplifiedOperatorBuilder simplified(zone()); | 38 SimplifiedOperatorBuilder simplified(zone()); |
| 39 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &simplified, | 39 JSGraph jsgraph(isolate(), graph(), common(), javascript(), &simplified, |
| 40 &machine); | 40 &machine); |
| 41 // TODO(titzer): mock the GraphReducer here for better unit testing. | 41 // TODO(titzer): mock the GraphReducer here for better unit testing. |
| 42 GraphReducer graph_reducer(zone(), graph()); | 42 GraphReducer graph_reducer(zone(), graph()); |
| 43 JSCreateLowering reducer(&graph_reducer, &deps_, &jsgraph, | 43 JSCreateLowering reducer(&graph_reducer, &deps_, &jsgraph, |
| 44 MaybeHandle<LiteralsArray>(), native_context(), | 44 MaybeHandle<TypeFeedbackVector>(), |
| 45 zone()); | 45 native_context(), zone()); |
| 46 return reducer.Reduce(node); | 46 return reducer.Reduce(node); |
| 47 } | 47 } |
| 48 | 48 |
| 49 Node* FrameState(Handle<SharedFunctionInfo> shared, Node* outer_frame_state) { | 49 Node* FrameState(Handle<SharedFunctionInfo> shared, Node* outer_frame_state) { |
| 50 Node* state_values = | 50 Node* state_values = |
| 51 graph()->NewNode(common()->StateValues(0, SparseInputMask::Dense())); | 51 graph()->NewNode(common()->StateValues(0, SparseInputMask::Dense())); |
| 52 return graph()->NewNode( | 52 return graph()->NewNode( |
| 53 common()->FrameState( | 53 common()->FrameState( |
| 54 BailoutId::None(), OutputFrameStateCombine::Ignore(), | 54 BailoutId::None(), OutputFrameStateCombine::Ignore(), |
| 55 common()->CreateFrameStateFunctionInfo( | 55 common()->CreateFrameStateFunctionInfo( |
| (...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 EXPECT_THAT(r.replacement(), | 225 EXPECT_THAT(r.replacement(), |
| 226 IsFinishRegion(IsAllocate(IsNumberConstant(Context::SizeFor( | 226 IsFinishRegion(IsAllocate(IsNumberConstant(Context::SizeFor( |
| 227 Context::MIN_CONTEXT_SLOTS + 1)), | 227 Context::MIN_CONTEXT_SLOTS + 1)), |
| 228 IsBeginRegion(_), control), | 228 IsBeginRegion(_), control), |
| 229 _)); | 229 _)); |
| 230 } | 230 } |
| 231 | 231 |
| 232 } // namespace compiler | 232 } // namespace compiler |
| 233 } // namespace internal | 233 } // namespace internal |
| 234 } // namespace v8 | 234 } // namespace v8 |
| OLD | NEW |