• littledan's avatar
    Ensure IteratorClose is called for errors in non-declaring assignments · 1aee7555
    littledan authored
    There was a bug in for-of loops without newly declared variables: If,
    in performing the assignment, an exception were thrown, then
    IteratorClose would not be called. The problem was that the assignment
    is done as part of assign_each, which happens before the loop is put
    back in the state which is recognized to be breaking/throwing/returning
    early.
    
    This patch modifies the for-of desugaring by setting the loop state
    before, rather than after, evaluating the assign_each portion, which is
    responsible for evaluating the assignment in for-of loops which do not
    have a declaration.
    
    This patch, together with https://codereview.chromium.org/1728973002 ,
    allow all test262 iterator return-related tests to pass.
    
    R=rossberg
    BUG=v8:4776
    LOG=Y
    
    Review URL: https://codereview.chromium.org/1731773003
    
    Cr-Commit-Position: refs/heads/master@{#34262}
    1aee7555
Name
Last commit
Last update
..
regress Loading commit data...
array-species-constructor-delete.js Loading commit data...
array-species-constructor.js Loading commit data...
array-species-delete.js Loading commit data...
array-species-modified.js Loading commit data...
array-species-parent-constructor.js Loading commit data...
array-species-proto.js Loading commit data...
array-species.js Loading commit data...
arraybuffer-species.js Loading commit data...
atomics.js Loading commit data...
block-conflicts-sloppy.js Loading commit data...
block-const-assign-sloppy.js Loading commit data...
block-eval-var-over-let.js Loading commit data...
block-for-sloppy.js Loading commit data...
block-lazy-compile.js Loading commit data...
block-leave-sloppy.js Loading commit data...
block-let-crankshaft-sloppy.js Loading commit data...
block-let-declaration-sloppy.js Loading commit data...
block-let-semantics-sloppy.js Loading commit data...
block-scoping-sloppy.js Loading commit data...
block-scoping-top-level-sloppy.js Loading commit data...
block-sloppy-function.js Loading commit data...
dataview-accessors.js Loading commit data...
debug-step-destructuring-assignment.js Loading commit data...
debug-step-destructuring-bind.js Loading commit data...
debug-stepin-default-parameters.js Loading commit data...
debug-stepin-proxies.js Loading commit data...
default-parameters-debug.js Loading commit data...
default-parameters-destructuring.js Loading commit data...
default-parameters.js Loading commit data...
destructuring-assignment-lazy.js Loading commit data...
destructuring-assignment.js Loading commit data...
destructuring-parameters-literalcount-nolazy.js Loading commit data...
destructuring-parameters-literalcount.js Loading commit data...
destructuring.js Loading commit data...
do-expressions-control.js Loading commit data...
do-expressions.js Loading commit data...
function-name.js Loading commit data...
function-sent.js Loading commit data...
futex.js Loading commit data...
generators.js Loading commit data...
instanceof-es6.js Loading commit data...
iterator-close.js Loading commit data...
module-linking.js Loading commit data...
module-parsing-eval.js Loading commit data...
module-recompile.js Loading commit data...
module-resolution.js Loading commit data...
modules.js Loading commit data...
object-entries.js Loading commit data...
object-get-own-property-descriptors.js Loading commit data...
object-values.js Loading commit data...
private-symbols.js Loading commit data...
private.js Loading commit data...
promise-species.js Loading commit data...
proxies-accesschecks.js Loading commit data...
proxies-apply.js Loading commit data...
proxies-bind.js Loading commit data...
proxies-construct.js Loading commit data...
proxies-cross-realm-exception.js Loading commit data...
proxies-define-property.js Loading commit data...
proxies-delete-property.js Loading commit data...
proxies-example-membrane.js Loading commit data...
proxies-for.js Loading commit data...
proxies-function.js Loading commit data...
proxies-get-own-property-descriptor.js Loading commit data...
proxies-get-prototype-of.js Loading commit data...
proxies-get.js Loading commit data...
proxies-global-reference.js Loading commit data...
proxies-has-own-property.js Loading commit data...
proxies-has.js Loading commit data...
proxies-hash.js Loading commit data...
proxies-integrity.js Loading commit data...
proxies-is-extensible.js Loading commit data...
proxies-json.js Loading commit data...
proxies-keys.js Loading commit data...
proxies-object-assign.js Loading commit data...
proxies-ownkeys.js Loading commit data...
proxies-prevent-extensions.js Loading commit data...
proxies-property-is-enumerable.js Loading commit data...
proxies-prototype-handler-stackoverflow.js Loading commit data...
proxies-prototype-target-stackoverflow.js Loading commit data...
proxies-revocable.js Loading commit data...
proxies-set-prototype-of.js Loading commit data...
proxies-set.js Loading commit data...
proxies-with-unscopables.js Loading commit data...
proxies-with.js Loading commit data...
proxies.js Loading commit data...
reflect-apply.js Loading commit data...
reflect-construct.js Loading commit data...
reflect-define-property.js Loading commit data...
reflect-get-own-property-descriptor.js Loading commit data...
reflect-get-prototype-of.js Loading commit data...
reflect-own-keys.js Loading commit data...
reflect-prevent-extensions.js Loading commit data...
reflect-set-prototype-of.js Loading commit data...
reflect.js Loading commit data...
regexp-flags.js Loading commit data...
regexp-lookbehind.js Loading commit data...
regexp-sticky.js Loading commit data...
set-prototype-of.js Loading commit data...
sharedarraybuffer.js Loading commit data...
simd.js Loading commit data...
species.js Loading commit data...
string-match.js Loading commit data...
string-replace.js Loading commit data...
string-split.js Loading commit data...
to-length.js Loading commit data...
to-name.js Loading commit data...
to-number.js Loading commit data...
to-primitive.js Loading commit data...
to-string.js Loading commit data...
typedarray-species.js Loading commit data...
unicode-character-ranges.js Loading commit data...
unicode-escapes-in-regexps.js Loading commit data...
unicode-regexp-backrefs.js Loading commit data...
unicode-regexp-ignore-case-noi18n.js Loading commit data...
unicode-regexp-ignore-case.js Loading commit data...
unicode-regexp-last-index.js Loading commit data...
unicode-regexp-property-class.js Loading commit data...
unicode-regexp-restricted-syntax.js Loading commit data...
unicode-regexp-unanchored-advance.js Loading commit data...
unicode-regexp-zero-length.js Loading commit data...