mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-04 06:48:38 +09:00
Issue #2089 - Avoid copying/recreating iterator result, AsyncGeneratorRequest and GeneratorObject expression stacks
Based-on: m-c 1394682,1410283,1396499
This commit is contained in:
parent
8322304fb3
commit
ece0496985
12 changed files with 208 additions and 38 deletions
|
|
@ -4557,20 +4557,20 @@ BaselineCompiler::emit_JSOP_RESUME()
|
|||
Register initLength = regs.takeAny();
|
||||
masm.loadPtr(Address(scratch2, NativeObject::offsetOfElements()), scratch2);
|
||||
masm.load32(Address(scratch2, ObjectElements::offsetOfInitializedLength()), initLength);
|
||||
masm.store32(Imm32(0), Address(scratch2, ObjectElements::offsetOfInitializedLength()));
|
||||
|
||||
Label loop, loopDone;
|
||||
masm.bind(&loop);
|
||||
masm.branchTest32(Assembler::Zero, initLength, initLength, &loopDone);
|
||||
{
|
||||
masm.pushValue(Address(scratch2, 0));
|
||||
masm.patchableCallPreBarrier(exprStackSlot, MIRType::Value);
|
||||
masm.addPtr(Imm32(sizeof(Value)), scratch2);
|
||||
masm.sub32(Imm32(1), initLength);
|
||||
masm.jump(&loop);
|
||||
}
|
||||
masm.bind(&loopDone);
|
||||
|
||||
masm.patchableCallPreBarrier(exprStackSlot, MIRType::Value);
|
||||
masm.storeValue(NullValue(), exprStackSlot);
|
||||
regs.add(initLength);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue