mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-22 15:17:29 +09:00
parent
3206741afa
commit
ba1cf5608c
1 changed files with 16 additions and 2 deletions
|
|
@ -5365,7 +5365,14 @@ BytecodeEmitter::emitIteratorClose(IteratorKind iterKind /* = IteratorKind::Sync
|
||||||
checkTypeSet(JSOP_CALL);
|
checkTypeSet(JSOP_CALL);
|
||||||
|
|
||||||
if (iterKind == IteratorKind::Async) {
|
if (iterKind == IteratorKind::Async) {
|
||||||
if (!emitAwait()) // ... ... RESULT
|
if (completionKind != CompletionKind::Throw) {
|
||||||
|
// Await clobbers rval, so save the current rval.
|
||||||
|
if (!emit1(JSOP_GETRVAL)) // ... ... RESULT RVAL
|
||||||
|
return false;
|
||||||
|
if (!emit1(JSOP_SWAP)) // ... ... RVAL RESULT
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (!emitAwait()) // ... ... RVAL? RESULT
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -5395,8 +5402,15 @@ BytecodeEmitter::emitIteratorClose(IteratorKind iterKind /* = IteratorKind::Sync
|
||||||
if (!emit1(JSOP_POP)) // ... RESULT
|
if (!emit1(JSOP_POP)) // ... RESULT
|
||||||
return false;
|
return false;
|
||||||
} else {
|
} else {
|
||||||
if (!emitCheckIsObj(CheckIsObjectKind::IteratorReturn)) // ... RESULT
|
if (!emitCheckIsObj(CheckIsObjectKind::IteratorReturn)) // ... RVAL? RESULT
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (iterKind == IteratorKind::Async) {
|
||||||
|
if (!emit1(JSOP_SWAP)) // ... RESULT RVAL
|
||||||
|
return false;
|
||||||
|
if (!emit1(JSOP_SETRVAL)) // ... RESULT
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ifReturnMethodIsDefined.emitElse())
|
if (!ifReturnMethodIsDefined.emitElse())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue