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 "v8.h" | 5 #include "v8.h" |
6 | 6 |
7 #include "disassembler.h" | 7 #include "disassembler.h" |
8 #include "disasm.h" | 8 #include "disasm.h" |
9 #include "jsregexp.h" | 9 #include "jsregexp.h" |
10 #include "macro-assembler.h" | 10 #include "macro-assembler.h" |
(...skipping 609 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
620 VerifyObjectField(kValueOffset); | 620 VerifyObjectField(kValueOffset); |
621 VerifyObjectField(kTypeOffset); | 621 VerifyObjectField(kTypeOffset); |
622 } | 622 } |
623 | 623 |
624 | 624 |
625 void Code::CodeVerify() { | 625 void Code::CodeVerify() { |
626 CHECK(IsAligned(reinterpret_cast<intptr_t>(instruction_start()), | 626 CHECK(IsAligned(reinterpret_cast<intptr_t>(instruction_start()), |
627 kCodeAlignment)); | 627 kCodeAlignment)); |
628 relocation_info()->ObjectVerify(); | 628 relocation_info()->ObjectVerify(); |
629 Address last_gc_pc = NULL; | 629 Address last_gc_pc = NULL; |
| 630 Isolate* isolate = GetIsolate(); |
630 for (RelocIterator it(this); !it.done(); it.next()) { | 631 for (RelocIterator it(this); !it.done(); it.next()) { |
631 it.rinfo()->Verify(); | 632 it.rinfo()->Verify(isolate); |
632 // Ensure that GC will not iterate twice over the same pointer. | 633 // Ensure that GC will not iterate twice over the same pointer. |
633 if (RelocInfo::IsGCRelocMode(it.rinfo()->rmode())) { | 634 if (RelocInfo::IsGCRelocMode(it.rinfo()->rmode())) { |
634 CHECK(it.rinfo()->pc() != last_gc_pc); | 635 CHECK(it.rinfo()->pc() != last_gc_pc); |
635 last_gc_pc = it.rinfo()->pc(); | 636 last_gc_pc = it.rinfo()->pc(); |
636 } | 637 } |
637 } | 638 } |
638 } | 639 } |
639 | 640 |
640 | 641 |
641 void Code::VerifyEmbeddedObjectsDependency() { | 642 void Code::VerifyEmbeddedObjectsDependency() { |
(...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1195 for (int i = 0; i < number_of_transitions(); ++i) { | 1196 for (int i = 0; i < number_of_transitions(); ++i) { |
1196 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; | 1197 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; |
1197 } | 1198 } |
1198 return true; | 1199 return true; |
1199 } | 1200 } |
1200 | 1201 |
1201 | 1202 |
1202 #endif // DEBUG | 1203 #endif // DEBUG |
1203 | 1204 |
1204 } } // namespace v8::internal | 1205 } } // namespace v8::internal |
OLD | NEW |