| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 // Review notes: | 5 // Review notes: |
| 6 // | 6 // |
| 7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
| 8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
| 9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
| 10 // | 10 // |
| (...skipping 2317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2328 return array->GetIsolate()->factory()->NewNumber(array->get_scalar(index)); | 2328 return array->GetIsolate()->factory()->NewNumber(array->get_scalar(index)); |
| 2329 } | 2329 } |
| 2330 } | 2330 } |
| 2331 | 2331 |
| 2332 | 2332 |
| 2333 void FixedDoubleArray::set(int index, double value) { | 2333 void FixedDoubleArray::set(int index, double value) { |
| 2334 DCHECK(map() != GetHeap()->fixed_cow_array_map() && | 2334 DCHECK(map() != GetHeap()->fixed_cow_array_map() && |
| 2335 map() != GetHeap()->fixed_array_map()); | 2335 map() != GetHeap()->fixed_array_map()); |
| 2336 int offset = kHeaderSize + index * kDoubleSize; | 2336 int offset = kHeaderSize + index * kDoubleSize; |
| 2337 if (std::isnan(value)) { | 2337 if (std::isnan(value)) { |
| 2338 WRITE_UINT64_FIELD(this, offset, V8_UINT64_C(0xFFFFFFFFFFFFFFFF)); | 2338 WRITE_DOUBLE_FIELD(this, offset, std::numeric_limits<double>::quiet_NaN()); |
| 2339 } else { | 2339 } else { |
| 2340 WRITE_DOUBLE_FIELD(this, offset, value); | 2340 WRITE_DOUBLE_FIELD(this, offset, value); |
| 2341 } | 2341 } |
| 2342 DCHECK(!is_the_hole(index)); | 2342 DCHECK(!is_the_hole(index)); |
| 2343 } | 2343 } |
| 2344 | 2344 |
| 2345 | 2345 |
| 2346 void FixedDoubleArray::set_the_hole(int index) { | 2346 void FixedDoubleArray::set_the_hole(int index) { |
| 2347 DCHECK(map() != GetHeap()->fixed_cow_array_map() && | 2347 DCHECK(map() != GetHeap()->fixed_cow_array_map() && |
| 2348 map() != GetHeap()->fixed_array_map()); | 2348 map() != GetHeap()->fixed_array_map()); |
| (...skipping 5273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7622 #undef READ_SHORT_FIELD | 7622 #undef READ_SHORT_FIELD |
| 7623 #undef WRITE_SHORT_FIELD | 7623 #undef WRITE_SHORT_FIELD |
| 7624 #undef READ_BYTE_FIELD | 7624 #undef READ_BYTE_FIELD |
| 7625 #undef WRITE_BYTE_FIELD | 7625 #undef WRITE_BYTE_FIELD |
| 7626 #undef NOBARRIER_READ_BYTE_FIELD | 7626 #undef NOBARRIER_READ_BYTE_FIELD |
| 7627 #undef NOBARRIER_WRITE_BYTE_FIELD | 7627 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 7628 | 7628 |
| 7629 } } // namespace v8::internal | 7629 } } // namespace v8::internal |
| 7630 | 7630 |
| 7631 #endif // V8_OBJECTS_INL_H_ | 7631 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |