Summary: | [ES7] yield star should not return if the inner iterator.throw returns { done: true } | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Yusuke Suzuki <ysuzuki> | ||||||||
Component: | New Bugs | Assignee: | Yusuke Suzuki <ysuzuki> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | benjamin, commit-queue, darin, fpizlo, ggaren, keith_miller, mark.lam, msaboff, saam | ||||||||
Priority: | P2 | ||||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Yusuke Suzuki
2016-04-14 05:50:56 PDT
Created attachment 276391 [details]
Patch
This change is also listed here. http://kangax.github.io/compat-table/esnext/ Created attachment 276395 [details]
Patch
Created attachment 276396 [details]
Patch
Comment on attachment 276396 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=276396&action=review > Source/JavaScriptCore/builtins/GeneratorPrototype.js:83 > + return @generatorResume(this, exception, @GeneratorResumeModeThrow); Use bytecode intrinsic constants. We can keep in sync with JSGenerator::constants. > Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:4442 > + emitThrowTypeError(ASCIILiteral("Iterator result interface is not an object.")); When innerIterator.throw() does not throw, we fall into the usual iteration path (branchOnResult). > Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp:4491 > + emitLabel(branchOnResult.get()); The iterator loop's condition phase. Note that this is not staging change. It is already introduced into the spec draft (ECMAScript 2016 spec). Comment on attachment 276396 [details]
Patch
Looks OK to me, but it’s slightly outside my expertise which is why I am not marking it review+
Comment on attachment 276396 [details]
Patch
r=me
Comment on attachment 276396 [details]
Patch
Thanks!
Comment on attachment 276396 [details] Patch Clearing flags on attachment: 276396 Committed r199652: <http://trac.webkit.org/changeset/199652> All reviewed patches have been landed. Closing bug. |