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

Side by Side Diff: src/compiler/js-native-context-specialization.cc

Issue 2060233002: [turbofan] Prevent storing signalling NaNs into holey double arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix spelling, rebase Created 4 years, 6 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/instruction-selector.cc ('k') | src/compiler/machine-operator.h » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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-native-context-specialization.h" 5 #include "src/compiler/js-native-context-specialization.h"
6 6
7 #include "src/accessors.h" 7 #include "src/accessors.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 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 this_value = graph()->NewNode(simplified()->TypeGuard(type_cache_.kSmi), 835 this_value = graph()->NewNode(simplified()->TypeGuard(type_cache_.kSmi),
836 this_value, this_control); 836 this_value, this_control);
837 } else if (IsFastDoubleElementsKind(elements_kind)) { 837 } else if (IsFastDoubleElementsKind(elements_kind)) {
838 Node* check = 838 Node* check =
839 graph()->NewNode(simplified()->ObjectIsNumber(), this_value); 839 graph()->NewNode(simplified()->ObjectIsNumber(), this_value);
840 this_control = this_effect = 840 this_control = this_effect =
841 graph()->NewNode(common()->DeoptimizeUnless(), check, frame_state, 841 graph()->NewNode(common()->DeoptimizeUnless(), check, frame_state,
842 this_effect, this_control); 842 this_effect, this_control);
843 this_value = graph()->NewNode(simplified()->TypeGuard(Type::Number()), 843 this_value = graph()->NewNode(simplified()->TypeGuard(Type::Number()),
844 this_value, this_control); 844 this_value, this_control);
845 // Make sure we do not store signalling NaNs into holey double arrays.
846 if (elements_kind == FAST_HOLEY_DOUBLE_ELEMENTS) {
847 this_value =
848 graph()->NewNode(simplified()->NumberSilenceNaN(), this_value);
849 }
845 } 850 }
846 this_effect = graph()->NewNode(simplified()->StoreElement(element_access), 851 this_effect = graph()->NewNode(simplified()->StoreElement(element_access),
847 this_elements, this_index, this_value, 852 this_elements, this_index, this_value,
848 this_effect, this_control); 853 this_effect, this_control);
849 } 854 }
850 855
851 // Remember the final state for this element access. 856 // Remember the final state for this element access.
852 values.push_back(this_value); 857 values.push_back(this_value);
853 effects.push_back(this_effect); 858 effects.push_back(this_effect);
854 controls.push_back(this_control); 859 controls.push_back(this_control);
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 } 1134 }
1130 1135
1131 1136
1132 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const { 1137 SimplifiedOperatorBuilder* JSNativeContextSpecialization::simplified() const {
1133 return jsgraph()->simplified(); 1138 return jsgraph()->simplified();
1134 } 1139 }
1135 1140
1136 } // namespace compiler 1141 } // namespace compiler
1137 } // namespace internal 1142 } // namespace internal
1138 } // namespace v8 1143 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/instruction-selector.cc ('k') | src/compiler/machine-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698