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

Side by Side Diff: src/objects-inl.h

Issue 912833003: Make SNaN verification universal for all arches. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix names. Created 5 years, 10 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/objects-debug.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « src/objects-debug.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698