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

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

Issue 2396353002: Revert "Add Smi::Zero and replace all Smi::FromInt(0) calls" (Closed)
Patch Set: Created 4 years, 2 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.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/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 659 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 Address last_gc_pc = NULL; 670 Address last_gc_pc = NULL;
671 Isolate* isolate = GetIsolate(); 671 Isolate* isolate = GetIsolate();
672 for (RelocIterator it(this); !it.done(); it.next()) { 672 for (RelocIterator it(this); !it.done(); it.next()) {
673 it.rinfo()->Verify(isolate); 673 it.rinfo()->Verify(isolate);
674 // Ensure that GC will not iterate twice over the same pointer. 674 // Ensure that GC will not iterate twice over the same pointer.
675 if (RelocInfo::IsGCRelocMode(it.rinfo()->rmode())) { 675 if (RelocInfo::IsGCRelocMode(it.rinfo()->rmode())) {
676 CHECK(it.rinfo()->pc() != last_gc_pc); 676 CHECK(it.rinfo()->pc() != last_gc_pc);
677 last_gc_pc = it.rinfo()->pc(); 677 last_gc_pc = it.rinfo()->pc();
678 } 678 }
679 } 679 }
680 CHECK(raw_type_feedback_info() == Smi::kZero || 680 CHECK(raw_type_feedback_info() == Smi::FromInt(0) ||
681 raw_type_feedback_info()->IsSmi() == IsCodeStubOrIC()); 681 raw_type_feedback_info()->IsSmi() == IsCodeStubOrIC());
682 } 682 }
683 683
684 684
685 void Code::VerifyEmbeddedObjectsDependency() { 685 void Code::VerifyEmbeddedObjectsDependency() {
686 if (!CanContainWeakObjects()) return; 686 if (!CanContainWeakObjects()) return;
687 WeakCell* cell = CachedWeakCell(); 687 WeakCell* cell = CachedWeakCell();
688 DisallowHeapAllocation no_gc; 688 DisallowHeapAllocation no_gc;
689 Isolate* isolate = GetIsolate(); 689 Isolate* isolate = GetIsolate();
690 HandleScope scope(isolate); 690 HandleScope scope(isolate);
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
865 byte_length()->IsUndefined(GetIsolate())); 865 byte_length()->IsUndefined(GetIsolate()));
866 } 866 }
867 867
868 868
869 void JSArrayBufferView::JSArrayBufferViewVerify() { 869 void JSArrayBufferView::JSArrayBufferViewVerify() {
870 CHECK(IsJSArrayBufferView()); 870 CHECK(IsJSArrayBufferView());
871 JSObjectVerify(); 871 JSObjectVerify();
872 VerifyPointer(buffer()); 872 VerifyPointer(buffer());
873 Isolate* isolate = GetIsolate(); 873 Isolate* isolate = GetIsolate();
874 CHECK(buffer()->IsJSArrayBuffer() || buffer()->IsUndefined(isolate) || 874 CHECK(buffer()->IsJSArrayBuffer() || buffer()->IsUndefined(isolate) ||
875 buffer() == Smi::kZero); 875 buffer() == Smi::FromInt(0));
876 876
877 VerifyPointer(raw_byte_offset()); 877 VerifyPointer(raw_byte_offset());
878 CHECK(raw_byte_offset()->IsSmi() || raw_byte_offset()->IsHeapNumber() || 878 CHECK(raw_byte_offset()->IsSmi() || raw_byte_offset()->IsHeapNumber() ||
879 raw_byte_offset()->IsUndefined(isolate)); 879 raw_byte_offset()->IsUndefined(isolate));
880 880
881 VerifyPointer(raw_byte_length()); 881 VerifyPointer(raw_byte_length());
882 CHECK(raw_byte_length()->IsSmi() || raw_byte_length()->IsHeapNumber() || 882 CHECK(raw_byte_length()->IsSmi() || raw_byte_length()->IsHeapNumber() ||
883 raw_byte_length()->IsUndefined(isolate)); 883 raw_byte_length()->IsUndefined(isolate));
884 } 884 }
885 885
(...skipping 476 matching lines...) Expand 10 before | Expand all | Expand 10 after
1362 1362
1363 // Both are done at the same time. 1363 // Both are done at the same time.
1364 CHECK_EQ(new_it.done(), old_it.done()); 1364 CHECK_EQ(new_it.done(), old_it.done());
1365 } 1365 }
1366 1366
1367 1367
1368 #endif // DEBUG 1368 #endif // DEBUG
1369 1369
1370 } // namespace internal 1370 } // namespace internal
1371 } // namespace v8 1371 } // namespace v8
OLDNEW
« no previous file with comments | « src/objects.cc ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698