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 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
667 | 667 |
668 Node* effect = NodeProperties::GetEffectInput(node); | 668 Node* effect = NodeProperties::GetEffectInput(node); |
669 Node* control = NodeProperties::GetControlInput(node); | 669 Node* control = NodeProperties::GetControlInput(node); |
670 Node* context = NodeProperties::GetContextInput(node); | 670 Node* context = NodeProperties::GetContextInput(node); |
671 int const function_map_index = | 671 int const function_map_index = |
672 Context::FunctionMapIndex(shared->language_mode(), shared->kind()); | 672 Context::FunctionMapIndex(shared->language_mode(), shared->kind()); |
673 Node* function_map = jsgraph()->HeapConstant( | 673 Node* function_map = jsgraph()->HeapConstant( |
674 handle(Map::cast(native_context()->get(function_map_index)), isolate())); | 674 handle(Map::cast(native_context()->get(function_map_index)), isolate())); |
675 // Note that it is only safe to embed the raw entry point of the compile | 675 // Note that it is only safe to embed the raw entry point of the compile |
676 // lazy stub into the code, because that stub is immortal and immovable. | 676 // lazy stub into the code, because that stub is immortal and immovable. |
677 Node* compile_entry = jsgraph()->IntPtrConstant(reinterpret_cast<intptr_t>( | 677 Node* compile_entry = jsgraph()->PointerConstant( |
678 jsgraph()->isolate()->builtins()->CompileLazy()->entry())); | 678 jsgraph()->isolate()->builtins()->CompileLazy()->entry()); |
679 Node* empty_fixed_array = jsgraph()->EmptyFixedArrayConstant(); | 679 Node* empty_fixed_array = jsgraph()->EmptyFixedArrayConstant(); |
680 Node* empty_literals_array = jsgraph()->EmptyLiteralsArrayConstant(); | 680 Node* empty_literals_array = jsgraph()->EmptyLiteralsArrayConstant(); |
681 Node* the_hole = jsgraph()->TheHoleConstant(); | 681 Node* the_hole = jsgraph()->TheHoleConstant(); |
682 Node* undefined = jsgraph()->UndefinedConstant(); | 682 Node* undefined = jsgraph()->UndefinedConstant(); |
683 AllocationBuilder a(jsgraph(), effect, control); | 683 AllocationBuilder a(jsgraph(), effect, control); |
684 STATIC_ASSERT(JSFunction::kSize == 9 * kPointerSize); | 684 STATIC_ASSERT(JSFunction::kSize == 9 * kPointerSize); |
685 a.Allocate(JSFunction::kSize, p.pretenure()); | 685 a.Allocate(JSFunction::kSize, p.pretenure()); |
686 a.Store(AccessBuilder::ForMap(), function_map); | 686 a.Store(AccessBuilder::ForMap(), function_map); |
687 a.Store(AccessBuilder::ForJSObjectProperties(), empty_fixed_array); | 687 a.Store(AccessBuilder::ForJSObjectProperties(), empty_fixed_array); |
688 a.Store(AccessBuilder::ForJSObjectElements(), empty_fixed_array); | 688 a.Store(AccessBuilder::ForJSObjectElements(), empty_fixed_array); |
(...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1252 return jsgraph()->simplified(); | 1252 return jsgraph()->simplified(); |
1253 } | 1253 } |
1254 | 1254 |
1255 MachineOperatorBuilder* JSCreateLowering::machine() const { | 1255 MachineOperatorBuilder* JSCreateLowering::machine() const { |
1256 return jsgraph()->machine(); | 1256 return jsgraph()->machine(); |
1257 } | 1257 } |
1258 | 1258 |
1259 } // namespace compiler | 1259 } // namespace compiler |
1260 } // namespace internal | 1260 } // namespace internal |
1261 } // namespace v8 | 1261 } // namespace v8 |
OLD | NEW |