| 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 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 746 } | 746 } |
| 747 } | 747 } |
| 748 | 748 |
| 749 return ReduceNewArrayToStubCall(node, site); | 749 return ReduceNewArrayToStubCall(node, site); |
| 750 } | 750 } |
| 751 | 751 |
| 752 Reduction JSCreateLowering::ReduceJSCreateClosure(Node* node) { | 752 Reduction JSCreateLowering::ReduceJSCreateClosure(Node* node) { |
| 753 DCHECK_EQ(IrOpcode::kJSCreateClosure, node->opcode()); | 753 DCHECK_EQ(IrOpcode::kJSCreateClosure, node->opcode()); |
| 754 CreateClosureParameters const& p = CreateClosureParametersOf(node->op()); | 754 CreateClosureParameters const& p = CreateClosureParametersOf(node->op()); |
| 755 Handle<SharedFunctionInfo> shared = p.shared_info(); | 755 Handle<SharedFunctionInfo> shared = p.shared_info(); |
| 756 | |
| 757 Node* effect = NodeProperties::GetEffectInput(node); | 756 Node* effect = NodeProperties::GetEffectInput(node); |
| 758 Node* control = NodeProperties::GetControlInput(node); | 757 Node* control = NodeProperties::GetControlInput(node); |
| 759 Node* context = NodeProperties::GetContextInput(node); | 758 Node* context = NodeProperties::GetContextInput(node); |
| 759 |
| 760 int const function_map_index = | 760 int const function_map_index = |
| 761 Context::FunctionMapIndex(shared->language_mode(), shared->kind()); | 761 Context::FunctionMapIndex(shared->language_mode(), shared->kind()); |
| 762 Node* function_map = jsgraph()->HeapConstant( | 762 Node* function_map = jsgraph()->HeapConstant( |
| 763 handle(Map::cast(native_context()->get(function_map_index)), isolate())); | 763 handle(Map::cast(native_context()->get(function_map_index)), isolate())); |
| 764 |
| 764 // Note that it is only safe to embed the raw entry point of the compile | 765 // Note that it is only safe to embed the raw entry point of the compile |
| 765 // lazy stub into the code, because that stub is immortal and immovable. | 766 // lazy stub into the code, because that stub is immortal and immovable. |
| 766 Node* compile_entry = jsgraph()->PointerConstant( | 767 Node* compile_entry = jsgraph()->PointerConstant( |
| 767 jsgraph()->isolate()->builtins()->CompileLazy()->entry()); | 768 jsgraph()->isolate()->builtins()->CompileLazy()->entry()); |
| 768 Node* empty_fixed_array = jsgraph()->EmptyFixedArrayConstant(); | 769 Node* empty_fixed_array = jsgraph()->EmptyFixedArrayConstant(); |
| 769 Node* empty_literals_array = jsgraph()->EmptyLiteralsArrayConstant(); | 770 Node* empty_literals_array = jsgraph()->EmptyLiteralsArrayConstant(); |
| 770 Node* the_hole = jsgraph()->TheHoleConstant(); | 771 Node* the_hole = jsgraph()->TheHoleConstant(); |
| 771 Node* undefined = jsgraph()->UndefinedConstant(); | 772 Node* undefined = jsgraph()->UndefinedConstant(); |
| 772 AllocationBuilder a(jsgraph(), effect, control); | 773 AllocationBuilder a(jsgraph(), effect, control); |
| 773 STATIC_ASSERT(JSFunction::kSize == 9 * kPointerSize); | 774 STATIC_ASSERT(JSFunction::kSize == 9 * kPointerSize); |
| (...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1381 return jsgraph()->simplified(); | 1382 return jsgraph()->simplified(); |
| 1382 } | 1383 } |
| 1383 | 1384 |
| 1384 MachineOperatorBuilder* JSCreateLowering::machine() const { | 1385 MachineOperatorBuilder* JSCreateLowering::machine() const { |
| 1385 return jsgraph()->machine(); | 1386 return jsgraph()->machine(); |
| 1386 } | 1387 } |
| 1387 | 1388 |
| 1388 } // namespace compiler | 1389 } // namespace compiler |
| 1389 } // namespace internal | 1390 } // namespace internal |
| 1390 } // namespace v8 | 1391 } // namespace v8 |
| OLD | NEW |