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

Side by Side Diff: src/objects-debug.cc

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 | « no previous file | src/objects-inl.h » ('j') | 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 #include "src/v8.h" 5 #include "src/v8.h"
6 6
7 #include "src/disasm.h" 7 #include "src/disasm.h"
8 #include "src/disassembler.h" 8 #include "src/disassembler.h"
9 #include "src/heap/objects-visiting.h" 9 #include "src/heap/objects-visiting.h"
10 #include "src/jsregexp.h" 10 #include "src/jsregexp.h"
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
383 Object* e = get(i); 383 Object* e = get(i);
384 VerifyPointer(e); 384 VerifyPointer(e);
385 } 385 }
386 } 386 }
387 387
388 388
389 void FixedDoubleArray::FixedDoubleArrayVerify() { 389 void FixedDoubleArray::FixedDoubleArrayVerify() {
390 for (int i = 0; i < length(); i++) { 390 for (int i = 0; i < length(); i++) {
391 if (!is_the_hole(i)) { 391 if (!is_the_hole(i)) {
392 uint64_t value = get_representation(i); 392 uint64_t value = get_representation(i);
393 CHECK((value & V8_UINT64_C(0x7FF8000000000000)) != 393 uint64_t unexpected =
394 V8_UINT64_C(0x7FF0000000000000) || 394 bit_cast<uint64_t>(std::numeric_limits<double>::quiet_NaN()) &
395 V8_UINT64_C(0x7FF8000000000000);
396 // Create implementation specific sNaN by inverting relevant bit.
397 unexpected ^= V8_UINT64_C(0x0008000000000000);
398 CHECK((value & V8_UINT64_C(0x7FF8000000000000)) != unexpected ||
395 (value & V8_UINT64_C(0x0007FFFFFFFFFFFF)) == V8_UINT64_C(0)); 399 (value & V8_UINT64_C(0x0007FFFFFFFFFFFF)) == V8_UINT64_C(0));
396 } 400 }
397 } 401 }
398 } 402 }
399 403
400 404
401 void ConstantPoolArray::ConstantPoolArrayVerify() { 405 void ConstantPoolArray::ConstantPoolArrayVerify() {
402 CHECK(IsConstantPoolArray()); 406 CHECK(IsConstantPoolArray());
403 ConstantPoolArray::Iterator code_iter(this, ConstantPoolArray::CODE_PTR); 407 ConstantPoolArray::Iterator code_iter(this, ConstantPoolArray::CODE_PTR);
404 while (!code_iter.is_finished()) { 408 while (!code_iter.is_finished()) {
(...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after
1274 ? it.rinfo()->target_cell() 1278 ? it.rinfo()->target_cell()
1275 : it.rinfo()->target_object(); 1279 : it.rinfo()->target_object();
1276 CHECK(!CanLeak(target, heap, skip_weak_cell)); 1280 CHECK(!CanLeak(target, heap, skip_weak_cell));
1277 } 1281 }
1278 } 1282 }
1279 1283
1280 1284
1281 #endif // DEBUG 1285 #endif // DEBUG
1282 1286
1283 } } // namespace v8::internal 1287 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698