зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1598548 part 7 - Add a RetAddrEntry::Kind for interrupt check callVM. r=tcampbell
This is necessary for the next patch: it will merge JSOP_LOOPHEAD and JSOP_LOOPENTRY but that means there can be multiple callVMs for that op and this confuses DebugModeOSR (interrupts can trigger debugger recompilation). Differential Revision: https://phabricator.services.mozilla.com/D55631 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
5634061f54
Коммит
2d2df9761e
|
@ -1259,8 +1259,12 @@ bool BaselineCodeGen<Handler>::emitInterruptCheck() {
|
|||
|
||||
prepareVMCall();
|
||||
|
||||
// Use a custom RetAddrEntry::Kind so DebugModeOSR can distinguish this call
|
||||
// from other callVMs that might happen at this pc.
|
||||
const RetAddrEntry::Kind kind = RetAddrEntry::Kind::InterruptCheck;
|
||||
|
||||
using Fn = bool (*)(JSContext*);
|
||||
if (!callVM<Fn, InterruptCheck>()) {
|
||||
if (!callVM<Fn, InterruptCheck>(kind)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -182,6 +182,8 @@ static const char* RetAddrEntryKindToString(RetAddrEntry::Kind kind) {
|
|||
return "warmup counter";
|
||||
case RetAddrEntry::Kind::StackCheck:
|
||||
return "stack check";
|
||||
case RetAddrEntry::Kind::InterruptCheck:
|
||||
return "interrupt check";
|
||||
case RetAddrEntry::Kind::DebugTrap:
|
||||
return "debug trap";
|
||||
case RetAddrEntry::Kind::DebugPrologue:
|
||||
|
@ -284,6 +286,7 @@ static void PatchBaselineFramesForDebugMode(
|
|||
switch (kind) {
|
||||
case RetAddrEntry::Kind::IC:
|
||||
case RetAddrEntry::Kind::CallVM:
|
||||
case RetAddrEntry::Kind::InterruptCheck:
|
||||
case RetAddrEntry::Kind::WarmupCounter:
|
||||
case RetAddrEntry::Kind::StackCheck: {
|
||||
// Cases A, B, C, D above.
|
||||
|
@ -298,6 +301,7 @@ static void PatchBaselineFramesForDebugMode(
|
|||
switch (kind) {
|
||||
case RetAddrEntry::Kind::IC:
|
||||
case RetAddrEntry::Kind::CallVM:
|
||||
case RetAddrEntry::Kind::InterruptCheck:
|
||||
retAddrEntry = &bl->retAddrEntryFromPCOffset(pcOffset, kind);
|
||||
break;
|
||||
case RetAddrEntry::Kind::WarmupCounter:
|
||||
|
|
|
@ -110,6 +110,9 @@ class RetAddrEntry {
|
|||
// A callVM for the over-recursion check on function entry.
|
||||
StackCheck,
|
||||
|
||||
// A callVM for an interrupt check.
|
||||
InterruptCheck,
|
||||
|
||||
// DebugTrapHandler (for debugger breakpoints/stepping).
|
||||
DebugTrap,
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче