OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 last_gc_pc = it.rinfo()->pc(); | 628 last_gc_pc = it.rinfo()->pc(); |
629 } | 629 } |
630 } | 630 } |
631 } | 631 } |
632 | 632 |
633 | 633 |
634 void Code::VerifyEmbeddedObjectsDependency() { | 634 void Code::VerifyEmbeddedObjectsDependency() { |
635 int mode_mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); | 635 int mode_mask = RelocInfo::ModeMask(RelocInfo::EMBEDDED_OBJECT); |
636 for (RelocIterator it(this, mode_mask); !it.done(); it.next()) { | 636 for (RelocIterator it(this, mode_mask); !it.done(); it.next()) { |
637 Object* obj = it.rinfo()->target_object(); | 637 Object* obj = it.rinfo()->target_object(); |
638 if (IsWeakEmbeddedObject(kind(), obj)) { | 638 if (IsWeakObject(obj)) { |
639 if (obj->IsMap()) { | 639 if (obj->IsMap()) { |
640 Map* map = Map::cast(obj); | 640 Map* map = Map::cast(obj); |
641 CHECK(map->dependent_code()->Contains( | 641 CHECK(map->dependent_code()->Contains( |
642 DependentCode::kWeaklyEmbeddedGroup, this)); | 642 DependentCode::kWeaklyEmbeddedGroup, this)); |
643 } else if (obj->IsJSObject()) { | 643 } else if (obj->IsJSObject()) { |
644 Object* raw_table = GetIsolate()->heap()->weak_object_to_code_table(); | 644 Object* raw_table = GetIsolate()->heap()->weak_object_to_code_table(); |
645 WeakHashTable* table = WeakHashTable::cast(raw_table); | 645 WeakHashTable* table = WeakHashTable::cast(raw_table); |
646 CHECK(DependentCode::cast(table->Lookup(obj))->Contains( | 646 CHECK(DependentCode::cast(table->Lookup(obj))->Contains( |
647 DependentCode::kWeaklyEmbeddedGroup, this)); | 647 DependentCode::kWeaklyEmbeddedGroup, this)); |
648 } | 648 } |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1150 for (int i = 0; i < number_of_transitions(); ++i) { | 1150 for (int i = 0; i < number_of_transitions(); ++i) { |
1151 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; | 1151 if (!CheckOneBackPointer(current_map, GetTarget(i))) return false; |
1152 } | 1152 } |
1153 return true; | 1153 return true; |
1154 } | 1154 } |
1155 | 1155 |
1156 | 1156 |
1157 #endif // DEBUG | 1157 #endif // DEBUG |
1158 | 1158 |
1159 } } // namespace v8::internal | 1159 } } // namespace v8::internal |
OLD | NEW |