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

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

Issue 553843002: Replace our home-grown BitCast with bit_cast from Chrome/Google3. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « src/mips64/simulator-mips64.cc ('k') | 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 353 matching lines...) Expand 10 before | Expand all | Expand 10 after
364 VerifyPointer(e); 364 VerifyPointer(e);
365 } 365 }
366 } 366 }
367 367
368 368
369 void FixedDoubleArray::FixedDoubleArrayVerify() { 369 void FixedDoubleArray::FixedDoubleArrayVerify() {
370 for (int i = 0; i < length(); i++) { 370 for (int i = 0; i < length(); i++) {
371 if (!is_the_hole(i)) { 371 if (!is_the_hole(i)) {
372 double value = get_scalar(i); 372 double value = get_scalar(i);
373 CHECK(!std::isnan(value) || 373 CHECK(!std::isnan(value) ||
374 (BitCast<uint64_t>(value) == 374 (bit_cast<uint64_t>(value) ==
375 BitCast<uint64_t>(canonical_not_the_hole_nan_as_double())) || 375 bit_cast<uint64_t>(canonical_not_the_hole_nan_as_double())) ||
376 ((BitCast<uint64_t>(value) & Double::kSignMask) != 0)); 376 ((bit_cast<uint64_t>(value) & Double::kSignMask) != 0));
377 } 377 }
378 } 378 }
379 } 379 }
380 380
381 381
382 void ConstantPoolArray::ConstantPoolArrayVerify() { 382 void ConstantPoolArray::ConstantPoolArrayVerify() {
383 CHECK(IsConstantPoolArray()); 383 CHECK(IsConstantPoolArray());
384 ConstantPoolArray::Iterator code_iter(this, ConstantPoolArray::CODE_PTR); 384 ConstantPoolArray::Iterator code_iter(this, ConstantPoolArray::CODE_PTR);
385 while (!code_iter.is_finished()) { 385 while (!code_iter.is_finished()) {
386 Address code_entry = get_code_ptr_entry(code_iter.next_index()); 386 Address code_entry = get_code_ptr_entry(code_iter.next_index());
(...skipping 807 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 for (int i = 0; i < number_of_transitions(); ++i) { 1194 for (int i = 0; i < number_of_transitions(); ++i) {
1195 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; 1195 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false;
1196 } 1196 }
1197 return true; 1197 return true;
1198 } 1198 }
1199 1199
1200 1200
1201 #endif // DEBUG 1201 #endif // DEBUG
1202 1202
1203 } } // namespace v8::internal 1203 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/mips64/simulator-mips64.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698