mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 10:49:00 +00:00
[vm/bytecode] Avoid eager foreground compilations from InlineCacheMissHandler
Previously, InlineCacheMissHandler forced foreground compilation of a target even if interpreter is enabled. This might cause excessive compilation of functions which are executed only a few times, as well as simultaneous compilation of a function in background and foreground. Change-Id: If716370d408cf9cff1b72123ab24d609246961a1 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112200 Reviewed-by: Ryan Macnak <rmacnak@google.com> Commit-Queue: Alexander Markov <alexmarkov@google.com>
This commit is contained in:
parent
08205fd62f
commit
00bbb5fe75
1 changed files with 6 additions and 0 deletions
|
@ -1139,6 +1139,12 @@ static void TrySwitchInstanceCall(const ICData& ic_data,
|
|||
return;
|
||||
}
|
||||
|
||||
// Avoid forcing foreground compilation if target function is still
|
||||
// interpreted.
|
||||
if (FLAG_enable_interpreter && !target_function.HasCode()) {
|
||||
return;
|
||||
}
|
||||
|
||||
const Array& data = Array::Handle(zone, ic_data.entries());
|
||||
const Code& target = Code::Handle(zone, target_function.EnsureHasCode());
|
||||
CodePatcher::PatchInstanceCallAt(caller_frame->pc(), caller_code, data,
|
||||
|
|
Loading…
Reference in a new issue