Commit 2ee967d2 authored by Ulan Degenbaev's avatar Ulan Degenbaev Committed by Commit Bot

[heap] Remove unused InvalidateCode function.

Bug: 
Change-Id: I7dacb2f4cbb66f0daebd3948c2239846af129f9a
Reviewed-on: https://chromium-review.googlesource.com/632621Reviewed-by: 's avatarJaroslav Sevcik <jarin@chromium.org>
Commit-Queue: Ulan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#47593}
parent 42ccbd33
......@@ -3775,28 +3775,6 @@ int MarkCompactCollector::Sweeper::RawSweep(
return static_cast<int>(FreeList::GuaranteedAllocatable(max_freed_bytes));
}
void MarkCompactCollector::InvalidateCode(Code* code) {
Page* page = Page::FromAddress(code->address());
Address start = code->instruction_start();
Address end = code->address() + code->Size();
RememberedSet<OLD_TO_NEW>::RemoveRangeTyped(page, start, end);
if (heap_->incremental_marking()->IsCompacting() &&
!page->ShouldSkipEvacuationSlotRecording()) {
DCHECK(compacting_);
// If the object is white than no slots were recorded on it yet.
if (non_atomic_marking_state()->IsWhite(code)) return;
// Ignore all slots that might have been recorded in the body of the
// deoptimized code object. Assumption: no slots will be recorded for
// this object after invalidating it.
RememberedSet<OLD_TO_OLD>::RemoveRangeTyped(page, start, end);
}
}
// Return true if the given code is deoptimized or will be deoptimized.
bool MarkCompactCollector::WillBeDeoptimized(Code* code) {
return code->is_optimized_code() && code->marked_for_deoptimization();
......
......@@ -705,8 +705,6 @@ class MarkCompactCollector final : public MarkCompactCollectorBase {
void UpdateSlots(SlotsBuffer* buffer);
void UpdateSlotsRecordedIn(SlotsBuffer* buffer);
void InvalidateCode(Code* code);
void ClearMarkbits();
bool is_compacting() const { return compacting_; }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment