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

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

Issue 2236443004: [turbofan] Introduce a dedicated ConvertTaggedHoleToUndefined operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix verify heap. Created 4 years, 4 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/heap/heap.cc ('k') | src/types.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/objects.h" 5 #include "src/objects.h"
6 6
7 #include "src/bootstrapper.h" 7 #include "src/bootstrapper.h"
8 #include "src/disasm.h" 8 #include "src/disasm.h"
9 #include "src/disassembler.h" 9 #include "src/disassembler.h"
10 #include "src/field-type.h" 10 #include "src/field-type.h"
(...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 JSObjectVerify(); 594 JSObjectVerify();
595 } 595 }
596 596
597 597
598 void Oddball::OddballVerify() { 598 void Oddball::OddballVerify() {
599 CHECK(IsOddball()); 599 CHECK(IsOddball());
600 Heap* heap = GetHeap(); 600 Heap* heap = GetHeap();
601 VerifyHeapPointer(to_string()); 601 VerifyHeapPointer(to_string());
602 Object* number = to_number(); 602 Object* number = to_number();
603 if (number->IsHeapObject()) { 603 if (number->IsHeapObject()) {
604 CHECK(number == heap->nan_value()); 604 CHECK(number == heap->nan_value() ||
605 number == heap->hole_nan_value());
605 } else { 606 } else {
606 CHECK(number->IsSmi()); 607 CHECK(number->IsSmi());
607 int value = Smi::cast(number)->value(); 608 int value = Smi::cast(number)->value();
608 // Hidden oddballs have negative smis. 609 // Hidden oddballs have negative smis.
609 const int kLeastHiddenOddballNumber = -7; 610 const int kLeastHiddenOddballNumber = -7;
610 CHECK_LE(value, 1); 611 CHECK_LE(value, 1);
611 CHECK(value >= kLeastHiddenOddballNumber); 612 CHECK(value >= kLeastHiddenOddballNumber);
612 } 613 }
613 if (map() == heap->undefined_map()) { 614 if (map() == heap->undefined_map()) {
614 CHECK(this == heap->undefined_value()); 615 CHECK(this == heap->undefined_value());
(...skipping 718 matching lines...) Expand 10 before | Expand all | Expand 10 after
1333 1334
1334 // Both are done at the same time. 1335 // Both are done at the same time.
1335 CHECK_EQ(new_it.done(), old_it.done()); 1336 CHECK_EQ(new_it.done(), old_it.done());
1336 } 1337 }
1337 1338
1338 1339
1339 #endif // DEBUG 1340 #endif // DEBUG
1340 1341
1341 } // namespace internal 1342 } // namespace internal
1342 } // namespace v8 1343 } // namespace v8
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698