summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/expressions/assignment
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 00:47:55 +0000
commit26a029d407be480d791972afb5975cf62c9360a6 (patch)
treef435a8308119effd964b339f76abb83a57c29483 /js/src/tests/test262/language/expressions/assignment
parentInitial commit. (diff)
downloadfirefox-26a029d407be480d791972afb5975cf62c9360a6.tar.xz
firefox-26a029d407be480d791972afb5975cf62c9360a6.zip
Adding upstream version 124.0.1.upstream/124.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'js/src/tests/test262/language/expressions/assignment')
-rw-r--r--js/src/tests/test262/language/expressions/assignment/11.13.1-1-6-s.js17
-rw-r--r--js/src/tests/test262/language/expressions/assignment/11.13.1-1-s-strict.js26
-rw-r--r--js/src/tests/test262/language/expressions/assignment/11.13.1-2-s-strict.js28
-rw-r--r--js/src/tests/test262/language/expressions/assignment/11.13.1-3-s-strict.js21
-rw-r--r--js/src/tests/test262/language/expressions/assignment/11.13.1-4-1.js25
-rw-r--r--js/src/tests/test262/language/expressions/assignment/11.13.1-4-14-s-strict.js18
-rw-r--r--js/src/tests/test262/language/expressions/assignment/11.13.1-4-27-s-strict.js18
-rw-r--r--js/src/tests/test262/language/expressions/assignment/11.13.1-4-28gs-strict.js17
-rw-r--r--js/src/tests/test262/language/expressions/assignment/11.13.1-4-29gs-strict.js17
-rw-r--r--js/src/tests/test262/language/expressions/assignment/11.13.1-4-3-s-strict.js18
-rw-r--r--js/src/tests/test262/language/expressions/assignment/11.13.1-4-6-s-strict.js18
-rw-r--r--js/src/tests/test262/language/expressions/assignment/8.12.5-3-b_1.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/8.12.5-3-b_2.js33
-rw-r--r--js/src/tests/test262/language/expressions/assignment/8.12.5-5-b_1.js30
-rw-r--r--js/src/tests/test262/language/expressions/assignment/8.14.4-8-b_1.js19
-rw-r--r--js/src/tests/test262/language/expressions/assignment/8.14.4-8-b_2-strict.js20
-rw-r--r--js/src/tests/test262/language/expressions/assignment/S11.13.1_A2.1_T1.js49
-rw-r--r--js/src/tests/test262/language/expressions/assignment/S11.13.1_A2.1_T2.js21
-rw-r--r--js/src/tests/test262/language/expressions/assignment/S11.13.1_A3.1.js22
-rw-r--r--js/src/tests/test262/language/expressions/assignment/S11.13.1_A3.2.js22
-rw-r--r--js/src/tests/test262/language/expressions/assignment/S11.13.1_A4_T1.js17
-rw-r--r--js/src/tests/test262/language/expressions/assignment/S11.13.1_A4_T2.js20
-rw-r--r--js/src/tests/test262/language/expressions/assignment/S11.13.1_A5_T1.js33
-rw-r--r--js/src/tests/test262/language/expressions/assignment/S11.13.1_A5_T2.js30
-rw-r--r--js/src/tests/test262/language/expressions/assignment/S11.13.1_A5_T3.js32
-rw-r--r--js/src/tests/test262/language/expressions/assignment/S11.13.1_A6_T1.js31
-rw-r--r--js/src/tests/test262/language/expressions/assignment/S11.13.1_A6_T2.js31
-rw-r--r--js/src/tests/test262/language/expressions/assignment/S11.13.1_A6_T3.js32
-rw-r--r--js/src/tests/test262/language/expressions/assignment/S11.13.1_A7_T3.js28
-rw-r--r--js/src/tests/test262/language/expressions/assignment/S11.13.1_A7_T4.js27
-rw-r--r--js/src/tests/test262/language/expressions/assignment/S8.12.4_A1.js17
-rw-r--r--js/src/tests/test262/language/expressions/assignment/S8.12.5_A1.js39
-rw-r--r--js/src/tests/test262/language/expressions/assignment/S8.12.5_A2.js50
-rw-r--r--js/src/tests/test262/language/expressions/assignment/assignment-operator-calls-putvalue-lref--rval--1.js43
-rw-r--r--js/src/tests/test262/language/expressions/assignment/assignment-operator-calls-putvalue-lref--rval-.js38
-rw-r--r--js/src/tests/test262/language/expressions/assignment/browser.js0
-rw-r--r--js/src/tests/test262/language/expressions/assignment/destructuring/browser.js0
-rw-r--r--js/src/tests/test262/language/expressions/assignment/destructuring/iterator-destructuring-property-reference-target-evaluation-order.js82
-rw-r--r--js/src/tests/test262/language/expressions/assignment/destructuring/keyed-destructuring-property-reference-target-evaluation-order.js77
-rw-r--r--js/src/tests/test262/language/expressions/assignment/destructuring/obj-prop-__proto__dup.js34
-rw-r--r--js/src/tests/test262/language/expressions/assignment/destructuring/shell.js0
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-assignment.js33
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-evaluation.js31
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-fn-name-arrow.js45
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-fn-name-class.js48
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-fn-name-cover.js47
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-fn-name-fn.js47
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-fn-name-gen.js47
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-in.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-let.js26
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-order.js32
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-simple-no-strict.js30
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-yield-expr.js45
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-yield-ident-invalid-strict.js25
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-yield-ident-valid.js30
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-get-err.js34
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-nrml-close-err.js51
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-nrml-close-null.js57
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-nrml-close-skip.js53
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-nrml-close.js69
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-rtrn-close-err.js68
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-rtrn-close-null.js77
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-rtrn-close.js84
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-thrw-close-err.js56
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-thrw-close-skip.js50
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-thrw-close.js65
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-invalid.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-null.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-undefined-hole.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-undefined-own.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-undefined.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-yield-expr.js47
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-yield-ident-invalid-strict.js25
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-yield-ident-valid.js30
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-memberexpr-optchain-prop-ref-init.js57
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-invalid.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-null.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-undefined-hole.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-undefined-own.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-undefined.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-yield-expr.js45
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-yield-ident-invalid-strict.js25
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-yield-ident-valid.js30
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-const.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-let.js25
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-obj-literal-optchain-prop-ref-init.js60
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-obj-literal-prop-ref-init-active.js70
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-obj-literal-prop-ref-init.js70
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-obj-literal-prop-ref.js70
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-prop-ref-no-get.js37
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-prop-ref-user-err.js28
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-prop-ref.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-unresolvable-no-strict.js33
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-unresolvable-strict-strict.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-target-identifier.js31
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-target-simple-no-strict.js30
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-target-simple-strict-strict.js25
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-target-yield-expr.js47
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-target-yield-invalid-strict.js25
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-target-yield-valid.js30
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-elision-iter-abpt.js64
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-elision-iter-nrml-close-err.js60
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-elision-iter-nrml-close-null.js63
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-elision-iter-nrml-close-skip.js61
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-elision-iter-nrml-close.js76
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-get-err.js35
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-nrml-close-err.js60
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-nrml-close-null.js63
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-nrml-close-skip.js62
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-nrml-close.js75
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-err.js82
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-null.js82
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close.js93
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-thrw-close-err.js68
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-thrw-close-skip.js59
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-thrw-close.js71
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-nrml-close-skip.js62
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-err.js84
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-null.js79
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close.js90
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-thrw-close-err.js69
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-thrw-close-skip.js62
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-thrw-close.js73
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elision-iter-abpt.js50
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elision-iter-get-err.js33
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elision-iter-nrml-close-err.js53
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elision-iter-nrml-close-null.js57
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elision-iter-nrml-close-skip.js54
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elision-iter-nrml-close.js69
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-array.js28
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-bool.js23
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-null.js23
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-num.js23
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-string.js28
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-symbol.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-undef.js23
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-empty-iter-close-err.js49
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-empty-iter-close-null.js51
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-empty-iter-close.js65
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-empty-iter-get-err.js33
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-array.js28
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-bool.js23
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-null.js23
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-num.js23
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-string.js28
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-symbol.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-undef.js23
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-iteration.js36
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-after-element.js32
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-after-elision.js31
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-before-element.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-before-elision.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-before-rest.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-elision-invalid.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-elision-iter-abpt.js55
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-elision.js32
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-init.js25
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-get-err.js34
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-nrml-close-skip.js56
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-rtrn-close-err.js79
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-rtrn-close-null.js79
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-rtrn-close.js94
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-thrw-close-err.js69
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-thrw-close-skip.js52
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-thrw-close.js77
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iteration.js37
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-lref-err.js61
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-lref.js65
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-invalid.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-iter-thrw-close-skip.js64
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-null.js30
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-undefined-hole.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-undefined-own.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-undefined.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-yield-expr.js47
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-yield-ident-invalid-strict.js25
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-yield-ident-valid.js30
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-invalid.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-null.js30
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-undefined-hole.js33
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-undefined-own.js33
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-undefined.js33
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-yield-expr.js45
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-yield-ident-invalid-strict.js25
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-yield-ident-valid.js30
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-const.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-let.js25
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-prop-ref-no-get.js40
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-prop-ref-user-err-iter-close-skip.js67
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-prop-ref-user-err.js28
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-prop-ref.js32
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-unresolvable-no-strict.js33
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-unresolvable-strict-strict.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-yield-expr.js49
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-yield-ident-invalid-strict.js26
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/array-rest-yield-ident-valid.js33
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/browser.js0
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-break-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-case-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-catch-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-class-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-const-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-continue-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-debugger-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-default-escaped-ext.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-default-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-default.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-delete-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-do-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-else-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-enum-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-export-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-extends-escaped-ext.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-extends-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-extends.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-finally-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-for-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-function-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-if-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-implements-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-import-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-in-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-instanceof-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-interface-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-let-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-new-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-package-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-private-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-protected-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-public-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-return-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-static-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-super-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-switch-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-this-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-throw-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-try-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-typeof-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-var-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-void-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-while-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-with-escaped.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-bool.js28
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-null.js23
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-num.js28
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-obj.js28
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-string.js28
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-symbol.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-undef.js23
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-resolution-first.js30
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-resolution-last.js30
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-resolution-lone.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-resolution-middle.js30
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-resolution-trlng.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-yield-expr.js27
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-yield-ident-invalid-strict.js25
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-yield-ident-valid.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-assignment-missing.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-assignment-null.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-assignment-truthy.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-assignment-undef.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-evaluation.js32
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-fn-name-arrow.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-fn-name-class.js47
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-fn-name-cover.js46
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-fn-name-fn.js46
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-fn-name-gen.js46
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-in.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-let.js26
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-order.js32
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-simple-no-strict.js30
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-simple-strict-strict.js25
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-yield-expr.js45
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-yield-ident-invalid-strict.js25
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-yield-ident-valid.js30
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-put-const.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-put-let.js25
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-put-unresolvable-no-strict.js33
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-put-unresolvable-strict-strict.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-simple-no-strict.js32
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-id-simple-strict-strict.js25
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-assignment-missing.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-assignment-null.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-assignment-truthy.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-assignment-undef.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-evaluation.js34
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-fn-name-arrow.js45
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-fn-name-class.js48
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-fn-name-cover.js47
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-fn-name-fn.js47
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-fn-name-gen.js47
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-in.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-let.js26
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-yield-expr.js44
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-yield-ident-invalid-strict.js25
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-yield-ident-valid.js30
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-memberexpr-optchain-prop-ref-init.js57
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-obj-literal-optchain-prop-ref-init.js60
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-obj-literal-prop-ref-init-active.js78
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-obj-literal-prop-ref-init.js78
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-obj-literal-prop-ref.js78
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-yield-expr.js46
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-yield-ident-invalid-strict.js25
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-yield-ident-valid.js30
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-identifier-resolution-first.js30
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-identifier-resolution-last.js30
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-identifier-resolution-lone.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-identifier-resolution-middle.js30
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-identifier-resolution-trlng.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-name-evaluation-error.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-name-evaluation.js31
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-invalid.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-null.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-undefined-own.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-undefined.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-yield-expr.js45
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-yield-ident-invalid-strict.js25
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-yield-ident-valid.js30
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-invalid.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-null.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-undefined-own.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-undefined.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-yield-expr.js45
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-yield-ident-invalid-strict.js25
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-yield-ident-valid.js30
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-const.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-let.js25
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-order.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-prop-ref-no-get.js37
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-prop-ref-user-err.js28
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-prop-ref.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-unresolvable-no-strict.js33
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-unresolvable-strict-strict.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-computed-property-no-strict.js47
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-computed-property.js48
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-descriptors.js46
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-empty-obj.js33
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-getter-abrupt-get-error.js28
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-getter.js38
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-1.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-1dot.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-1dot0.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-1e0.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-array-1.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-array-1e0.js42
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-string-1.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-not-last-element-invalid.js26
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-number.js33
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-order.js35
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-put-const.js25
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-same-name.js43
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-skip-non-enumerable.js46
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-str-val.js34
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-symbol-val.js33
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-to-property-with-setter.js40
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-to-property.js37
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-val-null.js25
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-val-undefined.js25
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-valid-object.js46
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/shell.js0
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-break-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-case-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-catch-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-class-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-const-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-continue-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-debugger-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-default-escaped-ext.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-default-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-default.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-delete-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-do-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-else-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-enum-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-export-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-extends-escaped-ext.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-extends-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-extends.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-finally-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-for-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-function-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-if-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-implements-escaped-strict.js42
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-import-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-in-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-instanceof-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-interface-escaped-strict.js42
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-let-escaped-strict.js42
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-new-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-package-escaped-strict.js42
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-private-escaped-strict.js42
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-protected-escaped-strict.js42
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-public-escaped-strict.js42
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-return-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-static-escaped-strict.js42
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-super-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-switch-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-this-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-throw-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-try-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-typeof-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-var-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-void-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-while-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-with-escaped.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/fn-name-arrow.js35
-rw-r--r--js/src/tests/test262/language/expressions/assignment/fn-name-class.js41
-rw-r--r--js/src/tests/test262/language/expressions/assignment/fn-name-cover.js39
-rw-r--r--js/src/tests/test262/language/expressions/assignment/fn-name-fn.js38
-rw-r--r--js/src/tests/test262/language/expressions/assignment/fn-name-gen.js39
-rw-r--r--js/src/tests/test262/language/expressions/assignment/fn-name-lhs-cover.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/fn-name-lhs-member.js29
-rw-r--r--js/src/tests/test262/language/expressions/assignment/id-arguments-strict-strict.js18
-rw-r--r--js/src/tests/test262/language/expressions/assignment/id-eval-strict-strict.js18
-rw-r--r--js/src/tests/test262/language/expressions/assignment/line-terminator.js20
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-break-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-case-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-catch-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-class-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-const-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-continue-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-debugger-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-default-escaped-ext.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-default-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-default.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-delete-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-do-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-else-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-enum-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-export-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-extends-escaped-ext.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-extends-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-extends.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-finally-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-for-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-function-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-if-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-implements-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-import-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-in-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-instanceof-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-interface-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-let-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-new-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-package-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-private-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-protected-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-public-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-return-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-static-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-super-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-switch-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-this-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-throw-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-try-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-typeof-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-var-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-void-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-while-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-with-escaped.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/non-simple-target.js19
-rw-r--r--js/src/tests/test262/language/expressions/assignment/shell.js0
-rw-r--r--js/src/tests/test262/language/expressions/assignment/target-assignment-inside-function.js24
-rw-r--r--js/src/tests/test262/language/expressions/assignment/target-assignment.js22
-rw-r--r--js/src/tests/test262/language/expressions/assignment/target-boolean.js23
-rw-r--r--js/src/tests/test262/language/expressions/assignment/target-cover-id.js30
-rw-r--r--js/src/tests/test262/language/expressions/assignment/target-cover-newtarget.js31
-rw-r--r--js/src/tests/test262/language/expressions/assignment/target-cover-yieldexpr.js34
-rw-r--r--js/src/tests/test262/language/expressions/assignment/target-member-computed-reference-null.js52
-rw-r--r--js/src/tests/test262/language/expressions/assignment/target-member-computed-reference-undefined.js52
-rw-r--r--js/src/tests/test262/language/expressions/assignment/target-member-identifier-reference-null.js33
-rw-r--r--js/src/tests/test262/language/expressions/assignment/target-member-identifier-reference-undefined.js33
-rw-r--r--js/src/tests/test262/language/expressions/assignment/target-newtarget.js31
-rw-r--r--js/src/tests/test262/language/expressions/assignment/target-null.js23
-rw-r--r--js/src/tests/test262/language/expressions/assignment/target-number.js23
-rw-r--r--js/src/tests/test262/language/expressions/assignment/target-string.js23
-rw-r--r--js/src/tests/test262/language/expressions/assignment/target-super-computed-reference-null.js39
-rw-r--r--js/src/tests/test262/language/expressions/assignment/target-super-identifier-reference-null.js39
-rw-r--r--js/src/tests/test262/language/expressions/assignment/white-space.js61
485 files changed, 17840 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/expressions/assignment/11.13.1-1-6-s.js b/js/src/tests/test262/language/expressions/assignment/11.13.1-1-6-s.js
new file mode 100644
index 0000000000..c21ad81858
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/11.13.1-1-6-s.js
@@ -0,0 +1,17 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: PutValue operates only on references (see step 3.a).
+es5id: 11.13.1-1-6-s
+description: >
+ simple assignment throws ReferenceError if LeftHandSide is an
+ unresolvable reference (base obj undefined)
+---*/
+
+
+assert.throws(ReferenceError, function() {
+ __ES3_1_test_suite_test_11_13_1_unique_id_0__.x = 42;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/11.13.1-1-s-strict.js b/js/src/tests/test262/language/expressions/assignment/11.13.1-1-s-strict.js
new file mode 100644
index 0000000000..cb32fcca40
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/11.13.1-1-s-strict.js
@@ -0,0 +1,26 @@
+'use strict';
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 11.13.1-1-s
+description: >
+ Strict Mode - TypeError is thrown if The LeftHandSide is a
+ reference to a data property with the attribute value
+ {[[Writable]]:false} under strict mode
+flags: [onlyStrict]
+---*/
+
+ var obj = {};
+ Object.defineProperty(obj, "prop", {
+ value: 10,
+ writable: false,
+ enumerable: true,
+ configurable: true
+ });
+assert.throws(TypeError, function() {
+ obj.prop = 20;
+});
+assert.sameValue(obj.prop, 10, 'obj.prop');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/11.13.1-2-s-strict.js b/js/src/tests/test262/language/expressions/assignment/11.13.1-2-s-strict.js
new file mode 100644
index 0000000000..693dec26ca
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/11.13.1-2-s-strict.js
@@ -0,0 +1,28 @@
+'use strict';
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 11.13.1-2-s
+description: >
+ Strict Mode - TypeError is thrown if The LeftHandSide is a
+ reference to an accessor property with the attribute value
+ {[[Set]]:undefined} under strict mode
+flags: [onlyStrict]
+---*/
+
+ var obj = {};
+ Object.defineProperty(obj, "prop", {
+ get: function () {
+ return 11;
+ },
+ set: undefined,
+ enumerable: true,
+ configurable: true
+ });
+assert.throws(TypeError, function() {
+ obj.prop = 20;
+});
+assert.sameValue(obj.prop, 11, 'obj.prop');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/11.13.1-3-s-strict.js b/js/src/tests/test262/language/expressions/assignment/11.13.1-3-s-strict.js
new file mode 100644
index 0000000000..acca291f6b
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/11.13.1-3-s-strict.js
@@ -0,0 +1,21 @@
+'use strict';
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 11.13.1-3-s
+description: >
+ Strict Mode - TypeError is thrown if The LeftHandSide is a
+ reference to a non-existent property of an object whose
+ [[Extensible]] internal property has the value false under strict
+ mode
+flags: [onlyStrict]
+---*/
+
+ var obj = {};
+ Object.preventExtensions(obj);
+assert.throws(TypeError, function() {
+ obj.len = 10;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/11.13.1-4-1.js b/js/src/tests/test262/language/expressions/assignment/11.13.1-4-1.js
new file mode 100644
index 0000000000..423d3f1d65
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/11.13.1-4-1.js
@@ -0,0 +1,25 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: PutValue operates only on references (see step 3.b).
+es5id: 11.13.1-4-1
+description: >
+ simple assignment creates property on the global object if
+ LeftHandSide is an unresolvable reference
+flags: [noStrict]
+---*/
+
+ function foo() {
+ __ES3_1_test_suite_test_11_13_1_unique_id_3__ = 42;
+ }
+ foo();
+
+ var desc = Object.getOwnPropertyDescriptor(this, '__ES3_1_test_suite_test_11_13_1_unique_id_3__');
+
+assert.sameValue(desc.value, 42, 'desc.value');
+assert.sameValue(desc.writable, true, 'desc.writable');
+assert.sameValue(desc.enumerable, true, 'desc.enumerable');
+assert.sameValue(desc.configurable, true, 'desc.configurable');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/11.13.1-4-14-s-strict.js b/js/src/tests/test262/language/expressions/assignment/11.13.1-4-14-s-strict.js
new file mode 100644
index 0000000000..6ceaa16864
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/11.13.1-4-14-s-strict.js
@@ -0,0 +1,18 @@
+'use strict';
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 11.13.1-4-14-s
+description: >
+ simple assignment throws TypeError if LeftHandSide is a readonly
+ property in strict mode (Number.MAX_VALUE)
+flags: [onlyStrict]
+---*/
+
+
+assert.throws(TypeError, function() {
+ Number.MAX_VALUE = 42;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/11.13.1-4-27-s-strict.js b/js/src/tests/test262/language/expressions/assignment/11.13.1-4-27-s-strict.js
new file mode 100644
index 0000000000..40b087e9aa
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/11.13.1-4-27-s-strict.js
@@ -0,0 +1,18 @@
+'use strict';
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 11.13.1-4-27-s
+description: >
+ simple assignment throws TypeError if LeftHandSide is a readonly
+ property in strict mode (Global.undefined)
+flags: [onlyStrict]
+---*/
+
+var global = this;
+assert.throws(TypeError, function() {
+ global.undefined = 42;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/11.13.1-4-28gs-strict.js b/js/src/tests/test262/language/expressions/assignment/11.13.1-4-28gs-strict.js
new file mode 100644
index 0000000000..d25f474f35
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/11.13.1-4-28gs-strict.js
@@ -0,0 +1,17 @@
+'use strict';
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 11.13.1-4-28gs
+description: >
+ Strict Mode - TypeError is thrown if the identifier 'Math.PI'
+ appears as the LeftHandSideExpression of simple assignment(=)
+flags: [onlyStrict]
+---*/
+
+assert.throws(TypeError, function() {
+ Math.PI = 20;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/11.13.1-4-29gs-strict.js b/js/src/tests/test262/language/expressions/assignment/11.13.1-4-29gs-strict.js
new file mode 100644
index 0000000000..891293bbc6
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/11.13.1-4-29gs-strict.js
@@ -0,0 +1,17 @@
+'use strict';
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 11.13.1-4-29gs
+description: >
+ Strict Mode - TypeError is thrown if the identifier 'Math.PI'
+ appears as the LeftHandSideExpression of simple assignment(=)
+flags: [onlyStrict]
+---*/
+
+assert.throws(TypeError, function() {
+ Math.PI = 20;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/11.13.1-4-3-s-strict.js b/js/src/tests/test262/language/expressions/assignment/11.13.1-4-3-s-strict.js
new file mode 100644
index 0000000000..de3c2d4804
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/11.13.1-4-3-s-strict.js
@@ -0,0 +1,18 @@
+'use strict';
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 11.13.1-4-3-s
+description: >
+ simple assignment throws TypeError if LeftHandSide is a readonly
+ property in strict mode (Global.Infinity)
+flags: [onlyStrict]
+---*/
+
+var global = this;
+assert.throws(TypeError, function() {
+ global.Infinity = 42;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/11.13.1-4-6-s-strict.js b/js/src/tests/test262/language/expressions/assignment/11.13.1-4-6-s-strict.js
new file mode 100644
index 0000000000..a5bc661296
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/11.13.1-4-6-s-strict.js
@@ -0,0 +1,18 @@
+'use strict';
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 11.13.1-4-6-s
+description: >
+ simple assignment throws TypeError if LeftHandSide is a readonly
+ property in strict mode (Function.length)
+flags: [onlyStrict]
+---*/
+
+
+assert.throws(TypeError, function() {
+ Function.length = 42;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/8.12.5-3-b_1.js b/js/src/tests/test262/language/expressions/assignment/8.12.5-3-b_1.js
new file mode 100644
index 0000000000..5fe405cfa3
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/8.12.5-3-b_1.js
@@ -0,0 +1,29 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 8.12.5-3-b_1
+description: >
+ Changing the value of a data property should not affect it's
+ non-value property descriptor attributes.
+---*/
+
+ var origDesc = Object.getOwnPropertyDescriptor(Array.prototype, "reduce");
+ var newDesc;
+
+ Array.prototype.reduce = function () {;};
+ newDesc = Object.getOwnPropertyDescriptor(Array.prototype, "reduce");
+ var descArray = [origDesc, newDesc];
+
+ for (var j in descArray) { //Ensure no attributes are magically added to newDesc
+ for (var i in descArray[j]) {
+ if (i==="value") {
+ assert.notSameValue(origDesc[i], newDesc[i], 'origDesc[i]');
+ }
+ else {
+ assert.sameValue(origDesc[i], newDesc[i], 'origDesc[i]');
+ }
+ }
+ }
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/8.12.5-3-b_2.js b/js/src/tests/test262/language/expressions/assignment/8.12.5-3-b_2.js
new file mode 100644
index 0000000000..b276570169
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/8.12.5-3-b_2.js
@@ -0,0 +1,33 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 8.12.5-3-b_2
+description: >
+ Changing the value of a data property should not affect it's
+ non-value property descriptor attributes.
+---*/
+
+ var tempObj = {};
+
+ Object.defineProperty(tempObj, "reduce", { value:456, enumerable:false, writable:true});
+ var origDesc = Object.getOwnPropertyDescriptor(tempObj, "reduce");
+
+ var newDesc;
+
+ tempObj.reduce = 123;
+ newDesc = Object.getOwnPropertyDescriptor(tempObj, "reduce");
+ var descArray = [origDesc, newDesc];
+
+ for (var j in descArray) {
+ for (var i in descArray[j]) {
+ if (i==="value") {
+ assert.notSameValue(origDesc[i], newDesc[i], 'origDesc[i]');
+ }
+ else {
+ assert.sameValue(origDesc[i], newDesc[i], 'origDesc[i]');
+ }
+ }
+ }
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/8.12.5-5-b_1.js b/js/src/tests/test262/language/expressions/assignment/8.12.5-5-b_1.js
new file mode 100644
index 0000000000..b37a501262
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/8.12.5-5-b_1.js
@@ -0,0 +1,30 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 8.12.5-5-b_1
+description: >
+ Changing the value of an accessor property should not affect it's
+ property descriptor attributes.
+---*/
+
+ var tempObj = {};
+
+ Object.defineProperty(tempObj, "reduce", { get: function() {return 456;}, enumerable:false, set: function() {;}});
+ var origDesc = Object.getOwnPropertyDescriptor(tempObj, "reduce");
+
+ var newDesc;
+
+ tempObj.reduce = 123;
+ newDesc = Object.getOwnPropertyDescriptor(tempObj, "reduce");
+ var descArray = [origDesc, newDesc];
+
+ for (var j in descArray) {
+ for (var i in descArray[j]) {
+ assert.sameValue(origDesc[i], newDesc[i], 'origDesc[i]');
+ }
+ }
+
+assert.sameValue(tempObj.reduce, 456, 'tempObj.reduce');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/8.14.4-8-b_1.js b/js/src/tests/test262/language/expressions/assignment/8.14.4-8-b_1.js
new file mode 100644
index 0000000000..e80c3d8ea0
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/8.14.4-8-b_1.js
@@ -0,0 +1,19 @@
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 8.14.4-8-b_1
+description: Non-writable property on a prototype written to.
+flags: [noStrict]
+---*/
+
+ function foo() {};
+ Object.defineProperty(foo.prototype, "bar", {value: "unwritable"});
+
+ var o = new foo();
+ o.bar = "overridden";
+
+assert.sameValue(o.hasOwnProperty("bar"), false, 'o.hasOwnProperty("bar")');
+assert.sameValue(o.bar, "unwritable", 'o.bar');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/8.14.4-8-b_2-strict.js b/js/src/tests/test262/language/expressions/assignment/8.14.4-8-b_2-strict.js
new file mode 100644
index 0000000000..8421c86137
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/8.14.4-8-b_2-strict.js
@@ -0,0 +1,20 @@
+'use strict';
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es5id: 8.14.4-8-b_2
+description: Non-writable property on a prototype written to in strict mode.
+flags: [onlyStrict]
+---*/
+
+ function foo() {};
+ Object.defineProperty(foo.prototype, "bar", {value: "unwritable"});
+
+ var o = new foo();
+assert.throws(TypeError, function() {
+ o.bar = "overridden";
+});
+assert.sameValue(o.bar, "unwritable", 'o.bar');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/S11.13.1_A2.1_T1.js b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A2.1_T1.js
new file mode 100644
index 0000000000..03cd57a083
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A2.1_T1.js
@@ -0,0 +1,49 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Operator x = y uses GetValue and PutValue
+es5id: 11.13.1_A2.1_T1
+description: Either AssigmentExpression is not Reference or GetBase is not null
+---*/
+
+//CHECK#1
+x = 1;
+if (x !== 1) {
+ throw new Test262Error('#1: x = 1; x === 1. Actual: ' + (x));
+}
+
+//CHECK#2
+var x = 1;
+if (x !== 1) {
+ throw new Test262Error('#2: var x = 1; x === 1. Actual: ' + (x));
+}
+
+//CHECK#3
+y = 1;
+x = y;
+if (x !== 1) {
+ throw new Test262Error('#3: y = 1; x = y; x === 1. Actual: ' + (x));
+}
+
+//CHECK#4
+var y = 1;
+var x = y;
+if (x !== 1) {
+ throw new Test262Error('#4: var y = 1; var x = y; x === 1. Actual: ' + (x));
+}
+
+//CHECK#5
+var objectx = new Object();
+var objecty = new Object();
+objecty.prop = 1.1;
+objectx.prop = objecty.prop;
+if (objectx.prop !== objecty.prop) {
+ throw new Test262Error('#5: var objectx = new Object(); var objecty = new Object(); objecty.prop = 1; objectx.prop = objecty.prop; objectx.prop === objecty.prop. Actual: ' + (objectx.prop));
+} else {
+ if (objectx === objecty) {
+ throw new Test262Error('#5: var objectx = new Object(); var objecty = new Object(); objecty.prop = 1; objectx.prop = objecty.prop; objectx !== objecty');
+ }
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/S11.13.1_A2.1_T2.js b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A2.1_T2.js
new file mode 100644
index 0000000000..1d6919eee2
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A2.1_T2.js
@@ -0,0 +1,21 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Operator x = y uses GetValue and PutValue
+es5id: 11.13.1_A2.1_T2
+description: If GetBase(AssigmentExpression) is null, throw ReferenceError
+---*/
+
+//CHECK#1
+try {
+ x = y;
+ throw new Test262Error('#1.1: x = y throw ReferenceError. Actual: ' + (x = y));
+}
+catch (e) {
+ if ((e instanceof ReferenceError) !== true) {
+ throw new Test262Error('#1.2: x = y throw ReferenceError. Actual: ' + (e));
+ }
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/S11.13.1_A3.1.js b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A3.1.js
new file mode 100644
index 0000000000..3dc00bf2c2
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A3.1.js
@@ -0,0 +1,22 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Operator x = y PutValue(x, y)
+es5id: 11.13.1_A3.1
+description: Checking Expression and Variable statements
+---*/
+
+//CHECK#1
+var x = 1;
+if (x !== 1) {
+ throw new Test262Error('#1: var x = 1; x === 1. Actual: ' + (x));
+}
+
+//CHECK#2
+x = 1;
+if (x !== 1) {
+ throw new Test262Error('#2: x = 1; x === 1. Actual: ' + (x));
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/S11.13.1_A3.2.js b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A3.2.js
new file mode 100644
index 0000000000..5e27a625a1
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A3.2.js
@@ -0,0 +1,22 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Operator x = y returns GetValue(y)
+es5id: 11.13.1_A3.2
+description: Checking Expression and Variable statements
+---*/
+
+//CHECK#1
+var x = 0;
+if ((x = 1) !== 1) {
+ throw new Test262Error('#1: var x = 0; (x = 1) === 1. Actual: ' + ((x = 1)));
+}
+
+//CHECK#2
+x = 0;
+if ((x = 1) !== 1) {
+ throw new Test262Error('#2: x = 0; (x = 1) === 1. Actual: ' + ((x = 1)));
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/S11.13.1_A4_T1.js b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A4_T1.js
new file mode 100644
index 0000000000..d615179322
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A4_T1.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: "AssignmentExpression : LeftHandSideExpression = AssignmentExpression"
+es5id: 11.13.1_A4_T1
+description: Syntax check
+---*/
+
+//CHECK#1
+var x;
+x = x = 1;
+if (x !== 1) {
+ throw new Test262Error('#1: The expression x = x = 1 is the same x = (x = 1), not (x = x) = 1. Actual: ' + (x));
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/S11.13.1_A4_T2.js b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A4_T2.js
new file mode 100644
index 0000000000..aef46f9e1c
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A4_T2.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: "AssignmentExpression : LeftHandSideExpression = AssignmentExpression"
+es5id: 11.13.1_A4_T2
+description: Syntax check if "x = x" throws ReferenceError
+---*/
+
+//CHECK#1
+try {
+ x = x;
+ throw new Test262Error('#1.1: x = x throw ReferenceError. Actual: ' + (x = x));
+} catch(e) {
+ if ((e instanceof ReferenceError) !== true) {
+ throw new Test262Error('#1.2: x = x throw ReferenceError. Actual: ' + (e));
+ }
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/S11.13.1_A5_T1.js b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A5_T1.js
new file mode 100644
index 0000000000..a47e0cb41f
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A5_T1.js
@@ -0,0 +1,33 @@
+// Copyright (C) 2014 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Assignment Operator calls PutValue(lref, rval)
+es5id: S11.13.1_A5_T1
+description: >
+ Evaluating LeftHandSideExpression lref returns Reference type; Reference
+ base value is an environment record and environment record kind is
+ object environment record. PutValue(lref, rval) uses the initially
+ created Reference even if the environment binding is no longer present.
+ Binding in surrounding function environment record is not changed.
+flags: [noStrict]
+---*/
+
+function testFunction() {
+ var x = 0;
+ var scope = {x: 1};
+
+ with (scope) {
+ x = (delete scope.x, 2);
+ }
+
+ if (scope.x !== 2) {
+ throw new Test262Error('#1: scope.x === 2. Actual: ' + (scope.x));
+ }
+ if (x !== 0) {
+ throw new Test262Error('#2: x === 0. Actual: ' + (x));
+ }
+}
+testFunction();
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/S11.13.1_A5_T2.js b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A5_T2.js
new file mode 100644
index 0000000000..aef7fc05d4
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A5_T2.js
@@ -0,0 +1,30 @@
+// Copyright (C) 2014 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Assignment Operator calls PutValue(lref, rval)
+es5id: S11.13.1_A5_T2
+description: >
+ Evaluating LeftHandSideExpression lref returns Reference type; Reference
+ base value is an environment record and environment record kind is
+ object environment record. PutValue(lref, rval) uses the initially
+ created Reference even if the environment binding is no longer present.
+ Binding in surrounding global environment record is not changed.
+flags: [noStrict]
+---*/
+
+var x = 0;
+var scope = {x: 1};
+
+with (scope) {
+ x = (delete scope.x, 2);
+}
+
+if (scope.x !== 2) {
+ throw new Test262Error('#1: scope.x === 2. Actual: ' + (scope.x));
+}
+if (x !== 0) {
+ throw new Test262Error('#2: x === 0. Actual: ' + (x));
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/S11.13.1_A5_T3.js b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A5_T3.js
new file mode 100644
index 0000000000..43497e4573
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A5_T3.js
@@ -0,0 +1,32 @@
+// Copyright (C) 2014 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Assignment Operator calls PutValue(lref, rval)
+es5id: S11.13.1_A5_T3
+description: >
+ Evaluating LeftHandSideExpression lref returns Reference type; Reference
+ base value is an environment record and environment record kind is
+ object environment record. PutValue(lref, rval) uses the initially
+ created Reference even if the environment binding is no longer present.
+ Binding in surrounding object environment record is not changed.
+flags: [noStrict]
+---*/
+
+var outerScope = {x: 0};
+var innerScope = {x: 1};
+
+with (outerScope) {
+ with (innerScope) {
+ x = (delete innerScope.x, 2);
+ }
+}
+
+if (innerScope.x !== 2) {
+ throw new Test262Error('#1: innerScope.x === 2. Actual: ' + (innerScope.x));
+}
+if (outerScope.x !== 0) {
+ throw new Test262Error('#2: outerScope.x === 0. Actual: ' + (outerScope.x));
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/S11.13.1_A6_T1.js b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A6_T1.js
new file mode 100644
index 0000000000..30056f06b5
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A6_T1.js
@@ -0,0 +1,31 @@
+// Copyright (C) 2014 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Assignment Operator calls PutValue(lref, rval)
+es5id: S11.13.1_A6_T1
+description: >
+ Evaluating LeftHandSideExpression lref returns Reference type; Reference
+ base value is an environment record and environment record kind is
+ declarative environment record. PutValue(lref, rval) uses the initially
+ created Reference even if a more local binding is available.
+flags: [noStrict]
+---*/
+
+function testAssignment() {
+ var x = 0;
+ var innerX = (function() {
+ x = (eval("var x;"), 1);
+ return x;
+ })();
+
+ if (innerX !== undefined) {
+ throw new Test262Error('#1: innerX === undefined. Actual: ' + (innerX));
+ }
+ if (x !== 1) {
+ throw new Test262Error('#2: x === 1. Actual: ' + (x));
+ }
+}
+testAssignment();
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/S11.13.1_A6_T2.js b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A6_T2.js
new file mode 100644
index 0000000000..84670b0864
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A6_T2.js
@@ -0,0 +1,31 @@
+// Copyright (C) 2014 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Assignment Operator calls PutValue(lref, rval)
+es5id: S11.13.1_A6_T2
+description: >
+ Evaluating LeftHandSideExpression lref returns Reference type; Reference
+ base value is an environment record and environment record kind is
+ declarative environment record. PutValue(lref, rval) uses the initially
+ created Reference even if a more local binding is available.
+flags: [noStrict]
+---*/
+
+function testAssignment() {
+ var x = 0;
+ var innerX = (function() {
+ x = (eval("var x = 2;"), 1);
+ return x;
+ })();
+
+ if (innerX !== 2) {
+ throw new Test262Error('#1: innerX === 2. Actual: ' + (innerX));
+ }
+ if (x !== 1) {
+ throw new Test262Error('#2: x === 1. Actual: ' + (x));
+ }
+}
+testAssignment();
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/S11.13.1_A6_T3.js b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A6_T3.js
new file mode 100644
index 0000000000..6a33126008
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A6_T3.js
@@ -0,0 +1,32 @@
+// Copyright (C) 2014 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Assignment Operator calls PutValue(lref, rval)
+es5id: S11.13.1_A6_T3
+description: >
+ Evaluating LeftHandSideExpression lref returns Reference type; Reference
+ base value is an environment record and environment record kind is
+ declarative environment record. PutValue(lref, rval) uses the initially
+ created Reference even if a more local binding is available.
+flags: [noStrict]
+---*/
+
+function testAssignment() {
+ var x = 0;
+ var scope = {};
+
+ with (scope) {
+ x = (scope.x = 2, 1);
+ }
+
+ if (scope.x !== 2) {
+ throw new Test262Error('#1: scope.x === 2. Actual: ' + (scope.x));
+ }
+ if (x !== 1) {
+ throw new Test262Error('#2: x === 1. Actual: ' + (x));
+ }
+}
+testAssignment();
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/S11.13.1_A7_T3.js b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A7_T3.js
new file mode 100644
index 0000000000..8675448e23
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A7_T3.js
@@ -0,0 +1,28 @@
+// Copyright (C) 2015 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Assignment Operator evaluates its operands from left to right.
+description: >
+ The left-hand side expression is evaluated before the right-hand side.
+ Left-hand side expression is MemberExpression: base[prop]. Evaluating
+ ToPropertyKey(prop) throws an error.
+---*/
+
+function DummyError() { }
+
+assert.throws(DummyError, function() {
+ var base = {};
+ var prop = {
+ toString: function() {
+ throw new DummyError();
+ }
+ };
+ var expr = function() {
+ throw new Test262Error("right-hand side expression evaluated");
+ };
+
+ base[prop] = expr();
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/S11.13.1_A7_T4.js b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A7_T4.js
new file mode 100644
index 0000000000..59ca4a3da9
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/S11.13.1_A7_T4.js
@@ -0,0 +1,27 @@
+// Copyright (C) 2015 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: Assignment Operator evaluates its operands from left to right.
+description: >
+ The left-hand side expression is evaluated before the right-hand side.
+ Left-hand side expression is MemberExpression: base[prop]. ToPropertyKey(prop)
+ is only called once.
+---*/
+
+var propKeyEvaluated = false;
+var base = {};
+var prop = {
+ toString: function() {
+ assert(!propKeyEvaluated);
+ propKeyEvaluated = true;
+ return "";
+ }
+};
+var expr = function() {
+ return 0;
+};
+
+base[prop] = expr();
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/S8.12.4_A1.js b/js/src/tests/test262/language/expressions/assignment/S8.12.4_A1.js
new file mode 100644
index 0000000000..fe4abc8f36
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/S8.12.4_A1.js
@@ -0,0 +1,17 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: If the property has the ReadOnly attribute, [[CanPut]](P) return false
+es5id: 8.12.4_A1
+description: Try put other value for Math.E property
+flags: [noStrict]
+---*/
+
+var __e = Math.E;
+Math.E = 1;
+if (Math.E !== __e){
+ throw new Test262Error('#1: __e = Math.E; Math.E = 1; Math.E === __e. Actual: ' + (Math.E));
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/S8.12.5_A1.js b/js/src/tests/test262/language/expressions/assignment/S8.12.5_A1.js
new file mode 100644
index 0000000000..67f1871c91
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/S8.12.5_A1.js
@@ -0,0 +1,39 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: |
+ When the [[Put]] method of O is called with property P and value V,
+ and If O doesn't have a property with name P, then
+ creates a property with name P, set its value to V and give it empty attributes
+es5id: 8.12.5_A1
+description: Put to not existent properties
+---*/
+
+var __map={}; __map[1]="one"; __map["two"]=2; __map["3"]="tre";
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+if (__map[1] !== "one") {
+ throw new Test262Error('#1: var __map={}; __map[1]="one"; __map["two"]=2; __map["3"]="tre"; __map[1] === "one". Actual: ' + (__map[1]));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+if (__map["two"] !== 2) {
+ throw new Test262Error('#2: var __map={}; __map[1]="one"; __map["two"]=2; __map["3"]="tre"; __map["two"] === 2. Actual: ' + (__map["two"]));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+if (__map["3"] !== "tre") {
+ throw new Test262Error('#3: var __map={}; __map[1]="one"; __map["two"]=2; __map["3"]="tre"; __map["3"] === "tre". Actual: ' + (__map["3"]));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/S8.12.5_A2.js b/js/src/tests/test262/language/expressions/assignment/S8.12.5_A2.js
new file mode 100644
index 0000000000..ab94c7ca5c
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/S8.12.5_A2.js
@@ -0,0 +1,50 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+info: |
+ When the [[Put]] method of O is called with property P and value V,
+ then set the value of the property to V. The attributes of the property are not changed
+es5id: 8.12.5_A2
+description: Put to existent properties
+---*/
+
+var _map={1:"one",two:2};
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#1
+_map[1]="uno";
+if (_map[1] !== "uno") {
+ throw new Test262Error('#1: var _map={1:"one",two:2}; _map[1]="uno"; _map[1] === "uno". Actual: ' + (_map[1]));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#2
+_map["1"]=1;
+if (_map[1] !== 1) {
+ throw new Test262Error('#2: var _map={1:"one",two:2}; _map[1]="uno"; _map["1"]=1; _map[1] === 1. Actual: ' + (_map[1]));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#3
+_map["two"]="two";
+if (_map["two"] !== "two") {
+ throw new Test262Error('#3: var _map={1:"one",two:2}; _map[1]="uno"; _map["1"]=1; _map["two"]="two"; _map["two"] === "two". Actual: ' + (_map["two"]));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//////////////////////////////////////////////////////////////////////////////
+//CHECK#4
+_map.two="duo";
+if (_map.two !== "duo") {
+ throw new Test262Error('#4: var _map={1:"one",two:2}; _map[1]="uno"; _map["1"]=1; _map["two"]="two"; _map.two="duo"; _map.two === "duo". Actual: ' + (_map.two));
+}
+//
+//////////////////////////////////////////////////////////////////////////////
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/assignment-operator-calls-putvalue-lref--rval--1.js b/js/src/tests/test262/language/expressions/assignment/assignment-operator-calls-putvalue-lref--rval--1.js
new file mode 100644
index 0000000000..4a4647f9c3
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/assignment-operator-calls-putvalue-lref--rval--1.js
@@ -0,0 +1,43 @@
+// Copyright (C) 2020 Rick Waldron. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-object-environment-records-setmutablebinding-n-v-s
+description: >
+ Assignment Operator calls PutValue(lref, rval) (formerly S11.13.1_A5_T5)
+info: |
+ The concrete Environment Record method SetMutableBinding for object Environment
+ Records attempts to set the value of the Environment Record's associated binding
+ object's property whose name is the value of the argument N to the value of argument V.
+ A property named N normally already exists but if it does not or is not currently writable,
+ error handling is determined by the value of the Boolean argument S.
+
+ Let stillExists be ? HasProperty(bindings, N).
+ If stillExists is false and S is true, throw a ReferenceError exception.
+flags: [noStrict]
+---*/
+
+var count = 0;
+var global = this;
+
+Object.defineProperty(this, "x", {
+ configurable: true,
+ value: 1
+});
+
+(function() {
+ "use strict";
+ assert.throws(ReferenceError, () => {
+ count++;
+ x = (delete global.x, 2);
+ count++;
+ });
+ count++;
+})();
+
+assert.sameValue(count, 2);
+assert(!('x' in this));
+assert(!('x' in global));
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/assignment-operator-calls-putvalue-lref--rval-.js b/js/src/tests/test262/language/expressions/assignment/assignment-operator-calls-putvalue-lref--rval-.js
new file mode 100644
index 0000000000..14dc6bf3ef
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/assignment-operator-calls-putvalue-lref--rval-.js
@@ -0,0 +1,38 @@
+// Copyright (C) 2020 Rick Waldron. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-object-environment-records-setmutablebinding-n-v-s
+description: >
+ Assignment Operator calls PutValue(lref, rval) (formerly S11.13.1_A5_T4)
+info: |
+ The concrete Environment Record method SetMutableBinding for object Environment
+ Records attempts to set the value of the Environment Record's associated binding
+ object's property whose name is the value of the argument N to the value of argument V.
+ A property named N normally already exists but if it does not or is not currently writable,
+ error handling is determined by the value of the Boolean argument S.
+
+ Let stillExists be ? HasProperty(bindings, N).
+ If stillExists is false and S is true, throw a ReferenceError exception.
+flags: [noStrict]
+---*/
+
+var count = 0;
+var scope = {x: 1};
+
+with (scope) {
+ (function() {
+ "use strict";
+ assert.throws(ReferenceError, () => {
+ count++;
+ x = (delete scope.x, 2);
+ count++;
+ });
+ count++;
+ })();
+}
+
+assert.sameValue(count, 2);
+assert(!('x' in scope));
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/browser.js b/js/src/tests/test262/language/expressions/assignment/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/browser.js
diff --git a/js/src/tests/test262/language/expressions/assignment/destructuring/browser.js b/js/src/tests/test262/language/expressions/assignment/destructuring/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/destructuring/browser.js
diff --git a/js/src/tests/test262/language/expressions/assignment/destructuring/iterator-destructuring-property-reference-target-evaluation-order.js b/js/src/tests/test262/language/expressions/assignment/destructuring/iterator-destructuring-property-reference-target-evaluation-order.js
new file mode 100644
index 0000000000..d552d8fa88
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/destructuring/iterator-destructuring-property-reference-target-evaluation-order.js
@@ -0,0 +1,82 @@
+// Copyright (C) 2017 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-runtime-semantics-iteratordestructuringassignmentevaluation
+description: >
+ Ensure correct evaluation order when destructuring target is property reference.
+info: |
+ 12.15.5.3 Runtime Semantics: IteratorDestructuringAssignmentEvaluation
+
+ AssignmentElement : DestructuringAssignmentTarget Initializer
+
+ 1. If DestructuringAssignmentTarget is neither an ObjectLiteral nor an ArrayLiteral, then
+ a. Let lref be the result of evaluating DestructuringAssignmentTarget.
+ b. ReturnIfAbrupt(lref).
+ 2. If iteratorRecord.[[Done]] is false, then
+ a. Let next be IteratorStep(iteratorRecord.[[Iterator]]).
+ ...
+ 3. If iteratorRecord.[[Done]] is true, let value be undefined.
+ ...
+ 5. Else, let v be value.
+ ...
+ 8. Return ? PutValue(lref, v).
+features: [Symbol.iterator]
+includes: [compareArray.js]
+---*/
+
+
+var log = [];
+
+function source() {
+ log.push("source");
+ var iterator = {
+ next: function() {
+ log.push("iterator-step");
+ return {
+ get done() {
+ log.push("iterator-done");
+ return true;
+ },
+ get value() {
+ // Note: This getter shouldn't be called.
+ log.push("iterator-value");
+ }
+ };
+ }
+ };
+ var source = {};
+ source[Symbol.iterator] = function() {
+ log.push("iterator");
+ return iterator;
+ };
+ return source;
+}
+function target() {
+ log.push("target");
+ return target = {
+ set q(v) {
+ log.push("set");
+ }
+ };
+}
+function targetKey() {
+ log.push("target-key");
+ return {
+ toString: function() {
+ log.push("target-key-tostring");
+ return "q";
+ }
+ };
+}
+
+([target()[targetKey()]] = source());
+
+assert.compareArray(log, [
+ "source", "iterator",
+ "target", "target-key", "target-key-tostring",
+ "iterator-step", "iterator-done",
+ "set",
+]);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/destructuring/keyed-destructuring-property-reference-target-evaluation-order.js b/js/src/tests/test262/language/expressions/assignment/destructuring/keyed-destructuring-property-reference-target-evaluation-order.js
new file mode 100644
index 0000000000..3b610f6035
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/destructuring/keyed-destructuring-property-reference-target-evaluation-order.js
@@ -0,0 +1,77 @@
+// Copyright (C) 2017 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-runtime-semantics-keyeddestructuringassignmentevaluation
+description: >
+ Ensure correct evaluation order when destructuring target is property reference.
+info: |
+ 12.15.5.2 Runtime Semantics: DestructuringAssignmentEvaluation
+
+ AssignmentProperty : PropertyName : AssignmentElement
+
+ 1. Let name be the result of evaluating PropertyName.
+ 2. ReturnIfAbrupt(name).
+ 3. Return the result of performing KeyedDestructuringAssignmentEvaluation of
+ AssignmentElement with value and name as the arguments.
+
+ 12.15.5.4 Runtime Semantics: KeyedDestructuringAssignmentEvaluation
+
+ 1. If DestructuringAssignmentTarget is neither an ObjectLiteral nor an ArrayLiteral, then
+ a. Let lref be the result of evaluating DestructuringAssignmentTarget.
+ b. ReturnIfAbrupt(lref).
+ 2. Let v be ? GetV(value, propertyName).
+ ...
+ 4. Else, let rhsValue be v.
+ ...
+ 7. Return ? PutValue(lref, rhsValue).
+includes: [compareArray.js]
+---*/
+
+
+var log = [];
+
+function source() {
+ log.push("source");
+ return {
+ get p() {
+ log.push("get");
+ }
+ };
+}
+function target() {
+ log.push("target");
+ return {
+ set q(v) {
+ log.push("set");
+ }
+ };
+}
+function sourceKey() {
+ log.push("source-key");
+ return {
+ toString: function() {
+ log.push("source-key-tostring");
+ return "p";
+ }
+ };
+}
+function targetKey() {
+ log.push("target-key");
+ return {
+ toString: function() {
+ log.push("target-key-tostring");
+ return "q";
+ }
+ };
+}
+
+({[sourceKey()]: target()[targetKey()]} = source());
+
+assert.compareArray(log, [
+ "source", "source-key", "source-key-tostring",
+ "target", "target-key", "target-key-tostring",
+ "get", "set",
+]);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/destructuring/obj-prop-__proto__dup.js b/js/src/tests/test262/language/expressions/assignment/destructuring/obj-prop-__proto__dup.js
new file mode 100644
index 0000000000..406b03b154
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/destructuring/obj-prop-__proto__dup.js
@@ -0,0 +1,34 @@
+// Copyright (C) 2016 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-destructuring-assignment
+es6id: 12.14.5
+description: Duplicate __proto__ property names
+info: |
+ Annex B defines an early error for duplicate PropertyName of `__proto__`,
+ in object initializers, but this does not apply to Object Assignment
+ patterns
+---*/
+
+// Explicitly define an "own" property to avoid Annex B "__proto__ Property
+// Names in Object Initializers" semantics (in environments which implement
+// that extension)
+var value = Object.defineProperty({}, '__proto__', { value: 123 });
+var result, x, y;
+
+result = { __proto__: x, __proto__: y } = value;
+
+assert.sameValue(result, value);
+assert.sameValue(x, 123, 'first AssignmentProperty');
+assert.sameValue(y, 123, 'second AssignmentProperty');
+
+result = x = y = null;
+
+// CoverParenthesizedExpressionAndArrowParameterList
+result = ({ __proto__: x, __proto__: y } = value);
+
+assert.sameValue(result, value);
+assert.sameValue(x, 123, 'first AssignmentProperty (CPEAAPL)');
+assert.sameValue(y, 123, 'second AssignmentProperty (CPEAAPL)');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/destructuring/shell.js b/js/src/tests/test262/language/expressions/assignment/destructuring/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/destructuring/shell.js
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-assignment.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-assignment.js
new file mode 100644
index 0000000000..6e8c60f05d
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-assignment.js
@@ -0,0 +1,33 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-init-assignment.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: If the Initializer is present and v is undefined, the Initializer should be evaluated and the result assigned to the target reference. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var v2, vNull, vHole, vUndefined, vOob;
+
+var result;
+var vals = [2, null, , undefined];
+
+result = [v2 = 10, vNull = 11, vHole = 12, vUndefined = 13, vOob = 14] = vals;
+
+assert.sameValue(v2, 2);
+assert.sameValue(vNull, null);
+assert.sameValue(vHole, 12);
+assert.sameValue(vUndefined, 13);
+assert.sameValue(vOob, 14);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-evaluation.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-evaluation.js
new file mode 100644
index 0000000000..a4713139d8
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-evaluation.js
@@ -0,0 +1,31 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-init-evaluation.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: The Initializer should only be evaluated if v is undefined. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var flag1 = false, flag2 = false;
+var _;
+
+var result;
+var vals = [14];
+
+result = [ _ = flag1 = true, _ = flag2 = true ] = vals;
+
+assert.sameValue(flag1, false);
+assert.sameValue(flag2, true);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-fn-name-arrow.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-fn-name-arrow.js
new file mode 100644
index 0000000000..fa90a9856f
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-fn-name-arrow.js
@@ -0,0 +1,45 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-init-fn-name-arrow.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Assignment of function `name` attribute (ArrowFunction) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ AssignmentElement[Yield] : DestructuringAssignmentTarget Initializeropt
+ [...] 7. If Initializer is present and value is undefined and
+ IsAnonymousFunctionDefinition(Initializer) and IsIdentifierRef of
+ DestructuringAssignmentTarget are both true, then
+ a. Let hasNameProperty be HasOwnProperty(v, "name").
+ b. ReturnIfAbrupt(hasNameProperty).
+ c. If hasNameProperty is false, perform SetFunctionName(v,
+ GetReferencedName(lref)).
+
+---*/
+var arrow;
+
+var result;
+var vals = [];
+
+result = [ arrow = () => {} ] = vals;
+
+verifyProperty(arrow, 'name', {
+ enumerable: false,
+ writable: false,
+ configurable: true,
+ value: 'arrow'
+});
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-fn-name-class.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-fn-name-class.js
new file mode 100644
index 0000000000..564353795f
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-fn-name-class.js
@@ -0,0 +1,48 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-init-fn-name-class.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Assignment of function `name` attribute (ClassExpression) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [class, destructuring-binding]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ AssignmentElement[Yield] : DestructuringAssignmentTarget Initializeropt
+ [...] 7. If Initializer is present and value is undefined and
+ IsAnonymousFunctionDefinition(Initializer) and IsIdentifierRef of
+ DestructuringAssignmentTarget are both true, then
+ a. Let hasNameProperty be HasOwnProperty(v, "name").
+ b. ReturnIfAbrupt(hasNameProperty).
+ c. If hasNameProperty is false, perform SetFunctionName(v,
+ GetReferencedName(lref)).
+
+---*/
+var xCls, cls, xCls2;
+
+var result;
+var vals = [];
+
+result = [ xCls = class x {}, cls = class {}, xCls2 = class { static name() {} } ] = vals;
+
+assert(xCls.name !== 'xCls');
+assert(xCls2.name !== 'xCls2');
+
+verifyProperty(cls, 'name', {
+ enumerable: false,
+ writable: false,
+ configurable: true,
+ value: 'cls'
+});
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-fn-name-cover.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-fn-name-cover.js
new file mode 100644
index 0000000000..b92baae534
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-fn-name-cover.js
@@ -0,0 +1,47 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-init-fn-name-cover.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Assignment of function `name` attribute (CoverParenthesizedExpression) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ AssignmentElement[Yield] : DestructuringAssignmentTarget Initializeropt
+ [...] 7. If Initializer is present and value is undefined and
+ IsAnonymousFunctionDefinition(Initializer) and IsIdentifierRef of
+ DestructuringAssignmentTarget are both true, then
+ a. Let hasNameProperty be HasOwnProperty(v, "name").
+ b. ReturnIfAbrupt(hasNameProperty).
+ c. If hasNameProperty is false, perform SetFunctionName(v,
+ GetReferencedName(lref)).
+
+---*/
+var xCover, cover;
+
+var result;
+var vals = [];
+
+result = [ xCover = (0, function() {}), cover = (function() {}) ] = vals;
+
+assert(xCover.name !== 'xCover');
+
+verifyProperty(cover, 'name', {
+ enumerable: false,
+ writable: false,
+ configurable: true,
+ value: 'cover'
+});
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-fn-name-fn.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-fn-name-fn.js
new file mode 100644
index 0000000000..31f2ebf66f
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-fn-name-fn.js
@@ -0,0 +1,47 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-init-fn-name-fn.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Assignment of function `name` attribute (FunctionExpression) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [class, destructuring-binding]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ AssignmentElement[Yield] : DestructuringAssignmentTarget Initializeropt
+ [...] 7. If Initializer is present and value is undefined and
+ IsAnonymousFunctionDefinition(Initializer) and IsIdentifierRef of
+ DestructuringAssignmentTarget are both true, then
+ a. Let hasNameProperty be HasOwnProperty(v, "name").
+ b. ReturnIfAbrupt(hasNameProperty).
+ c. If hasNameProperty is false, perform SetFunctionName(v,
+ GetReferencedName(lref)).
+
+---*/
+var xFn, fn;
+
+var result;
+var vals = [];
+
+result = [ xFn = function x() {}, fn = function() {} ] = vals;
+
+assert(xFn.name !== 'xFn');
+
+verifyProperty(fn, 'name', {
+ enumerable: false,
+ writable: false,
+ configurable: true,
+ value: 'fn'
+});
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-fn-name-gen.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-fn-name-gen.js
new file mode 100644
index 0000000000..470de386d1
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-fn-name-gen.js
@@ -0,0 +1,47 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-init-fn-name-gen.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Assignment of function `name` attribute (GeneratorExpression) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [generators, destructuring-binding]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ AssignmentElement[Yield] : DestructuringAssignmentTarget Initializeropt
+ [...] 7. If Initializer is present and value is undefined and
+ IsAnonymousFunctionDefinition(Initializer) and IsIdentifierRef of
+ DestructuringAssignmentTarget are both true, then
+ a. Let hasNameProperty be HasOwnProperty(v, "name").
+ b. ReturnIfAbrupt(hasNameProperty).
+ c. If hasNameProperty is false, perform SetFunctionName(v,
+ GetReferencedName(lref)).
+
+---*/
+var xGen, gen;
+
+var result;
+var vals = [];
+
+result = [ xGen = function* x() {}, gen = function*() {} ] = vals;
+
+assert.notSameValue(xGen.name, 'xGen');
+
+verifyProperty(gen, 'name', {
+ enumerable: false,
+ writable: false,
+ configurable: true,
+ value: 'gen'
+});
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-in.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-in.js
new file mode 100644
index 0000000000..c90e20eebb
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-in.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-init-in.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: The Initializer in an AssignmentElement may be an `in` expression. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+var result;
+var vals = [];
+
+result = [ x = 'x' in {} ] = vals;
+
+assert.sameValue(x, false);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-let.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-let.js
new file mode 100644
index 0000000000..864b2050ac
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-let.js
@@ -0,0 +1,26 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-init-let.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: Value retrieval of Initializer obeys `let` semantics. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [let, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+assert.throws(ReferenceError, function() {
+ 0, [ x = y ] = [];
+});
+
+let y;
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-order.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-order.js
new file mode 100644
index 0000000000..3297560ac6
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-order.js
@@ -0,0 +1,32 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-init-order.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Initializer values should be assigned in left-to-right order. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = 0;
+var a, b;
+
+var result;
+var vals = [];
+
+result = [ a = x += 1, b = x *= 2 ] = vals;
+
+assert.sameValue(a, 1);
+assert.sameValue(b, 2);
+assert.sameValue(x, 2);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-simple-no-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-simple-no-strict.js
new file mode 100644
index 0000000000..7b0c99397f
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-simple-no-strict.js
@@ -0,0 +1,30 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-init-simple-no-strict.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Identifiers that appear as the DestructuringAssignmentTarget in an AssignmentElement should take on the iterated value corresponding to their position in the ArrayAssignmentPattern. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, noStrict]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var argument, eval;
+
+var result;
+var vals = [];
+
+result = [arguments = 4, eval = 5] = vals;
+
+assert.sameValue(arguments, 4);
+assert.sameValue(eval, 5);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-yield-expr.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-yield-expr.js
new file mode 100644
index 0000000000..7099ec1567
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-yield-expr.js
@@ -0,0 +1,45 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-init-yield-expr.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When a `yield` token appears within the Initializer of an AssignmentElement within a generator function body, it behaves as a YieldExpression. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var value = [];
+var iterationResult, iter, x;
+iter = (function*() {
+
+var result;
+var vals = [];
+
+result = [ x = yield ] = vals;
+
+
+
+assert.sameValue(result, vals);
+
+})();
+
+iterationResult = iter.next();
+
+assert.sameValue(iterationResult.value, undefined);
+assert.sameValue(iterationResult.done, false);
+assert.sameValue(x, undefined);
+
+iterationResult = iter.next(86);
+
+assert.sameValue(iterationResult.value, undefined);
+assert.sameValue(iterationResult.done, true);
+assert.sameValue(x, 86);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-yield-ident-invalid-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-yield-ident-invalid-strict.js
new file mode 100644
index 0000000000..568a6ab3c9
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-yield-ident-invalid-strict.js
@@ -0,0 +1,25 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-init-yield-ident-invalid.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: When a `yield` token appears within the Initializer of an AssignmentElement outside of a generator function body, it behaves as an IdentifierReference. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+
+0, [ x = yield ] = [];
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-yield-ident-valid.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-yield-ident-valid.js
new file mode 100644
index 0000000000..89b4d680e4
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-init-yield-ident-valid.js
@@ -0,0 +1,30 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-init-yield-ident-valid.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When a `yield` token appears within the Initializer of an AssignmentElement outside of a generator function body, it behaves as an IdentifierReference. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, noStrict]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var yield = 4;
+var x;
+
+var result;
+var vals = [];
+
+result = [ x = yield ] = vals;
+
+assert.sameValue(x, 4);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-get-err.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-get-err.js
new file mode 100644
index 0000000000..3aec9ccd2b
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-get-err.js
@@ -0,0 +1,34 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-iter-get-err.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: Abrupt completion returned from GetIterator (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ AssignmentElementList ]
+
+ 1. Let iterator be GetIterator(value).
+ 2. ReturnIfAbrupt(iterator).
+
+---*/
+var iterable = {};
+iterable[Symbol.iterator] = function() {
+ throw new Test262Error();
+};
+var _;
+
+assert.throws(Test262Error, function() {
+ 0, [ _ ] = iterable;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-nrml-close-err.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-nrml-close-err.js
new file mode 100644
index 0000000000..dd59871882
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-nrml-close-err.js
@@ -0,0 +1,51 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-iter-nrml-close-err.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: Abrupt completion returned from IteratorClose (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ AssignmentElementList ]
+
+ [...]
+ 5. If iteratorRecord.[[done]] is false, return IteratorClose(iterator, result).
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var _;
+var iterable = {};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ // Set an upper-bound to limit unnecessary iteration in non-conformant
+ // implementations
+ return { done: nextCount > 10 };
+ },
+ return: function() {
+ returnCount += 1;
+ throw new Test262Error();
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+assert.throws(Test262Error, function() {
+ 0, [ _ ] = iterable;
+});
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-nrml-close-null.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-nrml-close-null.js
new file mode 100644
index 0000000000..fbfe85e1fb
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-nrml-close-null.js
@@ -0,0 +1,57 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-iter-nrml-close-null.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: IteratorClose throws a TypeError when `return` returns a non-Object value (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ AssignmentElementList ]
+
+ [...]
+ 5. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ result).
+ 6. Return result.
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ 7. If completion.[[type]] is throw, return Completion(completion).
+ 8. If innerResult.[[type]] is throw, return Completion(innerResult).
+ 9. If Type(innerResult.[[value]]) is not Object, throw a TypeError
+ exception.
+
+---*/
+var _;
+var iterable = {};
+var nextCount = 0;
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ // Set an upper-bound to limit unnecessary iteration in non-conformant
+ // implementations
+ return { done: nextCount > 10 };
+ },
+ return: function() {
+ return null;
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+assert.throws(TypeError, function() {
+ 0, [ _ ] = iterable;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-nrml-close-skip.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-nrml-close-skip.js
new file mode 100644
index 0000000000..5bf9ef020b
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-nrml-close-skip.js
@@ -0,0 +1,53 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-iter-nrml-close-skip.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: IteratorClose is not called when assignment evaluation has exhausted the iterator (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ AssignmentElementList ]
+
+ [...]
+ 5. If iteratorRecord.[[done]] is false, return IteratorClose(iterator, result).
+ 6. Return result.
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var _;
+var iterable = {};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ return { done: true };
+ },
+ return: function() {
+ returnCount += 1;
+ return {};
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+var result;
+var vals = iterable;
+
+result = [ _ ] = vals;
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 0);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-nrml-close.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-nrml-close.js
new file mode 100644
index 0000000000..60eaf96992
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-nrml-close.js
@@ -0,0 +1,69 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-iter-nrml-close.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: IteratorClose is called when assignment evaluation has not exhausted the iterator (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ AssignmentElementList ]
+
+ [...]
+ 5. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ result).
+ 6. Return result.
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ [...]
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var thisValue = null;
+var args = null;
+var _;
+var iterable = {};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ // Set an upper-bound to limit unnecessary iteration in non-conformant
+ // implementations
+ return { done: nextCount > 10 };
+ },
+ return: function() {
+ returnCount += 1;
+ thisValue = this;
+ args = arguments;
+ return {};
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+var result;
+var vals = iterable;
+
+result = [ _ ] = vals;
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 1);
+assert.sameValue(thisValue, iterator, 'correct `this` value');
+assert(!!args, 'arguments object provided');
+assert.sameValue(args.length, 0, 'zero arguments specified');
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-rtrn-close-err.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-rtrn-close-err.js
new file mode 100644
index 0000000000..8421d79f6a
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-rtrn-close-err.js
@@ -0,0 +1,68 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-iter-rtrn-close-err.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: IteratorClose is called when reference evaluation produces a "return" completion (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ AssignmentElementList ]
+
+ [...]
+ 5. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ result).
+ 6. Return result.
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ 7. If completion.[[type]] is throw, return Completion(completion).
+ 8. If innerResult.[[type]] is throw, return Completion(innerResult).
+
+---*/
+var returnCount = 0;
+var unreachable = 0;
+var iterable = {};
+var iterator = {
+ return: function() {
+ returnCount += 1;
+ throw new Test262Error();
+ }
+};
+var iter;
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+function* g() {
+
+var result;
+var vals = iterable;
+
+result = [ {}[ yield ] ] = vals;
+
+unreachable += 1;
+
+assert.sameValue(result, vals);
+
+}
+iter = g();
+iter.next();
+assert.throws(Test262Error, function() {
+ iter.return();
+});
+
+assert.sameValue(returnCount, 1);
+assert.sameValue(unreachable, 0, 'Unreachable statement was not executed');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-rtrn-close-null.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-rtrn-close-null.js
new file mode 100644
index 0000000000..c4c12f4d64
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-rtrn-close-null.js
@@ -0,0 +1,77 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-iter-rtrn-close-null.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: IteratorClose throws a TypeError when `return` returns a non-Object value (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ AssignmentElementList ]
+
+ [...]
+ 5. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ result).
+ 6. Return result.
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ 7. If completion.[[type]] is throw, return Completion(completion).
+ 8. If innerResult.[[type]] is throw, return Completion(innerResult).
+ 9. If Type(innerResult.[[value]]) is not Object, throw a TypeError
+ exception.
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var unreachable = 0;
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ return {done: false, value: undefined};
+ },
+ return: function() {
+ returnCount += 1;
+ return null;
+ }
+};
+var iterable = {};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+function* g() {
+
+var result;
+var vals = iterable;
+
+result = [ {} = yield ] = vals;
+
+unreachable += 1;
+
+assert.sameValue(result, vals);
+
+}
+
+var iter = g();
+iter.next();
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 0);
+assert.throws(TypeError, function() {
+ iter.return();
+});
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 1);
+assert.sameValue(unreachable, 0, 'Unreachable statement was not executed');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-rtrn-close.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-rtrn-close.js
new file mode 100644
index 0000000000..89ce986541
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-rtrn-close.js
@@ -0,0 +1,84 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-iter-rtrn-close.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: IteratorClose is called when reference evaluation produces a "return" completion (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ AssignmentElementList ]
+
+ [...]
+ 5. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ result).
+ 6. Return result.
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ 7. If completion.[[type]] is throw, return Completion(completion).
+ 8. If innerResult.[[type]] is throw, return Completion(innerResult).
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var unreachable = 0;
+var thisValue = null;
+var args = null;
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ return {done: false, value: undefined};
+ },
+ return: function() {
+ returnCount += 1;
+ thisValue = this;
+ args = arguments;
+ return {};
+ }
+};
+var iterable = {};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+function* g() {
+
+var result;
+var vals = iterable;
+
+result = [ {} = yield ] = vals;
+
+unreachable += 1;
+
+assert.sameValue(result, vals);
+
+}
+var iter = g();
+iter.next();
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 0);
+
+var result = iter.return(777);
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 1);
+assert.sameValue(unreachable, 0, 'Unreachable statement was not executed');
+assert.sameValue(result.value, 777);
+assert(result.done, 'Iterator correctly closed');
+assert.sameValue(thisValue, iterator, 'correct `this` value');
+assert(!!args, 'arguments object provided');
+assert.sameValue(args.length, 0, 'zero arguments specified');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-thrw-close-err.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-thrw-close-err.js
new file mode 100644
index 0000000000..71009064d4
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-thrw-close-err.js
@@ -0,0 +1,56 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-iter-thrw-close-err.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: IteratorClose is called when reference evaluation produces a "throw" completion (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ AssignmentElementList ]
+
+ [...]
+ 5. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ result).
+ 6. Return result.
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+function ReturnError() {}
+var iterable = {};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ return { done: true };
+ },
+ return: function() {
+ returnCount += 1;
+
+ // This value should be discarded.
+ throw new ReturnError();
+ }
+};
+var thrower = function() {
+ throw new Test262Error();
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+assert.throws(Test262Error, function() {
+ 0, [ {}[thrower()] ] = iterable;
+});
+
+assert.sameValue(nextCount, 0);
+assert.sameValue(returnCount, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-thrw-close-skip.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-thrw-close-skip.js
new file mode 100644
index 0000000000..338b68689c
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-thrw-close-skip.js
@@ -0,0 +1,50 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-iter-thrw-close-skip.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: IteratorClose is not called when iteration produces an abrupt completion (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ AssignmentElementList ]
+
+ [...]
+ 5. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ result).
+ 6. Return result.
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var iterable = {};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ throw new Test262Error();
+ },
+ return: function() {
+ returnCount += 1;
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+var _;
+
+assert.throws(Test262Error, function() {
+ 0, [ x ] = iterable;
+});
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 0);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-thrw-close.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-thrw-close.js
new file mode 100644
index 0000000000..0bb12945ed
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-iter-thrw-close.js
@@ -0,0 +1,65 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-iter-thrw-close.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: IteratorClose is called when reference evaluation produces a "throw" completion (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ AssignmentElementList ]
+
+ [...]
+ 5. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ result).
+ 6. Return result.
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ [...]
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var thisValue = null;
+var args = null;
+var iterable = {};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ return { done: true };
+ },
+ return: function() {
+ returnCount += 1;
+ thisValue = this;
+ args = arguments;
+ }
+};
+var thrower = function() {
+ throw new Test262Error();
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+assert.throws(Test262Error, function() {
+ 0, [ {}[thrower()] ] = iterable;
+});
+
+assert.sameValue(nextCount, 0);
+assert.sameValue(returnCount, 1);
+assert.sameValue(thisValue, iterator, 'correct `this` value');
+assert(!!args, 'arguments object provided');
+assert.sameValue(args.length, 0, 'zero arguments specified');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-invalid.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-invalid.js
new file mode 100644
index 0000000000..bc0cf9a518
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-invalid.js
@@ -0,0 +1,24 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-nested-array-invalid.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: It is a Syntax Error if LeftHandSideExpression is either an ObjectLiteral or an ArrayLiteral and if the lexical token sequence matched by LeftHandSideExpression cannot be parsed with no tokens left over using AssignmentPattern as the goal symbol. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+
+0, [[(x, y)]] = [[]];
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-null.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-null.js
new file mode 100644
index 0000000000..30369a5dce
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-null.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-nested-array-null.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an array literal and the value is `null`, a TypeError should be thrown. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var _;
+
+assert.throws(TypeError, function() {
+ 0, [[ _ ]] = [null];
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-undefined-hole.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-undefined-hole.js
new file mode 100644
index 0000000000..b94e8911b6
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-undefined-hole.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-nested-array-undefined-hole.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an array literal and the value is a "hole", a TypeError should be thrown. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var _;
+
+assert.throws(TypeError, function() {
+ 0, [[ _ ]] = [ , ];
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-undefined-own.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-undefined-own.js
new file mode 100644
index 0000000000..a9b7b96f9e
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-undefined-own.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-nested-array-undefined-own.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an array literal and the value is `undefined`, a TypeError should be thrown. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var _;
+
+assert.throws(TypeError, function() {
+ 0, [[ x ]] = [undefined];
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-undefined.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-undefined.js
new file mode 100644
index 0000000000..621539136e
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-undefined.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-nested-array-undefined.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an array literal and no value is defined, a TypeError should be thrown. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var _;
+
+assert.throws(TypeError, function() {
+ 0, [[ x ]] = [];
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-yield-expr.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-yield-expr.js
new file mode 100644
index 0000000000..4ad69704ff
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-yield-expr.js
@@ -0,0 +1,47 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-nested-array-yield-expr.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When a `yield` token appears within the DestructuringAssignmentTarget of a nested destructuring assignment and within a generator function body, it behaves as a YieldExpression. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var value = [[22]];
+var x = {};
+var iterationResult, iter;
+
+iter = (function*() {
+
+var result;
+var vals = value;
+
+result = [[x[yield]]] = vals;
+
+
+
+assert.sameValue(result, vals);
+
+}());
+
+iterationResult = iter.next();
+
+assert.sameValue(iterationResult.value, undefined);
+assert.sameValue(iterationResult.done, false);
+assert.sameValue(x.prop, undefined);
+
+iterationResult = iter.next('prop');
+
+assert.sameValue(iterationResult.value, undefined);
+assert.sameValue(iterationResult.done, true);
+assert.sameValue(x.prop, 22);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-yield-ident-invalid-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-yield-ident-invalid-strict.js
new file mode 100644
index 0000000000..2c705f2591
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-yield-ident-invalid-strict.js
@@ -0,0 +1,25 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-nested-array-yield-ident-invalid.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: When a `yield` token appears within the DestructuringAssignmentTarget of a nested destructuring assignment outside of strict mode, it behaves as an IdentifierReference. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+
+0, [[x[yield]]] = [[]];
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-yield-ident-valid.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-yield-ident-valid.js
new file mode 100644
index 0000000000..3c2b0a9a35
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array-yield-ident-valid.js
@@ -0,0 +1,30 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-nested-array-yield-ident-valid.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When a `yield` token appears within the DestructuringAssignmentTarget of a nested destructuring assignment outside of strict mode, it behaves as an IdentifierReference. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, noStrict]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var yield = 'prop';
+var x = {};
+
+var result;
+var vals = [[22]];
+
+result = [[x[yield]]] = vals;
+
+assert.sameValue(x.prop, 22);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array.js
new file mode 100644
index 0000000000..4f97f42494
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-array.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-nested-array.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an array literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+var result;
+var vals = [[1]];
+
+result = [[x]] = vals;
+
+assert.sameValue(x, 1);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-memberexpr-optchain-prop-ref-init.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-memberexpr-optchain-prop-ref-init.js
new file mode 100644
index 0000000000..8bdeca68e9
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-memberexpr-optchain-prop-ref-init.js
@@ -0,0 +1,57 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-nested-memberexpr-optchain-prop-ref-init.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: It is a Syntax Error if LeftHandSideExpression of an DestructuringAssignmentTarget is neither an ObjectLiteral nor an ArrayLiteral and AssignmentTargetType(LeftHandSideExpression) is not simple Using Object (MemberExpression OptionalChain .IdentifierName Initializer) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [optional-chaining, destructuring-binding]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ Syntax
+
+ AssignmentElement : DestructuringAssignmentTarget Initializer_opt
+ DestructuringAssignmentTarget : LeftHandSideExpression
+
+ Static Semantics: Early Errors
+
+ OptionalExpression:
+ MemberExpression OptionalChain
+ CallExpression OptionalChain
+ OptionalExpression OptionalChain
+
+ OptionalChain:
+ ?. [ Expression ]
+ ?. IdentifierName
+ ?. Arguments
+ ?. TemplateLiteral
+ OptionalChain [ Expression ]
+ OptionalChain .IdentifierName
+ OptionalChain Arguments
+ OptionalChain TemplateLiteral
+
+ DestructuringAssignmentTarget : LeftHandSideExpression
+
+ - It is a Syntax Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral and IsValidSimpleAssignmentTarget(LeftHandSideExpression) is not true.
+
+ Static Semantics: IsValidSimpleAssignmentTarget
+
+ LeftHandSideExpression : OptionalExpression
+ 1. Return false.
+
+---*/
+$DONOTEVALUATE();
+var x = {};
+
+0, [x?.y = 42] = [23];
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-invalid.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-invalid.js
new file mode 100644
index 0000000000..0bf4492dc6
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-invalid.js
@@ -0,0 +1,24 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-nested-obj-invalid.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: It is a Syntax Error if LeftHandSideExpression is either an ObjectLiteral or an ArrayLiteral and if the lexical token sequence matched by LeftHandSideExpression cannot be parsed with no tokens left over using AssignmentPattern as the goal symbol. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+
+0, [{ get x() {} }] = [{}];
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-null.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-null.js
new file mode 100644
index 0000000000..e5a3804c1a
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-null.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-nested-obj-null.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an object literal and the value is `null`, a TypeError should be thrown. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+assert.throws(TypeError, function() {
+ 0, [{ x }] = [null];
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-undefined-hole.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-undefined-hole.js
new file mode 100644
index 0000000000..b2e7d0607a
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-undefined-hole.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-nested-obj-undefined-hole.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an object literal and the value is a "hole", a TypeError should be thrown. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+assert.throws(TypeError, function() {
+ 0, [{ x }] = [ , ];
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-undefined-own.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-undefined-own.js
new file mode 100644
index 0000000000..7f3fdfcb73
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-undefined-own.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-nested-obj-undefined-own.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an object literal and the value is `undefined`, a TypeError should be thrown. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+assert.throws(TypeError, function() {
+ 0, [{ x }] = [undefined];
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-undefined.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-undefined.js
new file mode 100644
index 0000000000..63c9866580
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-undefined.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-nested-obj-undefined.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an object literal and no value is defined, a TypeError should be thrown. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+assert.throws(TypeError, function() {
+ 0, [{ x }] = [];
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-yield-expr.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-yield-expr.js
new file mode 100644
index 0000000000..53ce33ea1d
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-yield-expr.js
@@ -0,0 +1,45 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-nested-obj-yield-expr.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When a `yield` token appears within the Initializer of a nested destructuring assignment and within a generator function body, it behaves as a YieldExpression. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var iterationResult, iter, x;
+
+iter = (function*() {
+
+var result;
+var vals = [{}];
+
+result = [{ x = yield }] = vals;
+
+
+
+assert.sameValue(result, vals);
+
+}());
+
+iterationResult = iter.next();
+
+assert.sameValue(iterationResult.value, undefined);
+assert.sameValue(iterationResult.done, false);
+assert.sameValue(x, undefined);
+
+iterationResult = iter.next(4);
+
+assert.sameValue(iterationResult.value, undefined);
+assert.sameValue(iterationResult.done, true);
+assert.sameValue(x, 4);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-yield-ident-invalid-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-yield-ident-invalid-strict.js
new file mode 100644
index 0000000000..2dc2d6a1fe
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-yield-ident-invalid-strict.js
@@ -0,0 +1,25 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-nested-obj-yield-ident-invalid.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: When a `yield` token appears within the Initializer of a nested destructuring assignment outside of a generator function body, it behaves as a IdentifierReference. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+
+0, [{ x = yield }] = [{}];
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-yield-ident-valid.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-yield-ident-valid.js
new file mode 100644
index 0000000000..dc9738b5be
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj-yield-ident-valid.js
@@ -0,0 +1,30 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-nested-obj-yield-ident-valid.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When a `yield` token appears within the Initializer of a nested destructuring assignment outside of a generator function body, it behaves as an IdentifierReference. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, noStrict]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var yield = 2;
+var x;
+
+var result;
+var vals = [{}];
+
+result = [{ x = yield }] = vals;
+
+assert.sameValue(x, 2);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj.js
new file mode 100644
index 0000000000..8c12554c64
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-nested-obj.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-nested-obj.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an object literal, it should be parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+var result;
+var vals = [{ x: 2 }];
+
+result = [{ x }] = vals;
+
+assert.sameValue(x, 2);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-const.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-const.js
new file mode 100644
index 0000000000..d1dc500911
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-const.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-put-const.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: The assignment target should obey `const` semantics. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [const, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+const c = null;
+
+assert.throws(TypeError, function() {
+ 0, [ c ] = [1];
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-let.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-let.js
new file mode 100644
index 0000000000..11d55da24e
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-let.js
@@ -0,0 +1,25 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-put-let.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: The assignment target should obey `let` semantics. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [let, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+assert.throws(ReferenceError, function() {
+ 0, [ x ] = [];
+});
+
+let x;
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-obj-literal-optchain-prop-ref-init.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-obj-literal-optchain-prop-ref-init.js
new file mode 100644
index 0000000000..57d80fa31d
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-obj-literal-optchain-prop-ref-init.js
@@ -0,0 +1,60 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-put-obj-literal-optchain-prop-ref-init.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: It is a Syntax Error if LeftHandSideExpression of an DestructuringAssignmentTarget is neither an ObjectLiteral nor an ArrayLiteral and AssignmentTargetType(LeftHandSideExpression) is not simple Using Object (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [optional-chaining, destructuring-binding]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ Syntax
+
+ AssignmentElement : DestructuringAssignmentTarget Initializer_opt
+ DestructuringAssignmentTarget : LeftHandSideExpression
+
+ Static Semantics: Early Errors
+
+ OptionalExpression:
+ MemberExpression OptionalChain
+ CallExpression OptionalChain
+ OptionalExpression OptionalChain
+
+ OptionalChain:
+ ?. [ Expression ]
+ ?. IdentifierName
+ ?. Arguments
+ ?. TemplateLiteral
+ OptionalChain [ Expression ]
+ OptionalChain .IdentifierName
+ OptionalChain Arguments
+ OptionalChain TemplateLiteral
+
+ DestructuringAssignmentTarget : LeftHandSideExpression
+
+ - It is a Syntax Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral and IsValidSimpleAssignmentTarget(LeftHandSideExpression) is not true.
+
+ Static Semantics: IsValidSimpleAssignmentTarget
+
+ LeftHandSideExpression : OptionalExpression
+ 1. Return false.
+
+---*/
+$DONOTEVALUATE();
+
+0, [{
+ set y(val) {
+ throw new Test262Error('The property should not be accessed.');
+ }
+}?.y = 42] = [23];
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-obj-literal-prop-ref-init-active.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-obj-literal-prop-ref-init-active.js
new file mode 100644
index 0000000000..9b4dc59afb
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-obj-literal-prop-ref-init-active.js
@@ -0,0 +1,70 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-put-obj-literal-prop-ref-init-active.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: The DestructuringAssignmentTarget of an AssignmentElement can extend to LHSExpressions if it is neither an ObjectLiteral nor an ArrayLiteral and its AssignmentTargetTyp is simple. Using MemberExpression (ObjLiteral + identifier) with activated initializer. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ Syntax
+
+ AssignmentPattern : ArrayAssignmentPattern
+ ArrayAssignmentPattern : [ AssignmentElementList ]
+ AssignmentElementList : AssignmentElisionElement
+ AssignmentElisionElement : Elision_opt AssignmentElement
+ AssignmentElement : DestructuringAssignmentTarget Initializer_opt
+ DestructuringAssignmentTarget : LeftHandSideExpression
+
+ Static Semantics: Early Errors
+
+ DestructuringAssignmentTarget : LeftHandSideExpression
+
+ - It is a Syntax Error if LeftHandSideExpression is either an ObjectLiteral or an ArrayLiteral and if LeftHandSideExpression is not covering an AssignmentPattern.
+ - It is a Syntax Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral and AssignmentTargetType(LeftHandSideExpression) is not simple.
+
+ Runtime Semantics: DestructuringAssignmentEvaluation
+ ArrayAssignmentPattern : [ AssignmentElementList ]
+
+ 1. Let iteratorRecord be ? GetIterator(value).
+ 2. Let result be IteratorDestructuringAssignmentEvaluation of AssignmentElementList with argument iteratorRecord.
+ 3. If iteratorRecord.[[Done]] is false, return ? IteratorClose(iteratorRecord, result).
+ 4. Return result.
+
+ Runtime Semantics: IteratorDestructuringAssignmentEvaluation
+ AssignmentElement : DestructuringAssignmentTarget Initializer
+
+ 1. If DestructuringAssignmentTarget is neither an ObjectLiteral nor an ArrayLiteral, then
+ a. Let lref be the result of evaluating DestructuringAssignmentTarget.
+ ...
+ 7. Return ? PutValue(lref, v).
+
+---*/
+var x, setValue;
+
+var result;
+var vals = [undefined];
+
+result = [{
+ get y() {
+ throw new Test262Error('The property should not be accessed.');
+ },
+ set y(val) {
+ setValue = val;
+ }
+}.y = 42] = vals;
+
+assert.sameValue(setValue, 42);
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-obj-literal-prop-ref-init.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-obj-literal-prop-ref-init.js
new file mode 100644
index 0000000000..68b98e1a0d
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-obj-literal-prop-ref-init.js
@@ -0,0 +1,70 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-put-obj-literal-prop-ref-init.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: The DestructuringAssignmentTarget of an AssignmentElement can extend to LHSExpressions if it is neither an ObjectLiteral nor an ArrayLiteral and its AssignmentTargetTyp is simple. Using MemberExpression (ObjLiteral + identifier) with initializer. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ Syntax
+
+ AssignmentPattern : ArrayAssignmentPattern
+ ArrayAssignmentPattern : [ AssignmentElementList ]
+ AssignmentElementList : AssignmentElisionElement
+ AssignmentElisionElement : Elision_opt AssignmentElement
+ AssignmentElement : DestructuringAssignmentTarget Initializer_opt
+ DestructuringAssignmentTarget : LeftHandSideExpression
+
+ Static Semantics: Early Errors
+
+ DestructuringAssignmentTarget : LeftHandSideExpression
+
+ - It is a Syntax Error if LeftHandSideExpression is either an ObjectLiteral or an ArrayLiteral and if LeftHandSideExpression is not covering an AssignmentPattern.
+ - It is a Syntax Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral and AssignmentTargetType(LeftHandSideExpression) is not simple.
+
+ Runtime Semantics: DestructuringAssignmentEvaluation
+ ArrayAssignmentPattern : [ AssignmentElementList ]
+
+ 1. Let iteratorRecord be ? GetIterator(value).
+ 2. Let result be IteratorDestructuringAssignmentEvaluation of AssignmentElementList with argument iteratorRecord.
+ 3. If iteratorRecord.[[Done]] is false, return ? IteratorClose(iteratorRecord, result).
+ 4. Return result.
+
+ Runtime Semantics: IteratorDestructuringAssignmentEvaluation
+ AssignmentElement : DestructuringAssignmentTarget Initializer
+
+ 1. If DestructuringAssignmentTarget is neither an ObjectLiteral nor an ArrayLiteral, then
+ a. Let lref be the result of evaluating DestructuringAssignmentTarget.
+ ...
+ 7. Return ? PutValue(lref, v).
+
+---*/
+var x, setValue;
+
+var result;
+var vals = [23];
+
+result = [{
+ get y() {
+ throw new Test262Error('The property should not be accessed.');
+ },
+ set y(val) {
+ setValue = val;
+ }
+}.y = 42] = vals;
+
+assert.sameValue(setValue, 23);
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-obj-literal-prop-ref.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-obj-literal-prop-ref.js
new file mode 100644
index 0000000000..10459a2e9a
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-obj-literal-prop-ref.js
@@ -0,0 +1,70 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-put-obj-literal-prop-ref.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: The DestructuringAssignmentTarget of an AssignmentElement can extend to LHSExpressions if it is neither an ObjectLiteral nor an ArrayLiteral and its AssignmentTargetTyp is simple. Using MemberExpression (ObjLiteral + identifier). (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ Syntax
+
+ AssignmentPattern : ArrayAssignmentPattern
+ ArrayAssignmentPattern : [ AssignmentElementList ]
+ AssignmentElementList : AssignmentElisionElement
+ AssignmentElisionElement : Elision_opt AssignmentElement
+ AssignmentElement : DestructuringAssignmentTarget Initializer_opt
+ DestructuringAssignmentTarget : LeftHandSideExpression
+
+ Static Semantics: Early Errors
+
+ DestructuringAssignmentTarget : LeftHandSideExpression
+
+ - It is a Syntax Error if LeftHandSideExpression is either an ObjectLiteral or an ArrayLiteral and if LeftHandSideExpression is not covering an AssignmentPattern.
+ - It is a Syntax Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral and AssignmentTargetType(LeftHandSideExpression) is not simple.
+
+ Runtime Semantics: DestructuringAssignmentEvaluation
+ ArrayAssignmentPattern : [ AssignmentElementList ]
+
+ 1. Let iteratorRecord be ? GetIterator(value).
+ 2. Let result be IteratorDestructuringAssignmentEvaluation of AssignmentElementList with argument iteratorRecord.
+ 3. If iteratorRecord.[[Done]] is false, return ? IteratorClose(iteratorRecord, result).
+ 4. Return result.
+
+ Runtime Semantics: IteratorDestructuringAssignmentEvaluation
+ AssignmentElement : DestructuringAssignmentTarget Initializer
+
+ 1. If DestructuringAssignmentTarget is neither an ObjectLiteral nor an ArrayLiteral, then
+ a. Let lref be the result of evaluating DestructuringAssignmentTarget.
+ ...
+ 7. Return ? PutValue(lref, v).
+
+---*/
+var x, setValue;
+
+var result;
+var vals = [23];
+
+result = [{
+ get y() {
+ throw new Test262Error('The property should not be accessed.');
+ },
+ set y(val) {
+ setValue = val;
+ }
+}.y] = vals;
+
+assert.sameValue(setValue, 23);
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-prop-ref-no-get.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-prop-ref-no-get.js
new file mode 100644
index 0000000000..9a0e4df6d8
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-prop-ref-no-get.js
@@ -0,0 +1,37 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-put-prop-ref-no-get.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: If the DestructuringAssignmentTarget of an AssignmentElement is a PropertyReference, it should not be evaluated. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x, setValue;
+x = {
+ get y() {
+ throw new Test262Error('The property should not be accessed.');
+ },
+ set y(val) {
+ setValue = val;
+ }
+};
+
+var result;
+var vals = [23];
+
+result = [x.y] = vals;
+
+assert.sameValue(setValue, 23);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-prop-ref-user-err.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-prop-ref-user-err.js
new file mode 100644
index 0000000000..78dc5e7853
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-prop-ref-user-err.js
@@ -0,0 +1,28 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-put-prop-ref-user-err.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: Any error raised as a result of setting the value should be forwarded to the runtime. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = {
+ set y(val) {
+ throw new Test262Error();
+ }
+};
+
+assert.throws(Test262Error, function() {
+ 0, [x.y] = [23];
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-prop-ref.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-prop-ref.js
new file mode 100644
index 0000000000..278006500f
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-prop-ref.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-put-prop-ref.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: The DestructuringAssignmentTarget of an AssignmentElement may be a PropertyReference. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = {};
+
+var result;
+var vals = [4];
+
+result = [x.y] = vals;
+
+assert.sameValue(x.y, 4);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-unresolvable-no-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-unresolvable-no-strict.js
new file mode 100644
index 0000000000..44d50f33b1
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-unresolvable-no-strict.js
@@ -0,0 +1,33 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-put-unresolvable-no-strict.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Outside of strict mode, if the the assignment target is an unresolvable reference, a new `var` binding should be created in the environment record. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, noStrict]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+{
+
+var result;
+var vals = [];
+
+result = [ unresolvable ] = vals;
+
+
+
+assert.sameValue(result, vals);
+
+}
+
+assert.sameValue(unresolvable, undefined);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-unresolvable-strict-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-unresolvable-strict-strict.js
new file mode 100644
index 0000000000..7993e668b5
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-put-unresolvable-strict-strict.js
@@ -0,0 +1,24 @@
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-put-unresolvable-strict.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: In strict mode, if the the assignment target is an unresolvable reference, a ReferenceError should be thrown. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, onlyStrict]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+assert.throws(ReferenceError, function() {
+ 0, [ unresolvable ] = [];
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-target-identifier.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-target-identifier.js
new file mode 100644
index 0000000000..077947e6b6
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-target-identifier.js
@@ -0,0 +1,31 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-target-identifier.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Identifiers that appear as the DestructuringAssignmentTarget in an AssignmentElement should take on the iterated value corresponding to their position in the ArrayAssignmentPattern. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x, y, z;
+
+var result;
+var vals = [1, 2, 3];
+
+result = [x, y, z] = vals;
+
+assert.sameValue(x, 1);
+assert.sameValue(y, 2);
+assert.sameValue(z, 3);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-target-simple-no-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-target-simple-no-strict.js
new file mode 100644
index 0000000000..64b8661f4d
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-target-simple-no-strict.js
@@ -0,0 +1,30 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-target-simple-no-strict.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Identifiers that appear as the DestructuringAssignmentTarget in an AssignmentElement should take on the iterated value corresponding to their position in the ArrayAssignmentPattern. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, noStrict]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var argument, eval;
+
+var result;
+var vals = [2, 3];
+
+result = [arguments, eval] = vals;
+
+assert.sameValue(arguments, 2);
+assert.sameValue(eval, 3);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-target-simple-strict-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-target-simple-strict-strict.js
new file mode 100644
index 0000000000..db1f72d58d
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-target-simple-strict-strict.js
@@ -0,0 +1,25 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-target-simple-strict.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: It is a Syntax Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral and IsValidSimpleAssignmentTarget(LeftHandSideExpression) is false. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+
+0, [arguments] = [];
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-target-yield-expr.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-target-yield-expr.js
new file mode 100644
index 0000000000..c265030dc0
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-target-yield-expr.js
@@ -0,0 +1,47 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-target-yield-expr.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When a `yield` token appears within the DestructuringAssignmentTarget of an AssignmentElement within a generator function body, it behaves as a YieldExpression. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var value = [33];
+var x = {};
+var iterationResult, iter;
+
+iter = (function*() {
+
+var result;
+var vals = [33];
+
+result = [ x[yield] ] = vals;
+
+
+
+assert.sameValue(result, vals);
+
+}());
+
+iterationResult = iter.next();
+
+assert.sameValue(iterationResult.value, undefined);
+assert.sameValue(iterationResult.done, false);
+assert.sameValue(x.prop, undefined);
+
+iterationResult = iter.next('prop');
+
+assert.sameValue(iterationResult.value, undefined);
+assert.sameValue(iterationResult.done, true);
+assert.sameValue(x.prop, 33);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-target-yield-invalid-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-target-yield-invalid-strict.js
new file mode 100644
index 0000000000..fd9b6dd932
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-target-yield-invalid-strict.js
@@ -0,0 +1,25 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-target-yield-invalid.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: When a `yield` token appears within the DestructuringAssignmentTarget of an AssignmentElement and outside of a generator function body, it behaves as an IdentifierReference. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+
+0, [ x[yield] ] = [];
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-target-yield-valid.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-target-yield-valid.js
new file mode 100644
index 0000000000..35e2df1b60
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-target-yield-valid.js
@@ -0,0 +1,30 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-target-yield-valid.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When a `yield` token appears within the DestructuringAssignmentTarget of an AssignmentElement outside of a generator function body, it behaves as an IdentifierReference. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, noStrict]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var yield = 'prop';
+var x = {};
+
+var result;
+var vals = [33];
+
+result = [ x[yield] ] = vals;
+
+assert.sameValue(x.prop, 33);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-elision-iter-abpt.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-elision-iter-abpt.js
new file mode 100644
index 0000000000..36b3073e54
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-elision-iter-abpt.js
@@ -0,0 +1,64 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-trlg-iter-elision-iter-abpt.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: Abrupt completion returned during evaluation of elision (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern :
+ [ AssignmentElementList , Elisionopt AssignmentRestElementopt ]
+
+ [...]
+ 6. If Elision is present, then
+ a. Let status be the result of performing
+ IteratorDestructuringAssignmentEvaluation of Elision with
+ iteratorRecord as the argument.
+ b. If status is an abrupt completion, then
+ i. If iteratorRecord.[[done]] is false, return
+ IteratorClose(iterator, status).
+ ii. Return Completion(status).
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var iterable = {};
+var x;
+var iterator = {
+ next: function() {
+ nextCount += 1;
+
+ if (nextCount === 2) {
+ throw new Test262Error();
+ }
+
+ // Set an upper-bound to limit unnecessary iteration in non-conformant
+ // implementations
+ return { done: nextCount > 10 };
+ },
+ return: function() {
+ returnCount += 1;
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+
+assert.throws(Test262Error, function() {
+ 0, [ x , , ] = iterable;
+});
+
+assert.sameValue(nextCount, 2);
+assert.sameValue(returnCount, 0);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-elision-iter-nrml-close-err.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-elision-iter-nrml-close-err.js
new file mode 100644
index 0000000000..4f9998d039
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-elision-iter-nrml-close-err.js
@@ -0,0 +1,60 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-trlg-iter-elision-iter-nrml-close-err.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: Abrupt completion returned from IteratorClose (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern :
+ [ AssignmentElementList , Elisionopt AssignmentRestElementopt ]
+
+ [...]
+ 6. If Elision is present, then
+ a. Let status be the result of performing
+ IteratorDestructuringAssignmentEvaluation of Elision with
+ iteratorRecord as the argument.
+ b. If status is an abrupt completion, then
+ [...]
+ 8. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ status).
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var iterable = {};
+var x;
+var iterator = {
+ next: function() {
+ nextCount += 1;
+
+ // Set an upper-bound to limit unnecessary iteration in non-conformant
+ // implementations
+ return { done: nextCount > 10 };
+ },
+ return: function() {
+ returnCount += 1;
+ throw new Test262Error();
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+assert.throws(Test262Error, function() {
+ 0, [ x , , ] = iterable;
+});
+
+assert.sameValue(nextCount, 2);
+assert.sameValue(returnCount, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-elision-iter-nrml-close-null.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-elision-iter-nrml-close-null.js
new file mode 100644
index 0000000000..ae60643e24
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-elision-iter-nrml-close-null.js
@@ -0,0 +1,63 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-trlg-iter-elision-iter-nrml-close-null.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: IteratorClose throws a TypeError when `return` returns a non-Object value (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern :
+ [ AssignmentElementList , Elisionopt AssignmentRestElementopt ]
+
+ [...]
+ 6. If Elision is present, then
+ a. Let status be the result of performing
+ IteratorDestructuringAssignmentEvaluation of Elision with
+ iteratorRecord as the argument.
+ b. If status is an abrupt completion, then
+ [...]
+ 8. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ status).
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ 7. If completion.[[type]] is throw, return Completion(completion).
+ 8. If innerResult.[[type]] is throw, return Completion(innerResult).
+ 9. If Type(innerResult.[[value]]) is not Object, throw a TypeError
+ exception.
+
+---*/
+var iterable = {};
+var x;
+var nextCount = 0;
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ // Set an upper-bound to limit unnecessary iteration in non-conformant
+ // implementations
+ return { done: nextCount > 10 };
+ },
+ return: function() {
+ return null;
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+assert.throws(TypeError, function() {
+ 0, [ x , , ] = iterable;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-elision-iter-nrml-close-skip.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-elision-iter-nrml-close-skip.js
new file mode 100644
index 0000000000..160c75af9a
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-elision-iter-nrml-close-skip.js
@@ -0,0 +1,61 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-trlg-iter-elision-iter-nrml-close-skip.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: IteratorClose not invoked when elision exhausts the iterator (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern :
+ [ AssignmentElementList , Elisionopt AssignmentRestElementopt ]
+
+ [...]
+ 6. If Elision is present, then
+ a. Let status be the result of performing
+ IteratorDestructuringAssignmentEvaluation of Elision with
+ iteratorRecord as the argument.
+ b. If status is an abrupt completion, then
+ [...]
+ 8. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ status).
+ 9. Return Completion(status).
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var iterable = {};
+var x;
+var iterator = {
+ next: function() {
+ nextCount += 1;
+
+ return { done: nextCount > 1 };
+ },
+ return: function() {
+ returnCount += 1;
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+var result;
+var vals = iterable;
+
+result = [ x , , ] = vals;
+
+assert.sameValue(nextCount, 2);
+assert.sameValue(returnCount, 0);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-elision-iter-nrml-close.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-elision-iter-nrml-close.js
new file mode 100644
index 0000000000..e57416f5a1
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-elision-iter-nrml-close.js
@@ -0,0 +1,76 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-trlg-iter-elision-iter-nrml-close.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: IteratorClose invoked when elision does not exhaust the iterator (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern :
+ [ AssignmentElementList , Elisionopt AssignmentRestElementopt ]
+
+ [...]
+ 6. If Elision is present, then
+ a. Let status be the result of performing
+ IteratorDestructuringAssignmentEvaluation of Elision with
+ iteratorRecord as the argument.
+ b. If status is an abrupt completion, then
+ [...]
+ 8. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ status).
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ [...]
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var thisValue = null;
+var args = null;
+var iterable = {};
+var x;
+var iterator = {
+ next: function() {
+ nextCount += 1;
+
+ // Set an upper-bound to limit unnecessary iteration in non-conformant
+ // implementations
+ return { done: nextCount > 10 };
+ },
+ return: function() {
+ returnCount += 1;
+ thisValue = this;
+ args = arguments;
+ return {};
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+var result;
+var vals = iterable;
+
+result = [ x , , ] = vals;
+
+assert.sameValue(nextCount, 2);
+assert.sameValue(returnCount, 1);
+assert.sameValue(thisValue, iterator, 'correct `this` value');
+assert(!!args, 'arguments object provided');
+assert.sameValue(args.length, 0, 'zero arguments specified');
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-get-err.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-get-err.js
new file mode 100644
index 0000000000..91f18f559e
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-get-err.js
@@ -0,0 +1,35 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-trlg-iter-get-err.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: Abrupt completion returned from GetIterator (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern :
+ [ AssignmentElementList , Elisionopt AssignmentRestElementopt ]
+
+ 1. Let iterator be GetIterator(value).
+ 2. ReturnIfAbrupt(iterator).
+
+---*/
+var iterable = {};
+iterable[Symbol.iterator] = function() {
+ throw new Test262Error();
+};
+var x;
+
+assert.throws(Test262Error, function() {
+ 0, [ x , ] = iterable;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-nrml-close-err.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-nrml-close-err.js
new file mode 100644
index 0000000000..635d0cb425
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-nrml-close-err.js
@@ -0,0 +1,60 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-trlg-iter-list-nrml-close-err.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: Abrupt completion returned from IteratorClose (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern :
+ [ AssignmentElementList , Elisionopt AssignmentRestElementopt ]
+
+ [...]
+ 3. Let iteratorRecord be Record {[[iterator]]: iterator, [[done]]: false}.
+ 4. Let status be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentElementList using
+ iteratorRecord as the argument.
+ 5. If status is an abrupt completion, then
+ a. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ status).
+ b. Return Completion(status).
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var iterable = {};
+var thrower = function() {
+ throw new Test262Error();
+};
+var x;
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ return { done: nextCount > 10 };
+ },
+ return: function() {
+ returnCount += 1;
+ throw new Test262Error();
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+assert.throws(Test262Error, function() {
+ 0, [ x , ] = iterable;
+});
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-nrml-close-null.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-nrml-close-null.js
new file mode 100644
index 0000000000..2e25ce202a
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-nrml-close-null.js
@@ -0,0 +1,63 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-trlg-iter-list-nrml-close-null.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: IteratorClose throws a TypeError when `return` returns a non-Object value (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern :
+ [ AssignmentElementList , Elisionopt AssignmentRestElementopt ]
+
+ [...]
+ 3. Let iteratorRecord be Record {[[iterator]]: iterator, [[done]]: false}.
+ 4. Let status be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentElementList using
+ iteratorRecord as the argument.
+ 5. If status is an abrupt completion, then
+ a. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ status).
+ b. Return Completion(status).
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ 7. If completion.[[type]] is throw, return Completion(completion).
+ 8. If innerResult.[[type]] is throw, return Completion(innerResult).
+ 9. If Type(innerResult.[[value]]) is not Object, throw a TypeError
+ exception.
+
+---*/
+var iterable = {};
+var x;
+var nextCount = 0;
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ // Set an upper-bound to limit unnecessary iteration in non-conformant
+ // implementations
+ return { done: nextCount > 10 };
+ },
+ return: function() {
+ return null;
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+assert.throws(TypeError, function() {
+ 0, [ x , ] = iterable;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-nrml-close-skip.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-nrml-close-skip.js
new file mode 100644
index 0000000000..404ef3f813
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-nrml-close-skip.js
@@ -0,0 +1,62 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-trlg-iter-list-nrml-close-skip.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: IteratorClose is not invoked when evaluation of AssignmentElementList exhausts the iterator (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern :
+ [ AssignmentElementList , Elisionopt AssignmentRestElementopt ]
+
+ [...]
+ 3. Let iteratorRecord be Record {[[iterator]]: iterator, [[done]]: false}.
+ 4. Let status be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentElementList using
+ iteratorRecord as the argument.
+ 5. If status is an abrupt completion, then
+ a. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ status).
+ b. Return Completion(status).
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var iterable = {};
+var thrower = function() {
+ throw new Test262Error();
+};
+var x;
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ return { done: true };
+ },
+ return: function() {
+ returnCount += 1;
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+var result;
+var vals = iterable;
+
+result = [ x , ] = vals;
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 0);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-nrml-close.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-nrml-close.js
new file mode 100644
index 0000000000..a1984ca05f
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-nrml-close.js
@@ -0,0 +1,75 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-trlg-iter-list-nrml-close.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: IteratorClose is invoked when evaluation of AssignmentElementList completes without exhausting the iterator (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern :
+ [ AssignmentElementList , Elisionopt AssignmentRestElementopt ]
+
+ [...]
+ 3. Let iteratorRecord be Record {[[iterator]]: iterator, [[done]]: false}.
+ 4. Let status be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentElementList using
+ iteratorRecord as the argument.
+ 5. If status is an abrupt completion, then
+ a. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ status).
+ b. Return Completion(status).
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ [...]
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var thisValue = null;
+var args = null;
+var iterable = {};
+var x;
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ // Set an upper-bound to limit unnecessary iteration in non-conformant
+ // implementations
+ return { done: nextCount > 10 };
+ },
+ return: function() {
+ returnCount += 1;
+ thisValue = this;
+ args = arguments;
+ return {};
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+var result;
+var vals = iterable;
+
+result = [ x , ] = vals;
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 1);
+assert.sameValue(thisValue, iterator, 'correct `this` value');
+assert(!!args, 'arguments object provided');
+assert.sameValue(args.length, 0, 'zero arguments specified');
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-err.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-err.js
new file mode 100644
index 0000000000..fe325a61f1
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-err.js
@@ -0,0 +1,82 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-trlg-iter-list-rtrn-close-err.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: IteratorClose is invoked when evaluation of AssignmentElementList returns a "return" completion and the iterator has not been marked as "done" (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern :
+ [ AssignmentElementList , Elisionopt AssignmentRestElementopt ]
+
+ [...]
+ 3. Let iteratorRecord be Record {[[iterator]]: iterator, [[done]]: false}.
+ 4. Let status be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentElementList using
+ iteratorRecord as the argument.
+ 5. If status is an abrupt completion, then
+ a. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ status).
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ 7. If completion.[[type]] is throw, return Completion(completion).
+ 8. If innerResult.[[type]] is throw, return Completion(innerResult).
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var unreachable = 0;
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ return {done: false, value: undefined};
+ },
+ return: function() {
+ returnCount += 1;
+
+ throw new Test262Error();
+ }
+};
+var iterable = {};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+function* g() {
+
+var result;
+var vals = iterable;
+
+result = [ {} = yield , ] = vals;
+
+unreachable += 1;
+
+assert.sameValue(result, vals);
+
+}
+
+var iter = g();
+iter.next();
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 0);
+assert.throws(Test262Error, function() {
+ iter.return();
+});
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 1);
+assert.sameValue(unreachable, 0, 'Unreachable statement was not executed');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-null.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-null.js
new file mode 100644
index 0000000000..a202f24ba9
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-null.js
@@ -0,0 +1,82 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-trlg-iter-list-rtrn-close-null.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: IteratorClose throws a TypeError when `return` returns a non-Object value (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern :
+ [ AssignmentElementList , Elisionopt AssignmentRestElementopt ]
+
+ [...]
+ 3. Let iteratorRecord be Record {[[iterator]]: iterator, [[done]]: false}.
+ 4. Let status be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentElementList using
+ iteratorRecord as the argument.
+ 5. If status is an abrupt completion, then
+ a. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ status).
+ b. Return Completion(status).
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ 7. If completion.[[type]] is throw, return Completion(completion).
+ 8. If innerResult.[[type]] is throw, return Completion(innerResult).
+ 9. If Type(innerResult.[[value]]) is not Object, throw a TypeError
+ exception.
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ return {done: false, value: undefined};
+ },
+ return: function() {
+ returnCount += 1;
+ return null;
+ }
+};
+var iterable = {};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+function* g() {
+
+var result;
+var vals = iterable;
+
+result = [ {} = yield , ] = vals;
+
+
+
+assert.sameValue(result, vals);
+
+}
+
+var iter = g();
+iter.next();
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 0);
+assert.throws(TypeError, function() {
+ iter.return();
+});
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close.js
new file mode 100644
index 0000000000..0d9246d0cc
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close.js
@@ -0,0 +1,93 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-trlg-iter-list-rtrn-close.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: IteratorClose is invoked when evaluation of AssignmentElementList returns a "return" completion and the iterator has not been marked as "done" (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern :
+ [ AssignmentElementList , Elisionopt AssignmentRestElementopt ]
+
+ [...]
+ 3. Let iteratorRecord be Record {[[iterator]]: iterator, [[done]]: false}.
+ 4. Let status be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentElementList using
+ iteratorRecord as the argument.
+ 5. If status is an abrupt completion, then
+ a. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ status).
+ b. Return Completion(status).
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ 7. If completion.[[type]] is throw, return Completion(completion).
+ 8. If innerResult.[[type]] is throw, return Completion(innerResult).
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var unreachable = 0;
+var thisValue = null;
+var args = null;
+var iterable = {};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ return {done: false, value: undefined};
+ },
+ return: function() {
+ returnCount += 1;
+ thisValue = this;
+ args = arguments;
+ return {};
+ }
+};
+var iter, result;
+
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+function* g() {
+
+var result;
+var vals = iterable;
+
+result = [ {} = yield , ] = vals;
+
+unreachable += 1;
+
+assert.sameValue(result, vals);
+
+};
+
+iter = g();
+iter.next();
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 0);
+
+result = iter.return(888);
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 1);
+assert.sameValue(unreachable, 0, 'Unreachable statement was not executed');
+assert.sameValue(result.value, 888);
+assert(result.done, 'Iterator correctly closed');
+assert.sameValue(thisValue, iterator, 'correct `this` value');
+assert(!!args, 'arguments object provided');
+assert.sameValue(args.length, 0, 'zero arguments specified');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-thrw-close-err.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-thrw-close-err.js
new file mode 100644
index 0000000000..8337cbfc99
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-thrw-close-err.js
@@ -0,0 +1,68 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-trlg-iter-list-thrw-close-err.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: IteratorClose is invoked when evaluation of AssignmentElementList returns a "throw" completion and the iterator has not been marked as "done" (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern :
+ [ AssignmentElementList , Elisionopt AssignmentRestElementopt ]
+
+ [...]
+ 3. Let iteratorRecord be Record {[[iterator]]: iterator, [[done]]: false}.
+ 4. Let status be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentElementList using
+ iteratorRecord as the argument.
+ 5. If status is an abrupt completion, then
+ a. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ status).
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 7. If completion.[[type]] is throw, return Completion(completion).
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var iterable = {};
+var thrower = function() {
+ throw new Test262Error();
+};
+function ReturnError() {}
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ return { done: true };
+ },
+ return: function() {
+ returnCount += 1;
+
+ // This value should be discarded.
+ throw new ReturnError();
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+
+assert.throws(Test262Error, function() {
+ 0, [ {}[thrower()] , ] = iterable;
+});
+
+
+assert.sameValue(nextCount, 0);
+assert.sameValue(returnCount, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-thrw-close-skip.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-thrw-close-skip.js
new file mode 100644
index 0000000000..a855ca1752
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-thrw-close-skip.js
@@ -0,0 +1,59 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-trlg-iter-list-thrw-close-skip.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: IteratorClose is not invoked when evaluation of AssignmentElementList returns an abrupt completion and the iterator has been marked as "done" (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern :
+ [ AssignmentElementList , Elisionopt AssignmentRestElementopt ]
+
+ [...]
+ 3. Let iteratorRecord be Record {[[iterator]]: iterator, [[done]]: false}.
+ 4. Let status be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentElementList using
+ iteratorRecord as the argument.
+ 5. If status is an abrupt completion, then
+ a. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ status).
+ b. Return Completion(status).
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var iterable = {};
+var thrower = function() {
+ throw new Test262Error();
+};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ throw new Test262Error();
+ },
+ return: function() {
+ returnCount += 1;
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+var x;
+
+assert.throws(Test262Error, function() {
+ 0, [ x , ] = iterable;
+});
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 0);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-thrw-close.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-thrw-close.js
new file mode 100644
index 0000000000..5e7407c452
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-list-thrw-close.js
@@ -0,0 +1,71 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-trlg-iter-list-thrw-close.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: IteratorClose is invoked when evaluation of AssignmentElementList returns a "throw" completion and the iterator has not been marked as "done" (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern :
+ [ AssignmentElementList , Elisionopt AssignmentRestElementopt ]
+
+ [...]
+ 3. Let iteratorRecord be Record {[[iterator]]: iterator, [[done]]: false}.
+ 4. Let status be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentElementList using
+ iteratorRecord as the argument.
+ 5. If status is an abrupt completion, then
+ a. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ status).
+ b. Return Completion(status).
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ [...]
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var thisValue = null;
+var args = null;
+var iterable = {};
+var thrower = function() {
+ throw new Test262Error();
+};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ return { done: true };
+ },
+ return: function() {
+ returnCount += 1;
+ thisValue = this;
+ args = arguments;
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+assert.throws(Test262Error, function() {
+ 0, [ {}[thrower()] , ] = iterable;
+});
+
+assert.sameValue(nextCount, 0);
+assert.sameValue(returnCount, 1);
+assert.sameValue(thisValue, iterator, 'correct `this` value');
+assert(!!args, 'arguments object provided');
+assert.sameValue(args.length, 0, 'zero arguments specified');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-nrml-close-skip.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-nrml-close-skip.js
new file mode 100644
index 0000000000..73bbb0a002
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-nrml-close-skip.js
@@ -0,0 +1,62 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-trlg-iter-rest-nrml-close-skip.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: IteratorClose is not called when rest element evaluation has exhausted the iterator (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern :
+ [ AssignmentElementList , Elisionopt AssignmentRestElementopt ]
+
+ [...]
+ 7. If AssignmentRestElement is present, then
+ a. Let status be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentRestElement
+ with iteratorRecord as the argument.
+ 8. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ status).
+ 9. Return Completion(status).
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var iterable = {};
+var x, y;
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ return { value: nextCount, done: nextCount > 1 };
+ },
+ return: function() {
+ returnCount += 1;
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+var result;
+var vals = iterable;
+
+result = [ x , ...y ] = vals;
+
+
+
+assert.sameValue(result, vals);
+
+assert.sameValue(nextCount, 2, 'nextCount');
+assert.sameValue(returnCount, 0, 'returnCount');
+assert.sameValue(x, 1, 'x');
+assert.sameValue(y.length, 0, 'y.length');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-err.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-err.js
new file mode 100644
index 0000000000..53556fbaa2
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-err.js
@@ -0,0 +1,84 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-trlg-iter-rest-rtrn-close-err.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: IteratorClose is called when AssignmentRestEvaluation produces a "return" completion due to reference evaluation (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern :
+ [ AssignmentElementList , Elisionopt AssignmentRestElementopt ]
+
+ [...]
+ 7. If AssignmentRestElement is present, then
+ a. Let status be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentRestElement
+ with iteratorRecord as the argument.
+ 8. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ status).
+ 9. Return Completion(status).
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ 7. If completion.[[type]] is throw, return Completion(completion).
+ 8. If innerResult.[[type]] is throw, return Completion(innerResult).
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var unreachable = 0;
+var x;
+var iterable = {};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ // Set an upper-bound to limit unnecessary iteration in non-conformant
+ // implementations
+ return { done: nextCount > 10 };
+ },
+ return: function() {
+ returnCount += 1;
+
+ throw new Test262Error();
+ }
+};
+var iter;
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+function* g() {
+
+var result;
+var vals = iterable;
+
+result = [ x , ...{}[yield] ] = vals;
+
+unreachable += 1;
+
+assert.sameValue(result, vals);
+
+}
+
+iter = g();
+iter.next();
+
+assert.throws(Test262Error, function() {
+ iter.return();
+});
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 1);
+assert.sameValue(unreachable, 0, 'Unreachable statement was not executed');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-null.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-null.js
new file mode 100644
index 0000000000..72f586a6a9
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-null.js
@@ -0,0 +1,79 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-trlg-iter-rest-rtrn-close-null.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: IteratorClose throws a TypeError when `return` returns a non-Object value (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern :
+ [ AssignmentElementList , Elisionopt AssignmentRestElementopt ]
+
+ [...]
+ 7. If AssignmentRestElement is present, then
+ a. Let status be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentRestElement
+ with iteratorRecord as the argument.
+ 8. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ status).
+ 9. Return Completion(status).
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ 7. If completion.[[type]] is throw, return Completion(completion).
+ 8. If innerResult.[[type]] is throw, return Completion(innerResult).
+
+---*/
+var nextCount = 0;
+var iterable = {};
+var x;
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ // Set an upper-bound to limit unnecessary iteration in non-conformant
+ // implementations
+ return { done: nextCount > 10 };
+ },
+ return: function() {
+ return null;
+ }
+};
+var iter;
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+function* g() {
+
+var result;
+var vals = iterable;
+
+result = [ x , ...{}[yield] ] = vals;
+
+
+
+assert.sameValue(result, vals);
+
+}
+
+iter = g();
+iter.next();
+
+assert.throws(TypeError, function() {
+ iter.return();
+});
+
+assert.sameValue(nextCount, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close.js
new file mode 100644
index 0000000000..59913ad167
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close.js
@@ -0,0 +1,90 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-trlg-iter-rest-rtrn-close.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: IteratorClose is called when AssignmentRestEvaluation produces a "return" completion due to reference evaluation (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern :
+ [ AssignmentElementList , Elisionopt AssignmentRestElementopt ]
+
+ [...]
+ 7. If AssignmentRestElement is present, then
+ a. Let status be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentRestElement
+ with iteratorRecord as the argument.
+ 8. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ status).
+ 9. Return Completion(status).
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ 7. If completion.[[type]] is throw, return Completion(completion).
+ 8. If innerResult.[[type]] is throw, return Completion(innerResult).
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var unreachable = 0;
+var thisValue = null;
+var args = null;
+var iterable = {};
+var x;
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ // Set an upper-bound to limit unnecessary iteration in non-conformant
+ // implementations
+ return { done: nextCount > 10 };
+ },
+ return: function() {
+ returnCount += 1;
+ thisValue = this;
+ args = arguments;
+ return {};
+ }
+};
+var iter, result;
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+function* g() {
+
+var result;
+var vals = iterable;
+
+result = [ x , ...{}[yield] ] = vals;
+
+unreachable += 1;
+
+assert.sameValue(result, vals);
+
+}
+
+iter = g();
+iter.next();
+result = iter.return(999);
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 1);
+assert.sameValue(unreachable, 0, 'Unreachable statement was not executed');
+assert.sameValue(result.value, 999);
+assert(result.done, 'Iterator correctly closed');
+assert.sameValue(thisValue, iterator, 'correct `this` value');
+assert(!!args, 'arguments object provided');
+assert.sameValue(args.length, 0, 'zero arguments specified');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-thrw-close-err.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-thrw-close-err.js
new file mode 100644
index 0000000000..d742a4e872
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-thrw-close-err.js
@@ -0,0 +1,69 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-trlg-iter-rest-thrw-close-err.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: IteratorClose is called when AssignmentRestEvaluation produces a "throw" completion due to reference evaluation (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern :
+ [ AssignmentElementList , Elisionopt AssignmentRestElementopt ]
+
+ [...]
+ 7. If AssignmentRestElement is present, then
+ a. Let status be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentRestElement
+ with iteratorRecord as the argument.
+ 8. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ status).
+ 9. Return Completion(status).
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 7. If completion.[[type]] is throw, return Completion(completion)
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var x;
+function ReturnError() {}
+var iterable = {};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ // Set an upper-bound to limit unnecessary iteration in non-conformant
+ // implementations
+ return { done: nextCount > 10 };
+ },
+ return: function() {
+ returnCount += 1;
+
+ // This value should be discarded.
+ throw new ReturnError();
+ }
+};
+var thrower = function() {
+ throw new Test262Error();
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+assert.throws(Test262Error, function() {
+ 0, [ x , ...{}[thrower()] ] = iterable;
+});
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-thrw-close-skip.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-thrw-close-skip.js
new file mode 100644
index 0000000000..de19c8f80a
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-thrw-close-skip.js
@@ -0,0 +1,62 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-trlg-iter-rest-thrw-close-skip.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: Abrupt completion returned during iteration for rest element (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern :
+ [ AssignmentElementList , Elisionopt AssignmentRestElementopt ]
+
+ [...]
+ 7. If AssignmentRestElement is present, then
+ a. Let status be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentRestElement
+ with iteratorRecord as the argument.
+ 8. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ status).
+ 9. Return Completion(status).
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var iterable = {};
+var x;
+var iterator = {
+ next: function() {
+ nextCount += 1;
+
+ if (nextCount === 2) {
+ throw new Test262Error();
+ }
+
+ // Set an upper-bound to limit unnecessary iteration in non-conformant
+ // implementations
+ return { done: nextCount > 10 };
+ },
+ return: function() {
+ returnCount += 1;
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+assert.throws(Test262Error, function() {
+ 0, [ x , ...x ] = iterable;
+});
+
+assert.sameValue(nextCount, 2);
+assert.sameValue(returnCount, 0);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-thrw-close.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-thrw-close.js
new file mode 100644
index 0000000000..d30f3a71a8
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elem-trlg-iter-rest-thrw-close.js
@@ -0,0 +1,73 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elem-trlg-iter-rest-thrw-close.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: IteratorClose is called when AssignmentRestEvaluation produces a "throw" completion due to reference evaluation (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern :
+ [ AssignmentElementList , Elisionopt AssignmentRestElementopt ]
+
+ [...]
+ 7. If AssignmentRestElement is present, then
+ a. Let status be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentRestElement
+ with iteratorRecord as the argument.
+ 8. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ status).
+ 9. Return Completion(status).
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ [...]
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var thisValue = null;
+var args = null;
+var iterable = {};
+var x;
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ // Set an upper-bound to limit unnecessary iteration in non-conformant
+ // implementations
+ return { done: nextCount > 10 };
+ },
+ return: function() {
+ returnCount += 1;
+ thisValue = this;
+ args = arguments;
+ }
+};
+var thrower = function() {
+ throw new Test262Error();
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+assert.throws(Test262Error, function() {
+ 0, [ x , ...{}[thrower()] ] = iterable;
+});
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 1);
+assert.sameValue(thisValue, iterator, 'correct `this` value');
+assert(!!args, 'arguments object provided');
+assert.sameValue(args.length, 0, 'zero arguments specified');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-iter-abpt.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-iter-abpt.js
new file mode 100644
index 0000000000..74f7309dba
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-iter-abpt.js
@@ -0,0 +1,50 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elision-iter-abpt.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: IteratorClose is not called when iteration produces an abrupt completion (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ Elision ]
+
+ 1. Let iterator be GetIterator(value).
+ [...]
+ 5. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ result).
+ [...]
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var iterable = {};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ throw new Test262Error();
+ },
+ return: function() {
+ returnCount += 1;
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+assert.throws(Test262Error, function() {
+ 0, [ , ] = iterable;
+});
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 0);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-iter-get-err.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-iter-get-err.js
new file mode 100644
index 0000000000..2ca34d47e4
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-iter-get-err.js
@@ -0,0 +1,33 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elision-iter-get-err.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: Abrupt completion returned from GetIterator (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ Elision ]
+
+ 1. Let iterator be GetIterator(value).
+ 2. ReturnIfAbrupt(iterator).
+
+---*/
+var iterable = {};
+iterable[Symbol.iterator] = function() {
+ throw new Test262Error();
+};
+
+assert.throws(Test262Error, function() {
+ 0, [ , ] = iterable;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-iter-nrml-close-err.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-iter-nrml-close-err.js
new file mode 100644
index 0000000000..b5b62fd7e6
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-iter-nrml-close-err.js
@@ -0,0 +1,53 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elision-iter-nrml-close-err.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: Abrupt completion returned from IteratorClose (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ Elision ]
+
+ 1. Let iterator be GetIterator(value).
+ [...]
+ 5. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ result).
+ 6. Return result.
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var iterable = {};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ // Set an upper-bound to limit unnecessary iteration in non-conformant
+ // implementations
+ return { done: nextCount > 10 };
+ },
+ return: function() {
+ returnCount += 1;
+ throw new Test262Error();
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+assert.throws(Test262Error, function() {
+ 0, [ , ] = iterable;
+});
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-iter-nrml-close-null.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-iter-nrml-close-null.js
new file mode 100644
index 0000000000..e6a3dd180c
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-iter-nrml-close-null.js
@@ -0,0 +1,57 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elision-iter-nrml-close-null.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: IteratorClose throws a TypeError when `return` returns a non-Object value (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ Elision ]
+
+ 1. Let iterator be GetIterator(value).
+ [...]
+ 5. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ result).
+ [...]
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ 7. If completion.[[type]] is throw, return Completion(completion).
+ 8. If innerResult.[[type]] is throw, return Completion(innerResult).
+ 9. If Type(innerResult.[[value]]) is not Object, throw a TypeError
+ exception.
+
+---*/
+var iterable = {};
+var nextCount = 0;
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ // Set an upper-bound to limit unnecessary iteration in non-conformant
+ // implementations
+ return { done: nextCount > 10 };
+ },
+ return: function() {
+ return null;
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+assert.throws(TypeError, function() {
+ 0, [ , ] = iterable;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-iter-nrml-close-skip.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-iter-nrml-close-skip.js
new file mode 100644
index 0000000000..2c01037e9d
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-iter-nrml-close-skip.js
@@ -0,0 +1,54 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elision-iter-nrml-close-skip.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: IteratorClose is not called when iteration has exhausted the iterator (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ Elision ]
+
+ 1. Let iterator be GetIterator(value).
+ [...]
+ 5. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ result).
+ [...]
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var iterable = {};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ return { done: true };
+ },
+ return: function() {
+ returnCount += 1;
+ return {};
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+var result;
+var vals = iterable;
+
+result = [ , ] = vals;
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 0);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-iter-nrml-close.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-iter-nrml-close.js
new file mode 100644
index 0000000000..0340338d29
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-iter-nrml-close.js
@@ -0,0 +1,69 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elision-iter-nrml-close.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: IteratorClose is called when assignment evaluation has not exhausted the iterator (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ Elision ]
+
+ 1. Let iterator be GetIterator(value).
+ [...]
+ 5. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ result).
+ [...]
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ [...]
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var thisValue = null;
+var args = null;
+var iterable = {};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ // Set an upper-bound to limit unnecessary iteration in non-conformant
+ // implementations
+ return { done: nextCount > 10 };
+ },
+ return: function() {
+ returnCount += 1;
+ thisValue = this;
+ args = arguments;
+ return {};
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+var result;
+var vals = iterable;
+
+result = [ , ] = vals;
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 1);
+assert.sameValue(thisValue, iterator, 'correct `this` value');
+assert(!!args, 'arguments object provided');
+assert.sameValue(args.length, 0, 'zero arguments specified');
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-array.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-array.js
new file mode 100644
index 0000000000..802b529a8b
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-array.js
@@ -0,0 +1,28 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elision-val-array.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: An ArrayAssignmentPattern containing only Elisions requires iterable values (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+var result;
+var vals = [];
+
+result = [,] = vals;
+
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-bool.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-bool.js
new file mode 100644
index 0000000000..39621c5830
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-bool.js
@@ -0,0 +1,23 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elision-val-bool.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: An ArrayAssignmentPattern containing only Elisions requires iterable values and throws for boolean values. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+assert.throws(TypeError, function() {
+ 0, [,] = true;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-null.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-null.js
new file mode 100644
index 0000000000..d73ad33646
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-null.js
@@ -0,0 +1,23 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elision-val-null.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: An ArrayAssignmentPattern containing only Elisions requires iterable values and throws for `null`. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+assert.throws(TypeError, function() {
+ 0, [,] = null;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-num.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-num.js
new file mode 100644
index 0000000000..a8f5e71f8f
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-num.js
@@ -0,0 +1,23 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elision-val-num.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: An ArrayAssignmentPattern containing only Elisions requires iterable values and throws for number values. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+assert.throws(TypeError, function() {
+ 0, [,] = 1;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-string.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-string.js
new file mode 100644
index 0000000000..468ce5e9da
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-string.js
@@ -0,0 +1,28 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elision-val-string.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: An ArrayAssignmentPattern containing only Elisions requires iterable values (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+var result;
+var vals = 'string literal';
+
+result = [,] = vals;
+
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-symbol.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-symbol.js
new file mode 100644
index 0000000000..81b7e6b68c
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-symbol.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elision-val-symbol.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: An ArrayAssignmentPattern containing only Elisions requires iterable values and throws for symbol values. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var s = Symbol();
+
+assert.throws(TypeError, function() {
+ 0, [,] = s;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-undef.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-undef.js
new file mode 100644
index 0000000000..1847e2eee1
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-elision-val-undef.js
@@ -0,0 +1,23 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-elision-val-undef.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: An ArrayAssignmentPattern containing only Elisions requires iterable values and throws for `undefined`. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+assert.throws(TypeError, function() {
+ 0, [,] = undefined;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-iter-close-err.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-iter-close-err.js
new file mode 100644
index 0000000000..fe4d8a91aa
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-iter-close-err.js
@@ -0,0 +1,49 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-empty-iter-close-err.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: Abrupt completion returned from IteratorClose (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ ]
+
+ 1. Let iterator be GetIterator(value).
+ 2. ReturnIfAbrupt(iterator).
+ 3. Return IteratorClose(iterator, NormalCompletion(empty)).
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var iterable = {};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ return { done: true };
+ },
+ return: function() {
+ returnCount += 1;
+ throw new Test262Error();
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+assert.throws(Test262Error, function() {
+ 0, [] = iterable;
+});
+
+assert.sameValue(nextCount, 0);
+assert.sameValue(returnCount, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-iter-close-null.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-iter-close-null.js
new file mode 100644
index 0000000000..9d3c42baf1
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-iter-close-null.js
@@ -0,0 +1,51 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-empty-iter-close-null.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: IteratorClose throws a TypeError when `return` returns a non-Object value (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ ]
+
+ 1. Let iterator be GetIterator(value).
+ 2. ReturnIfAbrupt(iterator).
+ 3. Return IteratorClose(iterator, NormalCompletion(empty)).
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ 7. If completion.[[type]] is throw, return Completion(completion).
+ 8. If innerResult.[[type]] is throw, return Completion(innerResult).
+ 9. If Type(innerResult.[[value]]) is not Object, throw a TypeError
+ exception.
+
+---*/
+var iterable = {};
+var iterator = {
+ next: function() {
+ return { done: true };
+ },
+ return: function() {
+ return null;
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+assert.throws(TypeError, function() {
+ 0, [] = iterable;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-iter-close.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-iter-close.js
new file mode 100644
index 0000000000..d7a57dbe0b
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-iter-close.js
@@ -0,0 +1,65 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-empty-iter-close.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Iterator is closed without iterating (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ ]
+
+ 1. Let iterator be GetIterator(value).
+ 2. ReturnIfAbrupt(iterator).
+ 3. Return IteratorClose(iterator, NormalCompletion(empty)).
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ [...]
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var thisValue = null;
+var args = null;
+var iterable = {};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ return { done: true };
+ },
+ return: function() {
+ returnCount += 1;
+ thisValue = this;
+ args = arguments;
+ return {};
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+var result;
+var vals = iterable;
+
+result = [] = vals;
+
+assert.sameValue(nextCount, 0);
+assert.sameValue(returnCount, 1);
+assert.sameValue(thisValue, iterator, 'correct `this` value');
+assert(!!args, 'arguments object provided');
+assert.sameValue(args.length, 0, 'zero arguments specified');
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-iter-get-err.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-iter-get-err.js
new file mode 100644
index 0000000000..b717addb6c
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-iter-get-err.js
@@ -0,0 +1,33 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-empty-iter-get-err.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: Abrupt completion returned from GetIterator (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ ]
+
+ 1. Let iterator be GetIterator(value).
+ 2. ReturnIfAbrupt(iterator).
+
+---*/
+var iterable = {};
+iterable[Symbol.iterator] = function() {
+ throw new Test262Error();
+};
+
+assert.throws(Test262Error, function() {
+ 0, [] = iterable;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-array.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-array.js
new file mode 100644
index 0000000000..34cdcf1cbb
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-array.js
@@ -0,0 +1,28 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-empty-val-array.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: An ArrayAssignmentPattern without an AssignmentElementList requires iterable values. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+var result;
+var vals = [];
+
+result = [] = vals;
+
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-bool.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-bool.js
new file mode 100644
index 0000000000..71c6b78238
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-bool.js
@@ -0,0 +1,23 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-empty-val-bool.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: An ArrayAssignmentPattern without an AssignmentElementList requires iterable values and throws for boolean values (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+assert.throws(TypeError, function() {
+ 0, [] = true;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-null.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-null.js
new file mode 100644
index 0000000000..6f92dfb22d
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-null.js
@@ -0,0 +1,23 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-empty-val-null.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: An ArrayAssignmentPattern without an AssignmentElementList requires iterable values and throws for `null`. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+assert.throws(TypeError, function() {
+ 0, [] = null;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-num.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-num.js
new file mode 100644
index 0000000000..bb94582b9d
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-num.js
@@ -0,0 +1,23 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-empty-val-num.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: An ArrayAssignmentPattern without an AssignmentElementList requires iterable values and throws for number values. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+assert.throws(TypeError, function() {
+ 0, [] = 1;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-string.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-string.js
new file mode 100644
index 0000000000..00c6d335ee
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-string.js
@@ -0,0 +1,28 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-empty-val-string.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: An ArrayAssignmentPattern without an AssignmentElementList requires iterable values. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+var result;
+var vals = 'string literal';
+
+result = [] = vals;
+
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-symbol.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-symbol.js
new file mode 100644
index 0000000000..95d5a39733
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-symbol.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-empty-val-symbol.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: An ArrayAssignmentPattern without an AssignmentElementList requires iterable values and throws for Symbol values. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var s = Symbol();
+
+assert.throws(TypeError, function() {
+ 0, [] = s;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-undef.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-undef.js
new file mode 100644
index 0000000000..5427aceb28
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-empty-val-undef.js
@@ -0,0 +1,23 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-empty-val-undef.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: An ArrayAssignmentPattern without an AssignmentElementList requires iterable values and throws for `undefined`. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+assert.throws(TypeError, function() {
+ 0, [] = undefined;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-iteration.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-iteration.js
new file mode 100644
index 0000000000..acde85ea55
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-iteration.js
@@ -0,0 +1,36 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-iteration.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Value iteration only proceeds for the number of elements in the ArrayAssignmentPattern. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var count = 0;
+var g = function*() {
+ count += 1;
+ yield;
+ count += 1;
+ yield;
+ count += 1;
+}
+
+var result;
+var vals = g();
+
+result = [,,] = vals;
+
+assert.sameValue(count, 2);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-after-element.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-after-element.js
new file mode 100644
index 0000000000..d604cad121
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-after-element.js
@@ -0,0 +1,32 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-after-element.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: An AssignmentRestElement following an AssignmentElement consumes all remaining iterable values. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x, y;
+
+var result;
+var vals = [1, 2, 3];
+
+result = [x, ...y] = vals;
+
+assert.sameValue(x, 1);
+assert.sameValue(y.length, 2);
+assert.sameValue(y[0], 2);
+assert.sameValue(y[1], 3);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-after-elision.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-after-elision.js
new file mode 100644
index 0000000000..f5f585b83c
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-after-elision.js
@@ -0,0 +1,31 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-after-elision.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: An AssignmentRestElement following an elision consumes all remaining iterable values. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+var result;
+var vals = [1, 2, 3];
+
+result = [, ...x] = vals;
+
+assert.sameValue(x.length, 2);
+assert.sameValue(x[0], 2);
+assert.sameValue(x[1], 3);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-before-element.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-before-element.js
new file mode 100644
index 0000000000..444c2118bf
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-before-element.js
@@ -0,0 +1,24 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-before-element.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: An AssignmentElement may not follow an AssignmentRestElement in an AssignmentElementList. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+
+0, [...x, y] = [];
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-before-elision.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-before-elision.js
new file mode 100644
index 0000000000..459a381bd1
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-before-elision.js
@@ -0,0 +1,24 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-before-elision.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: An elision may not follow an AssignmentRestElement in an AssignmentElementList. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+
+0, [...x,] = [];
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-before-rest.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-before-rest.js
new file mode 100644
index 0000000000..ca326a85ab
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-before-rest.js
@@ -0,0 +1,24 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-before-rest.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: An AssignmentRestElement may not follow another AssignmentRestElement in an AssignmentElementList. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+
+0, [...x, ...y] = [];
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-elision-invalid.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-elision-invalid.js
new file mode 100644
index 0000000000..2a6f56988e
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-elision-invalid.js
@@ -0,0 +1,24 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-elision-invalid.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: ArrayAssignmentPattern may not include elisions following an AssignmentRestElement in a AssignmentElementList. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+
+0, [...x,] = [];
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-elision-iter-abpt.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-elision-iter-abpt.js
new file mode 100644
index 0000000000..ade40df9eb
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-elision-iter-abpt.js
@@ -0,0 +1,55 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-elision-iter-abpt.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: IteratorClose is not called when assignment evaluation produces an abrupt completion (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ Elisionopt AssignmentRestElement ]
+
+ [...]
+ 4. If Elision is present, then
+ a. Let status be the result of performing
+ IteratorDestructuringAssignmentEvaluation of Elision with
+ iteratorRecord as the argument.
+ b. If status is an abrupt completion, then
+ i. If iteratorRecord.[[done]] is false, return
+ IteratorClose(iterator, status).
+ ii. Return Completion(status).
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var iterable = {};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ throw new Test262Error();
+ },
+ return: function() {
+ returnCount += 1;
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+var x;
+
+assert.throws(Test262Error, function() {
+ 0, [ , ...x] = iterable;
+});
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 0);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-elision.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-elision.js
new file mode 100644
index 0000000000..aa4d0267ca
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-elision.js
@@ -0,0 +1,32 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-elision.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: ArrayAssignmentPattern may include elisions at any position preceding a AssignmentRestElement in a AssignmentElementList. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x, y;
+
+var result;
+var vals = [1, 2, 3, 4, 5, 6];
+
+result = [, , x, , ...y] = vals;
+
+assert.sameValue(x, 3);
+assert.sameValue(y.length, 2);
+assert.sameValue(y[0], 5);
+assert.sameValue(y[1], 6);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-init.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-init.js
new file mode 100644
index 0000000000..4dfd4e9960
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-init.js
@@ -0,0 +1,25 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-init.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: The AssignmentRestElement does not support an initializer. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+var x;
+
+0, [...x = 1] = [];
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-get-err.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-get-err.js
new file mode 100644
index 0000000000..d003d388e3
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-get-err.js
@@ -0,0 +1,34 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-iter-get-err.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: Abrupt completion returned from GetIterator (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ Elisionopt AssignmentRestElement ]
+
+ 1. Let iterator be GetIterator(value).
+ 2. ReturnIfAbrupt(iterator).
+
+---*/
+var iterable = {};
+var x;
+iterable[Symbol.iterator] = function() {
+ throw new Test262Error();
+};
+
+assert.throws(Test262Error, function() {
+ 0, [...x] = iterable;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-nrml-close-skip.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-nrml-close-skip.js
new file mode 100644
index 0000000000..51dbe4c5f5
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-nrml-close-skip.js
@@ -0,0 +1,56 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-iter-nrml-close-skip.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: IteratorClose is not called when assignment evaluation has exhausted the iterator (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ Elisionopt AssignmentRestElement ]
+
+ [...]
+ 5. Let result be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentRestElement with
+ iteratorRecord as the argument
+ 6. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ result).
+ 7. Return result.
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var x;
+var iterable = {};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ return { done: true };
+ },
+ return: function() {
+ returnCount += 1;
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+var result;
+var vals = iterable;
+
+result = [ ...x ] = vals;
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 0);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-rtrn-close-err.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-rtrn-close-err.js
new file mode 100644
index 0000000000..9eae05c598
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-rtrn-close-err.js
@@ -0,0 +1,79 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-iter-rtrn-close-err.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: IteratorClose is called when reference evaluation produces a "return" completion (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ Elisionopt AssignmentRestElement ]
+
+ [...]
+ 5. Let result be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentRestElement with
+ iteratorRecord as the argument
+ 6. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ result).
+
+ AssignmentRestElement[Yield] : ... DestructuringAssignmentTarget
+
+ 1. If DestructuringAssignmentTarget is neither an ObjectLiteral nor an
+ ArrayLiteral, then
+ a. Let lref be the result of evaluating DestructuringAssignmentTarget.
+ b. ReturnIfAbrupt(lref).
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ 7. If completion.[[type]] is throw, return Completion(completion).
+ 8. If innerResult.[[type]] is throw, return Completion(innerResult).
+
+---*/
+var returnCount = 0;
+var unreachable = 0;
+var iterable = {};
+var iterator = {
+ return: function() {
+ returnCount += 1;
+
+ throw new Test262Error();
+ }
+};
+var iter;
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+function* g() {
+
+var result;
+var vals = iterable;
+
+result = [...{}[yield]] = vals;
+
+unreachable += 1;
+
+assert.sameValue(result, vals);
+
+}
+
+iter = g();
+iter.next();
+assert.throws(Test262Error, function() {
+ iter.return();
+});
+
+assert.sameValue(returnCount, 1);
+assert.sameValue(unreachable, 0, 'Unreachable statement was not executed');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-rtrn-close-null.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-rtrn-close-null.js
new file mode 100644
index 0000000000..6ee0957c11
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-rtrn-close-null.js
@@ -0,0 +1,79 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-iter-rtrn-close-null.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: IteratorClose throws a TypeError when `return` returns a non-Object value (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ Elisionopt AssignmentRestElement ]
+
+ [...]
+ 5. Let result be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentRestElement with
+ iteratorRecord as the argument
+ 6. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ result).
+
+ AssignmentRestElement[Yield] : ... DestructuringAssignmentTarget
+
+ 1. If DestructuringAssignmentTarget is neither an ObjectLiteral nor an
+ ArrayLiteral, then
+ a. Let lref be the result of evaluating DestructuringAssignmentTarget.
+ b. ReturnIfAbrupt(lref).
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ [...]
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ 7. If completion.[[type]] is throw, return Completion(completion).
+ 8. If innerResult.[[type]] is throw, return Completion(innerResult).
+
+---*/
+var iterable = {};
+var iterator = {
+ return: function() {
+ return null;
+ }
+};
+var iter;
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+function* g() {
+
+var result;
+var vals = iterable;
+
+result = [...{}[yield]] = vals;
+
+
+
+assert.sameValue(result, vals);
+
+}
+
+iter = g();
+iter.next();
+
+assert.throws(TypeError, function() {
+ iter.return();
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-rtrn-close.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-rtrn-close.js
new file mode 100644
index 0000000000..7aaf8b7e1b
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-rtrn-close.js
@@ -0,0 +1,94 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-iter-rtrn-close.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: IteratorClose is called when reference evaluation produces a "return" completion (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ Elisionopt AssignmentRestElement ]
+
+ [...]
+ 5. Let result be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentRestElement with
+ iteratorRecord as the argument
+ 6. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ result).
+
+ AssignmentRestElement[Yield] : ... DestructuringAssignmentTarget
+
+ 1. If DestructuringAssignmentTarget is neither an ObjectLiteral nor an
+ ArrayLiteral, then
+ a. Let lref be the result of evaluating DestructuringAssignmentTarget.
+ b. ReturnIfAbrupt(lref).
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ [...]
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ 7. If completion.[[type]] is throw, return Completion(completion).
+ 8. If innerResult.[[type]] is throw, return Completion(innerResult).
+
+---*/
+var returnCount = 0;
+var unreachable = 0;
+var thisValue = null;
+var args = null;
+var iterable = {};
+var iterator = {
+ next() {
+ throw new Test262Error();
+ },
+ return: function() {
+ returnCount += 1;
+ thisValue = this;
+ args = arguments;
+ return {};
+ }
+};
+var iter, result;
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+function* g() {
+
+var result;
+var vals = iterable;
+
+result = [...{}[yield]] = vals;
+
+unreachable += 1;
+
+assert.sameValue(result, vals);
+
+}
+
+iter = g();
+iter.next();
+result = iter.return(444);
+
+assert.sameValue(returnCount, 1);
+assert.sameValue(unreachable, 0, 'Unreachable statement was not executed');
+assert.sameValue(result.value, 444);
+assert(result.done, 'Iterator correctly closed');
+assert.sameValue(thisValue, iterator, 'correct `this` value');
+assert(!!args, 'arguments object provided');
+assert.sameValue(args.length, 0, 'zero arguments specified');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-thrw-close-err.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-thrw-close-err.js
new file mode 100644
index 0000000000..a9ff16b48b
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-thrw-close-err.js
@@ -0,0 +1,69 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-iter-thrw-close-err.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: IteratorClose is called when reference evaluation produces a "throw" completion (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ Elisionopt AssignmentRestElement ]
+
+ [...]
+ 5. Let result be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentRestElement with
+ iteratorRecord as the argument
+ 6. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ result).
+
+ AssignmentRestElement[Yield] : ... DestructuringAssignmentTarget
+
+ 1. If DestructuringAssignmentTarget is neither an ObjectLiteral nor an
+ ArrayLiteral, then
+ a. Let lref be the result of evaluating DestructuringAssignmentTarget.
+ b. ReturnIfAbrupt(lref).
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var x;
+function ReturnError() {}
+var iterable = {};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ // Set an upper-bound to limit unnecessary iteration in non-conformant
+ // implementations
+ return { done: nextCount > 10 };
+ },
+ return: function() {
+ returnCount += 1;
+
+ // This value should be discarded.
+ throw new ReturnError();
+ }
+};
+var thrower = function() {
+ throw new Test262Error();
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+
+assert.throws(Test262Error, function() {
+ 0, [...{}[thrower()]] = iterable;
+});
+
+assert.sameValue(nextCount, 0);
+assert.sameValue(returnCount, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-thrw-close-skip.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-thrw-close-skip.js
new file mode 100644
index 0000000000..0d4f1c2f97
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-thrw-close-skip.js
@@ -0,0 +1,52 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-iter-thrw-close-skip.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: IteratorClose is not called when iteration produces an abrupt completion (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ Elisionopt AssignmentRestElement ]
+
+ [...]
+ 5. Let result be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentRestElement with
+ iteratorRecord as the argument
+ 6. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ result).
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var x;
+var iterable = {};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ throw new Test262Error();
+ },
+ return: function() {
+ returnCount += 1;
+ }
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+assert.throws(Test262Error, function() {
+ 0, [...x] = iterable;
+});
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 0);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-thrw-close.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-thrw-close.js
new file mode 100644
index 0000000000..77a7a8f576
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iter-thrw-close.js
@@ -0,0 +1,77 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-iter-thrw-close.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: IteratorClose is called when reference evaluation produces a "throw" completion (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ Elisionopt AssignmentRestElement ]
+
+ [...]
+ 5. Let result be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentRestElement with
+ iteratorRecord as the argument
+ 6. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ result).
+
+ AssignmentRestElement[Yield] : ... DestructuringAssignmentTarget
+
+ 1. If DestructuringAssignmentTarget is neither an ObjectLiteral nor an
+ ArrayLiteral, then
+ a. Let lref be the result of evaluating DestructuringAssignmentTarget.
+ b. ReturnIfAbrupt(lref).
+
+ 7.4.6 IteratorClose( iterator, completion )
+
+ [...]
+ 6. Let innerResult be Call(return, iterator, « »).
+ [...]
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var thisValue = null;
+var args = null;
+var x;
+var iterable = {};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ // Set an upper-bound to limit unnecessary iteration in non-conformant
+ // implementations
+ return { done: nextCount > 10 };
+ },
+ return: function() {
+ returnCount += 1;
+ thisValue = this;
+ args = arguments;
+ }
+};
+var thrower = function() {
+ throw new Test262Error();
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+assert.throws(Test262Error, function() {
+ 0, [...{}[thrower()]] = iterable;
+});
+
+assert.sameValue(nextCount, 0);
+assert.sameValue(returnCount, 1);
+assert.sameValue(thisValue, iterator, 'correct `this` value');
+assert(!!args, 'arguments object provided');
+assert.sameValue(args.length, 0, 'zero arguments specified');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iteration.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iteration.js
new file mode 100644
index 0000000000..b7a7df2877
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-iteration.js
@@ -0,0 +1,37 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-iteration.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: In the presense of an AssignmentRestElement, value iteration exhausts the iterable value; (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var count = 0;
+var g = function*() {
+ count += 1;
+ yield;
+ count += 1;
+ yield;
+ count += 1;
+}
+var x;
+
+var result;
+var vals = g();
+
+result = [...x] = vals;
+
+assert.sameValue(count, 3);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-lref-err.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-lref-err.js
new file mode 100644
index 0000000000..accc197bb8
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-lref-err.js
@@ -0,0 +1,61 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-lref-err.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: IteratorClose is called when reference evaluation produces an abrupt completion (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ Elisionopt AssignmentRestElement ]
+
+ [...]
+ 5. Let result be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentRestElement with
+ iteratorRecord as the argument
+ 6. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ result).
+
+ AssignmentRestElement[Yield] : ... DestructuringAssignmentTarget
+
+ 1. If DestructuringAssignmentTarget is neither an ObjectLiteral nor an
+ ArrayLiteral, then
+ a. Let lref be the result of evaluating DestructuringAssignmentTarget.
+ b. ReturnIfAbrupt(lref).
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var iterable = {};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ return { done: true };
+ },
+ return: function() {
+ returnCount += 1;
+ }
+};
+var thrower = function() {
+ throw new Test262Error();
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+assert.throws(Test262Error, function() {
+ 0, [...{}[thrower()]] = iterable;
+});
+
+assert.sameValue(nextCount, 0);
+assert.sameValue(returnCount, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-lref.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-lref.js
new file mode 100644
index 0000000000..9827e5ff66
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-lref.js
@@ -0,0 +1,65 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-lref.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Reference is evaluated during assignment (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ Elisionopt AssignmentRestElement ]
+
+ [...]
+ 5. Let result be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentRestElement with
+ iteratorRecord as the argument
+ 6. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ result).
+
+ AssignmentRestElement[Yield] : ... DestructuringAssignmentTarget
+
+ 1. If DestructuringAssignmentTarget is neither an ObjectLiteral nor an
+ ArrayLiteral, then
+ a. Let lref be the result of evaluating DestructuringAssignmentTarget.
+ b. ReturnIfAbrupt(lref).
+ [...]
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var iterable = {};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ return { done: true };
+ },
+ return: function() {
+ returnCount += 1;
+ }
+};
+var obj = {};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+var result;
+var vals = iterable;
+
+result = [...obj['a' + 'b']] = vals;
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 0);
+assert(!!obj.ab);
+assert.sameValue(obj.ab.length, 0);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-invalid.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-invalid.js
new file mode 100644
index 0000000000..184a68eef8
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-invalid.js
@@ -0,0 +1,24 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-nested-array-invalid.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: It is a Syntax Error if LeftHandSideExpression is either an ObjectLiteral or an ArrayLiteral and if the lexical token sequence matched by LeftHandSideExpression cannot be parsed with no tokens left over using AssignmentPattern as the goal symbol. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+
+0, [...[(x, y)]] = [[]];
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-iter-thrw-close-skip.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-iter-thrw-close-skip.js
new file mode 100644
index 0000000000..5e71ef0752
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-iter-thrw-close-skip.js
@@ -0,0 +1,64 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-nested-array-iter-thrw-close-skip.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: IteratorClose is not called when nested array pattern evaluation produces an abrupt completion (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ Elisionopt AssignmentRestElement ]
+
+ [...]
+ 5. Let result be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentRestElement with
+ iteratorRecord as the argument
+ 6. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ result).
+
+ AssignmentRestElement[Yield] : ... DestructuringAssignmentTarget
+
+ [...]
+ 4. Repeat while iteratorRecord.[[done]] is false
+ [...]
+ d. If next is false, set iteratorRecord.[[done]] to true.
+ [...]
+ 7. Return the result of performing DestructuringAssignmentEvaluation of
+ nestedAssignmentPattern with A as the argument.
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var iterable = {};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ return { done: true };
+ },
+ return: function() {
+ returnCount += 1;
+ }
+};
+var thrower = function() {
+ throw new Test262Error();
+};
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+assert.throws(Test262Error, function() {
+ 0, [...[...{}[thrower()]]] = iterable;
+});
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 0);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-null.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-null.js
new file mode 100644
index 0000000000..db98682592
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-null.js
@@ -0,0 +1,30 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-nested-array-null.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an array literal and the iterable emits `null` as the only value, an array with a single `null` element should be used as the value of the nested DestructuringAssignment. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x, y;
+
+var result;
+var vals = [null];
+
+result = [...[x, y]] = vals;
+
+assert.sameValue(x, null);
+assert.sameValue(y, undefined);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-undefined-hole.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-undefined-hole.js
new file mode 100644
index 0000000000..9094260e59
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-undefined-hole.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-nested-array-undefined-hole.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an array literal and the iterable is an array with a "hole", an array with a single `undefined` element should be used as the value of the nested DestructuringAssignment. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = null;
+
+var result;
+var vals = [ , ];
+
+result = [...[x]] = vals;
+
+assert.sameValue(x, undefined);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-undefined-own.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-undefined-own.js
new file mode 100644
index 0000000000..ea9ea94630
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-undefined-own.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-nested-array-undefined-own.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an array literal and the iterable emits `undefined` as the only value, an array with a single `undefined` element should be used as the value of the nested DestructuringAssignment. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = null;
+
+var result;
+var vals = [undefined];
+
+result = [...[x]] = vals;
+
+assert.sameValue(x, undefined);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-undefined.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-undefined.js
new file mode 100644
index 0000000000..6817993dc1
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-undefined.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-nested-array-undefined.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an array literal and the iterable is emits no values, an empty array should be used as the value of the nested DestructuringAssignment. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = null;
+
+var result;
+var vals = [];
+
+result = [...[x]] = vals;
+
+assert.sameValue(x, undefined);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-yield-expr.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-yield-expr.js
new file mode 100644
index 0000000000..f69cd97607
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-yield-expr.js
@@ -0,0 +1,47 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-nested-array-yield-expr.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When a `yield` token appears within the DestructuringAssignmentTarget of a nested destructuring assignment and within a generator function body, it should behave as a YieldExpression. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var value = [86];
+var x = {};
+var iterationResult, iter;
+
+iter = (function*() {
+
+var result;
+var vals = [86];
+
+result = [...[x[yield]]] = vals;
+
+
+
+assert.sameValue(result, vals);
+
+}());
+
+iterationResult = iter.next();
+
+assert.sameValue(iterationResult.value, undefined);
+assert.sameValue(iterationResult.done, false);
+assert.sameValue(x.prop, undefined);
+
+iterationResult = iter.next('prop');
+
+assert.sameValue(iterationResult.value, undefined);
+assert.sameValue(iterationResult.done, true);
+assert.sameValue(x.prop, 86);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-yield-ident-invalid-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-yield-ident-invalid-strict.js
new file mode 100644
index 0000000000..7498198fb3
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-yield-ident-invalid-strict.js
@@ -0,0 +1,25 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-nested-array-yield-ident-invalid.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: When a `yield` token appears within the DestructuringAssignmentTarget of a nested destructuring assignment and outside of a generator function body, it should behave as an IdentifierExpression. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+
+0, [...[x[yield]]] = [];
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-yield-ident-valid.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-yield-ident-valid.js
new file mode 100644
index 0000000000..85d2d45de8
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array-yield-ident-valid.js
@@ -0,0 +1,30 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-nested-array-yield-ident-valid.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When a `yield` token appears within the DestructuringAssignmentTarget of a nested destructuring assignment and outside of a generator function body, it should behave as an IdentifierExpression. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, noStrict]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var yield = 'prop';
+var x = {};
+
+var result;
+var vals = [86];
+
+result = [...[x[yield]]] = vals;
+
+assert.sameValue(x.prop, 86);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array.js
new file mode 100644
index 0000000000..f9c4ea7f11
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-array.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-nested-array.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an array literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+var result;
+var vals = [1, 2, 3];
+
+result = [...[x]] = vals;
+
+assert.sameValue(x, 1);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-invalid.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-invalid.js
new file mode 100644
index 0000000000..8ec363df99
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-invalid.js
@@ -0,0 +1,24 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-nested-obj-invalid.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: It is a Syntax Error if LeftHandSideExpression is either an ObjectLiteral or an ArrayLiteral and if the lexical token sequence matched by LeftHandSideExpression cannot be parsed with no tokens left over using AssignmentPattern as the goal symbol. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+
+0, [...{ get x() {} }] = [[]];
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-null.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-null.js
new file mode 100644
index 0000000000..98cc4efe48
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-null.js
@@ -0,0 +1,30 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-nested-obj-null.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an object literal and the iterable emits `null` as the only value, an array with a single `null` element should be used as the value of the nested DestructuringAssignment. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x, length;
+
+var result;
+var vals = [null];
+
+result = [...{ 0: x, length }] = vals;
+
+assert.sameValue(x, null);
+assert.sameValue(length, 1);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-undefined-hole.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-undefined-hole.js
new file mode 100644
index 0000000000..36cd215bce
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-undefined-hole.js
@@ -0,0 +1,33 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-nested-obj-undefined-hole.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an array literal and the iterable is an array with a "hole", an array with a single `undefined` element should be used as the value of the nested DestructuringAssignment. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = null;
+// Use the the top-level lexical scope for 'length' to provide compatibility with browsers
+// where length and name are properties of WindowProxy
+let length;
+
+var result;
+var vals = [ , ];
+
+result = [...{ 0: x, length }] = vals;
+
+assert.sameValue(x, undefined);
+assert.sameValue(length, 1);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-undefined-own.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-undefined-own.js
new file mode 100644
index 0000000000..31d1ef08ee
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-undefined-own.js
@@ -0,0 +1,33 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-nested-obj-undefined-own.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an array literal and the iterable emits `undefined` as the only value, an array with a single `undefined` element should be used as the value of the nested DestructuringAssignment. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = null;
+// Use the the top-level lexical scope for 'length' to provide compatibility with browsers
+// where length and name are properties of WindowProxy
+let length;
+
+var result;
+var vals = [undefined];
+
+result = [...{ 0: x, length }] = vals;
+
+assert.sameValue(x, undefined);
+assert.sameValue(length, 1);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-undefined.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-undefined.js
new file mode 100644
index 0000000000..550168927a
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-undefined.js
@@ -0,0 +1,33 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-nested-obj-undefined.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an obect literal and the iterable is emits no values, an empty array should be used as the value of the nested DestructuringAssignment. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = null;
+// Use the the top-level lexical scope for 'length' to provide compatibility with browsers
+// where length and name are properties of WindowProxy
+let length;
+
+var result;
+var vals = [];
+
+result = [...{ 0: x, length }] = vals;
+
+assert.sameValue(x, undefined);
+assert.sameValue(length, 0);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-yield-expr.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-yield-expr.js
new file mode 100644
index 0000000000..c19d6c3d1e
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-yield-expr.js
@@ -0,0 +1,45 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-nested-obj-yield-expr.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When a `yield` token appears within the Initializer of a nested destructuring assignment and within a generator function body, it should behave as a YieldExpression. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var iterationResult, iter, x;
+
+iter = (function*() {
+
+var result;
+var vals = [{}];
+
+result = [...{ x = yield }] = vals;
+
+
+
+assert.sameValue(result, vals);
+
+}());
+
+iterationResult = iter.next();
+
+assert.sameValue(iterationResult.value, undefined);
+assert.sameValue(iterationResult.done, false);
+assert.sameValue(x, undefined);
+
+iterationResult = iter.next(4);
+
+assert.sameValue(iterationResult.value, undefined);
+assert.sameValue(iterationResult.done, true);
+assert.sameValue(x, 4);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-yield-ident-invalid-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-yield-ident-invalid-strict.js
new file mode 100644
index 0000000000..45d52fb208
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-yield-ident-invalid-strict.js
@@ -0,0 +1,25 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-nested-obj-yield-ident-invalid.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: When a `yield` token appears within the Initializer of a nested destructuring assignment and outside of a generator function body, it should behave as an IdentifierExpression. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+
+0, [...{ x = yield }] = [{}];
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-yield-ident-valid.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-yield-ident-valid.js
new file mode 100644
index 0000000000..49a63f6a8a
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj-yield-ident-valid.js
@@ -0,0 +1,30 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-nested-obj-yield-ident-valid.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When a `yield` token appears within the Initializer of a nested destructuring assignment and outside of a generator function body, it should behave as an IdentifierExpression. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, noStrict]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var yield = 2;
+var x;
+
+var result;
+var vals = [{}];
+
+result = [...{ x = yield }] = vals;
+
+assert.sameValue(x, 2);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj.js
new file mode 100644
index 0000000000..064a3eead0
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-nested-obj.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-nested-obj.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an object literal, it should be parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+var result;
+var vals = [1, 2, 3];
+
+result = [...{ 1: x }] = vals;
+
+assert.sameValue(x, 2);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-const.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-const.js
new file mode 100644
index 0000000000..78b2e86304
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-const.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-put-const.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: The assignment target should obey `const` semantics. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [const, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+const c = null;
+
+assert.throws(TypeError, function() {
+ 0, [ ...c ] = [1];
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-let.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-let.js
new file mode 100644
index 0000000000..b4147637b4
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-let.js
@@ -0,0 +1,25 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-put-let.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: The assignment target should obey `let` semantics. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [let, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+assert.throws(ReferenceError, function() {
+ 0, [ ...x ] = [];
+});
+
+let x;
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-prop-ref-no-get.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-prop-ref-no-get.js
new file mode 100644
index 0000000000..6ec8b83172
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-prop-ref-no-get.js
@@ -0,0 +1,40 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-put-prop-ref-no-get.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: If the DestructuringAssignmentTarget of an AssignmentElement is a PropertyReference, it should not be evaluated. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var setValue;
+var x = {
+ get y() {
+ throw new Test262Error('The property should not be accessed.');
+ },
+ set y(val) {
+ setValue = val;
+ }
+};
+
+var result;
+var vals = [23, 45, 99];
+
+result = [...x.y] = vals;
+
+assert.sameValue(setValue.length, 3);
+assert.sameValue(setValue[0], 23);
+assert.sameValue(setValue[1], 45);
+assert.sameValue(setValue[2], 99);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-prop-ref-user-err-iter-close-skip.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-prop-ref-user-err-iter-close-skip.js
new file mode 100644
index 0000000000..ca7d2f3e9e
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-prop-ref-user-err-iter-close-skip.js
@@ -0,0 +1,67 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-put-prop-ref-user-err-iter-close-skip.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: IteratorClose is not called when value assignment produces an abrupt completion. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol.iterator, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ ArrayAssignmentPattern : [ Elisionopt AssignmentRestElement ]
+
+ [...]
+ 5. Let result be the result of performing
+ IteratorDestructuringAssignmentEvaluation of AssignmentRestElement with
+ iteratorRecord as the argument
+ 6. If iteratorRecord.[[done]] is false, return IteratorClose(iterator,
+ result).
+
+ AssignmentRestElement[Yield] : ... DestructuringAssignmentTarget
+
+ [...]
+ 4. Repeat while iteratorRecord.[[done]] is false
+ [...]
+ d. If next is false, set iteratorRecord.[[done]] to true.
+ [...]
+ 5. If DestructuringAssignmentTarget is neither an ObjectLiteral nor an
+ ArrayLiteral, then
+ a. Return PutValue(lref, A).
+
+---*/
+var nextCount = 0;
+var returnCount = 0;
+var iterable = {};
+var iterator = {
+ next: function() {
+ nextCount += 1;
+ return { done: true };
+ },
+ return: function() {
+ returnCount += 1;
+ }
+};
+var obj = Object.defineProperty({}, 'poisoned', {
+ set: function(x) {
+ throw new Test262Error();
+ }
+});
+iterable[Symbol.iterator] = function() {
+ return iterator;
+};
+
+assert.throws(Test262Error, function() {
+ 0, [...obj.poisoned] = iterable;
+});
+
+assert.sameValue(nextCount, 1);
+assert.sameValue(returnCount, 0);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-prop-ref-user-err.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-prop-ref-user-err.js
new file mode 100644
index 0000000000..8265b28bf1
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-prop-ref-user-err.js
@@ -0,0 +1,28 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-put-prop-ref-user-err.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: Any error raised as a result of setting the value should be forwarded to the runtime. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = {
+ set y(val) {
+ throw new Test262Error();
+ }
+};
+
+assert.throws(Test262Error, function() {
+ 0, [...x.y] = [23];
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-prop-ref.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-prop-ref.js
new file mode 100644
index 0000000000..0aa5d01042
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-prop-ref.js
@@ -0,0 +1,32 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-put-prop-ref.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: The DestructuringAssignmentTarget of an AssignmentElement may be a PropertyReference. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = {};
+
+var result;
+var vals = [4, 3, 2];
+
+result = [...x.y] = vals;
+
+assert.sameValue(x.y.length, 3);
+assert.sameValue(x.y[0], 4);
+assert.sameValue(x.y[1], 3);
+assert.sameValue(x.y[2], 2);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-unresolvable-no-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-unresolvable-no-strict.js
new file mode 100644
index 0000000000..b6aa3bc182
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-unresolvable-no-strict.js
@@ -0,0 +1,33 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-put-unresolvable-no-strict.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Outside of strict mode, if the the assignment target is an unresolvable reference, a new `var` binding should be created in the environment record. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, noStrict]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+{
+
+var result;
+var vals = [];
+
+result = [ ...unresolvable ] = vals;
+
+
+
+assert.sameValue(result, vals);
+
+}
+
+assert.sameValue(unresolvable.length, 0);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-unresolvable-strict-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-unresolvable-strict-strict.js
new file mode 100644
index 0000000000..9259515c07
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-put-unresolvable-strict-strict.js
@@ -0,0 +1,24 @@
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-put-unresolvable-strict.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: In strict mode, if the the assignment target is an unresolvable reference, a ReferenceError should be thrown. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, onlyStrict]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+assert.throws(ReferenceError, function() {
+ 0, [ ...unresolvable ] = [];
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-yield-expr.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-yield-expr.js
new file mode 100644
index 0000000000..18d828315a
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-yield-expr.js
@@ -0,0 +1,49 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-yield-expr.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When a `yield` token appears within the DestructuringAssignmentTarget of an AssignmentRestElement and within the body of a generator function, it should behave as a YieldExpression. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = {};
+var iterationResult, iter;
+
+iter = (function*() {
+
+var result;
+var vals = [33, 44, 55];
+
+result = [...x[yield]] = vals;
+
+
+
+assert.sameValue(result, vals);
+
+}());
+
+iterationResult = iter.next();
+
+assert.sameValue(iterationResult.value, undefined);
+assert.sameValue(iterationResult.done, false);
+assert.sameValue(x.prop, undefined);
+
+iterationResult = iter.next('prop');
+
+assert.sameValue(iterationResult.value, undefined);
+assert.sameValue(iterationResult.done, true);
+assert.sameValue(x.prop.length, 3);
+assert.sameValue(x.prop[0], 33);
+assert.sameValue(x.prop[1], 44);
+assert.sameValue(x.prop[2], 55);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-yield-ident-invalid-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-yield-ident-invalid-strict.js
new file mode 100644
index 0000000000..eecefb75a1
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-yield-ident-invalid-strict.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-yield-ident-invalid.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: When a `yield` token appears within the DestructuringAssignmentTarget of an AssignmentRestElement and outside of a generator function body, it should behave as an IdentifierReference. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+var x = {};
+
+0, [...x[yield]] = [];
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-yield-ident-valid.js b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-yield-ident-valid.js
new file mode 100644
index 0000000000..da7097314c
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/array-rest-yield-ident-valid.js
@@ -0,0 +1,33 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/array-rest-yield-ident-valid.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When a `yield` token appears within the DestructuringAssignmentTarget of an AssignmentRestElement and outside of a generator function body, it should behave as an IdentifierReference. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, noStrict]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var yield = 'prop';
+var x = {};
+
+var result;
+var vals = [33, 44, 55];
+
+result = [...x[yield]] = vals;
+
+assert.sameValue(x.prop.length, 3);
+assert.sameValue(x.prop[0], 33);
+assert.sameValue(x.prop[1], 44);
+assert.sameValue(x.prop[2], 55);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/browser.js b/js/src/tests/test262/language/expressions/assignment/dstr/browser.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/browser.js
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-break-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-break-escaped.js
new file mode 100644
index 0000000000..f3302919de
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-break-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/break-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: break is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { bre\u0061k: x } = { break: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['break'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-case-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-case-escaped.js
new file mode 100644
index 0000000000..e487afba5c
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-case-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/case-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: case is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { c\u0061se: x } = { case: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['case'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-catch-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-catch-escaped.js
new file mode 100644
index 0000000000..4ddd4eefa5
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-catch-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/catch-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: catch is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { c\u0061tch: x } = { catch: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['catch'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-class-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-class-escaped.js
new file mode 100644
index 0000000000..1179b693f6
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-class-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/class-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: class is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { cl\u0061ss: x } = { class: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['class'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-const-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-const-escaped.js
new file mode 100644
index 0000000000..f8875ac7c8
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-const-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/const-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: const is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { \u0063onst: x } = { const: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['const'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-continue-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-continue-escaped.js
new file mode 100644
index 0000000000..f8314c8f1b
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-continue-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/continue-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: continue is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { \u0063ontinue: x } = { continue: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['continue'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-debugger-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-debugger-escaped.js
new file mode 100644
index 0000000000..4c79f64111
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-debugger-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/debugger-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: debugger is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { \u0064ebugger: x } = { debugger: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['debugger'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-default-escaped-ext.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-default-escaped-ext.js
new file mode 100644
index 0000000000..17cd4152ff
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-default-escaped-ext.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/default-escaped-ext.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: default is a valid identifier name, using extended escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { def\u{61}ult: x } = { default: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['default'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-default-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-default-escaped.js
new file mode 100644
index 0000000000..bca7f3aade
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-default-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/default-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: default is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { def\u0061ult: x } = { default: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['default'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-default.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-default.js
new file mode 100644
index 0000000000..9bbba5e211
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-default.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/default.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: default is a valid identifier name (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { default: x } = { default: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['default'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-delete-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-delete-escaped.js
new file mode 100644
index 0000000000..5df2b28dda
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-delete-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/delete-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: delete is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { \u0064elete: x } = { delete: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['delete'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-do-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-do-escaped.js
new file mode 100644
index 0000000000..31624d5e1d
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-do-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/do-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: do is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { \u0064o: x } = { do: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['do'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-else-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-else-escaped.js
new file mode 100644
index 0000000000..0f43750477
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-else-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/else-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: else is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { \u0065lse: x } = { else: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['else'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-enum-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-enum-escaped.js
new file mode 100644
index 0000000000..7b42edf66d
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-enum-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/enum-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: enum is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { \u0065num: x } = { enum: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['enum'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-export-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-export-escaped.js
new file mode 100644
index 0000000000..813695821d
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-export-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/export-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: export is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { \u0065xport: x } = { export: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['export'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-extends-escaped-ext.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-extends-escaped-ext.js
new file mode 100644
index 0000000000..4185adae44
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-extends-escaped-ext.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/extends-escaped-ext.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: extends is a valid identifier name, using extended escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { \u{65}xtends: x } = { extends: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['extends'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-extends-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-extends-escaped.js
new file mode 100644
index 0000000000..5a2aeb01d4
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-extends-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/extends-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: extends is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { \u0065xtends: x } = { extends: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['extends'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-extends.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-extends.js
new file mode 100644
index 0000000000..9502374c62
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-extends.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/extends.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: extends is a valid identifier name (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { extends: x } = { extends: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['extends'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-finally-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-finally-escaped.js
new file mode 100644
index 0000000000..f30bcd67b8
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-finally-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/finally-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: finally is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { \u0066inally: x } = { finally: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['finally'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-for-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-for-escaped.js
new file mode 100644
index 0000000000..5a8ad4abe1
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-for-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/for-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: for is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { \u0066or: x } = { for: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['for'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-function-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-function-escaped.js
new file mode 100644
index 0000000000..727c213786
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-function-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/function-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: function is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { \u0066unction: x } = { function: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['function'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-if-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-if-escaped.js
new file mode 100644
index 0000000000..2d28ca7849
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-if-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/if-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: if is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { i\u0066: x } = { if: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['if'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-implements-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-implements-escaped.js
new file mode 100644
index 0000000000..b9eb90b619
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-implements-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/implements-escaped.case
+// - src/identifier-names/future-reserved-words/obj-assignment-prop-name.template
+/*---
+description: implements is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { \u0069mplements: x } = { implements: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['implements'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-import-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-import-escaped.js
new file mode 100644
index 0000000000..8553f5c1ae
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-import-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/import-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: import is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { \u0069mport: x } = { import: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['import'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-in-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-in-escaped.js
new file mode 100644
index 0000000000..3d07e44893
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-in-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/in-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: in is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { \u0069n: x } = { in: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['in'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-instanceof-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-instanceof-escaped.js
new file mode 100644
index 0000000000..d54cb421b0
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-instanceof-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/instanceof-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: instanceof is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { \u0069nstanceof: x } = { instanceof: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['instanceof'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-interface-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-interface-escaped.js
new file mode 100644
index 0000000000..56310b2519
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-interface-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/interface-escaped.case
+// - src/identifier-names/future-reserved-words/obj-assignment-prop-name.template
+/*---
+description: interface is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { interf\u0061ce: x } = { interface: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['interface'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-let-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-let-escaped.js
new file mode 100644
index 0000000000..d5bca3d4b8
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-let-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/let-escaped.case
+// - src/identifier-names/future-reserved-words/obj-assignment-prop-name.template
+/*---
+description: let is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { l\u0065t: x } = { let: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['let'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-new-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-new-escaped.js
new file mode 100644
index 0000000000..6e89cad5f0
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-new-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/new-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: new is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { n\u0065w: x } = { new: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['new'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-package-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-package-escaped.js
new file mode 100644
index 0000000000..95098e7c00
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-package-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/package-escaped.case
+// - src/identifier-names/future-reserved-words/obj-assignment-prop-name.template
+/*---
+description: package is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { p\u0061ckage: x } = { package: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['package'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-private-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-private-escaped.js
new file mode 100644
index 0000000000..552cd4f612
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-private-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/private-escaped.case
+// - src/identifier-names/future-reserved-words/obj-assignment-prop-name.template
+/*---
+description: private is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { privat\u0065: x } = { private: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['private'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-protected-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-protected-escaped.js
new file mode 100644
index 0000000000..0f8fa5c8aa
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-protected-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/protected-escaped.case
+// - src/identifier-names/future-reserved-words/obj-assignment-prop-name.template
+/*---
+description: protected is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { prot\u0065cted: x } = { protected: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['protected'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-public-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-public-escaped.js
new file mode 100644
index 0000000000..577a3a161a
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-public-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/public-escaped.case
+// - src/identifier-names/future-reserved-words/obj-assignment-prop-name.template
+/*---
+description: public is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { pu\u0062lic: x } = { public: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['public'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-return-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-return-escaped.js
new file mode 100644
index 0000000000..e38ada8a84
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-return-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/return-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: return is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { r\u0065turn: x } = { return: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['return'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-static-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-static-escaped.js
new file mode 100644
index 0000000000..b6d90b4708
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-static-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/static-escaped.case
+// - src/identifier-names/future-reserved-words/obj-assignment-prop-name.template
+/*---
+description: static is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { st\u0061tic: x } = { static: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['static'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-super-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-super-escaped.js
new file mode 100644
index 0000000000..0034acb501
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-super-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/super-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: super is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { sup\u0065r: x } = { super: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['super'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-switch-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-switch-escaped.js
new file mode 100644
index 0000000000..9f4eacb8aa
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-switch-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/switch-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: switch is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { sw\u0069tch: x } = { switch: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['switch'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-this-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-this-escaped.js
new file mode 100644
index 0000000000..8d79281d61
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-this-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/this-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: this is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { th\u0069s: x } = { this: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['this'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-throw-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-throw-escaped.js
new file mode 100644
index 0000000000..a415369746
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-throw-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/throw-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: throw is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { t\u0068row: x } = { throw: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['throw'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-try-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-try-escaped.js
new file mode 100644
index 0000000000..e6daf9f44d
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-try-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/try-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: try is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { tr\u0079: x } = { try: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['try'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-typeof-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-typeof-escaped.js
new file mode 100644
index 0000000000..235dc02849
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-typeof-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/typeof-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: typeof is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { typ\u0065of: x } = { typeof: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['typeof'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-var-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-var-escaped.js
new file mode 100644
index 0000000000..394e1b1652
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-var-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/var-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: var is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { v\u0061r: x } = { var: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['var'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-void-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-void-escaped.js
new file mode 100644
index 0000000000..4487b69484
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-void-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/void-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: void is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { voi\u0064: x } = { void: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['void'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-while-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-while-escaped.js
new file mode 100644
index 0000000000..990bdbec0f
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-while-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/while-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: while is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { whil\u0065: x } = { while: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['while'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-with-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-with-escaped.js
new file mode 100644
index 0000000000..f581ef26f1
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/ident-name-prop-name-literal-with-escaped.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/with-escaped.case
+// - src/identifier-names/default/obj-assignment-prop-name.template
+/*---
+description: with is a valid identifier name, using escape (PropertyName of an ObjectAssignmentPattern)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, noStrict]
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ PropertyName:
+ LiteralPropertyName
+ ...
+
+ LiteralPropertyName:
+ IdentifierName
+ ...
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+
+---*/
+
+
+var y = { w\u0069th: x } = { with: 42 };
+
+assert.sameValue(x, 42, 'property exists');
+assert.sameValue(y['with'], 42, 'assignment successful');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-bool.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-bool.js
new file mode 100644
index 0000000000..0a3e70db40
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-bool.js
@@ -0,0 +1,28 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-empty-bool.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: An ObjectAssignmentPattern without an AssignmentPropertyList requires an object-coercible value (boolean value) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+var result;
+var vals = false;
+
+result = {} = vals;
+
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-null.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-null.js
new file mode 100644
index 0000000000..864f2fc492
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-null.js
@@ -0,0 +1,23 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-empty-null.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: An ObjectAssignmentPattern without an AssignmentPropertyList requires an object-coercible value (null value) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+assert.throws(TypeError, function() {
+ 0, {} = null;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-num.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-num.js
new file mode 100644
index 0000000000..e86dbcf1ca
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-num.js
@@ -0,0 +1,28 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-empty-num.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: An ObjectAssignmentPattern without an AssignmentPropertyList requires an object-coercible value (number value) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+var result;
+var vals = 0;
+
+result = {} = vals;
+
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-obj.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-obj.js
new file mode 100644
index 0000000000..25d50462d5
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-obj.js
@@ -0,0 +1,28 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-empty-obj.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: An ObjectAssignmentPattern without an AssignmentPropertyList requires an object-coercible value (object value) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+var result;
+var vals = {};
+
+result = {} = vals;
+
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-string.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-string.js
new file mode 100644
index 0000000000..d9aed2cf3a
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-string.js
@@ -0,0 +1,28 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-empty-string.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: An ObjectAssignmentPattern without an AssignmentPropertyList requires an object-coercible value (string value) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+var result;
+var vals = '';
+
+result = {} = vals;
+
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-symbol.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-symbol.js
new file mode 100644
index 0000000000..7602964816
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-symbol.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-empty-symbol.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: An ObjectAssignmentPattern without an AssignmentPropertyList requires an object-coercible value (symbol value) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var s = Symbol();
+
+var result;
+var vals = s;
+
+result = {} = vals;
+
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-undef.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-undef.js
new file mode 100644
index 0000000000..80ffa5a55d
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-empty-undef.js
@@ -0,0 +1,23 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-empty-undef.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: An ObjectAssignmentPattern without an AssignmentPropertyList requires an object-coercible value (undefined value) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+assert.throws(TypeError, function() {
+ 0, {} = undefined;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-resolution-first.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-resolution-first.js
new file mode 100644
index 0000000000..e9dac12e35
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-resolution-first.js
@@ -0,0 +1,30 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-identifier-resolution-first.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Evaluation of DestructuringAssignmentTarget (first of many) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = null;
+var y;
+
+var result;
+var vals = { x: 3 };
+
+result = { x, y } = vals;
+
+assert.sameValue(x, 3);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-resolution-last.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-resolution-last.js
new file mode 100644
index 0000000000..54b833dce1
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-resolution-last.js
@@ -0,0 +1,30 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-identifier-resolution-last.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Evaluation of DestructuringAssignmentTarget (last of many) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = null;
+var w;
+
+var result;
+var vals = { x: 4 };
+
+result = { w, x } = vals;
+
+assert.sameValue(x, 4);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-resolution-lone.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-resolution-lone.js
new file mode 100644
index 0000000000..c88aebabcd
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-resolution-lone.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-identifier-resolution-lone.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Evaluation of DestructuringAssignmentTarget (lone identifier) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = null;
+
+var result;
+var vals = { x: 2 };
+
+result = { x, } = vals;
+
+assert.sameValue(x, 2);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-resolution-middle.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-resolution-middle.js
new file mode 100644
index 0000000000..62762c40fb
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-resolution-middle.js
@@ -0,0 +1,30 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-identifier-resolution-middle.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Evaluation of DestructuringAssignmentTarget (within many) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = null;
+var w, y;
+
+var result;
+var vals = { x: 5 };
+
+result = { w, x, y } = vals;
+
+assert.sameValue(x, 5);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-resolution-trlng.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-resolution-trlng.js
new file mode 100644
index 0000000000..5c4bef3b12
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-resolution-trlng.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-identifier-resolution-trlng.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Evaluation of DestructuringAssignmentTarget (lone identifier with trailing comma) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = null;
+
+var result;
+var vals = { x: 1 };
+
+result = { x } = vals;
+
+assert.sameValue(x, 1);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-yield-expr.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-yield-expr.js
new file mode 100644
index 0000000000..6ca77fcf52
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-yield-expr.js
@@ -0,0 +1,27 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-identifier-yield-expr.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: yield is not a valid IdentifierReference in an AssignmentProperty within generator function bodies. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [generators, destructuring-binding]
+flags: [generated, noStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+(function*() {
+
+0, { yield } = {};
+
+});
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-yield-ident-invalid-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-yield-ident-invalid-strict.js
new file mode 100644
index 0000000000..8b62852334
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-yield-ident-invalid-strict.js
@@ -0,0 +1,25 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-identifier-yield-ident-invalid.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: yield is not a valid IdentifierReference in an AssignmentProperty within strict mode code. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+
+0, { yield } = {};
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-yield-ident-valid.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-yield-ident-valid.js
new file mode 100644
index 0000000000..4b55761131
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-identifier-yield-ident-valid.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-identifier-yield-ident-valid.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: yield is a valid IdentifierReference in an AssignmentProperty outside of strict mode and generator functions. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, noStrict]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var yield;
+
+var result;
+var vals = { yield: 3 };
+
+result = { yield } = vals;
+
+assert.sameValue(yield, 3);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-assignment-missing.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-assignment-missing.js
new file mode 100644
index 0000000000..ff0a8685eb
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-assignment-missing.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-init-assignment-missing.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: If the Initializer is present and v is undefined, the Initializer should be evaluated and the result assigned to the target reference (no corresponding property defined). (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+var result;
+var vals = {};
+
+result = { x = 1 } = vals;
+
+assert.sameValue(x, 1);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-assignment-null.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-assignment-null.js
new file mode 100644
index 0000000000..dc8014ede7
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-assignment-null.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-init-assignment-null.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: If the Initializer is present and v is undefined, the Initializer should be evaluated and the result assigned to the target reference (null property value defined). (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+var result;
+var vals = { x: null };
+
+result = { x = 1 } = vals;
+
+assert.sameValue(x, null);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-assignment-truthy.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-assignment-truthy.js
new file mode 100644
index 0000000000..113dce8228
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-assignment-truthy.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-init-assignment-truthy.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: If the Initializer is present and v is undefined, the Initializer should be evaluated and the result assigned to the target reference (truthy property value defined). (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+var result;
+var vals = { x: 2 };
+
+result = { x = 1 } = vals;
+
+assert.sameValue(x, 2);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-assignment-undef.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-assignment-undef.js
new file mode 100644
index 0000000000..153452a176
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-assignment-undef.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-init-assignment-undef.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: If the Initializer is present and v is undefined, the Initializer should be evaluated and the result assigned to the target reference ("undefined" property value defined). (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+var result;
+var vals = { x: undefined };
+
+result = { x = 1 } = vals;
+
+assert.sameValue(x, 1);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-evaluation.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-evaluation.js
new file mode 100644
index 0000000000..af646d43f6
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-evaluation.js
@@ -0,0 +1,32 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-init-evaluation.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: The Initializer should only be evaluated if v is undefined. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var flag1 = false;
+var flag2 = false;
+var x, y;
+
+var result;
+var vals = { y: 1 };
+
+result = { x = flag1 = true, y = flag2 = true } = vals;
+
+assert.sameValue(flag1, true);
+assert.sameValue(flag2, false);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-fn-name-arrow.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-fn-name-arrow.js
new file mode 100644
index 0000000000..f52a00666e
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-fn-name-arrow.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-init-fn-name-arrow.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Assignment of function `name` attribute (ArrowFunction) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ AssignmentProperty : IdentifierReference Initializeropt
+ [...] 6. If Initializeropt is present and v is undefined, then
+ [...]
+ d. If IsAnonymousFunctionDefinition(Initializer) is true, then
+ i. Let hasNameProperty be HasOwnProperty(v, "name").
+ ii. ReturnIfAbrupt(hasNameProperty).
+ iii. If hasNameProperty is false, perform SetFunctionName(v, P).
+
+---*/
+var arrow;
+
+var result;
+var vals = {};
+
+result = { arrow = () => {} } = vals;
+
+verifyProperty(arrow, 'name', {
+ enumerable: false,
+ writable: false,
+ configurable: true,
+ value: 'arrow'
+});
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-fn-name-class.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-fn-name-class.js
new file mode 100644
index 0000000000..3b0ea36979
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-fn-name-class.js
@@ -0,0 +1,47 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-init-fn-name-class.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Assignment of function `name` attribute (ClassExpression) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [class, destructuring-binding]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ AssignmentProperty : IdentifierReference Initializeropt
+ [...] 6. If Initializeropt is present and v is undefined, then
+ [...]
+ d. If IsAnonymousFunctionDefinition(Initializer) is true, then
+ i. Let hasNameProperty be HasOwnProperty(v, "name").
+ ii. ReturnIfAbrupt(hasNameProperty).
+ iii. If hasNameProperty is false, perform SetFunctionName(v, P).
+
+---*/
+var xCls, cls, xCls2;
+
+var result;
+var vals = {};
+
+result = { xCls = class x {}, cls = class {}, xCls2 = class { static name() {} } } = vals;
+
+assert.notSameValue(xCls.name, 'xCls');
+assert.notSameValue(xCls2.name, 'xCls2');
+
+verifyProperty(cls, 'name', {
+ enumerable: false,
+ writable: false,
+ configurable: true,
+ value: 'cls'
+});
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-fn-name-cover.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-fn-name-cover.js
new file mode 100644
index 0000000000..53d2ac1f63
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-fn-name-cover.js
@@ -0,0 +1,46 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-init-fn-name-cover.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Assignment of function `name` attribute (CoverParenthesizedExpression) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ AssignmentProperty : IdentifierReference Initializeropt
+ [...] 6. If Initializeropt is present and v is undefined, then
+ [...]
+ d. If IsAnonymousFunctionDefinition(Initializer) is true, then
+ i. Let hasNameProperty be HasOwnProperty(v, "name").
+ ii. ReturnIfAbrupt(hasNameProperty).
+ iii. If hasNameProperty is false, perform SetFunctionName(v, P).
+
+---*/
+var xCover, cover;
+
+var result;
+var vals = {};
+
+result = { xCover = (0, function() {}), cover = (function() {}) } = vals;
+
+assert.notSameValue(xCover.name, 'xCover');
+
+verifyProperty(cover, 'name', {
+ enumerable: false,
+ writable: false,
+ configurable: true,
+ value: 'cover'
+});
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-fn-name-fn.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-fn-name-fn.js
new file mode 100644
index 0000000000..d5d9c4aad3
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-fn-name-fn.js
@@ -0,0 +1,46 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-init-fn-name-fn.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Assignment of function `name` attribute (FunctionExpression) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ AssignmentProperty : IdentifierReference Initializeropt
+ [...] 6. If Initializeropt is present and v is undefined, then
+ [...]
+ d. If IsAnonymousFunctionDefinition(Initializer) is true, then
+ i. Let hasNameProperty be HasOwnProperty(v, "name").
+ ii. ReturnIfAbrupt(hasNameProperty).
+ iii. If hasNameProperty is false, perform SetFunctionName(v, P).
+
+---*/
+var xFn, fn;
+
+var result;
+var vals = {};
+
+result = { xFn = function x() {}, fn = function() {} } = vals;
+
+assert.notSameValue(xFn.name, 'xFn');
+
+verifyProperty(fn, 'name', {
+ enumerable: false,
+ writable: false,
+ configurable: true,
+ value: 'fn'
+});
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-fn-name-gen.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-fn-name-gen.js
new file mode 100644
index 0000000000..192c957e00
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-fn-name-gen.js
@@ -0,0 +1,46 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-init-fn-name-gen.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Assignment of function `name` attribute (GeneratorExpression) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [generators, destructuring-binding]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ AssignmentProperty : IdentifierReference Initializeropt
+ [...] 6. If Initializeropt is present and v is undefined, then
+ [...]
+ d. If IsAnonymousFunctionDefinition(Initializer) is true, then
+ i. Let hasNameProperty be HasOwnProperty(v, "name").
+ ii. ReturnIfAbrupt(hasNameProperty).
+ iii. If hasNameProperty is false, perform SetFunctionName(v, P).
+
+---*/
+var xGen, gen;
+
+var result;
+var vals = {};
+
+result = { xGen = function* x() {}, gen = function*() {} } = vals;
+
+assert.notSameValue(xGen.name, 'xGen');
+
+verifyProperty(gen, 'name', {
+ enumerable: false,
+ writable: false,
+ configurable: true,
+ value: 'gen'
+});
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-in.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-in.js
new file mode 100644
index 0000000000..ed0ab551e1
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-in.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-init-in.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: The Initializer in an AssignmentProperty may be an `in` expression. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var prop;
+
+var result;
+var vals = {};
+
+result = { prop = 'x' in {} } = vals;
+
+assert.sameValue(prop, false);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-let.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-let.js
new file mode 100644
index 0000000000..0198aa5f88
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-let.js
@@ -0,0 +1,26 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-init-let.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: Value retrieval of Initializer obeys `let` semantics. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [let, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+assert.throws(ReferenceError, function() {
+ 0, { x = y } = {};
+});
+
+let y;
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-order.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-order.js
new file mode 100644
index 0000000000..3d7fe2fae6
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-order.js
@@ -0,0 +1,32 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-init-order.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Initializer values should be assigned in left-to-right order. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = 0;
+var a, b;
+
+var result;
+var vals = {};
+
+result = { a = x += 1, b = x *= 2 } = vals;
+
+assert.sameValue(a, 1);
+assert.sameValue(b, 2);
+assert.sameValue(x, 2);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-simple-no-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-simple-no-strict.js
new file mode 100644
index 0000000000..fc5b04ee2c
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-simple-no-strict.js
@@ -0,0 +1,30 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-init-simple-no-strict.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Evaluation of DestructuringAssignmentTarget. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, noStrict]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var eval, arguments;
+
+var result;
+var vals = {};
+
+result = { eval = 3, arguments = 4 } = vals;
+
+assert.sameValue(eval, 3);
+assert.sameValue(arguments, 4);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-simple-strict-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-simple-strict-strict.js
new file mode 100644
index 0000000000..b108c3cec5
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-simple-strict-strict.js
@@ -0,0 +1,25 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-init-simple-strict.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: It is a Syntax Error if IsValidSimpleAssignmentTarget of IdentifierReference is false. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+
+0, { eval = 0 } = {};
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-yield-expr.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-yield-expr.js
new file mode 100644
index 0000000000..4e47a1872e
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-yield-expr.js
@@ -0,0 +1,45 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-init-yield-expr.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When a `yield` token appears within the Initializer of an AssignmentProperty and within a generator function body, it should behave as a YieldExpression. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var iterationResult, x, iter;
+
+iter = (function*() {
+
+var result;
+var vals = {};
+
+result = { x = yield } = vals;
+
+
+
+assert.sameValue(result, vals);
+
+}());
+
+iterationResult = iter.next();
+
+assert.sameValue(iterationResult.value, undefined);
+assert.sameValue(iterationResult.done, false);
+assert.sameValue(x, undefined);
+
+iterationResult = iter.next(3);
+
+assert.sameValue(iterationResult.value, undefined);
+assert.sameValue(iterationResult.done, true);
+assert.sameValue(x, 3);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-yield-ident-invalid-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-yield-ident-invalid-strict.js
new file mode 100644
index 0000000000..4e56c9ec35
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-yield-ident-invalid-strict.js
@@ -0,0 +1,25 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-init-yield-ident-invalid.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: When a `yield` token appears within the Initializer of an AssignmentProperty and outside of a generator function body, it should behave as an IdentifierReference. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+
+0, { x = yield } = {};
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-yield-ident-valid.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-yield-ident-valid.js
new file mode 100644
index 0000000000..e7bed310df
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-init-yield-ident-valid.js
@@ -0,0 +1,30 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-init-yield-ident-valid.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When a `yield` token appears within the Initializer of an AssignmentProperty and outside of a generator function body, it should behave as an IdentifierReference. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, noStrict]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var yield = 3;
+var x;
+
+var result;
+var vals = {};
+
+result = { x = yield } = vals;
+
+assert.sameValue(x, 3);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-put-const.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-put-const.js
new file mode 100644
index 0000000000..ec963a9aca
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-put-const.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-put-const.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: The assignment target should obey `const` semantics. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [const, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+const c = null;
+
+assert.throws(TypeError, function() {
+ 0, { c } = { c: 1 };
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-put-let.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-put-let.js
new file mode 100644
index 0000000000..0aaf7c4238
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-put-let.js
@@ -0,0 +1,25 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-put-let.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: The assignment target should obey `let` semantics. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [let, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+assert.throws(ReferenceError, function() {
+ 0, { x } = {};
+});
+
+let x;
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-put-unresolvable-no-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-put-unresolvable-no-strict.js
new file mode 100644
index 0000000000..789446d242
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-put-unresolvable-no-strict.js
@@ -0,0 +1,33 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-put-unresolvable-no-strict.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Outside of strict mode, if the the assignment target is an unresolvable reference, a new `var` binding should be created in the environment record. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, noStrict]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+{
+
+var result;
+var vals = {};
+
+result = { unresolvable } = vals;
+
+
+
+assert.sameValue(result, vals);
+
+}
+
+assert.sameValue(unresolvable, undefined);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-put-unresolvable-strict-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-put-unresolvable-strict-strict.js
new file mode 100644
index 0000000000..65b53f6c14
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-put-unresolvable-strict-strict.js
@@ -0,0 +1,24 @@
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-put-unresolvable-strict.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: In strict mode, if the the assignment target is an unresolvable reference, a ReferenceError should be thrown. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, onlyStrict]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+assert.throws(ReferenceError, function() {
+ 0, { unresolvable } = {};
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-simple-no-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-simple-no-strict.js
new file mode 100644
index 0000000000..ff3c3f4370
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-simple-no-strict.js
@@ -0,0 +1,32 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-simple-no-strict.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Evaluation of DestructuringAssignmentTarget. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, noStrict]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var eval, arguments;
+
+var result;
+var vals = { eval: 1, arguments: 2 };
+
+result = { eval, arguments } = vals;
+
+
+
+assert.sameValue(result, vals);
+
+assert.sameValue(eval, 1);
+assert.sameValue(arguments, 2);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-simple-strict-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-simple-strict-strict.js
new file mode 100644
index 0000000000..5eacfa0706
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-id-simple-strict-strict.js
@@ -0,0 +1,25 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-id-simple-strict.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: It is a Syntax Error if IsValidSimpleAssignmentTarget of IdentifierReference is false. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+
+0, { eval } = {};
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-assignment-missing.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-assignment-missing.js
new file mode 100644
index 0000000000..4162200ec9
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-assignment-missing.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-elem-init-assignment-missing.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: If the Initializer is present and v is undefined, the Initializer should be evaluated and the result assigned to the target reference (non-existent property) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+var result;
+var vals = {};
+
+result = { y: x = 1 } = vals;
+
+assert.sameValue(x, 1);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-assignment-null.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-assignment-null.js
new file mode 100644
index 0000000000..934717387f
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-assignment-null.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-elem-init-assignment-null.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: If the Initializer is present and v is not undefined, the Initializer should be evaluated and the result assigned to the target reference (null value) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+var result;
+var vals = { y: null };
+
+result = { y: x = 1 } = vals;
+
+assert.sameValue(x, null);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-assignment-truthy.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-assignment-truthy.js
new file mode 100644
index 0000000000..c820858676
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-assignment-truthy.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-elem-init-assignment-truthy.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: If the Initializer is present and v is not undefined, the Initializer should be evaluated and the result assigned to the target reference (truthy value) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+var result;
+var vals = { y: 2 };
+
+result = { y: x = 1 } = vals;
+
+assert.sameValue(x, 2);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-assignment-undef.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-assignment-undef.js
new file mode 100644
index 0000000000..1229fb58c5
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-assignment-undef.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-elem-init-assignment-undef.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: If the Initializer is present and v is undefined, the Initializer should be evaluated and the result assigned to the target reference (undefined value) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+var result;
+var vals = { y: undefined };
+
+result = { y: x = 1 } = vals;
+
+assert.sameValue(x, 1);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-evaluation.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-evaluation.js
new file mode 100644
index 0000000000..1426148e15
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-evaluation.js
@@ -0,0 +1,34 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-elem-init-evaluation.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: The Initializer should only be evaluated if v is undefined. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var flag1 = false;
+var flag2 = false;
+var x, y;
+
+var result;
+var vals = { y: 1 };
+
+result = { x: x = flag1 = true, y: y = flag2 = true } = vals;
+
+assert.sameValue(x, true, 'value of `x`');
+assert.sameValue(flag1, true, 'value of `flag1`');
+assert.sameValue(y, 1, 'value of `y`');
+assert.sameValue(flag2, false, 'value of `flag2`');
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-fn-name-arrow.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-fn-name-arrow.js
new file mode 100644
index 0000000000..353db9e6a0
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-fn-name-arrow.js
@@ -0,0 +1,45 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-elem-init-fn-name-arrow.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Assignment of function `name` attribute (ArrowFunction) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ AssignmentElement[Yield] : DestructuringAssignmentTarget Initializeropt
+ [...] 7. If Initializer is present and v is undefined and
+ IsAnonymousFunctionDefinition(Initializer) and IsIdentifierRef of
+ DestructuringAssignmentTarget are both true, then
+ a. Let hasNameProperty be HasOwnProperty(rhsValue, "name").
+ b. ReturnIfAbrupt(hasNameProperty).
+ c. If hasNameProperty is false, perform SetFunctionName(rhsValue,
+ GetReferencedName(lref)).
+
+---*/
+var arrow;
+
+var result;
+var vals = {};
+
+result = { x: arrow = () => {} } = vals;
+
+verifyProperty(arrow, 'name', {
+ enumerable: false,
+ writable: false,
+ configurable: true,
+ value: 'arrow'
+});
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-fn-name-class.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-fn-name-class.js
new file mode 100644
index 0000000000..5e73a4159e
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-fn-name-class.js
@@ -0,0 +1,48 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-elem-init-fn-name-class.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Assignment of function `name` attribute (ClassExpression) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [class, destructuring-binding]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ AssignmentElement[Yield] : DestructuringAssignmentTarget Initializeropt
+ [...] 7. If Initializer is present and v is undefined and
+ IsAnonymousFunctionDefinition(Initializer) and IsIdentifierRef of
+ DestructuringAssignmentTarget are both true, then
+ a. Let hasNameProperty be HasOwnProperty(rhsValue, "name").
+ b. ReturnIfAbrupt(hasNameProperty).
+ c. If hasNameProperty is false, perform SetFunctionName(rhsValue,
+ GetReferencedName(lref)).
+
+---*/
+var xCls, cls, xCls2;
+
+var result;
+var vals = {};
+
+result = { x: xCls = class x {}, x: cls = class {}, x: xCls2 = class { static name() {} } } = vals;
+
+assert.notSameValue(xCls.name, 'xCls');
+assert.notSameValue(xCls2.name, 'xCls2');
+
+verifyProperty(cls, 'name', {
+ enumerable: false,
+ writable: false,
+ configurable: true,
+ value: 'cls'
+});
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-fn-name-cover.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-fn-name-cover.js
new file mode 100644
index 0000000000..988d4736c5
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-fn-name-cover.js
@@ -0,0 +1,47 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-elem-init-fn-name-cover.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Assignment of function `name` attribute (CoverParenthesizedExpression) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ AssignmentElement[Yield] : DestructuringAssignmentTarget Initializeropt
+ [...] 7. If Initializer is present and v is undefined and
+ IsAnonymousFunctionDefinition(Initializer) and IsIdentifierRef of
+ DestructuringAssignmentTarget are both true, then
+ a. Let hasNameProperty be HasOwnProperty(rhsValue, "name").
+ b. ReturnIfAbrupt(hasNameProperty).
+ c. If hasNameProperty is false, perform SetFunctionName(rhsValue,
+ GetReferencedName(lref)).
+
+---*/
+var xCover, cover;
+
+var result;
+var vals = {};
+
+result = { x: xCover = (0, function() {}), x: cover = (function() {}) } = vals;
+
+assert.notSameValue(xCover.name, 'xCover');
+
+verifyProperty(cover, 'name', {
+ enumerable: false,
+ writable: false,
+ configurable: true,
+ value: 'cover'
+});
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-fn-name-fn.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-fn-name-fn.js
new file mode 100644
index 0000000000..ff6f58bd21
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-fn-name-fn.js
@@ -0,0 +1,47 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-elem-init-fn-name-fn.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Assignment of function `name` attribute (FunctionExpression) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ AssignmentElement[Yield] : DestructuringAssignmentTarget Initializeropt
+ [...] 7. If Initializer is present and v is undefined and
+ IsAnonymousFunctionDefinition(Initializer) and IsIdentifierRef of
+ DestructuringAssignmentTarget are both true, then
+ a. Let hasNameProperty be HasOwnProperty(rhsValue, "name").
+ b. ReturnIfAbrupt(hasNameProperty).
+ c. If hasNameProperty is false, perform SetFunctionName(rhsValue,
+ GetReferencedName(lref)).
+
+---*/
+var xFn, fn;
+
+var result;
+var vals = {};
+
+result = { x: xFn = function x() {}, x: fn = function() {} } = vals;
+
+assert.notSameValue(xFn.name, 'xFn');
+
+verifyProperty(fn, 'name', {
+ enumerable: false,
+ writable: false,
+ configurable: true,
+ value: 'fn'
+});
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-fn-name-gen.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-fn-name-gen.js
new file mode 100644
index 0000000000..94eb2e7f13
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-fn-name-gen.js
@@ -0,0 +1,47 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-elem-init-fn-name-gen.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Assignment of function `name` attribute (GeneratorExpression) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [generators, destructuring-binding]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ AssignmentElement[Yield] : DestructuringAssignmentTarget Initializeropt
+ [...] 7. If Initializer is present and v is undefined and
+ IsAnonymousFunctionDefinition(Initializer) and IsIdentifierRef of
+ DestructuringAssignmentTarget are both true, then
+ a. Let hasNameProperty be HasOwnProperty(rhsValue, "name").
+ b. ReturnIfAbrupt(hasNameProperty).
+ c. If hasNameProperty is false, perform SetFunctionName(rhsValue,
+ GetReferencedName(lref)).
+
+---*/
+var xGen, gen;
+
+var result;
+var vals = {};
+
+result = { x: xGen = function* x() {}, x: gen = function*() {} } = vals;
+
+assert.notSameValue(xGen.name, 'xGen');
+
+verifyProperty(gen, 'name', {
+ enumerable: false,
+ writable: false,
+ configurable: true,
+ value: 'gen'
+});
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-in.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-in.js
new file mode 100644
index 0000000000..def4b5f246
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-in.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-elem-init-in.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: The Initializer in an AssignmentElement may be an `in` expression. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var prop;
+
+var result;
+var vals = {};
+
+result = { x: prop = 'x' in {} } = vals;
+
+assert.sameValue(prop, false);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-let.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-let.js
new file mode 100644
index 0000000000..ab885d9f71
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-let.js
@@ -0,0 +1,26 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-elem-init-let.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: Value retrieval of Initializer obeys `let` semantics. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [let, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+assert.throws(ReferenceError, function() {
+ 0, { x: x = y } = {};
+});
+
+let y;
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-yield-expr.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-yield-expr.js
new file mode 100644
index 0000000000..1fdcf239d5
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-yield-expr.js
@@ -0,0 +1,44 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-elem-init-yield-expr.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When a `yield` token appears within the Initializer of an AssignmentElement and within a generator function body, it should behave as a YieldExpression. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var iterationResult, iter, x;
+iter = (function*() {
+
+var result;
+var vals = {};
+
+result = { x: x = yield } = vals;
+
+
+
+assert.sameValue(result, vals);
+
+}());
+
+iterationResult = iter.next();
+
+assert.sameValue(iterationResult.value, undefined);
+assert.sameValue(iterationResult.done, false);
+assert.sameValue(x, undefined);
+
+iterationResult = iter.next(86);
+
+assert.sameValue(iterationResult.value, undefined);
+assert.sameValue(iterationResult.done, true);
+assert.sameValue(x, 86);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-yield-ident-invalid-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-yield-ident-invalid-strict.js
new file mode 100644
index 0000000000..06b04242e5
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-yield-ident-invalid-strict.js
@@ -0,0 +1,25 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-elem-init-yield-ident-invalid.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: When a `yield` token appears within the Initializer of an AssignmentElement and outside of a generator function body, it should behave as an IdentifierReference. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+
+0, { x: x = yield } = {};
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-yield-ident-valid.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-yield-ident-valid.js
new file mode 100644
index 0000000000..12d458c9c2
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-init-yield-ident-valid.js
@@ -0,0 +1,30 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-elem-init-yield-ident-valid.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When a `yield` token appears within the Initializer of an AssignmentElement and outside of a generator function body, it should behave as an IdentifierReference. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, noStrict]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var yield = 4;
+var x;
+
+var result;
+var vals = {};
+
+result = { x: x = yield } = vals;
+
+assert.sameValue(x, 4);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-memberexpr-optchain-prop-ref-init.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-memberexpr-optchain-prop-ref-init.js
new file mode 100644
index 0000000000..b186432078
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-memberexpr-optchain-prop-ref-init.js
@@ -0,0 +1,57 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-elem-target-memberexpr-optchain-prop-ref-init.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: It is a Syntax Error if LeftHandSideExpression of an DestructuringAssignmentTarget is neither an ObjectLiteral nor an ArrayLiteral and AssignmentTargetType(LeftHandSideExpression) is not simple Using Object (MemberExpression OptionalChain .IdentifierName Initializer) (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [optional-chaining, destructuring-binding]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ Syntax
+
+ AssignmentElement : DestructuringAssignmentTarget Initializer_opt
+ DestructuringAssignmentTarget : LeftHandSideExpression
+
+ Static Semantics: Early Errors
+
+ OptionalExpression:
+ MemberExpression OptionalChain
+ CallExpression OptionalChain
+ OptionalExpression OptionalChain
+
+ OptionalChain:
+ ?. [ Expression ]
+ ?. IdentifierName
+ ?. Arguments
+ ?. TemplateLiteral
+ OptionalChain [ Expression ]
+ OptionalChain .IdentifierName
+ OptionalChain Arguments
+ OptionalChain TemplateLiteral
+
+ DestructuringAssignmentTarget : LeftHandSideExpression
+
+ - It is a Syntax Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral and IsValidSimpleAssignmentTarget(LeftHandSideExpression) is not true.
+
+ Static Semantics: IsValidSimpleAssignmentTarget
+
+ LeftHandSideExpression : OptionalExpression
+ 1. Return false.
+
+---*/
+$DONOTEVALUATE();
+var y = {};
+
+0, { x: y?.z = 42 } = { x: 23 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-obj-literal-optchain-prop-ref-init.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-obj-literal-optchain-prop-ref-init.js
new file mode 100644
index 0000000000..d0b80f742e
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-obj-literal-optchain-prop-ref-init.js
@@ -0,0 +1,60 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-elem-target-obj-literal-optchain-prop-ref-init.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: It is a Syntax Error if LeftHandSideExpression of an DestructuringAssignmentTarget is neither an ObjectLiteral nor an ArrayLiteral and AssignmentTargetType(LeftHandSideExpression) is not simple Using Object (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [optional-chaining, destructuring-binding]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ Syntax
+
+ AssignmentElement : DestructuringAssignmentTarget Initializer_opt
+ DestructuringAssignmentTarget : LeftHandSideExpression
+
+ Static Semantics: Early Errors
+
+ OptionalExpression:
+ MemberExpression OptionalChain
+ CallExpression OptionalChain
+ OptionalExpression OptionalChain
+
+ OptionalChain:
+ ?. [ Expression ]
+ ?. IdentifierName
+ ?. Arguments
+ ?. TemplateLiteral
+ OptionalChain [ Expression ]
+ OptionalChain .IdentifierName
+ OptionalChain Arguments
+ OptionalChain TemplateLiteral
+
+ DestructuringAssignmentTarget : LeftHandSideExpression
+
+ - It is a Syntax Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral and IsValidSimpleAssignmentTarget(LeftHandSideExpression) is not true.
+
+ Static Semantics: IsValidSimpleAssignmentTarget
+
+ LeftHandSideExpression : OptionalExpression
+ 1. Return false.
+
+---*/
+$DONOTEVALUATE();
+
+0, { x: {
+ set y(val) {
+ throw new Test262Error('The property should not be accessed.');
+ }
+}?.y = 42} = {x: 42};
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-obj-literal-prop-ref-init-active.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-obj-literal-prop-ref-init-active.js
new file mode 100644
index 0000000000..1af5151a3b
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-obj-literal-prop-ref-init-active.js
@@ -0,0 +1,78 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-elem-target-obj-literal-prop-ref-init-active.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: The DestructuringAssignmentTarget of an AssignmentElement can extend to LHSExpressions if it is neither an ObjectLiteral nor an ArrayLiteral and its AssignmentTargetTyp is simple. Using MemberExpression (ObjLiteral + identifier) with active initializer. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ Syntax
+
+ AssignmentPattern : ObjectAssignmentPattern
+ ObjectAssignmentPattern : { AssignmentPropertyList }
+ AssignmentPropertyList : AssignmentProperty
+ AssignmentProperty : PropertyName : AssignmentElement
+ AssignmentElement : DestructuringAssignmentTarget Initializer_opt
+ DestructuringAssignmentTarget : LeftHandSideExpression
+
+ Static Semantics: Early Errors
+
+ DestructuringAssignmentTarget : LeftHandSideExpression
+
+ - It is a Syntax Error if LeftHandSideExpression is either an ObjectLiteral or an ArrayLiteral and if LeftHandSideExpression is not covering an AssignmentPattern.
+ - It is a Syntax Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral and AssignmentTargetType(LeftHandSideExpression) is not simple.
+
+ Runtime Semantics: DestructuringAssignmentEvaluation
+ ObjectAssignmentPattern : { AssignmentPropertyList }
+
+ 1. Perform ? RequireObjectCoercible(value).
+ 2. Perform ? PropertyDestructuringAssignmentEvaluation for AssignmentPropertyList using value as the argument.
+ 3. Return NormalCompletion(empty).
+
+ Runtime Semantics: PropertyDestructuringAssignmentEvaluation
+
+ AssignmentProperty : PropertyName : AssignmentElement
+
+ 1. Let name be the result of evaluating PropertyName.
+ 2. ReturnIfAbrupt(name).
+ 3. Perform ? KeyedDestructuringAssignmentEvaluation of AssignmentElement with value and name as the arguments.
+ 4. Return a new List containing name.
+
+ Runtime Semantics: KeyedDestructuringAssignmentEvaluation
+
+ AssignmentElement : DestructuringAssignmentTarget Initializer
+
+ 1. If DestructuringAssignmentTarget is neither an ObjectLiteral nor an ArrayLiteral, then
+ a. Let lref be the result of evaluating DestructuringAssignmentTarget.
+ ...
+
+---*/
+var setValue;
+
+var result;
+var vals = {x: undefined};
+
+result = { x: {
+ get y() {
+ throw new Test262Error('The property should not be accessed.');
+ },
+ set y(val) {
+ setValue = val;
+ }
+}.y = 42} = vals;
+
+assert.sameValue(setValue, 42);
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-obj-literal-prop-ref-init.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-obj-literal-prop-ref-init.js
new file mode 100644
index 0000000000..0e9560589c
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-obj-literal-prop-ref-init.js
@@ -0,0 +1,78 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-elem-target-obj-literal-prop-ref-init.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: The DestructuringAssignmentTarget of an AssignmentElement can extend to LHSExpressions if it is neither an ObjectLiteral nor an ArrayLiteral and its AssignmentTargetTyp is simple. Using MemberExpression (ObjLiteral + identifier) with initializer. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ Syntax
+
+ AssignmentPattern : ObjectAssignmentPattern
+ ObjectAssignmentPattern : { AssignmentPropertyList }
+ AssignmentPropertyList : AssignmentProperty
+ AssignmentProperty : PropertyName : AssignmentElement
+ AssignmentElement : DestructuringAssignmentTarget Initializer_opt
+ DestructuringAssignmentTarget : LeftHandSideExpression
+
+ Static Semantics: Early Errors
+
+ DestructuringAssignmentTarget : LeftHandSideExpression
+
+ - It is a Syntax Error if LeftHandSideExpression is either an ObjectLiteral or an ArrayLiteral and if LeftHandSideExpression is not covering an AssignmentPattern.
+ - It is a Syntax Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral and AssignmentTargetType(LeftHandSideExpression) is not simple.
+
+ Runtime Semantics: DestructuringAssignmentEvaluation
+ ObjectAssignmentPattern : { AssignmentPropertyList }
+
+ 1. Perform ? RequireObjectCoercible(value).
+ 2. Perform ? PropertyDestructuringAssignmentEvaluation for AssignmentPropertyList using value as the argument.
+ 3. Return NormalCompletion(empty).
+
+ Runtime Semantics: PropertyDestructuringAssignmentEvaluation
+
+ AssignmentProperty : PropertyName : AssignmentElement
+
+ 1. Let name be the result of evaluating PropertyName.
+ 2. ReturnIfAbrupt(name).
+ 3. Perform ? KeyedDestructuringAssignmentEvaluation of AssignmentElement with value and name as the arguments.
+ 4. Return a new List containing name.
+
+ Runtime Semantics: KeyedDestructuringAssignmentEvaluation
+
+ AssignmentElement : DestructuringAssignmentTarget Initializer
+
+ 1. If DestructuringAssignmentTarget is neither an ObjectLiteral nor an ArrayLiteral, then
+ a. Let lref be the result of evaluating DestructuringAssignmentTarget.
+ ...
+
+---*/
+var setValue;
+
+var result;
+var vals = {x: 23};
+
+result = { x: {
+ get y() {
+ throw new Test262Error('The property should not be accessed.');
+ },
+ set y(val) {
+ setValue = val;
+ }
+}.y = 42} = vals;
+
+assert.sameValue(setValue, 23);
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-obj-literal-prop-ref.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-obj-literal-prop-ref.js
new file mode 100644
index 0000000000..ec5453c000
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-obj-literal-prop-ref.js
@@ -0,0 +1,78 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-elem-target-obj-literal-prop-ref.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: The DestructuringAssignmentTarget of an AssignmentElement can extend to LHSExpressions if it is neither an ObjectLiteral nor an ArrayLiteral and its AssignmentTargetTyp is simple. Using MemberExpression (ObjLiteral + identifier). (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+
+ Syntax
+
+ AssignmentPattern : ObjectAssignmentPattern
+ ObjectAssignmentPattern : { AssignmentPropertyList }
+ AssignmentPropertyList : AssignmentProperty
+ AssignmentProperty : PropertyName : AssignmentElement
+ AssignmentElement : DestructuringAssignmentTarget Initializer_opt
+ DestructuringAssignmentTarget : LeftHandSideExpression
+
+ Static Semantics: Early Errors
+
+ DestructuringAssignmentTarget : LeftHandSideExpression
+
+ - It is a Syntax Error if LeftHandSideExpression is either an ObjectLiteral or an ArrayLiteral and if LeftHandSideExpression is not covering an AssignmentPattern.
+ - It is a Syntax Error if LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral and AssignmentTargetType(LeftHandSideExpression) is not simple.
+
+ Runtime Semantics: DestructuringAssignmentEvaluation
+ ObjectAssignmentPattern : { AssignmentPropertyList }
+
+ 1. Perform ? RequireObjectCoercible(value).
+ 2. Perform ? PropertyDestructuringAssignmentEvaluation for AssignmentPropertyList using value as the argument.
+ 3. Return NormalCompletion(empty).
+
+ Runtime Semantics: PropertyDestructuringAssignmentEvaluation
+
+ AssignmentProperty : PropertyName : AssignmentElement
+
+ 1. Let name be the result of evaluating PropertyName.
+ 2. ReturnIfAbrupt(name).
+ 3. Perform ? KeyedDestructuringAssignmentEvaluation of AssignmentElement with value and name as the arguments.
+ 4. Return a new List containing name.
+
+ Runtime Semantics: KeyedDestructuringAssignmentEvaluation
+
+ AssignmentElement : DestructuringAssignmentTarget Initializer
+
+ 1. If DestructuringAssignmentTarget is neither an ObjectLiteral nor an ArrayLiteral, then
+ a. Let lref be the result of evaluating DestructuringAssignmentTarget.
+ ...
+
+---*/
+var setValue;
+
+var result;
+var vals = {x: 23};
+
+result = { x: {
+ get y() {
+ throw new Test262Error('The property should not be accessed.');
+ },
+ set y(val) {
+ setValue = val;
+ }
+}.y} = vals;
+
+assert.sameValue(setValue, 23);
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-yield-expr.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-yield-expr.js
new file mode 100644
index 0000000000..b0856136d6
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-yield-expr.js
@@ -0,0 +1,46 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-elem-target-yield-expr.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When a `yield` token appears within the DestructuringAssignmentTarget of an AssignmentElement and within a generator function body, it should behave as a YieldExpression. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = {};
+var iterationResult, iter;
+
+iter = (function*() {
+
+var result;
+var vals = { x: 23 };
+
+result = { x: x[yield] } = vals;
+
+
+
+assert.sameValue(result, vals);
+
+}());
+
+iterationResult = iter.next();
+
+assert.sameValue(iterationResult.value, undefined);
+assert.sameValue(iterationResult.done, false);
+assert.sameValue(x.prop, undefined);
+
+iterationResult = iter.next('prop');
+
+assert.sameValue(iterationResult.value, undefined);
+assert.sameValue(iterationResult.done, true);
+assert.sameValue(x.prop, 23);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-yield-ident-invalid-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-yield-ident-invalid-strict.js
new file mode 100644
index 0000000000..102e371bcf
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-yield-ident-invalid-strict.js
@@ -0,0 +1,25 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-elem-target-yield-ident-invalid.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: When a `yield` token appears within the DestructuringAssignmentTarget of an AssignmentElement and outside of a generator function body, it should behave as an IdentifierReference. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+
+0, { x: x[yield] } = {};
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-yield-ident-valid.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-yield-ident-valid.js
new file mode 100644
index 0000000000..792a3647cd
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-elem-target-yield-ident-valid.js
@@ -0,0 +1,30 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-elem-target-yield-ident-valid.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When a `yield` token appears within the DestructuringAssignmentTarget of an AssignmentElement and outside of a generator function body, it should behave as an IdentifierReference. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, noStrict]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var yield = 'prop';
+var x = {};
+
+var result;
+var vals = { x: 23 };
+
+result = { x: x[yield] } = vals;
+
+assert.sameValue(x.prop, 23);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-identifier-resolution-first.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-identifier-resolution-first.js
new file mode 100644
index 0000000000..254311e74b
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-identifier-resolution-first.js
@@ -0,0 +1,30 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-identifier-resolution-first.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Evaluation of DestructuringAssignmentTarget (first of many). (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = null;
+var y;
+
+var result;
+var vals = { a: 3 };
+
+result = { a: x, y } = vals;
+
+assert.sameValue(x, 3);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-identifier-resolution-last.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-identifier-resolution-last.js
new file mode 100644
index 0000000000..8d2fb78a54
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-identifier-resolution-last.js
@@ -0,0 +1,30 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-identifier-resolution-last.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Evaluation of DestructuringAssignmentTarget (last of many). (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = null;
+var w;
+
+var result;
+var vals = { a: 4 };
+
+result = { w, a: x } = vals;
+
+assert.sameValue(x, 4);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-identifier-resolution-lone.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-identifier-resolution-lone.js
new file mode 100644
index 0000000000..6c2eb1194c
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-identifier-resolution-lone.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-identifier-resolution-lone.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Evaluation of DestructuringAssignmentTarget (lone element). (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = null;
+
+var result;
+var vals = { a: 1 };
+
+result = { a: x } = vals;
+
+assert.sameValue(x, 1);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-identifier-resolution-middle.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-identifier-resolution-middle.js
new file mode 100644
index 0000000000..687b89b83a
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-identifier-resolution-middle.js
@@ -0,0 +1,30 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-identifier-resolution-middle.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Evaluation of DestructuringAssignmentTarget (within many). (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = null;
+var w, y;
+
+var result;
+var vals = { a: 5 };
+
+result = { w, a: x, y } = vals;
+
+assert.sameValue(x, 5);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-identifier-resolution-trlng.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-identifier-resolution-trlng.js
new file mode 100644
index 0000000000..6d8bbaab70
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-identifier-resolution-trlng.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-identifier-resolution-trlng.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Evaluation of DestructuringAssignmentTarget (lone element with trailing comma). (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = null;
+
+var result;
+var vals = { a: 2 };
+
+result = { a: x, } = vals;
+
+assert.sameValue(x, 2);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-name-evaluation-error.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-name-evaluation-error.js
new file mode 100644
index 0000000000..661e6cedf0
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-name-evaluation-error.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-name-evaluation-error.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: Any error raised as a result of evaluating PropertyName should be forwarded to the runtime. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var a, x;
+
+assert.throws(TypeError, function() {
+ 0, { [a.b]: x } = {};
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-name-evaluation.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-name-evaluation.js
new file mode 100644
index 0000000000..dd5b19795f
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-name-evaluation.js
@@ -0,0 +1,31 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-name-evaluation.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: PropertyName of an AssignmentProperty may be a ComputedPropertyName. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x, y, xy;
+
+var result;
+var vals = { x: 1, xy: 23, y: 2 };
+
+result = { ['x' + 'y']: x } = vals;
+
+assert.sameValue(x, 23);
+assert.sameValue(y, undefined);
+assert.sameValue(xy, undefined);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-invalid.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-invalid.js
new file mode 100644
index 0000000000..969c72ffff
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-invalid.js
@@ -0,0 +1,24 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-nested-array-invalid.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: It is a Syntax Error if LeftHandSideExpression is either an ObjectLiteral or an ArrayLiteral and if the lexical token sequence matched by LeftHandSideExpression cannot be parsed with no tokens left over using AssignmentPattern as the goal symbol. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+
+0, { x: [(x, y)] } = { x: [] };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-null.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-null.js
new file mode 100644
index 0000000000..dee74a0b37
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-null.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-nested-array-null.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an array literal and the value is `null`, a TypeError should be thrown. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+assert.throws(TypeError, function() {
+ 0, { x: [ x ] } = { x: null };
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-undefined-own.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-undefined-own.js
new file mode 100644
index 0000000000..c54cd5a2f8
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-undefined-own.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-nested-array-undefined-own.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an array literal and the value is `undefined`, a TypeError should be thrown. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+assert.throws(TypeError, function() {
+ 0, { x: [ x ] } = { x: undefined };
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-undefined.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-undefined.js
new file mode 100644
index 0000000000..2cdf77353c
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-undefined.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-nested-array-undefined.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an array literal and the value is not defined, a TypeError should be thrown. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+assert.throws(TypeError, function() {
+ 0, { x: [ x ] } = {};
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-yield-expr.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-yield-expr.js
new file mode 100644
index 0000000000..60c6799f1a
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-yield-expr.js
@@ -0,0 +1,45 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-nested-array-yield-expr.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When a `yield` token appears within the Initializer of a nested destructuring assignment and within a generator function body, it should behave as a YieldExpression. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var iterationResult, iter, x;
+
+iter = (function*() {
+
+var result;
+var vals = { x: [] };
+
+result = { x: [x = yield] } = vals;
+
+
+
+assert.sameValue(result, vals);
+
+}());
+
+iterationResult = iter.next();
+
+assert.sameValue(iterationResult.value, undefined);
+assert.sameValue(iterationResult.done, false);
+assert.sameValue(x, undefined);
+
+iterationResult = iter.next(24601);
+
+assert.sameValue(iterationResult.value, undefined);
+assert.sameValue(iterationResult.done, true);
+assert.sameValue(x, 24601);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-yield-ident-invalid-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-yield-ident-invalid-strict.js
new file mode 100644
index 0000000000..a5069df25a
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-yield-ident-invalid-strict.js
@@ -0,0 +1,25 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-nested-array-yield-ident-invalid.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: When a `yield` token appears within the Initializer of a nested destructuring assignment and outside of a generator function body, it should behave as an IdentifierReference. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+
+0, { x: [x = yield] } = { x: [] };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-yield-ident-valid.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-yield-ident-valid.js
new file mode 100644
index 0000000000..6a05f43771
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array-yield-ident-valid.js
@@ -0,0 +1,30 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-nested-array-yield-ident-valid.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When a `yield` token appears within the Initializer of a nested destructuring assignment and outside of a generator function body, it should behave as an IdentifierReference. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, noStrict]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var yield = 22;
+var x;
+
+var result;
+var vals = { x: [] };
+
+result = { x: [x = yield] } = vals;
+
+assert.sameValue(x, 22);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array.js
new file mode 100644
index 0000000000..75de956ec0
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-array.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-nested-array.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an array literal, it should be parsed parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var y;
+
+var result;
+var vals = { x: [321] };
+
+result = { x: [y] } = vals;
+
+assert.sameValue(y, 321);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-invalid.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-invalid.js
new file mode 100644
index 0000000000..9963d779a7
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-invalid.js
@@ -0,0 +1,24 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-nested-obj-invalid.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: It is a Syntax Error if LeftHandSideExpression is either an ObjectLiteral or an ArrayLiteral and if the lexical token sequence matched by LeftHandSideExpression cannot be parsed with no tokens left over using AssignmentPattern as the goal symbol. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+
+0, { x: { get x() {} } } = { x: {} };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-null.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-null.js
new file mode 100644
index 0000000000..7f4128cc77
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-null.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-nested-obj-null.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an object literal and the value is `null`, a TypeError should be thrown. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+assert.throws(TypeError, function() {
+ 0, { x: { x } } = { x: null };
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-undefined-own.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-undefined-own.js
new file mode 100644
index 0000000000..0818d0b8fe
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-undefined-own.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-nested-obj-undefined-own.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an object literal and the value is `undefined`, a TypeError should be thrown. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+assert.throws(TypeError, function() {
+ 0, { x: { x } } = { x: undefined };
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-undefined.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-undefined.js
new file mode 100644
index 0000000000..10da50bd6b
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-undefined.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-nested-obj-undefined.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an object literal and the value is not defined, a TypeError should be thrown. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+assert.throws(TypeError, function() {
+ 0, { x: { x } } = {};
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-yield-expr.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-yield-expr.js
new file mode 100644
index 0000000000..12c6b1d113
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-yield-expr.js
@@ -0,0 +1,45 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-nested-obj-yield-expr.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When a `yield` token appears within the Initializer of a nested destructuring assignment and within a generator function body, it should behave as a YieldExpression. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [generators, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var iterationResult, iter, x = undefined;
+
+iter = (function*() {
+
+var result;
+var vals = { x: {} };
+
+result = { x: { x = yield } } = vals;
+
+
+
+assert.sameValue(result, vals);
+
+}());
+
+iterationResult = iter.next();
+
+assert.sameValue(iterationResult.value, undefined);
+assert.sameValue(iterationResult.done, false);
+assert.sameValue(x, undefined);
+
+iterationResult = iter.next(4);
+
+assert.sameValue(iterationResult.value, undefined);
+assert.sameValue(iterationResult.done, true);
+assert.sameValue(x, 4);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-yield-ident-invalid-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-yield-ident-invalid-strict.js
new file mode 100644
index 0000000000..4a5ecc8e53
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-yield-ident-invalid-strict.js
@@ -0,0 +1,25 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-nested-obj-yield-ident-invalid.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: When a `yield` token appears within the Initializer of a nested destructuring assignment and outside of a generator function body, it should behave as an IdentifierReference. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+
+0, { x: { x = yield } } = { x: {} };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-yield-ident-valid.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-yield-ident-valid.js
new file mode 100644
index 0000000000..03e5f6a40a
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj-yield-ident-valid.js
@@ -0,0 +1,30 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-nested-obj-yield-ident-valid.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When a `yield` token appears within the Initializer of a nested destructuring assignment and outside of a generator function body, it should behave as an IdentifierReference. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, noStrict]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var yield = 2;
+var result, x;
+
+var result;
+var vals = { x: {} };
+
+result = { x: { x = yield } } = vals;
+
+assert.sameValue(x, 2);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj.js
new file mode 100644
index 0000000000..0f5a84f5cb
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-nested-obj.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-nested-obj.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an object literal, it should be parsed as a DestructuringAssignmentPattern and evaluated as a destructuring assignment. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var result, y;
+
+var result;
+var vals = { x: { y: 2 } };
+
+result = { x: { y } } = vals;
+
+assert.sameValue(y, 2);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-const.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-const.js
new file mode 100644
index 0000000000..33e1ad8d0d
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-const.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-put-const.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: The assignment target should obey `const` semantics. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [const, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+const c = 1;
+
+assert.throws(TypeError, function() {
+ 0, { a: c } = { a: 2 };
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-let.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-let.js
new file mode 100644
index 0000000000..65c55a18f9
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-let.js
@@ -0,0 +1,25 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-put-let.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: The assignment target should obey `let` semantics. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [let, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+assert.throws(ReferenceError, function() {
+ 0, { a: x } = {};
+});
+
+let x;
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-order.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-order.js
new file mode 100644
index 0000000000..cf9bc3e7a4
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-order.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-put-order.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: The AssignmentElements in an AssignmentElementList are evaluated in left- to-right order. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+
+var result;
+var vals = { a: 2, z: 1 };
+
+result = { z: x, a: x } = vals;
+
+assert.sameValue(x, 2);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-prop-ref-no-get.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-prop-ref-no-get.js
new file mode 100644
index 0000000000..022e817e9e
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-prop-ref-no-get.js
@@ -0,0 +1,37 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-put-prop-ref-no-get.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: If the DestructuringAssignmentTarget of an AssignmentElement is a PropertyReference, it should not be evaluated. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var setValue;
+var x = {
+ get y() {
+ throw new Test262Error('The property should not be accessed.');
+ },
+ set y(val) {
+ setValue = val;
+ }
+};
+
+var result;
+var vals = { a: 23 };
+
+result = { a: x.y } = vals;
+
+assert.sameValue(setValue, 23);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-prop-ref-user-err.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-prop-ref-user-err.js
new file mode 100644
index 0000000000..ef0a42b309
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-prop-ref-user-err.js
@@ -0,0 +1,28 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-put-prop-ref-user-err.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: Any error raised as a result of setting the value should be forwarded to the runtime. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = {
+ set y(val) {
+ throw new Test262Error();
+ }
+};
+
+assert.throws(Test262Error, function() {
+ 0, { a: x.y } = { a: 23 };
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-prop-ref.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-prop-ref.js
new file mode 100644
index 0000000000..3f1d3b389e
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-prop-ref.js
@@ -0,0 +1,29 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-put-prop-ref.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: The DestructuringAssignmentTarget of an AssignmentElement may be a PropertyReference. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x = {};
+
+var result;
+var vals = { xy: 4 };
+
+result = { xy: x.y } = vals;
+
+assert.sameValue(x.y, 4);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-unresolvable-no-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-unresolvable-no-strict.js
new file mode 100644
index 0000000000..0e46e0f6ee
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-unresolvable-no-strict.js
@@ -0,0 +1,33 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-put-unresolvable-no-strict.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Outside of strict mode, if the the assignment target is an unresolvable reference, a new `var` binding should be created in the environment record. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, noStrict]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+{
+
+var result;
+var vals = {};
+
+result = { x: unresolvable } = vals;
+
+
+
+assert.sameValue(result, vals);
+
+}
+
+assert.sameValue(unresolvable, undefined);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-unresolvable-strict-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-unresolvable-strict-strict.js
new file mode 100644
index 0000000000..e85875a580
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-prop-put-unresolvable-strict-strict.js
@@ -0,0 +1,24 @@
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-prop-put-unresolvable-strict.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: In strict mode, if the the assignment target is an unresolvable reference, a ReferenceError should be thrown. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [destructuring-binding]
+flags: [generated, onlyStrict]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+
+assert.throws(ReferenceError, function() {
+ 0, { x: unresolvable } = {};
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-computed-property-no-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-computed-property-no-strict.js
new file mode 100644
index 0000000000..bf76ec497a
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-computed-property-no-strict.js
@@ -0,0 +1,47 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-computed-property-no-strict.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Destructuring field can be a computed property, i.e it can be defined only at runtime. Rest operantion needs to skip these properties as well. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [object-rest, destructuring-binding]
+flags: [generated, noStrict]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var a = "foo";
+
+var result;
+var vals = { foo: 1, bar: 2, baz: 3 };
+
+result = {[a]:b, ...rest} = vals;
+
+assert.sameValue(b, 1);
+assert.sameValue(rest.bar, 2);
+assert.sameValue(rest.baz, 3);
+
+assert.sameValue(Object.getOwnPropertyDescriptor(rest, "foo"), undefined);
+
+verifyProperty(rest, "bar", {
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+verifyProperty(rest, "baz", {
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-computed-property.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-computed-property.js
new file mode 100644
index 0000000000..da00c69bf5
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-computed-property.js
@@ -0,0 +1,48 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-computed-property.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Destructuring field can be a computed property, i.e it can be defined only at runtime. Rest operantion needs to skip these properties as well. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [object-rest, destructuring-binding]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var a = "foo";
+var b, rest;
+
+var result;
+var vals = { foo: 1, bar: 2, baz: 3 };
+
+result = {[a]:b, ...rest} = vals;
+
+assert.sameValue(b, 1);
+assert.sameValue(rest.bar, 2);
+assert.sameValue(rest.baz, 3);
+
+assert.sameValue(Object.getOwnPropertyDescriptor(rest, "foo"), undefined);
+
+verifyProperty(rest, "bar", {
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+verifyProperty(rest, "baz", {
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-descriptors.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-descriptors.js
new file mode 100644
index 0000000000..4f15e7389c
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-descriptors.js
@@ -0,0 +1,46 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-descriptors.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Object created from rest deconstruction doesn't copy source object property descriptors. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [object-rest, destructuring-binding]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var rest;
+var obj = {};
+Object.defineProperty(obj, "a", { value: 3, configurable: false, enumerable: true });
+Object.defineProperty(obj, "b", { value: 4, writable: false, enumerable: true });
+
+var result;
+var vals = obj;
+
+result = {...rest} = vals;
+
+verifyProperty(rest, "a", {
+ enumerable: true,
+ writable: true,
+ configurable: true,
+ value: 3
+});
+
+verifyProperty(rest, "b", {
+ enumerable: true,
+ writable: true,
+ configurable: true,
+ value: 4
+});
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-empty-obj.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-empty-obj.js
new file mode 100644
index 0000000000..71bea4852e
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-empty-obj.js
@@ -0,0 +1,33 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-empty-obj.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: RestBindingInitialization creates a new object even if lhs is an empty object (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [object-rest, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var rest;
+
+
+var result;
+var vals = {};
+
+result = {...rest} = vals;
+
+assert.notSameValue(rest, undefined);
+assert.notSameValue(rest, null);
+assert.sameValue(typeof rest, "object");
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-getter-abrupt-get-error.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-getter-abrupt-get-error.js
new file mode 100644
index 0000000000..fa96091ae8
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-getter-abrupt-get-error.js
@@ -0,0 +1,28 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-getter-abrupt-get-error.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: Rest deconstruction doesn't happen if getter return is abrupt (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [object-rest, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+var count = 0;
+
+assert.throws(Test262Error, function() {
+ 0, {...x} = { get v() { count++; throw new Test262Error(); } };
+});
+
+assert.sameValue(count, 1);
+
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-getter.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-getter.js
new file mode 100644
index 0000000000..56abb3f8b1
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-getter.js
@@ -0,0 +1,38 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-getter.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Getter is called when obj is being deconstructed to a rest Object (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [object-rest, destructuring-binding]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var x;
+var count = 0;
+
+var result;
+var vals = { get v() { count++; return 2; } };
+
+result = {...x} = vals;
+
+assert.sameValue(count, 1);
+
+verifyProperty(x, "v", {
+ enumerable: true,
+ writable: true,
+ configurable: true,
+ value: 2
+});
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-1.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-1.js
new file mode 100644
index 0000000000..e2d14c2ffa
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-1.js
@@ -0,0 +1,41 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-non-string-computed-property-1.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Destructuring field can be a non-string computed property, i.e it can be defined only at runtime. Rest operation needs to skip these properties as well. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [object-rest, destructuring-binding]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var a = 1.;
+var b, rest;
+
+var result;
+var vals = {[a]: 1, bar: 2 };
+
+result = {[a]:b, ...rest} = vals;
+
+assert.sameValue(b, 1);
+
+assert.sameValue(Object.getOwnPropertyDescriptor(rest, "1"), undefined);
+
+verifyProperty(rest, "bar", {
+ value: 2,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-1dot.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-1dot.js
new file mode 100644
index 0000000000..3bcee308a7
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-1dot.js
@@ -0,0 +1,41 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-non-string-computed-property-1dot.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Destructuring field can be a non-string computed property, i.e it can be defined only at runtime. Rest operation needs to skip these properties as well. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [object-rest, destructuring-binding]
+flags: [generated]
+includes: [compareArray.js, propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var a = 1.;
+var b, rest;
+
+var result;
+var vals = {[a]: [1], bar: 2 };
+
+result = {[a]:b, ...rest} = vals;
+
+assert.compareArray(b, [1]);
+
+assert.sameValue(Object.getOwnPropertyDescriptor(rest, "1"), undefined);
+
+verifyProperty(rest, "bar", {
+ value: 2,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-1dot0.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-1dot0.js
new file mode 100644
index 0000000000..9f9dac8e6a
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-1dot0.js
@@ -0,0 +1,41 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-non-string-computed-property-1dot0.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Destructuring field can be a non-string computed property, i.e it can be defined only at runtime. Rest operation needs to skip these properties as well. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [object-rest, destructuring-binding]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var a = 1.;
+var b, rest;
+
+var result;
+var vals = {[a]: 1.0, bar: 2 };
+
+result = {[a]:b, ...rest} = vals;
+
+assert.sameValue(b, 1);
+
+assert.sameValue(Object.getOwnPropertyDescriptor(rest, "1"), undefined);
+
+verifyProperty(rest, "bar", {
+ value: 2,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-1e0.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-1e0.js
new file mode 100644
index 0000000000..c14618f693
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-1e0.js
@@ -0,0 +1,41 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-non-string-computed-property-1e0.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Destructuring field can be a non-string computed property, i.e it can be defined only at runtime. Rest operation needs to skip these properties as well. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [object-rest, destructuring-binding]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var a = 1.;
+var b, rest;
+
+var result;
+var vals = {[a]: 1e0, bar: 2 };
+
+result = {[a]:b, ...rest} = vals;
+
+assert.sameValue(b, 1);
+
+assert.sameValue(Object.getOwnPropertyDescriptor(rest, "1"), undefined);
+
+verifyProperty(rest, "bar", {
+ value: 2,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-array-1.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-array-1.js
new file mode 100644
index 0000000000..1dca7cf988
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-array-1.js
@@ -0,0 +1,41 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-non-string-computed-property-array-1.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Destructuring field can be a non-string computed property, i.e it can be defined only at runtime. Rest operation needs to skip these properties as well. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [object-rest, destructuring-binding]
+flags: [generated]
+includes: [compareArray.js, propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var a = 1.;
+var b, rest;
+
+var result;
+var vals = {[a]: [1], bar: 2 };
+
+result = {[a]:b, ...rest} = vals;
+
+assert.compareArray(b, [1]);
+
+assert.sameValue(Object.getOwnPropertyDescriptor(rest, "1"), undefined);
+
+verifyProperty(rest, "bar", {
+ value: 2,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-array-1e0.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-array-1e0.js
new file mode 100644
index 0000000000..b42f45876d
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-array-1e0.js
@@ -0,0 +1,42 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-non-string-computed-property-array-1e0.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Destructuring field can be a non-string computed property, i.e it can be defined only at runtime. Rest operation needs to skip these properties as well. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [object-rest, destructuring-binding]
+flags: [generated]
+includes: [compareArray.js, propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var a = 1.;
+var b, rest;
+
+var result;
+var vals = {[a]: [1e0], bar: 2 };
+
+result = {[a]:b, ...rest} = vals;
+
+assert.compareArray(b, [1]);
+
+
+assert.sameValue(Object.getOwnPropertyDescriptor(rest, "1"), undefined);
+
+verifyProperty(rest, "bar", {
+ value: 2,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-string-1.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-string-1.js
new file mode 100644
index 0000000000..4a3fab8a11
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-non-string-computed-property-string-1.js
@@ -0,0 +1,41 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-non-string-computed-property-string-1.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Destructuring field can be a non-string computed property, i.e it can be defined only at runtime. Rest operation needs to skip these properties as well. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [object-rest, destructuring-binding]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var a = 1.;
+var b, rest;
+
+var result;
+var vals = {[a]: "1", bar: 2 };
+
+result = {[a]:b, ...rest} = vals;
+
+assert.sameValue(b, "1");
+
+assert.sameValue(Object.getOwnPropertyDescriptor(rest, "1"), undefined);
+
+verifyProperty(rest, "bar", {
+ value: 2,
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-not-last-element-invalid.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-not-last-element-invalid.js
new file mode 100644
index 0000000000..7b8df749b0
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-not-last-element-invalid.js
@@ -0,0 +1,26 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-not-last-element-invalid.case
+// - src/dstr-assignment/syntax/assignment-expr.template
+/*---
+description: Object rest element needs to be the last AssignmenProperty in ObjectAssignmentPattern. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [object-rest, destructuring-binding]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+$DONOTEVALUATE();
+var rest, b;
+
+0, {...rest, b} = {}
+;
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-number.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-number.js
new file mode 100644
index 0000000000..30f97831b6
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-number.js
@@ -0,0 +1,33 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-number.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: RestBindingInitialization creates a new object even if lhs is a Number (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [object-rest, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var rest;
+
+
+var result;
+var vals = 51;
+
+result = {...rest} = vals;
+
+assert.notSameValue(rest, undefined);
+assert.notSameValue(rest, null);
+assert(rest instanceof Object);
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-order.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-order.js
new file mode 100644
index 0000000000..ebe5ee76fb
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-order.js
@@ -0,0 +1,35 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-order.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Rest operation follows [[OwnPropertyKeys]] order (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol, object-rest, destructuring-binding]
+flags: [generated]
+includes: [compareArray.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var rest;
+var calls = [];
+var o = { get z() { calls.push('z') }, get a() { calls.push('a') } };
+Object.defineProperty(o, 1, { get: () => { calls.push(1) }, enumerable: true });
+Object.defineProperty(o, Symbol('foo'), { get: () => { calls.push("Symbol(foo)") }, enumerable: true });
+
+var result;
+var vals = o;
+
+result = {...rest} = vals;
+
+assert.compareArray(calls, [1, 'z', 'a', "Symbol(foo)"]);
+assert.sameValue(Object.keys(rest).length, 3);
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-put-const.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-put-const.js
new file mode 100644
index 0000000000..e5fee31f33
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-put-const.js
@@ -0,0 +1,25 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-put-const.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: The object rest deconstruction assignment target should obey `const` semantics. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [object-rest, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+const rest = null;
+
+assert.throws(TypeError, function() {
+ 0, {...rest} = {}
+;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-same-name.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-same-name.js
new file mode 100644
index 0000000000..5957e8d5dc
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-same-name.js
@@ -0,0 +1,43 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-same-name.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Proper setting in the values for rest name equal to a property name. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [object-rest, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var o = {
+ x: 42,
+ y: 39,
+ z: 'cheeseburger'
+};
+
+var x, y, z;
+
+var result;
+var vals = o;
+
+result = { x, ...z } = vals;
+
+assert.sameValue(x, 42);
+assert.sameValue(y, undefined);
+assert.sameValue(z.y, 39);
+assert.sameValue(z.z, 'cheeseburger');
+
+var keys = Object.getOwnPropertyNames(z);
+assert.sameValue(keys.length, 2);
+assert.sameValue(keys[0], 'y');
+assert.sameValue(keys[1], 'z');
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-skip-non-enumerable.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-skip-non-enumerable.js
new file mode 100644
index 0000000000..b8bf7d6be7
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-skip-non-enumerable.js
@@ -0,0 +1,46 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-skip-non-enumerable.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Rest object doesn't contain non-enumerable properties (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [object-rest, destructuring-binding]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var rest;
+var obj = {a: 3, b: 4};
+Object.defineProperty(obj, "x", { value: 4, enumerable: false });
+
+var result;
+var vals = obj;
+
+result = {...rest} = vals;
+
+assert.sameValue(Object.getOwnPropertyDescriptor(rest, "x"), undefined);
+
+verifyProperty(rest, "a", {
+ enumerable: true,
+ writable: true,
+ configurable: true,
+ value: 3
+});
+
+verifyProperty(rest, "b", {
+ enumerable: true,
+ writable: true,
+ configurable: true,
+ value: 4
+});
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-str-val.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-str-val.js
new file mode 100644
index 0000000000..1b51b24b6d
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-str-val.js
@@ -0,0 +1,34 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-str-val.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: RestBindingInitialization creats an object with indexes as property name (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [object-rest, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var rest;
+
+
+var result;
+var vals = "foo";
+
+result = {...rest} = vals;
+
+assert.sameValue(rest["0"], "f");
+assert.sameValue(rest["1"], "o");
+assert.sameValue(rest["2"], "o");
+assert(rest instanceof Object);
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-symbol-val.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-symbol-val.js
new file mode 100644
index 0000000000..8ee1b81cf5
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-symbol-val.js
@@ -0,0 +1,33 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-symbol-val.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: RestBindingInitialization creates a new object if lhs is a Symbol (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [Symbol, object-rest, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var rest;
+
+
+var result;
+var vals = Symbol("foo");
+
+result = {...rest} = vals;
+
+assert.notSameValue(rest, undefined);
+assert.notSameValue(rest, null);
+assert(rest instanceof Object);
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-to-property-with-setter.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-to-property-with-setter.js
new file mode 100644
index 0000000000..8312f614a6
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-to-property-with-setter.js
@@ -0,0 +1,40 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-to-property-with-setter.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an object property setter, its value should be binded as rest object. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [object-rest, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var settedValue;
+var executedGetter = false;
+var src = {
+ get y() { executedGetter = true; },
+ set y(v) {
+ settedValue = v;
+ }
+}
+src.y = undefined;
+
+var result;
+var vals = { x: 1, y: 2};
+
+result = {...src.y} = vals;
+
+assert.sameValue(settedValue.x, 1);
+assert.sameValue(settedValue.y, 2);
+assert(!executedGetter, "The property should not be accessed");
+
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-to-property.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-to-property.js
new file mode 100644
index 0000000000..414320f095
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-to-property.js
@@ -0,0 +1,37 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-to-property.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: When DestructuringAssignmentTarget is an object property, its value should be binded as rest object. (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [object-rest, destructuring-binding]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var src = {};
+
+var result;
+var vals = { x: 1, y: 2};
+
+result = {...src.y} = vals;
+
+assert.sameValue(src.y.x, 1);
+assert.sameValue(src.y.y, 2);
+
+verifyProperty(src, "y", {
+ enumerable: true,
+ writable: true,
+ configurable: true
+});
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-val-null.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-val-null.js
new file mode 100644
index 0000000000..3837360fa5
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-val-null.js
@@ -0,0 +1,25 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-val-null.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: TypeError is thrown when rhs is null because of 7.1.13 ToObject ( argument ) used by CopyDataProperties (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [object-rest, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var rest;
+
+assert.throws(TypeError, function() {
+ 0, {...rest} = null
+;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-val-undefined.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-val-undefined.js
new file mode 100644
index 0000000000..0e7bebb084
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-val-undefined.js
@@ -0,0 +1,25 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-val-undefined.case
+// - src/dstr-assignment/error/assignment-expr.template
+/*---
+description: TypeError is thrown when rhs is ```undefined``` because of 7.1.13 ToObject ( argument ) used by CopyDataProperties (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [object-rest, destructuring-binding]
+flags: [generated]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var rest;
+
+assert.throws(TypeError, function() {
+ 0, {...rest} = undefined
+;
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-valid-object.js b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-valid-object.js
new file mode 100644
index 0000000000..8c4e7779af
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/obj-rest-valid-object.js
@@ -0,0 +1,46 @@
+// This file was procedurally generated from the following sources:
+// - src/dstr-assignment/obj-rest-valid-object.case
+// - src/dstr-assignment/default/assignment-expr.template
+/*---
+description: Rest object contains just unextracted data (AssignmentExpression)
+esid: sec-variable-statement-runtime-semantics-evaluation
+features: [object-rest, destructuring-binding]
+flags: [generated]
+includes: [propertyHelper.js]
+info: |
+ VariableDeclaration : BindingPattern Initializer
+
+ 1. Let rhs be the result of evaluating Initializer.
+ 2. Let rval be GetValue(rhs).
+ 3. ReturnIfAbrupt(rval).
+ 4. Return the result of performing BindingInitialization for
+ BindingPattern passing rval and undefined as arguments.
+---*/
+var rest, a, b;
+
+
+var result;
+var vals = {x: 1, y: 2, a: 5, b: 3};
+
+result = {a, b, ...rest} = vals;
+
+assert.sameValue(rest.a, undefined);
+assert.sameValue(rest.b, undefined);
+
+verifyProperty(rest, "x", {
+ enumerable: true,
+ writable: true,
+ configurable: true,
+ value: 1
+});
+
+verifyProperty(rest, "y", {
+ enumerable: true,
+ writable: true,
+ configurable: true,
+ value: 2
+});
+
+assert.sameValue(result, vals);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/shell.js b/js/src/tests/test262/language/expressions/assignment/dstr/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/shell.js
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-break-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-break-escaped.js
new file mode 100644
index 0000000000..4021e72bf9
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-break-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/break-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: break is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { bre\u0061k } = { break: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-case-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-case-escaped.js
new file mode 100644
index 0000000000..0250a07c3a
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-case-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/case-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: case is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { c\u0061se } = { case: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-catch-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-catch-escaped.js
new file mode 100644
index 0000000000..58a44f4811
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-catch-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/catch-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: catch is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { c\u0061tch } = { catch: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-class-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-class-escaped.js
new file mode 100644
index 0000000000..42241bf14c
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-class-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/class-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: class is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { cl\u0061ss } = { class: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-const-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-const-escaped.js
new file mode 100644
index 0000000000..f9059ccacd
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-const-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/const-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: const is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { \u0063onst } = { const: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-continue-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-continue-escaped.js
new file mode 100644
index 0000000000..0844d028ba
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-continue-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/continue-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: continue is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { \u0063ontinue } = { continue: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-debugger-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-debugger-escaped.js
new file mode 100644
index 0000000000..57743fe821
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-debugger-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/debugger-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: debugger is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { \u0064ebugger } = { debugger: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-default-escaped-ext.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-default-escaped-ext.js
new file mode 100644
index 0000000000..dd1b705aba
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-default-escaped-ext.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/default-escaped-ext.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: default is a valid identifier name, using extended escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { def\u{61}ult } = { default: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-default-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-default-escaped.js
new file mode 100644
index 0000000000..9ee78fed40
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-default-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/default-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: default is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { def\u0061ult } = { default: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-default.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-default.js
new file mode 100644
index 0000000000..0a575392d9
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-default.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/default.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: default is a valid identifier name (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { default } = { default: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-delete-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-delete-escaped.js
new file mode 100644
index 0000000000..e140eaace9
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-delete-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/delete-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: delete is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { \u0064elete } = { delete: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-do-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-do-escaped.js
new file mode 100644
index 0000000000..43a6ea3d5b
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-do-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/do-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: do is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { \u0064o } = { do: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-else-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-else-escaped.js
new file mode 100644
index 0000000000..3f3239013f
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-else-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/else-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: else is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { \u0065lse } = { else: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-enum-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-enum-escaped.js
new file mode 100644
index 0000000000..2f995e1068
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-enum-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/enum-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: enum is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { \u0065num } = { enum: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-export-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-export-escaped.js
new file mode 100644
index 0000000000..0b72342f39
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-export-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/export-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: export is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { \u0065xport } = { export: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-extends-escaped-ext.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-extends-escaped-ext.js
new file mode 100644
index 0000000000..d6c134a590
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-extends-escaped-ext.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/extends-escaped-ext.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: extends is a valid identifier name, using extended escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { \u{65}xtends } = { extends: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-extends-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-extends-escaped.js
new file mode 100644
index 0000000000..790b7acce9
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-extends-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/extends-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: extends is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { \u0065xtends } = { extends: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-extends.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-extends.js
new file mode 100644
index 0000000000..4e581b8a0d
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-extends.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/extends.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: extends is a valid identifier name (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { extends } = { extends: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-finally-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-finally-escaped.js
new file mode 100644
index 0000000000..99fb08d33f
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-finally-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/finally-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: finally is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { \u0066inally } = { finally: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-for-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-for-escaped.js
new file mode 100644
index 0000000000..d0c357ec35
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-for-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/for-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: for is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { \u0066or } = { for: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-function-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-function-escaped.js
new file mode 100644
index 0000000000..7712561dd1
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-function-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/function-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: function is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { \u0066unction } = { function: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-if-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-if-escaped.js
new file mode 100644
index 0000000000..7df6b01ae6
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-if-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/if-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: if is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { i\u0066 } = { if: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-implements-escaped-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-implements-escaped-strict.js
new file mode 100644
index 0000000000..89fe2b9ed5
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-implements-escaped-strict.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/implements-escaped.case
+// - src/identifier-names/future-reserved-words/obj-assignment-identifier.template
+/*---
+description: implements is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { \u0069mplements } = { implements: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-import-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-import-escaped.js
new file mode 100644
index 0000000000..b6a6a1b72f
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-import-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/import-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: import is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { \u0069mport } = { import: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-in-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-in-escaped.js
new file mode 100644
index 0000000000..fe1fc01ef6
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-in-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/in-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: in is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { \u0069n } = { in: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-instanceof-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-instanceof-escaped.js
new file mode 100644
index 0000000000..5bd56e7ae5
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-instanceof-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/instanceof-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: instanceof is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { \u0069nstanceof } = { instanceof: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-interface-escaped-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-interface-escaped-strict.js
new file mode 100644
index 0000000000..f74aedca37
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-interface-escaped-strict.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/interface-escaped.case
+// - src/identifier-names/future-reserved-words/obj-assignment-identifier.template
+/*---
+description: interface is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { interf\u0061ce } = { interface: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-let-escaped-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-let-escaped-strict.js
new file mode 100644
index 0000000000..83cc39551e
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-let-escaped-strict.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/let-escaped.case
+// - src/identifier-names/future-reserved-words/obj-assignment-identifier.template
+/*---
+description: let is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { l\u0065t } = { let: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-new-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-new-escaped.js
new file mode 100644
index 0000000000..852271aa3c
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-new-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/new-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: new is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { n\u0065w } = { new: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-package-escaped-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-package-escaped-strict.js
new file mode 100644
index 0000000000..8c352baa40
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-package-escaped-strict.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/package-escaped.case
+// - src/identifier-names/future-reserved-words/obj-assignment-identifier.template
+/*---
+description: package is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { p\u0061ckage } = { package: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-private-escaped-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-private-escaped-strict.js
new file mode 100644
index 0000000000..9eaf631c39
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-private-escaped-strict.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/private-escaped.case
+// - src/identifier-names/future-reserved-words/obj-assignment-identifier.template
+/*---
+description: private is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { privat\u0065 } = { private: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-protected-escaped-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-protected-escaped-strict.js
new file mode 100644
index 0000000000..6e657c7ee7
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-protected-escaped-strict.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/protected-escaped.case
+// - src/identifier-names/future-reserved-words/obj-assignment-identifier.template
+/*---
+description: protected is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { prot\u0065cted } = { protected: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-public-escaped-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-public-escaped-strict.js
new file mode 100644
index 0000000000..0370a9bc63
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-public-escaped-strict.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/public-escaped.case
+// - src/identifier-names/future-reserved-words/obj-assignment-identifier.template
+/*---
+description: public is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { pu\u0062lic } = { public: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-return-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-return-escaped.js
new file mode 100644
index 0000000000..40ed1c9f5f
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-return-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/return-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: return is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { r\u0065turn } = { return: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-static-escaped-strict.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-static-escaped-strict.js
new file mode 100644
index 0000000000..3ce4742e81
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-static-escaped-strict.js
@@ -0,0 +1,42 @@
+// |reftest| error:SyntaxError
+'use strict';
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/static-escaped.case
+// - src/identifier-names/future-reserved-words/obj-assignment-identifier.template
+/*---
+description: static is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated, onlyStrict]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { st\u0061tic } = { static: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-super-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-super-escaped.js
new file mode 100644
index 0000000000..27b59ef36f
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-super-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/super-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: super is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { sup\u0065r } = { super: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-switch-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-switch-escaped.js
new file mode 100644
index 0000000000..63cdf87388
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-switch-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/switch-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: switch is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { sw\u0069tch } = { switch: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-this-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-this-escaped.js
new file mode 100644
index 0000000000..dcbc415081
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-this-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/this-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: this is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { th\u0069s } = { this: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-throw-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-throw-escaped.js
new file mode 100644
index 0000000000..c02a3906e3
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-throw-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/throw-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: throw is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { t\u0068row } = { throw: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-try-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-try-escaped.js
new file mode 100644
index 0000000000..fabbb2381d
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-try-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/try-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: try is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { tr\u0079 } = { try: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-typeof-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-typeof-escaped.js
new file mode 100644
index 0000000000..519ee04405
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-typeof-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/typeof-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: typeof is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { typ\u0065of } = { typeof: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-var-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-var-escaped.js
new file mode 100644
index 0000000000..609dff33ba
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-var-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/var-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: var is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { v\u0061r } = { var: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-void-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-void-escaped.js
new file mode 100644
index 0000000000..c385489504
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-void-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/void-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: void is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { voi\u0064 } = { void: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-while-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-while-escaped.js
new file mode 100644
index 0000000000..303357d74c
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-while-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/while-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: while is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { whil\u0065 } = { while: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-with-escaped.js b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-with-escaped.js
new file mode 100644
index 0000000000..ec6ee2a5ec
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/dstr/syntax-error-ident-ref-with-escaped.js
@@ -0,0 +1,41 @@
+// |reftest| error:SyntaxError
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/with-escaped.case
+// - src/identifier-names/default/obj-assignment-identifier.template
+/*---
+description: with is a valid identifier name, using escape (IdentifierReference in ObjectAssignmentPattern cannot be a ReservedWord)
+esid: prod-AssignmentPattern
+features: [destructuring-assignment]
+flags: [generated]
+negative:
+ phase: parse
+ type: SyntaxError
+info: |
+ AssignmentPattern:
+ ObjectAssignmentPattern
+
+ ObjectAssignmentPattern:
+ { AssignmentPropertyList }
+
+ AssignmentPropertyList:
+ AssignmentProperty
+ AssignmentPropertyList , AssignmentProperty
+
+ AssignmentProperty:
+ IdentifierReference Initializer_opt
+ PropertyName : AssignmentElement
+
+ IdentifierReference:
+ Identifier
+ [~Yield]yield
+ [~Await]await
+
+ Identifier:
+ IdentifierName but not ReservedWord
+
+---*/
+
+
+$DONOTEVALUATE();
+
+var x = { w\u0069th } = { with: 42 };
diff --git a/js/src/tests/test262/language/expressions/assignment/fn-name-arrow.js b/js/src/tests/test262/language/expressions/assignment/fn-name-arrow.js
new file mode 100644
index 0000000000..425d626e72
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/fn-name-arrow.js
@@ -0,0 +1,35 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es6id: 12.14.4
+description: Assignment of function `name` attribute (ArrowFunction)
+info: |
+ AssignmentExpression[In, Yield] :
+ LeftHandSideExpression[?Yield] = AssignmentExpression[?In, ?Yield]
+
+ 1. If LeftHandSideExpression is neither an ObjectLiteral nor an
+ ArrayLiteral, then
+ [...]
+ e. If IsAnonymousFunctionDefinition(AssignmentExpression) and
+ IsIdentifierRef of LeftHandSideExpression are both true, then
+
+ i. Let hasNameProperty be HasOwnProperty(rval, "name").
+ ii. ReturnIfAbrupt(hasNameProperty).
+ iii. If hasNameProperty is false, perform SetFunctionName(rval,
+ GetReferencedName(lref)).
+includes: [propertyHelper.js]
+---*/
+
+var arrow;
+
+arrow = () => {};
+
+verifyProperty(arrow, 'name', {
+ value: 'arrow',
+ writable: false,
+ enumerable: false,
+ configurable: true,
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/fn-name-class.js b/js/src/tests/test262/language/expressions/assignment/fn-name-class.js
new file mode 100644
index 0000000000..d719330d17
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/fn-name-class.js
@@ -0,0 +1,41 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es6id: 12.14.4
+description: Assignment of function `name` attribute (ClassExpression)
+info: |
+ AssignmentExpression[In, Yield] :
+ LeftHandSideExpression[?Yield] = AssignmentExpression[?In, ?Yield]
+
+ 1. If LeftHandSideExpression is neither an ObjectLiteral nor an
+ ArrayLiteral, then
+ [...]
+ e. If IsAnonymousFunctionDefinition(AssignmentExpression) and
+ IsIdentifierRef of LeftHandSideExpression are both true, then
+
+ i. Let hasNameProperty be HasOwnProperty(rval, "name").
+ ii. ReturnIfAbrupt(hasNameProperty).
+ iii. If hasNameProperty is false, perform SetFunctionName(rval,
+ GetReferencedName(lref)).
+includes: [propertyHelper.js]
+features: [class]
+---*/
+
+var xCls, cls, xCls2;
+
+xCls = class x {};
+cls = class {};
+xCls2 = class { static name() {} };
+
+assert.notSameValue(xCls.name, 'xCls');
+assert.notSameValue(xCls2.name, 'xCls2');
+
+verifyProperty(cls, 'name', {
+ value: 'cls',
+ writable: false,
+ enumerable: false,
+ configurable: true,
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/fn-name-cover.js b/js/src/tests/test262/language/expressions/assignment/fn-name-cover.js
new file mode 100644
index 0000000000..b68f672952
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/fn-name-cover.js
@@ -0,0 +1,39 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es6id: 12.14.4
+description: >
+ Assignment of function `name` attribute (CoverParenthesizedExpression)
+info: |
+ AssignmentExpression[In, Yield] :
+ LeftHandSideExpression[?Yield] = AssignmentExpression[?In, ?Yield]
+
+ 1. If LeftHandSideExpression is neither an ObjectLiteral nor an
+ ArrayLiteral, then
+ [...]
+ e. If IsAnonymousFunctionDefinition(AssignmentExpression) and
+ IsIdentifierRef of LeftHandSideExpression are both true, then
+
+ i. Let hasNameProperty be HasOwnProperty(rval, "name").
+ ii. ReturnIfAbrupt(hasNameProperty).
+ iii. If hasNameProperty is false, perform SetFunctionName(rval,
+ GetReferencedName(lref)).
+includes: [propertyHelper.js]
+---*/
+
+var xCover, cover;
+
+xCover = (0, function() {});
+cover = (function() {});
+
+assert(xCover.name !== 'xCover');
+
+verifyProperty(cover, 'name', {
+ value: 'cover',
+ writable: false,
+ enumerable: false,
+ configurable: true,
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/fn-name-fn.js b/js/src/tests/test262/language/expressions/assignment/fn-name-fn.js
new file mode 100644
index 0000000000..1e520addde
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/fn-name-fn.js
@@ -0,0 +1,38 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es6id: 12.14.4
+description: Assignment of function `name` attribute (FunctionExpression)
+info: |
+ AssignmentExpression[In, Yield] :
+ LeftHandSideExpression[?Yield] = AssignmentExpression[?In, ?Yield]
+
+ 1. If LeftHandSideExpression is neither an ObjectLiteral nor an
+ ArrayLiteral, then
+ [...]
+ e. If IsAnonymousFunctionDefinition(AssignmentExpression) and
+ IsIdentifierRef of LeftHandSideExpression are both true, then
+
+ i. Let hasNameProperty be HasOwnProperty(rval, "name").
+ ii. ReturnIfAbrupt(hasNameProperty).
+ iii. If hasNameProperty is false, perform SetFunctionName(rval,
+ GetReferencedName(lref)).
+includes: [propertyHelper.js]
+---*/
+
+var xFn, fn;
+
+xFn = function x() {};
+fn = function() {};
+
+assert(xFn.name !== 'xFn');
+
+verifyProperty(fn, 'name', {
+ value: 'fn',
+ writable: false,
+ enumerable: false,
+ configurable: true,
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/fn-name-gen.js b/js/src/tests/test262/language/expressions/assignment/fn-name-gen.js
new file mode 100644
index 0000000000..04439260ca
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/fn-name-gen.js
@@ -0,0 +1,39 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+es6id: 12.14.4
+description: Assignment of function `name` attribute (GeneratorExpression)
+info: |
+ AssignmentExpression[In, Yield] :
+ LeftHandSideExpression[?Yield] = AssignmentExpression[?In, ?Yield]
+
+ 1. If LeftHandSideExpression is neither an ObjectLiteral nor an
+ ArrayLiteral, then
+ [...]
+ e. If IsAnonymousFunctionDefinition(AssignmentExpression) and
+ IsIdentifierRef of LeftHandSideExpression are both true, then
+
+ i. Let hasNameProperty be HasOwnProperty(rval, "name").
+ ii. ReturnIfAbrupt(hasNameProperty).
+ iii. If hasNameProperty is false, perform SetFunctionName(rval,
+ GetReferencedName(lref)).
+includes: [propertyHelper.js]
+features: [generators]
+---*/
+
+var xGen, gen;
+
+xGen = function* x() {};
+gen = function*() {};
+
+assert(xGen.name !== 'xGen');
+
+verifyProperty(gen, 'name', {
+ value: 'gen',
+ writable: false,
+ enumerable: false,
+ configurable: true,
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/fn-name-lhs-cover.js b/js/src/tests/test262/language/expressions/assignment/fn-name-lhs-cover.js
new file mode 100644
index 0000000000..851579395b
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/fn-name-lhs-cover.js
@@ -0,0 +1,29 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-assignment-operators-runtime-semantics-evaluation
+description: Left-hand side as a CoverParenthesizedExpression
+info: |
+ AssignmentExpression[In, Yield, Await] :
+ LeftHandSideExpression[?Yield, ?Await] = AssignmentExpression[?In, ?Yield, ?Await]
+
+ 1. If LeftHandSideExpression is neither an ObjectLiteral nor an
+ ArrayLiteral, then
+ [...]
+ c. If IsAnonymousFunctionDefinition(AssignmentExpression) and
+ IsIdentifierRef of LeftHandSideExpression are both true, then
+ i. Let rval be NamedEvaluation of AssignmentExpression with argument
+ GetReferencedName(lref).
+includes: [propertyHelper.js]
+---*/
+
+var fn;
+
+(fn) = function() {};
+
+verifyProperty(fn, "name", {
+ value: "", writable: false, enumerable: false, configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/fn-name-lhs-member.js b/js/src/tests/test262/language/expressions/assignment/fn-name-lhs-member.js
new file mode 100644
index 0000000000..bdf4b01ab0
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/fn-name-lhs-member.js
@@ -0,0 +1,29 @@
+// Copyright (C) 2015 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-assignment-operators-runtime-semantics-evaluation
+description: Left-hand side as a MemberExpression
+info: |
+ AssignmentExpression[In, Yield, Await] :
+ LeftHandSideExpression[?Yield, ?Await] = AssignmentExpression[?In, ?Yield, ?Await]
+
+ 1. If LeftHandSideExpression is neither an ObjectLiteral nor an
+ ArrayLiteral, then
+ [...]
+ c. If IsAnonymousFunctionDefinition(AssignmentExpression) and
+ IsIdentifierRef of LeftHandSideExpression are both true, then
+ i. Let rval be NamedEvaluation of AssignmentExpression with argument
+ GetReferencedName(lref).
+includes: [propertyHelper.js]
+---*/
+
+var o = {};
+
+o.attr = function() {};
+
+verifyProperty(o.attr, "name", {
+ value: "", writable: false, enumerable: false, configurable: true
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/id-arguments-strict-strict.js b/js/src/tests/test262/language/expressions/assignment/id-arguments-strict-strict.js
new file mode 100644
index 0000000000..1b688ca1e4
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/id-arguments-strict-strict.js
@@ -0,0 +1,18 @@
+// |reftest| error:SyntaxError
+'use strict';
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es5id: 11.13.1-4-30-s
+description: >
+ Strict Mode - SyntaxError is thrown if the identifier 'arguments' appears as
+ the LeftHandSideExpression (PrimaryExpression) of simple assignment(=).
+negative:
+ phase: parse
+ type: SyntaxError
+flags: [onlyStrict]
+---*/
+
+$DONOTEVALUATE();
+
+(arguments) = 20;
diff --git a/js/src/tests/test262/language/expressions/assignment/id-eval-strict-strict.js b/js/src/tests/test262/language/expressions/assignment/id-eval-strict-strict.js
new file mode 100644
index 0000000000..14a99e387f
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/id-eval-strict-strict.js
@@ -0,0 +1,18 @@
+// |reftest| error:SyntaxError
+'use strict';
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+es5id: 11.13.1-4-30-s
+description: >
+ Strict Mode - SyntaxError is thrown if the identifier 'eval' appears as the
+ LeftHandSideExpression (PrimaryExpression) of simple assignment(=).
+negative:
+ phase: parse
+ type: SyntaxError
+flags: [onlyStrict]
+---*/
+
+$DONOTEVALUATE();
+
+(eval) = 20;
diff --git a/js/src/tests/test262/language/expressions/assignment/line-terminator.js b/js/src/tests/test262/language/expressions/assignment/line-terminator.js
new file mode 100644
index 0000000000..9c239b9557
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/line-terminator.js
@@ -0,0 +1,20 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: >
+ White Space between LeftHandSideExpression and "=" or between "=" and
+ AssignmentExpression is allowed
+es5id: 11.13.1_A1
+---*/
+
+var x;
+
+x
+=
+true;
+
+if (x !== true) {
+ throw new Test262Error('#6: (x\\u000A=\\u000Atrue) === true');
+}
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-break-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-break-escaped.js
new file mode 100644
index 0000000000..c4e41cec40
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-break-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/break-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: break is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.bre\u0061k = 42;
+
+assert.sameValue(obj['break'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-case-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-case-escaped.js
new file mode 100644
index 0000000000..e7cf8f5054
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-case-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/case-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: case is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.c\u0061se = 42;
+
+assert.sameValue(obj['case'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-catch-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-catch-escaped.js
new file mode 100644
index 0000000000..8726bb4412
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-catch-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/catch-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: catch is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.c\u0061tch = 42;
+
+assert.sameValue(obj['catch'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-class-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-class-escaped.js
new file mode 100644
index 0000000000..279764714c
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-class-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/class-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: class is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.cl\u0061ss = 42;
+
+assert.sameValue(obj['class'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-const-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-const-escaped.js
new file mode 100644
index 0000000000..610b4af903
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-const-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/const-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: const is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.\u0063onst = 42;
+
+assert.sameValue(obj['const'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-continue-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-continue-escaped.js
new file mode 100644
index 0000000000..0c7fc186b4
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-continue-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/continue-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: continue is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.\u0063ontinue = 42;
+
+assert.sameValue(obj['continue'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-debugger-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-debugger-escaped.js
new file mode 100644
index 0000000000..f0c950c5cb
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-debugger-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/debugger-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: debugger is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.\u0064ebugger = 42;
+
+assert.sameValue(obj['debugger'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-default-escaped-ext.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-default-escaped-ext.js
new file mode 100644
index 0000000000..59b454709e
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-default-escaped-ext.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/default-escaped-ext.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: default is a valid identifier name, using extended escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.def\u{61}ult = 42;
+
+assert.sameValue(obj['default'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-default-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-default-escaped.js
new file mode 100644
index 0000000000..9dab69ac5e
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-default-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/default-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: default is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.def\u0061ult = 42;
+
+assert.sameValue(obj['default'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-default.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-default.js
new file mode 100644
index 0000000000..7048fd5790
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-default.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/default.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: default is a valid identifier name (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.default = 42;
+
+assert.sameValue(obj['default'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-delete-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-delete-escaped.js
new file mode 100644
index 0000000000..3622802786
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-delete-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/delete-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: delete is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.\u0064elete = 42;
+
+assert.sameValue(obj['delete'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-do-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-do-escaped.js
new file mode 100644
index 0000000000..815589e7af
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-do-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/do-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: do is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.\u0064o = 42;
+
+assert.sameValue(obj['do'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-else-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-else-escaped.js
new file mode 100644
index 0000000000..1c59e91b86
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-else-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/else-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: else is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.\u0065lse = 42;
+
+assert.sameValue(obj['else'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-enum-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-enum-escaped.js
new file mode 100644
index 0000000000..b6fac3639e
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-enum-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/enum-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: enum is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.\u0065num = 42;
+
+assert.sameValue(obj['enum'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-export-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-export-escaped.js
new file mode 100644
index 0000000000..2153c92704
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-export-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/export-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: export is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.\u0065xport = 42;
+
+assert.sameValue(obj['export'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-extends-escaped-ext.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-extends-escaped-ext.js
new file mode 100644
index 0000000000..78f93e5c2a
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-extends-escaped-ext.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/extends-escaped-ext.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: extends is a valid identifier name, using extended escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.\u{65}xtends = 42;
+
+assert.sameValue(obj['extends'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-extends-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-extends-escaped.js
new file mode 100644
index 0000000000..dcfa282fd5
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-extends-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/extends-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: extends is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.\u0065xtends = 42;
+
+assert.sameValue(obj['extends'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-extends.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-extends.js
new file mode 100644
index 0000000000..8f7257c85a
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-extends.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/extends.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: extends is a valid identifier name (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.extends = 42;
+
+assert.sameValue(obj['extends'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-finally-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-finally-escaped.js
new file mode 100644
index 0000000000..e5f14173a2
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-finally-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/finally-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: finally is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.\u0066inally = 42;
+
+assert.sameValue(obj['finally'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-for-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-for-escaped.js
new file mode 100644
index 0000000000..7af5f3e21b
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-for-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/for-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: for is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.\u0066or = 42;
+
+assert.sameValue(obj['for'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-function-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-function-escaped.js
new file mode 100644
index 0000000000..8137fe2749
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-function-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/function-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: function is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.\u0066unction = 42;
+
+assert.sameValue(obj['function'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-if-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-if-escaped.js
new file mode 100644
index 0000000000..bd53cfb7ff
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-if-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/if-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: if is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.i\u0066 = 42;
+
+assert.sameValue(obj['if'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-implements-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-implements-escaped.js
new file mode 100644
index 0000000000..e60fb6b590
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-implements-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/implements-escaped.case
+// - src/identifier-names/future-reserved-words/member-expr.template
+/*---
+description: implements is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.\u0069mplements = 42;
+
+assert.sameValue(obj['implements'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-import-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-import-escaped.js
new file mode 100644
index 0000000000..2d54d1bed8
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-import-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/import-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: import is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.\u0069mport = 42;
+
+assert.sameValue(obj['import'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-in-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-in-escaped.js
new file mode 100644
index 0000000000..4eaf396217
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-in-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/in-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: in is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.\u0069n = 42;
+
+assert.sameValue(obj['in'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-instanceof-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-instanceof-escaped.js
new file mode 100644
index 0000000000..85e755dd13
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-instanceof-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/instanceof-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: instanceof is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.\u0069nstanceof = 42;
+
+assert.sameValue(obj['instanceof'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-interface-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-interface-escaped.js
new file mode 100644
index 0000000000..fc20e81cc2
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-interface-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/interface-escaped.case
+// - src/identifier-names/future-reserved-words/member-expr.template
+/*---
+description: interface is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.interf\u0061ce = 42;
+
+assert.sameValue(obj['interface'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-let-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-let-escaped.js
new file mode 100644
index 0000000000..bba82ac17b
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-let-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/let-escaped.case
+// - src/identifier-names/future-reserved-words/member-expr.template
+/*---
+description: let is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.l\u0065t = 42;
+
+assert.sameValue(obj['let'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-new-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-new-escaped.js
new file mode 100644
index 0000000000..c32fba4fbd
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-new-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/new-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: new is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.n\u0065w = 42;
+
+assert.sameValue(obj['new'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-package-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-package-escaped.js
new file mode 100644
index 0000000000..d0982c50dc
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-package-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/package-escaped.case
+// - src/identifier-names/future-reserved-words/member-expr.template
+/*---
+description: package is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.p\u0061ckage = 42;
+
+assert.sameValue(obj['package'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-private-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-private-escaped.js
new file mode 100644
index 0000000000..bd26da549e
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-private-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/private-escaped.case
+// - src/identifier-names/future-reserved-words/member-expr.template
+/*---
+description: private is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.privat\u0065 = 42;
+
+assert.sameValue(obj['private'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-protected-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-protected-escaped.js
new file mode 100644
index 0000000000..dcd520d905
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-protected-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/protected-escaped.case
+// - src/identifier-names/future-reserved-words/member-expr.template
+/*---
+description: protected is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.prot\u0065cted = 42;
+
+assert.sameValue(obj['protected'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-public-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-public-escaped.js
new file mode 100644
index 0000000000..d47f59da0b
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-public-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/public-escaped.case
+// - src/identifier-names/future-reserved-words/member-expr.template
+/*---
+description: public is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.pu\u0062lic = 42;
+
+assert.sameValue(obj['public'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-return-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-return-escaped.js
new file mode 100644
index 0000000000..71328e0bdb
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-return-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/return-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: return is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.r\u0065turn = 42;
+
+assert.sameValue(obj['return'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-static-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-static-escaped.js
new file mode 100644
index 0000000000..df9d1db9aa
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-static-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/static-escaped.case
+// - src/identifier-names/future-reserved-words/member-expr.template
+/*---
+description: static is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.st\u0061tic = 42;
+
+assert.sameValue(obj['static'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-super-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-super-escaped.js
new file mode 100644
index 0000000000..4e9b53a4ae
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-super-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/super-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: super is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.sup\u0065r = 42;
+
+assert.sameValue(obj['super'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-switch-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-switch-escaped.js
new file mode 100644
index 0000000000..8d2d40dd66
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-switch-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/switch-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: switch is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.sw\u0069tch = 42;
+
+assert.sameValue(obj['switch'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-this-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-this-escaped.js
new file mode 100644
index 0000000000..a8f2f1e9c4
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-this-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/this-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: this is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.th\u0069s = 42;
+
+assert.sameValue(obj['this'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-throw-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-throw-escaped.js
new file mode 100644
index 0000000000..dcbac3674f
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-throw-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/throw-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: throw is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.t\u0068row = 42;
+
+assert.sameValue(obj['throw'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-try-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-try-escaped.js
new file mode 100644
index 0000000000..2ccf2188d3
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-try-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/try-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: try is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.tr\u0079 = 42;
+
+assert.sameValue(obj['try'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-typeof-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-typeof-escaped.js
new file mode 100644
index 0000000000..839ece3b05
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-typeof-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/typeof-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: typeof is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.typ\u0065of = 42;
+
+assert.sameValue(obj['typeof'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-var-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-var-escaped.js
new file mode 100644
index 0000000000..a260f72a93
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-var-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/var-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: var is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.v\u0061r = 42;
+
+assert.sameValue(obj['var'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-void-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-void-escaped.js
new file mode 100644
index 0000000000..257bf58a70
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-void-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/void-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: void is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.voi\u0064 = 42;
+
+assert.sameValue(obj['void'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-while-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-while-escaped.js
new file mode 100644
index 0000000000..47b8163ac1
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-while-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/while-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: while is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.whil\u0065 = 42;
+
+assert.sameValue(obj['while'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-with-escaped.js b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-with-escaped.js
new file mode 100644
index 0000000000..811c59766f
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/member-expr-ident-name-with-escaped.js
@@ -0,0 +1,24 @@
+// This file was procedurally generated from the following sources:
+// - src/identifier-names/with-escaped.case
+// - src/identifier-names/default/member-expr.template
+/*---
+description: with is a valid identifier name, using escape (MemberExpression IdentifierName)
+esid: prod-PropertyDefinition
+flags: [generated]
+info: |
+ MemberExpression:
+ ...
+ MemberExpression . IdentifierName
+
+ Reserved Words
+
+ A reserved word is an IdentifierName that cannot be used as an Identifier.
+---*/
+
+var obj = {};
+
+obj.w\u0069th = 42;
+
+assert.sameValue(obj['with'], 42, 'property exists');
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/non-simple-target.js b/js/src/tests/test262/language/expressions/assignment/non-simple-target.js
new file mode 100644
index 0000000000..a06f9fb7a4
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/non-simple-target.js
@@ -0,0 +1,19 @@
+// |reftest| error:SyntaxError
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-assignment-operators-static-semantics-early-errors
+info: |
+ It is an early Syntax Error if LeftHandSideExpression is neither an
+ ObjectLiteral nor an ArrayLiteral and AssignmentTargetType of
+ LeftHandSideExpression is invalid or strict.
+description: Assignment with non-simple target
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+1 = 1;
diff --git a/js/src/tests/test262/language/expressions/assignment/shell.js b/js/src/tests/test262/language/expressions/assignment/shell.js
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/shell.js
diff --git a/js/src/tests/test262/language/expressions/assignment/target-assignment-inside-function.js b/js/src/tests/test262/language/expressions/assignment/target-assignment-inside-function.js
new file mode 100644
index 0000000000..4ba6dee38c
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/target-assignment-inside-function.js
@@ -0,0 +1,24 @@
+// |reftest| error:SyntaxError
+// Copyright (C) 2020 Rick Waldron. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-assignment-operators-static-semantics-early-errors
+description: Applied to assignment
+info: |
+ AssignmentExpression : LeftHandSideExpression = AssignmentExpression
+
+ - It is an early Syntax Error if LeftHandSideExpression is neither an
+ ObjectLiteral nor an ArrayLiteral and AssignmentTargetType of
+ LeftHandSideExpression is invalid or strict.
+
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+function f() {
+ var a, b = 2;
+ (a = b) = 1;
+}
diff --git a/js/src/tests/test262/language/expressions/assignment/target-assignment.js b/js/src/tests/test262/language/expressions/assignment/target-assignment.js
new file mode 100644
index 0000000000..63e62d461f
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/target-assignment.js
@@ -0,0 +1,22 @@
+// |reftest| error:SyntaxError
+// Copyright (C) 2020 Rick Waldron. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-assignment-operators-static-semantics-early-errors
+description: Applied to assignment
+info: |
+ AssignmentExpression : LeftHandSideExpression = AssignmentExpression
+
+ - It is an early Syntax Error if LeftHandSideExpression is neither an
+ ObjectLiteral nor an ArrayLiteral and AssignmentTargetType of
+ LeftHandSideExpression is invalid or strict.
+
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+var a, b = 2;
+(a = b) = 1;
diff --git a/js/src/tests/test262/language/expressions/assignment/target-boolean.js b/js/src/tests/test262/language/expressions/assignment/target-boolean.js
new file mode 100644
index 0000000000..af28d1fd76
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/target-boolean.js
@@ -0,0 +1,23 @@
+// |reftest| error:SyntaxError
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-assignment-operators-static-semantics-early-errors
+description: >
+ simple assignment throws SyntaxError if LeftHandSide is not a
+ reference (boolean)
+info: |
+ AssignmentExpression : LeftHandSideExpression = AssignmentExpression
+
+ It is an early Syntax Error if LeftHandSideExpression is neither an
+ ObjectLiteral nor an ArrayLiteral and AssignmentTargetType of
+ LeftHandSideExpression is invalid or strict.
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+true = 42;
diff --git a/js/src/tests/test262/language/expressions/assignment/target-cover-id.js b/js/src/tests/test262/language/expressions/assignment/target-cover-id.js
new file mode 100644
index 0000000000..c99d79e821
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/target-cover-id.js
@@ -0,0 +1,30 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-assignment-operators-static-semantics-early-errors
+es6id: 12.14.1
+es5id: 11.1.6_A3_T5
+description: Applied to a "covered" IdentifierReference
+info: |
+ AssignmentExpression : LeftHandSideExpression = AssignmentExpression
+
+ - It is an early Reference Error if LeftHandSideExpression is neither an
+ ObjectLiteral nor an ArrayLiteral and IsValidSimpleAssignmentTarget of
+ LeftHandSideExpression is false.
+
+ Static Semantics: IsValidSimpleAssignmentTarget
+
+ IdentifierReference : Identifier
+
+ 1. If this IdentifierReference is contained in strict mode code and
+ StringValue of Identifier is "eval" or "arguments", return false.
+ 2. Return true.
+---*/
+
+var x;
+
+(x) = 1;
+
+assert.sameValue(x, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/target-cover-newtarget.js b/js/src/tests/test262/language/expressions/assignment/target-cover-newtarget.js
new file mode 100644
index 0000000000..536ab71888
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/target-cover-newtarget.js
@@ -0,0 +1,31 @@
+// |reftest| error:SyntaxError
+// Copyright (C) 2016 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-assignment-operators-static-semantics-early-errors
+description: Applied to a "covered" new.target
+info: |
+ AssignmentExpression : LeftHandSideExpression = AssignmentExpression
+
+ - It is an early Syntax Error if LeftHandSideExpression is neither an
+ ObjectLiteral nor an ArrayLiteral and AssignmentTargetType of
+ LeftHandSideExpression is invalid or strict.
+
+ 12.3.1.6 Static Semantics: AssignmentTargetType
+
+ NewTarget:
+
+ new.target
+
+ 1. Return invalid.
+negative:
+ phase: parse
+ type: SyntaxError
+features: [new.target]
+---*/
+
+$DONOTEVALUATE();
+
+function f() {
+ (new.target) = 1;
+}
diff --git a/js/src/tests/test262/language/expressions/assignment/target-cover-yieldexpr.js b/js/src/tests/test262/language/expressions/assignment/target-cover-yieldexpr.js
new file mode 100644
index 0000000000..9cd34e279f
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/target-cover-yieldexpr.js
@@ -0,0 +1,34 @@
+// |reftest| error:SyntaxError
+// Copyright (C) 2016 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-assignment-operators-static-semantics-early-errors
+description: Applied to a "covered" YieldExpression
+info: |
+ AssignmentExpression : LeftHandSideExpression = AssignmentExpression
+
+ - It is an early Syntax Error if LeftHandSideExpression is neither an
+ ObjectLiteral nor an ArrayLiteral and AssignmentTargetType of
+ LeftHandSideExpression is invalid or strict.
+
+ 12.15.3 Static Semantics: IsValidSimpleAssignmentTarget
+
+ AssignmentExpression:
+ YieldExpression
+ ArrowFunction
+ AsyncArrowFunction
+ LeftHandSideExpression = AssignmentExpression
+ LeftHandSideExpression AssignmentOperator AssignmentExpression
+
+ 1. Return invalid.
+features: [generators]
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+function* g() {
+ (yield) = 1;
+}
diff --git a/js/src/tests/test262/language/expressions/assignment/target-member-computed-reference-null.js b/js/src/tests/test262/language/expressions/assignment/target-member-computed-reference-null.js
new file mode 100644
index 0000000000..d0a87d3cca
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/target-member-computed-reference-null.js
@@ -0,0 +1,52 @@
+// Copyright (C) 2015 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-assignment-operators
+description: Assignment Operator evaluates the value prior validating a MemberExpression's reference (null)
+info: |
+ # 13.15.2 Runtime Semantics: Evaluation
+ AssignmentExpression : LeftHandSideExpression = AssignmentExpression
+
+ 1. If LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral,
+ then
+ a. Let lref be the result of evaluating LeftHandSideExpression.
+ [...]
+ e. Perform ? PutValue(lref, rval).
+
+ # 6.2.4.5 PutValue ( V, W )
+
+ [...]
+ 5. If IsPropertyReference(V) is true, then
+ a. Let baseObj be ? ToObject(V.[[Base]]).
+---*/
+
+function DummyError() { }
+
+assert.throws(DummyError, function() {
+ var base = null;
+ var prop = function() {
+ throw new DummyError();
+ };
+ var expr = function() {
+ throw new Test262Error("right-hand side expression evaluated");
+ };
+
+ base[prop()] = expr();
+});
+
+assert.throws(DummyError, function() {
+ var base = null;
+ var prop = {
+ toString: function() {
+ throw new Test262Error("property key evaluated");
+ }
+ };
+ var expr = function() {
+ throw new DummyError();
+ };
+
+ base[prop] = expr();
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/target-member-computed-reference-undefined.js b/js/src/tests/test262/language/expressions/assignment/target-member-computed-reference-undefined.js
new file mode 100644
index 0000000000..d9b488a1af
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/target-member-computed-reference-undefined.js
@@ -0,0 +1,52 @@
+// Copyright (C) 2015 André Bargull. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-assignment-operators
+description: Assignment Operator evaluates the value prior validating a MemberExpression's reference (undefined)
+info: |
+ # 13.15.2 Runtime Semantics: Evaluation
+ AssignmentExpression : LeftHandSideExpression = AssignmentExpression
+
+ 1. If LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral,
+ then
+ a. Let lref be the result of evaluating LeftHandSideExpression.
+ [...]
+ e. Perform ? PutValue(lref, rval).
+
+ # 6.2.4.5 PutValue ( V, W )
+
+ [...]
+ 5. If IsPropertyReference(V) is true, then
+ a. Let baseObj be ? ToObject(V.[[Base]]).
+---*/
+
+function DummyError() { }
+
+assert.throws(DummyError, function() {
+ var base = undefined;
+ var prop = function() {
+ throw new DummyError();
+ };
+ var expr = function() {
+ throw new Test262Error("right-hand side expression evaluated");
+ };
+
+ base[prop()] = expr();
+});
+
+assert.throws(DummyError, function() {
+ var base = undefined;
+ var prop = {
+ toString: function() {
+ throw new Test262Error("property key evaluated");
+ }
+ };
+ var expr = function() {
+ throw new DummyError();
+ };
+
+ base[prop] = expr();
+});
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/target-member-identifier-reference-null.js b/js/src/tests/test262/language/expressions/assignment/target-member-identifier-reference-null.js
new file mode 100644
index 0000000000..80b6c1c4fb
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/target-member-identifier-reference-null.js
@@ -0,0 +1,33 @@
+// Copyright (C) 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-assignment-operators
+description: Assignment Operator evaluates the value prior validating a MemberExpression's reference (null)
+info: |
+ # 13.15.2 Runtime Semantics: Evaluation
+ AssignmentExpression : LeftHandSideExpression = AssignmentExpression
+
+ 1. If LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral,
+ then
+ a. Let lref be the result of evaluating LeftHandSideExpression.
+ [...]
+ e. Perform ? PutValue(lref, rval).
+
+ # 6.2.4.5 PutValue ( V, W )
+
+ [...]
+ 5. If IsPropertyReference(V) is true, then
+ a. Let baseObj be ? ToObject(V.[[Base]]).
+---*/
+
+var count = 0;
+var base = null;
+
+assert.throws(TypeError, function() {
+ base.prop = count += 1;
+});
+
+assert.sameValue(count, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/target-member-identifier-reference-undefined.js b/js/src/tests/test262/language/expressions/assignment/target-member-identifier-reference-undefined.js
new file mode 100644
index 0000000000..35d4d8640e
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/target-member-identifier-reference-undefined.js
@@ -0,0 +1,33 @@
+// Copyright (C) 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-assignment-operators
+description: Assignment Operator evaluates the value prior validating a MemberExpression's reference (undefined)
+info: |
+ # 13.15.2 Runtime Semantics: Evaluation
+ AssignmentExpression : LeftHandSideExpression = AssignmentExpression
+
+ 1. If LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral,
+ then
+ a. Let lref be the result of evaluating LeftHandSideExpression.
+ [...]
+ e. Perform ? PutValue(lref, rval).
+
+ # 6.2.4.5 PutValue ( V, W )
+
+ [...]
+ 5. If IsPropertyReference(V) is true, then
+ a. Let baseObj be ? ToObject(V.[[Base]]).
+---*/
+
+var count = 0;
+var base = undefined;
+
+assert.throws(TypeError, function() {
+ base.prop = count += 1;
+});
+
+assert.sameValue(count, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/target-newtarget.js b/js/src/tests/test262/language/expressions/assignment/target-newtarget.js
new file mode 100644
index 0000000000..4e72ebc44d
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/target-newtarget.js
@@ -0,0 +1,31 @@
+// |reftest| error:SyntaxError
+// Copyright (C) 2016 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+esid: sec-assignment-operators-static-semantics-early-errors
+description: Applied to new.target
+info: |
+ AssignmentExpression : LeftHandSideExpression = AssignmentExpression
+
+ - It is an early Syntax Error if LeftHandSideExpression is neither an
+ ObjectLiteral nor an ArrayLiteral and AssignmentTargetType of
+ LeftHandSideExpression is invalid or strict.
+
+ 12.3.1.6 Static Semantics: AssignmentTargetType
+
+ NewTarget:
+
+ new.target
+
+ 1. Return invalid.
+negative:
+ phase: parse
+ type: SyntaxError
+features: [new.target]
+---*/
+
+$DONOTEVALUATE();
+
+function f() {
+ new.target = 1;
+}
diff --git a/js/src/tests/test262/language/expressions/assignment/target-null.js b/js/src/tests/test262/language/expressions/assignment/target-null.js
new file mode 100644
index 0000000000..e7d0cb4ecc
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/target-null.js
@@ -0,0 +1,23 @@
+// |reftest| error:SyntaxError
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-assignment-operators-static-semantics-early-errors
+description: >
+ simple assignment throws SyntaxError if LeftHandSide is not a
+ reference (null)
+info: |
+ AssignmentExpression : LeftHandSideExpression = AssignmentExpression
+
+ It is an early Syntax Error if LeftHandSideExpression is neither an
+ ObjectLiteral nor an ArrayLiteral and AssignmentTargetType of
+ LeftHandSideExpression is invalid or strict.
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+null = 42;
diff --git a/js/src/tests/test262/language/expressions/assignment/target-number.js b/js/src/tests/test262/language/expressions/assignment/target-number.js
new file mode 100644
index 0000000000..572019de9f
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/target-number.js
@@ -0,0 +1,23 @@
+// |reftest| error:SyntaxError
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-assignment-operators-static-semantics-early-errors
+description: >
+ simple assignment throws SyntaxError if LeftHandSide is not a
+ reference (number)
+info: |
+ AssignmentExpression : LeftHandSideExpression = AssignmentExpression
+
+ It is an early Syntax Error if LeftHandSideExpression is neither an
+ ObjectLiteral nor an ArrayLiteral and AssignmentTargetType of
+ LeftHandSideExpression is invalid or strict.
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+42 = 42;
diff --git a/js/src/tests/test262/language/expressions/assignment/target-string.js b/js/src/tests/test262/language/expressions/assignment/target-string.js
new file mode 100644
index 0000000000..891933e326
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/target-string.js
@@ -0,0 +1,23 @@
+// |reftest| error:SyntaxError
+// Copyright (c) 2012 Ecma International. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-assignment-operators-static-semantics-early-errors
+description: >
+ simple assignment throws SyntaxError if LeftHandSide is not a
+ reference (string)
+info: |
+ AssignmentExpression : LeftHandSideExpression = AssignmentExpression
+
+ It is an early Syntax Error if LeftHandSideExpression is neither an
+ ObjectLiteral nor an ArrayLiteral and AssignmentTargetType of
+ LeftHandSideExpression is invalid or strict.
+negative:
+ phase: parse
+ type: SyntaxError
+---*/
+
+$DONOTEVALUATE();
+
+'x' = 42;
diff --git a/js/src/tests/test262/language/expressions/assignment/target-super-computed-reference-null.js b/js/src/tests/test262/language/expressions/assignment/target-super-computed-reference-null.js
new file mode 100644
index 0000000000..a7903058aa
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/target-super-computed-reference-null.js
@@ -0,0 +1,39 @@
+// Copyright (C) 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-assignment-operators
+description: Assignment Operator evaluates the value prior validating a SuperProperty's reference (null)
+info: |
+ # 13.15.2 Runtime Semantics: Evaluation
+ AssignmentExpression : LeftHandSideExpression = AssignmentExpression
+
+ 1. If LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral,
+ then
+ a. Let lref be the result of evaluating LeftHandSideExpression.
+ [...]
+ e. Perform ? PutValue(lref, rval).
+
+ # 6.2.4.5 PutValue ( V, W )
+
+ [...]
+ 5. If IsPropertyReference(V) is true, then
+ a. Let baseObj be ? ToObject(V.[[Base]]).
+---*/
+
+var count = 0;
+class C {
+ static m() {
+ super[0] = count += 1;
+ }
+}
+
+Object.setPrototypeOf(C, null);
+
+assert.throws(TypeError, function() {
+ C.m();
+});
+
+assert.sameValue(count, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/target-super-identifier-reference-null.js b/js/src/tests/test262/language/expressions/assignment/target-super-identifier-reference-null.js
new file mode 100644
index 0000000000..18428d95be
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/target-super-identifier-reference-null.js
@@ -0,0 +1,39 @@
+// Copyright (C) 2021 the V8 project authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+
+/*---
+esid: sec-assignment-operators
+description: Assignment Operator evaluates the value prior validating a SuperProperty's reference (null)
+info: |
+ # 13.15.2 Runtime Semantics: Evaluation
+ AssignmentExpression : LeftHandSideExpression = AssignmentExpression
+
+ 1. If LeftHandSideExpression is neither an ObjectLiteral nor an ArrayLiteral,
+ then
+ a. Let lref be the result of evaluating LeftHandSideExpression.
+ [...]
+ e. Perform ? PutValue(lref, rval).
+
+ # 6.2.4.5 PutValue ( V, W )
+
+ [...]
+ 5. If IsPropertyReference(V) is true, then
+ a. Let baseObj be ? ToObject(V.[[Base]]).
+---*/
+
+var count = 0;
+class C {
+ static m() {
+ super.x = count += 1;
+ }
+}
+
+Object.setPrototypeOf(C, null);
+
+assert.throws(TypeError, function() {
+ C.m();
+});
+
+assert.sameValue(count, 1);
+
+reportCompare(0, 0);
diff --git a/js/src/tests/test262/language/expressions/assignment/white-space.js b/js/src/tests/test262/language/expressions/assignment/white-space.js
new file mode 100644
index 0000000000..35cdb23e7d
--- /dev/null
+++ b/js/src/tests/test262/language/expressions/assignment/white-space.js
@@ -0,0 +1,61 @@
+// Copyright 2009 the Sputnik authors. All rights reserved.
+// This code is governed by the BSD license found in the LICENSE file.
+/*---
+description: >
+ White Space between LeftHandSideExpression and "=" or between "=" and
+ AssignmentExpression is allowed
+es5id: 11.13.1_A1
+---*/
+
+var x;
+
+x = 'U+0009';
+if (x !== 'U+0009') {
+ throw new Test262Error('#1: (x\\u0009=\\u0009true) === true');
+}
+
+x = 'U+000B';
+if (x !== 'U+000B') {
+ throw new Test262Error('#2: (x\\u000B=\\u000Btrue) === true');
+}
+
+x = 'U+000C';
+if (x !== 'U+000C') {
+ throw new Test262Error('#3: (x\\u000C=\\u000Ctrue) === true');
+}
+
+x = 'U+0020';
+if (x !== 'U+0020') {
+ throw new Test262Error('#4: (x\\u0020=\\u0020true) === true');
+}
+
+x = 'U+00A0';
+if (x !== 'U+00A0') {
+ throw new Test262Error('#5: (x\\u00A0=\\u00A0true) === true');
+}
+
+x
+=
+'U+000D';
+if (x !== 'U+000D') {
+ throw new Test262Error('#7: (x\\u000D=\\u000Dtrue) === true');
+}
+
+x
=
'U+2028';
+if (x !== 'U+2028') {
+ throw new Test262Error('#8: (x\\u2028=\\u2028true) === true');
+}
+
+x
=
'U+2029';
+if (x !== 'U+2029') {
+ throw new Test262Error('#9: (x\\u2029=\\u2029true) === true');
+}
+
+x  
+

=  
+

'U+0009U+000BU+000CU+0020U+00A0U+000DU+2028U+2029';
+if (x !== 'U+0009U+000BU+000CU+0020U+00A0U+000DU+2028U+2029') {
+ throw new Test262Error('#10: (x\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000D\\u2028\\u2029=\\u0009\\u000B\\u000C\\u0020\\u00A0\\u000D\\u2028\\u2029true) === true');
+}
+
+reportCompare(0, 0);