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

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

Issue 997983004: [turbofan] Support lazy deopt for truncating store to a typed array. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweaks Created 5 years, 9 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 | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/operator-properties.cc » ('j') | 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/compiler/access-builder.h" 5 #include "src/compiler/access-builder.h"
6 #include "src/compiler/js-graph.h" 6 #include "src/compiler/js-graph.h"
7 #include "src/compiler/js-typed-lowering.h" 7 #include "src/compiler/js-typed-lowering.h"
8 #include "src/compiler/node-matchers.h" 8 #include "src/compiler/node-matchers.h"
9 #include "src/compiler/node-properties.h" 9 #include "src/compiler/node-properties.h"
10 #include "src/compiler/operator-properties.h" 10 #include "src/compiler/operator-properties.h"
(...skipping 785 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 // Convert to a number first. 796 // Convert to a number first.
797 if (!value_type->Is(Type::Number())) { 797 if (!value_type->Is(Type::Number())) {
798 Reduction number_reduction = ReduceJSToNumberInput(value); 798 Reduction number_reduction = ReduceJSToNumberInput(value);
799 if (number_reduction.Changed()) { 799 if (number_reduction.Changed()) {
800 value = number_reduction.replacement(); 800 value = number_reduction.replacement();
801 } else { 801 } else {
802 DCHECK(FLAG_turbo_deoptimization == 802 DCHECK(FLAG_turbo_deoptimization ==
803 (OperatorProperties::GetFrameStateInputCount( 803 (OperatorProperties::GetFrameStateInputCount(
804 javascript()->ToNumber()) == 1)); 804 javascript()->ToNumber()) == 1));
805 if (FLAG_turbo_deoptimization) { 805 if (FLAG_turbo_deoptimization) {
806 Node* frame_state_for_to_number =
807 NodeProperties::GetFrameStateInput(node, 1);
806 value = effect = 808 value = effect =
807 graph()->NewNode(javascript()->ToNumber(), value, context, 809 graph()->NewNode(javascript()->ToNumber(), value, context,
808 jsgraph()->EmptyFrameState(), effect, control); 810 frame_state_for_to_number, effect, control);
809 } else { 811 } else {
810 value = effect = graph()->NewNode(javascript()->ToNumber(), value, 812 value = effect = graph()->NewNode(javascript()->ToNumber(), value,
811 context, effect, control); 813 context, effect, control);
812 } 814 }
813 } 815 }
814 } 816 }
815 // For integer-typed arrays, convert to the integer type. 817 // For integer-typed arrays, convert to the integer type.
816 if (TypeOf(access.machine_type()) == kTypeInt32 && 818 if (TypeOf(access.machine_type()) == kTypeInt32 &&
817 !value_type->Is(Type::Signed32())) { 819 !value_type->Is(Type::Signed32())) {
818 value = graph()->NewNode(simplified()->NumberToInt32(), value); 820 value = graph()->NewNode(simplified()->NumberToInt32(), value);
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
1050 } 1052 }
1051 1053
1052 1054
1053 MachineOperatorBuilder* JSTypedLowering::machine() const { 1055 MachineOperatorBuilder* JSTypedLowering::machine() const {
1054 return jsgraph()->machine(); 1056 return jsgraph()->machine();
1055 } 1057 }
1056 1058
1057 } // namespace compiler 1059 } // namespace compiler
1058 } // namespace internal 1060 } // namespace internal
1059 } // namespace v8 1061 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/operator-properties.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698