Commit 01fa999d authored by Toon Verwaest's avatar Toon Verwaest Committed by V8 LUCI CQ

[code-cache] Remove SFI from the compilation cache when flushed

Previously if we had no bytecode the SFI wasn't removed. This was a bug
introduced after replacing Fullcodegen ageing (where we checked the code
object, which could have been the lazycompilestub).

Change-Id: I13add56a2c62fffddb11abdc35019272abc72c30
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3686409
Auto-Submit: Toon Verwaest <verwaest@chromium.org>
Commit-Queue: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80908}
parent 76c8db92
......@@ -76,7 +76,8 @@ void CompilationCacheScript::Age() {
Object value = table.PrimaryValueAt(entry);
if (!value.IsUndefined(isolate())) {
SharedFunctionInfo info = SharedFunctionInfo::cast(value);
if (info.HasBytecodeArray() && info.GetBytecodeArray(isolate()).IsOld()) {
if (!info.HasBytecodeArray() ||
info.GetBytecodeArray(isolate()).IsOld()) {
table.RemoveEntry(entry);
}
}
......@@ -114,7 +115,8 @@ void CompilationCacheEval::Age() {
// The ageing mechanism for eval caches.
SharedFunctionInfo info =
SharedFunctionInfo::cast(table.PrimaryValueAt(entry));
if (info.HasBytecodeArray() && info.GetBytecodeArray(isolate()).IsOld()) {
if (!info.HasBytecodeArray() ||
info.GetBytecodeArray(isolate()).IsOld()) {
table.RemoveEntry(entry);
}
}
......
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