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/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 Loading... |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |