Commit 6a932d41 authored by Mythri A's avatar Mythri A Committed by Commit Bot

Also reset interrupt budget on feedback cell when flushing bytecode

Bug: v8:8394, v8:8395
Change-Id: I1cbb87b67bef4d469abde99070b7870e2b8d0c90
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1601149
Commit-Queue: Mythri Alle <mythria@chromium.org>
Reviewed-by: 's avatarRoss McIlroy <rmcilroy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#61340}
parent 46062a15
......@@ -31,6 +31,11 @@ void FeedbackCell::clear_padding() {
FeedbackCell::kAlignedSize - FeedbackCell::kUnalignedSize);
}
void FeedbackCell::reset() {
set_value(GetReadOnlyRoots().undefined_value());
set_interrupt_budget(FeedbackCell::GetInitialInterruptBudget());
}
} // namespace internal
} // namespace v8
......
......@@ -45,6 +45,7 @@ class FeedbackCell : public Struct {
static const int kAlignedSize = RoundUp<kObjectAlignment>(int{kSize});
inline void clear_padding();
inline void reset();
using BodyDescriptor =
FixedBodyDescriptor<kValueOffset, kInterruptBudgetOffset, kAlignedSize>;
......
......@@ -701,8 +701,7 @@ void JSFunction::ResetIfBytecodeFlushed() {
// Bytecode was flushed and function is now uncompiled, reset JSFunction
// by setting code to CompileLazy and clearing the feedback vector.
set_code(GetIsolate()->builtins()->builtin(i::Builtins::kCompileLazy));
raw_feedback_cell()->set_value(
ReadOnlyRoots(GetIsolate()).undefined_value());
raw_feedback_cell()->reset();
}
}
......
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