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/heap/mark-compact.h" | 5 #include "src/heap/mark-compact.h" |
6 | 6 |
7 #include "src/base/atomicops.h" | 7 #include "src/base/atomicops.h" |
8 #include "src/base/bits.h" | 8 #include "src/base/bits.h" |
9 #include "src/base/sys-info.h" | 9 #include "src/base/sys-info.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 2435 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2446 have_code_to_deoptimize_ |= current->MarkCodeForDeoptimization( | 2446 have_code_to_deoptimize_ |= current->MarkCodeForDeoptimization( |
2447 isolate, DependentCode::kWeakCodeGroup); | 2447 isolate, DependentCode::kWeakCodeGroup); |
2448 current = current->next_link(); | 2448 current = current->next_link(); |
2449 } | 2449 } |
2450 | 2450 |
2451 WeakHashTable* table = heap_->weak_object_to_code_table(); | 2451 WeakHashTable* table = heap_->weak_object_to_code_table(); |
2452 uint32_t capacity = table->Capacity(); | 2452 uint32_t capacity = table->Capacity(); |
2453 for (uint32_t i = 0; i < capacity; i++) { | 2453 for (uint32_t i = 0; i < capacity; i++) { |
2454 uint32_t key_index = table->EntryToIndex(i); | 2454 uint32_t key_index = table->EntryToIndex(i); |
2455 Object* key = table->get(key_index); | 2455 Object* key = table->get(key_index); |
2456 if (!table->IsKey(key)) continue; | 2456 if (!table->IsKey(isolate, key)) continue; |
2457 uint32_t value_index = table->EntryToValueIndex(i); | 2457 uint32_t value_index = table->EntryToValueIndex(i); |
2458 Object* value = table->get(value_index); | 2458 Object* value = table->get(value_index); |
2459 DCHECK(key->IsWeakCell()); | 2459 DCHECK(key->IsWeakCell()); |
2460 if (WeakCell::cast(key)->cleared()) { | 2460 if (WeakCell::cast(key)->cleared()) { |
2461 have_code_to_deoptimize_ |= | 2461 have_code_to_deoptimize_ |= |
2462 DependentCode::cast(value)->MarkCodeForDeoptimization( | 2462 DependentCode::cast(value)->MarkCodeForDeoptimization( |
2463 isolate, DependentCode::kWeakCodeGroup); | 2463 isolate, DependentCode::kWeakCodeGroup); |
2464 table->set(key_index, heap_->the_hole_value()); | 2464 table->set(key_index, heap_->the_hole_value()); |
2465 table->set(value_index, heap_->the_hole_value()); | 2465 table->set(value_index, heap_->the_hole_value()); |
2466 table->ElementRemoved(); | 2466 table->ElementRemoved(); |
(...skipping 1518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3985 MarkBit mark_bit = Marking::MarkBitFrom(host); | 3985 MarkBit mark_bit = Marking::MarkBitFrom(host); |
3986 if (Marking::IsBlack(mark_bit)) { | 3986 if (Marking::IsBlack(mark_bit)) { |
3987 RelocInfo rinfo(isolate(), pc, RelocInfo::CODE_TARGET, 0, host); | 3987 RelocInfo rinfo(isolate(), pc, RelocInfo::CODE_TARGET, 0, host); |
3988 RecordRelocSlot(host, &rinfo, target); | 3988 RecordRelocSlot(host, &rinfo, target); |
3989 } | 3989 } |
3990 } | 3990 } |
3991 } | 3991 } |
3992 | 3992 |
3993 } // namespace internal | 3993 } // namespace internal |
3994 } // namespace v8 | 3994 } // namespace v8 |
OLD | NEW |