зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1364608 - Stash rval in AsyncIteratorClose. (r=arai)
This commit is contained in:
Родитель
8b07ba2a07
Коммит
f9087690d7
|
@ -5422,7 +5422,14 @@ BytecodeEmitter::emitIteratorClose(IteratorKind iterKind /* = IteratorKind::Sync
|
|||
checkTypeSet(JSOP_CALL);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -5450,8 +5457,15 @@ BytecodeEmitter::emitIteratorClose(IteratorKind iterKind /* = IteratorKind::Sync
|
|||
if (!emitPopN(2)) // ... RESULT
|
||||
return false;
|
||||
} else {
|
||||
if (!emitCheckIsObj(CheckIsObjectKind::IteratorReturn)) // ... RESULT
|
||||
if (!emitCheckIsObj(CheckIsObjectKind::IteratorReturn)) // ... RVAL? RESULT
|
||||
return false;
|
||||
|
||||
if (iterKind == IteratorKind::Async) {
|
||||
if (!emit1(JSOP_SWAP)) // ... RESULT RVAL
|
||||
return false;
|
||||
if (!emit1(JSOP_SETRVAL)) // ... RESULT
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ifReturnMethodIsDefined.emitElse())
|
||||
|
|
|
@ -507,17 +507,11 @@ skip script test262/language/statements/for-await-of/async-func-dstr-let-ary-ptr
|
|||
skip script test262/language/statements/for-await-of/async-func-dstr-let-ary-ptrn-rest-id-iter-step-err.js
|
||||
skip script test262/language/statements/for-await-of/async-func-dstr-var-ary-ptrn-elision-step-err.js
|
||||
skip script test262/language/statements/for-await-of/async-func-dstr-var-ary-ptrn-rest-id-iter-step-err.js
|
||||
skip script test262/language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-elision-iter-close.js
|
||||
skip script test262/language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-elision-step-err.js
|
||||
skip script test262/language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-rest-id-iter-close.js
|
||||
skip script test262/language/statements/for-await-of/async-gen-dstr-const-ary-ptrn-rest-id-iter-step-err.js
|
||||
skip script test262/language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-elision-iter-close.js
|
||||
skip script test262/language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-elision-step-err.js
|
||||
skip script test262/language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-rest-id-iter-step-err.js
|
||||
skip script test262/language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-rest-id-iter-close.js
|
||||
skip script test262/language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-elision-iter-close.js
|
||||
skip script test262/language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-elision-step-err.js
|
||||
skip script test262/language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-rest-id-iter-close.js
|
||||
skip script test262/language/statements/for-await-of/async-gen-dstr-var-ary-ptrn-rest-id-iter-step-err.js
|
||||
|
||||
# Missing expression statement restriction for "async function"
|
||||
|
|
Загрузка…
Ссылка в новой задаче