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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
| 7 #include "src/base/math.h" |
7 #include "src/disasm.h" | 8 #include "src/disasm.h" |
8 #include "src/disassembler.h" | 9 #include "src/disassembler.h" |
9 #include "src/heap/objects-visiting.h" | 10 #include "src/heap/objects-visiting.h" |
10 #include "src/jsregexp.h" | 11 #include "src/jsregexp.h" |
11 #include "src/macro-assembler.h" | 12 #include "src/macro-assembler.h" |
12 #include "src/ostreams.h" | 13 #include "src/ostreams.h" |
13 | 14 |
14 namespace v8 { | 15 namespace v8 { |
15 namespace internal { | 16 namespace internal { |
16 | 17 |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
382 for (int i = 0; i < length(); i++) { | 383 for (int i = 0; i < length(); i++) { |
383 Object* e = get(i); | 384 Object* e = get(i); |
384 VerifyPointer(e); | 385 VerifyPointer(e); |
385 } | 386 } |
386 } | 387 } |
387 | 388 |
388 | 389 |
389 void FixedDoubleArray::FixedDoubleArrayVerify() { | 390 void FixedDoubleArray::FixedDoubleArrayVerify() { |
390 for (int i = 0; i < length(); i++) { | 391 for (int i = 0; i < length(); i++) { |
391 if (!is_the_hole(i)) { | 392 if (!is_the_hole(i)) { |
392 double value = get_scalar(i); | 393 double const value = get_scalar(i); |
393 CHECK(!std::isnan(value) || | 394 CHECK(!std::isnan(value) || base::IsQuietNaN(value)); |
394 (bit_cast<uint64_t>(value) == | |
395 bit_cast<uint64_t>(canonical_not_the_hole_nan_as_double())) || | |
396 ((bit_cast<uint64_t>(value) & Double::kSignMask) != 0)); | |
397 } | 395 } |
398 } | 396 } |
399 } | 397 } |
400 | 398 |
401 | 399 |
402 void ConstantPoolArray::ConstantPoolArrayVerify() { | 400 void ConstantPoolArray::ConstantPoolArrayVerify() { |
403 CHECK(IsConstantPoolArray()); | 401 CHECK(IsConstantPoolArray()); |
404 ConstantPoolArray::Iterator code_iter(this, ConstantPoolArray::CODE_PTR); | 402 ConstantPoolArray::Iterator code_iter(this, ConstantPoolArray::CODE_PTR); |
405 while (!code_iter.is_finished()) { | 403 while (!code_iter.is_finished()) { |
406 Address code_entry = get_code_ptr_entry(code_iter.next_index()); | 404 Address code_entry = get_code_ptr_entry(code_iter.next_index()); |
(...skipping 844 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1251 while (map != heap->roots_array_start()[i++]) { | 1249 while (map != heap->roots_array_start()[i++]) { |
1252 CHECK_LT(i, Heap::kStrongRootListLength); | 1250 CHECK_LT(i, Heap::kStrongRootListLength); |
1253 } | 1251 } |
1254 } | 1252 } |
1255 } | 1253 } |
1256 | 1254 |
1257 | 1255 |
1258 #endif // DEBUG | 1256 #endif // DEBUG |
1259 | 1257 |
1260 } } // namespace v8::internal | 1258 } } // namespace v8::internal |
OLD | NEW |