Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(613)

Side by Side Diff: src/compiler/js-typed-lowering.cc

Issue 1559853002: [turbofan] Use NumberConstant for LoadElement's index (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698