Skip to content

Commit

Permalink
Bug 1876425 part 1 - Stop using trial inlined ICScripts during bailou…
Browse files Browse the repository at this point in the history
…t if needed. r=iain, a=RyanVM

Differential Revision: https://phabricator.services.mozilla.com/D201213
  • Loading branch information
jandem committed Feb 9, 2024
1 parent 905cffa commit 82338d2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion js/src/jit/BaselineBailouts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ class MOZ_STACK_CLASS BaselineStackBuilder {

BailoutKind bailoutKind_;

bool canUseTrialInlinedICScripts_ = true;

// The baseline frames we will reconstruct on the heap are not
// rooted, so GC must be suppressed.
gc::AutoSuppressGC suppress_;
Expand Down Expand Up @@ -486,7 +488,8 @@ void BaselineStackBuilder::setNextCallee(
JSFunction* nextCallee, TrialInliningState trialInliningState) {
nextCallee_ = nextCallee;

if (trialInliningState == TrialInliningState::Inlined) {
if (trialInliningState == TrialInliningState::Inlined &&
canUseTrialInlinedICScripts_) {
// Update icScript_ to point to the icScript of nextCallee
const uint32_t pcOff = script_->pcToOffset(pc_);
icScript_ = icScript_->findInlinedChild(pcOff);
Expand All @@ -496,6 +499,9 @@ void BaselineStackBuilder::setNextCallee(
// inlined ICScript available, but we also could not if we transitioned
// to TrialInliningState::Failure after being monomorphic inlined.
icScript_ = nextCallee->nonLazyScript()->jitScript()->icScript();
if (trialInliningState != TrialInliningState::MonomorphicInlined) {
canUseTrialInlinedICScripts_ = false;
}
}
}

Expand Down

0 comments on commit 82338d2

Please sign in to comment.