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

Side by Side Diff: src/heap/mark-compact.cc

Issue 2031533002: [dictionaries] Use IsKey(Isolate* i, Object* o) everywhere (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: use new IsTheHole Created 4 years, 6 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/heap/incremental-marking.cc ('k') | src/objects.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/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
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
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
OLDNEW
« no previous file with comments | « src/heap/incremental-marking.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698