mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-03 14:28:39 +09:00
Issue #2308 & #1240 Follow-up - Replace JSOP_POS in ++/-- with JSOP_TONUMERIC. https://bugzilla.mozilla.org/show_bug.cgi?id=1519135
This commit is contained in:
parent
2b637c564f
commit
209d714434
28 changed files with 251 additions and 77 deletions
|
|
@ -1322,14 +1322,37 @@ BaselineCompiler::emit_JSOP_POS()
|
|||
// Keep top stack value in R0.
|
||||
frame.popRegsAndSync(1);
|
||||
|
||||
// Inline path for int32 and double.
|
||||
// Inline path for int32 and double; otherwise call VM.
|
||||
Label done;
|
||||
masm.branchTestNumber(Assembler::Equal, R0, &done);
|
||||
|
||||
// Call IC.
|
||||
ICToNumber_Fallback::Compiler stubCompiler(cx);
|
||||
if (!emitOpIC(stubCompiler.getStub(&stubSpace_)))
|
||||
prepareVMCall();
|
||||
pushArg(R0);
|
||||
if (!callVM(ToNumberInfo)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
masm.bind(&done);
|
||||
frame.push(R0);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
BaselineCompiler::emit_JSOP_TONUMERIC()
|
||||
{
|
||||
// Keep top stack value in R0.
|
||||
frame.popRegsAndSync(1);
|
||||
|
||||
// Inline path for int32 and double; otherwise call VM.
|
||||
Label done;
|
||||
masm.branchTestNumber(Assembler::Equal, R0, &done);
|
||||
|
||||
prepareVMCall();
|
||||
pushArg(R0);
|
||||
if (!callVM(ToNumericInfo)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
masm.bind(&done);
|
||||
frame.push(R0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue