| 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 20 matching lines...) Expand all  Loading... | 
| 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  Loading... | 
| 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 | 
| OLD | NEW | 
|---|