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

Unified Diff: src/heap/mark-compact.cc

Issue 1096053002: Avoid having untyped slots for objects embedded into code. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/mark-compact.cc
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
index f2a98527b139e7099db9f38c64e1844c96a41b59..f387c990f2f27ff03655dae93c319b23e01ec140 100644
--- a/src/heap/mark-compact.cc
+++ b/src/heap/mark-compact.cc
@@ -4607,24 +4607,9 @@ void MarkCompactCollector::RecordRelocSlot(RelocInfo* rinfo, Object* target) {
if (target_page->IsEvacuationCandidate() &&
(rinfo->host() == NULL ||
!ShouldSkipEvacuationSlotRecording(rinfo->host()))) {
- bool success;
- if (RelocInfo::IsEmbeddedObject(rmode) && rinfo->IsInConstantPool()) {
- // This doesn't need to be typed since it is just a normal heap pointer.
- Object** target_pointer =
- reinterpret_cast<Object**>(rinfo->constant_pool_entry_address());
- success = SlotsBuffer::AddTo(
- &slots_buffer_allocator_, target_page->slots_buffer_address(),
- target_pointer, SlotsBuffer::FAIL_ON_OVERFLOW);
- } else if (RelocInfo::IsCodeTarget(rmode) && rinfo->IsInConstantPool()) {
- success = SlotsBuffer::AddTo(
- &slots_buffer_allocator_, target_page->slots_buffer_address(),
- SlotsBuffer::CODE_ENTRY_SLOT, rinfo->constant_pool_entry_address(),
- SlotsBuffer::FAIL_ON_OVERFLOW);
- } else {
- success = SlotsBuffer::AddTo(
- &slots_buffer_allocator_, target_page->slots_buffer_address(),
- SlotTypeForRMode(rmode), rinfo->pc(), SlotsBuffer::FAIL_ON_OVERFLOW);
- }
+ bool success = SlotsBuffer::AddTo(
+ &slots_buffer_allocator_, target_page->slots_buffer_address(),
+ SlotTypeForRMode(rmode), rinfo->pc(), SlotsBuffer::FAIL_ON_OVERFLOW);
if (!success) {
EvictPopularEvacuationCandidate(target_page);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698