OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |