| 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/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-operator.h" | 7 #include "src/compiler/js-operator.h" |
| 8 #include "src/compiler/js-typed-lowering.h" | 8 #include "src/compiler/js-typed-lowering.h" |
| 9 #include "src/compiler/machine-operator.h" | 9 #include "src/compiler/machine-operator.h" |
| 10 #include "src/compiler/node-properties-inl.h" | 10 #include "src/compiler/node-properties-inl.h" |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 { | 221 { |
| 222 Reduction r = Reduce(Parameter(Type::Null())); | 222 Reduction r = Reduce(Parameter(Type::Null())); |
| 223 ASSERT_TRUE(r.Changed()); | 223 ASSERT_TRUE(r.Changed()); |
| 224 EXPECT_THAT(r.replacement(), | 224 EXPECT_THAT(r.replacement(), |
| 225 IsHeapConstant(Unique<HeapObject>::CreateImmovable(null))); | 225 IsHeapConstant(Unique<HeapObject>::CreateImmovable(null))); |
| 226 } | 226 } |
| 227 } | 227 } |
| 228 | 228 |
| 229 | 229 |
| 230 TEST_F(JSTypedLoweringTest, ParameterWithNaN) { | 230 TEST_F(JSTypedLoweringTest, ParameterWithNaN) { |
| 231 const double kNaNs[] = {base::OS::nan_value(), | 231 const double kNaNs[] = {-std::numeric_limits<double>::quiet_NaN(), |
| 232 std::numeric_limits<double>::quiet_NaN(), | 232 std::numeric_limits<double>::quiet_NaN(), |
| 233 std::numeric_limits<double>::signaling_NaN()}; | 233 std::numeric_limits<double>::signaling_NaN()}; |
| 234 TRACED_FOREACH(double, nan, kNaNs) { | 234 TRACED_FOREACH(double, nan, kNaNs) { |
| 235 Handle<Object> constant = factory()->NewNumber(nan); | 235 Handle<Object> constant = factory()->NewNumber(nan); |
| 236 Reduction r = Reduce(Parameter(Type::Constant(constant, zone()))); | 236 Reduction r = Reduce(Parameter(Type::Constant(constant, zone()))); |
| 237 ASSERT_TRUE(r.Changed()); | 237 ASSERT_TRUE(r.Changed()); |
| 238 EXPECT_THAT(r.replacement(), IsNumberConstant(IsNaN())); | 238 EXPECT_THAT(r.replacement(), IsNumberConstant(IsNaN())); |
| 239 } | 239 } |
| 240 { | 240 { |
| 241 Reduction r = | 241 Reduction r = |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 IsStoreElement( | 809 IsStoreElement( |
| 810 access, IsIntPtrConstant(bit_cast<intptr_t>(&backing_store[0])), | 810 access, IsIntPtrConstant(bit_cast<intptr_t>(&backing_store[0])), |
| 811 key, value, effect, control)); | 811 key, value, effect, control)); |
| 812 } | 812 } |
| 813 } | 813 } |
| 814 } | 814 } |
| 815 | 815 |
| 816 } // namespace compiler | 816 } // namespace compiler |
| 817 } // namespace internal | 817 } // namespace internal |
| 818 } // namespace v8 | 818 } // namespace v8 |
| OLD | NEW |