OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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/code-factory.h" | 5 #include "src/code-factory.h" |
6 #include "src/compilation-dependencies.h" | 6 #include "src/compilation-dependencies.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-typed-lowering.h" | 9 #include "src/compiler/js-typed-lowering.h" |
10 #include "src/compiler/linkage.h" | 10 #include "src/compiler/linkage.h" |
(...skipping 2715 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2726 : AccessBuilder::ForFixedArrayElement(); | 2726 : AccessBuilder::ForFixedArrayElement(); |
2727 Node* value = | 2727 Node* value = |
2728 IsFastDoubleElementsKind(elements_kind) | 2728 IsFastDoubleElementsKind(elements_kind) |
2729 ? jsgraph()->Float64Constant(bit_cast<double>(kHoleNanInt64)) | 2729 ? jsgraph()->Float64Constant(bit_cast<double>(kHoleNanInt64)) |
2730 : jsgraph()->TheHoleConstant(); | 2730 : jsgraph()->TheHoleConstant(); |
2731 | 2731 |
2732 // Actually allocate the backing store. | 2732 // Actually allocate the backing store. |
2733 AllocationBuilder a(jsgraph(), effect, control); | 2733 AllocationBuilder a(jsgraph(), effect, control); |
2734 a.AllocateArray(capacity, elements_map, pretenure); | 2734 a.AllocateArray(capacity, elements_map, pretenure); |
2735 for (int i = 0; i < capacity; ++i) { | 2735 for (int i = 0; i < capacity; ++i) { |
2736 Node* index = jsgraph()->Int32Constant(i); | 2736 Node* index = jsgraph()->Constant(i); |
2737 a.Store(access, index, value); | 2737 a.Store(access, index, value); |
2738 } | 2738 } |
2739 return a.Finish(); | 2739 return a.Finish(); |
2740 } | 2740 } |
2741 | 2741 |
2742 | 2742 |
2743 Factory* JSTypedLowering::factory() const { return jsgraph()->factory(); } | 2743 Factory* JSTypedLowering::factory() const { return jsgraph()->factory(); } |
2744 | 2744 |
2745 | 2745 |
2746 Graph* JSTypedLowering::graph() const { return jsgraph()->graph(); } | 2746 Graph* JSTypedLowering::graph() const { return jsgraph()->graph(); } |
(...skipping 22 matching lines...) Expand all Loading... |
2769 } | 2769 } |
2770 | 2770 |
2771 | 2771 |
2772 CompilationDependencies* JSTypedLowering::dependencies() const { | 2772 CompilationDependencies* JSTypedLowering::dependencies() const { |
2773 return dependencies_; | 2773 return dependencies_; |
2774 } | 2774 } |
2775 | 2775 |
2776 } // namespace compiler | 2776 } // namespace compiler |
2777 } // namespace internal | 2777 } // namespace internal |
2778 } // namespace v8 | 2778 } // namespace v8 |
OLD | NEW |