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 | 6 |
7 #include "src/allocation-site-scopes.h" | 7 #include "src/allocation-site-scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/compilation-dependencies.h" | 9 #include "src/compilation-dependencies.h" |
10 #include "src/compiler/access-builder.h" | 10 #include "src/compiler/access-builder.h" |
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 int capacity = static_cast<int>(length_type->Max()); | 744 int capacity = static_cast<int>(length_type->Max()); |
745 return ReduceNewArray(node, length, capacity, site); | 745 return ReduceNewArray(node, length, capacity, site); |
746 } | 746 } |
747 } | 747 } |
748 } | 748 } |
749 | 749 |
750 return ReduceNewArrayToStubCall(node, site); | 750 return ReduceNewArrayToStubCall(node, site); |
751 } | 751 } |
752 | 752 |
753 Reduction JSCreateLowering::ReduceJSCreateClosure(Node* node) { | 753 Reduction JSCreateLowering::ReduceJSCreateClosure(Node* node) { |
| 754 if (!FLAG_turbo_lower_create_closure) return NoChange(); |
754 DCHECK_EQ(IrOpcode::kJSCreateClosure, node->opcode()); | 755 DCHECK_EQ(IrOpcode::kJSCreateClosure, node->opcode()); |
755 CreateClosureParameters const& p = CreateClosureParametersOf(node->op()); | 756 CreateClosureParameters const& p = CreateClosureParametersOf(node->op()); |
756 Handle<SharedFunctionInfo> shared = p.shared_info(); | 757 Handle<SharedFunctionInfo> shared = p.shared_info(); |
757 Node* effect = NodeProperties::GetEffectInput(node); | 758 Node* effect = NodeProperties::GetEffectInput(node); |
758 Node* control = NodeProperties::GetControlInput(node); | 759 Node* control = NodeProperties::GetControlInput(node); |
759 Node* context = NodeProperties::GetContextInput(node); | 760 Node* context = NodeProperties::GetContextInput(node); |
760 | 761 |
761 int const function_map_index = | 762 int const function_map_index = |
762 Context::FunctionMapIndex(shared->language_mode(), shared->kind()); | 763 Context::FunctionMapIndex(shared->language_mode(), shared->kind()); |
763 Node* function_map = jsgraph()->HeapConstant( | 764 Node* function_map = jsgraph()->HeapConstant( |
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1387 return jsgraph()->simplified(); | 1388 return jsgraph()->simplified(); |
1388 } | 1389 } |
1389 | 1390 |
1390 MachineOperatorBuilder* JSCreateLowering::machine() const { | 1391 MachineOperatorBuilder* JSCreateLowering::machine() const { |
1391 return jsgraph()->machine(); | 1392 return jsgraph()->machine(); |
1392 } | 1393 } |
1393 | 1394 |
1394 } // namespace compiler | 1395 } // namespace compiler |
1395 } // namespace internal | 1396 } // namespace internal |
1396 } // namespace v8 | 1397 } // namespace v8 |
OLD | NEW |