Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merged by Bors] - Allow BindingPattern in function parameters #1666

Closed
wants to merge 21 commits into from

Conversation

am-a-man
Copy link
Contributor

This Pull Request fixes/closes #1601

It changes the following:

  • implements FormalParameter using syntax::ast::node::declaration::Declaration as
pub struct FormalParameter {

    declaration: Declaration,
    is_rest_param: bool,

}
  • changes fn test_formatting(source: &'static str) in ast::node to setup tests based on the new struct definition
  • changes in various tests using FormalParameter
  • changes in files using FormalParameter

What it does not change:

  • if the function uses FormalParameter but does not seem affected due to the changed definition it is not altered while keeping all the required features i.e. if it wasn't affected but ended up giving undesired (not error) behaviour it has been changed

@jedel1043 jedel1043 added ast Issue surrounding the abstract syntax tree enhancement New feature or request Hacktoberfest Hacktoberfest 2021 - https://hacktoberfest.digitalocean.com labels Oct 13, 2021
@jedel1043 jedel1043 added this to the v0.14.0 milestone Oct 13, 2021
@jedel1043 jedel1043 changed the title Allow BindingPattern in function parameters #1601 Allow BindingPattern in function parameters Oct 13, 2021
@jedel1043
Copy link
Member

Test262 conformance changes:

Test result main count PR count difference
Total 86,438 86,438 0
Passed 37,764 38,117 +353
Ignored 19,022 19,022 0
Failed 29,652 29,299 -353
Panics 0 0 0
Conformance 43.69% 44.10% +0.41%
Fixed tests (409):
test/language/destructuring/binding/initialization-returns-normal-completion-for-empty-objects.js [strict mode] (previously Failed)
test/language/destructuring/binding/initialization-returns-normal-completion-for-empty-objects.js (previously Failed)
test/language/destructuring/binding/syntax/array-elements-with-initializer.js [strict mode] (previously Failed)
test/language/destructuring/binding/syntax/array-elements-with-initializer.js (previously Failed)
test/language/destructuring/binding/syntax/array-pattern-with-no-elements.js [strict mode] (previously Failed)
test/language/destructuring/binding/syntax/array-pattern-with-no-elements.js (previously Failed)
test/language/destructuring/binding/syntax/object-pattern-with-no-property-list.js [strict mode] (previously Failed)
test/language/destructuring/binding/syntax/object-pattern-with-no-property-list.js (previously Failed)
test/language/destructuring/binding/syntax/array-pattern-with-elisions.js [strict mode] (previously Failed)
test/language/destructuring/binding/syntax/array-pattern-with-elisions.js (previously Failed)
test/language/destructuring/binding/syntax/array-elements-with-object-patterns.js [strict mode] (previously Failed)
test/language/destructuring/binding/syntax/array-elements-with-object-patterns.js (previously Failed)
test/language/destructuring/binding/syntax/property-list-followed-by-a-single-comma.js [strict mode] (previously Failed)
test/language/destructuring/binding/syntax/property-list-followed-by-a-single-comma.js (previously Failed)
test/language/destructuring/binding/syntax/property-list-bindings-elements.js [strict mode] (previously Failed)
test/language/destructuring/binding/syntax/property-list-bindings-elements.js (previously Failed)
test/language/destructuring/binding/syntax/recursive-array-and-object-patterns.js [strict mode] (previously Failed)
test/language/destructuring/binding/syntax/recursive-array-and-object-patterns.js (previously Failed)
test/language/destructuring/binding/syntax/array-rest-elements.js [strict mode] (previously Failed)
test/language/destructuring/binding/syntax/array-rest-elements.js (previously Failed)
test/language/destructuring/binding/syntax/array-elements-without-initializer.js [strict mode] (previously Failed)
test/language/destructuring/binding/syntax/array-elements-without-initializer.js (previously Failed)
test/language/destructuring/binding/syntax/property-list-single-name-bindings.js [strict mode] (previously Failed)
test/language/destructuring/binding/syntax/property-list-single-name-bindings.js (previously Failed)
test/language/destructuring/binding/syntax/property-list-with-property-list.js [strict mode] (previously Failed)
test/language/destructuring/binding/syntax/property-list-with-property-list.js (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-empty.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-empty.js (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-obj-id.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-obj-id.js (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-rest-getter.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-rest-getter.js (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-prop-id-init.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-prop-id-init.js (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-id-iter-val.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-id-iter-val.js (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-prop-id.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-prop-id.js (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-obj-prop-id-init.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-obj-prop-id-init.js (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-ary-empty-iter.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-ary-empty-iter.js (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-id-init-undef.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-id-init-undef.js (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-id-iter-complete.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-id-iter-complete.js (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-prop-ary.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-prop-ary.js (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-prop-obj-init.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-prop-obj-init.js (previously Failed)
test/language/expressions/function/dstr/ary-name-iter-val.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-name-iter-val.js (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-prop-ary-init.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-prop-ary-init.js (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-rest-ary-rest.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-rest-ary-rest.js (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-ary-rest-init.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-ary-rest-init.js (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-prop-id-init.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-prop-id-init.js (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-prop-obj.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-prop-obj.js (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-rest-getter.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-rest-getter.js (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-id-trailing-comma.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-id-trailing-comma.js (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-ary-elision-iter.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-ary-elision-iter.js (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-rest-obj-id.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-rest-obj-id.js (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-empty.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-empty.js (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-ary-elem-iter.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-ary-elem-iter.js (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-prop-ary.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-prop-ary.js (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-ary-rest-iter.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-ary-rest-iter.js (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-id-trailing-comma.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-id-trailing-comma.js (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-prop-id-trailing-comma.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-prop-id-trailing-comma.js (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-prop-id-trailing-comma.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-prop-id-trailing-comma.js (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-prop-ary-trailing-comma.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-prop-ary-trailing-comma.js (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-prop-ary-init.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-prop-ary-init.js (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-id-init-hole.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-id-init-hole.js (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-obj-prop-id.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-obj-prop-id.js (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-prop-id-init-skipped.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-prop-id-init-skipped.js (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-id-iter-done.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-id-iter-done.js (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-obj-id-init.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-obj-id-init.js (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-prop-obj-init.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-prop-obj-init.js (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-id-init-skipped.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-id-init-skipped.js (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-rest-id-elision.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-rest-id-elision.js (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-prop-id.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-prop-id.js (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-ary-elem-init.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-ary-elem-init.js (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-rest-id-direct.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-rest-id-direct.js (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-prop-obj.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/obj-ptrn-prop-obj.js (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-rest-id-exhausted.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-rest-id-exhausted.js (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-rest-id.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-rest-id.js (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-rest-ary-elem.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-rest-ary-elem.js (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-id-init-skipped.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-id-init-skipped.js (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-id-init-skipped.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-id-init-skipped.js (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-prop-id-init-skipped.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-prop-id-init-skipped.js (previously Failed)
test/language/expressions/function/dstr/ary-init-iter-no-close.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-init-iter-no-close.js (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-id-init-exhausted.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/ary-ptrn-elem-id-init-exhausted.js (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-prop-ary-trailing-comma.js [strict mode] (previously Failed)
test/language/expressions/function/dstr/dflt-obj-ptrn-prop-ary-trailing-comma.js (previously Failed)
test/language/expressions/generators/dstr/dflt-obj-init-null.js [strict mode] (previously Failed)
test/language/expressions/generators/dstr/dflt-obj-init-null.js (previously Failed)
test/language/expressions/generators/dstr/obj-ptrn-prop-obj-value-null.js [strict mode] (previously Failed)
test/language/expressions/generators/dstr/obj-ptrn-prop-obj-value-null.js (previously Failed)
test/language/expressions/generators/dstr/dflt-obj-ptrn-prop-ary-value-null.js [strict mode] (previously Failed)
test/language/expressions/generators/dstr/dflt-obj-ptrn-prop-ary-value-null.js (previously Failed)
test/language/expressions/generators/dstr/obj-ptrn-prop-obj-value-undef.js [strict mode] (previously Failed)
test/language/expressions/generators/dstr/obj-ptrn-prop-obj-value-undef.js (previously Failed)
test/language/expressions/generators/dstr/obj-init-undefined.js [strict mode] (previously Failed)
test/language/expressions/generators/dstr/obj-init-undefined.js (previously Failed)
test/language/expressions/generators/dstr/ary-ptrn-elem-obj-val-undef.js [strict mode] (previously Failed)
test/language/expressions/generators/dstr/ary-ptrn-elem-obj-val-undef.js (previously Failed)
test/language/expressions/generators/dstr/obj-ptrn-prop-ary-value-null.js [strict mode] (previously Failed)
test/language/expressions/generators/dstr/obj-ptrn-prop-ary-value-null.js (previously Failed)
test/language/expressions/generators/dstr/obj-init-null.js [strict mode] (previously Failed)
test/language/expressions/generators/dstr/obj-init-null.js (previously Failed)
test/language/expressions/generators/dstr/ary-ptrn-elem-obj-val-null.js [strict mode] (previously Failed)
test/language/expressions/generators/dstr/ary-ptrn-elem-obj-val-null.js (previously Failed)
test/language/expressions/generators/dstr/dflt-obj-init-undefined.js [strict mode] (previously Failed)
test/language/expressions/generators/dstr/dflt-obj-init-undefined.js (previously Failed)
test/language/expressions/generators/dstr/ary-ptrn-elem-ary-val-null.js [strict mode] (previously Failed)
test/language/expressions/generators/dstr/ary-ptrn-elem-ary-val-null.js (previously Failed)
test/language/expressions/generators/dstr/dflt-obj-ptrn-prop-obj-value-null.js [strict mode] (previously Failed)
test/language/expressions/generators/dstr/dflt-obj-ptrn-prop-obj-value-null.js (previously Failed)
test/language/expressions/generators/dstr/dflt-obj-ptrn-prop-obj-value-undef.js [strict mode] (previously Failed)
test/language/expressions/generators/dstr/dflt-obj-ptrn-prop-obj-value-undef.js (previously Failed)
test/language/expressions/generators/dstr/ary-init-iter-get-err-array-prototype.js [strict mode] (previously Failed)
test/language/expressions/generators/dstr/ary-init-iter-get-err-array-prototype.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-name-iter-val.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-name-iter-val.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-id-init-hole.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-id-init-hole.js (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-prop-obj-init.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-prop-obj-init.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-obj-id-init.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-obj-id-init.js (previously Failed)
test/language/expressions/object/dstr/gen-meth-ary-init-iter-get-err-array-prototype.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/gen-meth-ary-init-iter-get-err-array-prototype.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-ary-elem-iter.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-ary-elem-iter.js (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-prop-ary-init.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-prop-ary-init.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-ary-rest-iter.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-ary-rest-iter.js (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-id-trailing-comma.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-id-trailing-comma.js (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-prop-ary-trailing-comma.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-prop-ary-trailing-comma.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-rest-ary-rest.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-rest-ary-rest.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-rest-obj-id.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-rest-obj-id.js (previously Failed)
test/language/expressions/object/dstr/gen-meth-obj-init-undefined.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/gen-meth-obj-init-undefined.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-id-init-undef.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-id-init-undef.js (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-id-init-skipped.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-id-init-skipped.js (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-prop-ary.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-prop-ary.js (previously Failed)
test/language/expressions/object/dstr/gen-meth-ary-ptrn-elem-obj-val-undef.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/gen-meth-ary-ptrn-elem-obj-val-undef.js (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-prop-ary.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-prop-ary.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-ary-rest-init.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-ary-rest-init.js (previously Failed)
test/language/expressions/object/dstr/gen-meth-ary-ptrn-elem-obj-val-null.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/gen-meth-ary-ptrn-elem-obj-val-null.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-id-iter-complete.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-id-iter-complete.js (previously Failed)
test/language/expressions/object/dstr/gen-meth-dflt-obj-ptrn-prop-ary-value-null.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/gen-meth-dflt-obj-ptrn-prop-ary-value-null.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-id-init-skipped.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-id-init-skipped.js (previously Failed)
test/language/expressions/object/dstr/gen-meth-obj-ptrn-prop-obj-value-null.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/gen-meth-obj-ptrn-prop-obj-value-null.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-obj-prop-id.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-obj-prop-id.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-rest-id-elision.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-rest-id-elision.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-ary-elem-init.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-ary-elem-init.js (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-prop-id-trailing-comma.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-prop-id-trailing-comma.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-rest-id-exhausted.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-rest-id-exhausted.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-rest-id.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-rest-id.js (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-empty.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-empty.js (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-id-trailing-comma.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-id-trailing-comma.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-rest-id-direct.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-rest-id-direct.js (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-prop-obj.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-prop-obj.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-id-iter-val.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-id-iter-val.js (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-prop-id-init.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-prop-id-init.js (previously Failed)
test/language/expressions/object/dstr/gen-meth-ary-ptrn-elem-ary-val-null.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/gen-meth-ary-ptrn-elem-ary-val-null.js (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-prop-id.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-prop-id.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-ary-elision-iter.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-ary-elision-iter.js (previously Failed)
test/language/expressions/object/dstr/gen-meth-obj-ptrn-prop-obj-value-undef.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/gen-meth-obj-ptrn-prop-obj-value-undef.js (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-prop-id.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-prop-id.js (previously Failed)
test/language/expressions/object/dstr/gen-meth-dflt-obj-init-null.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/gen-meth-dflt-obj-init-null.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-obj-prop-id-init.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-obj-prop-id-init.js (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-prop-id-init-skipped.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-prop-id-init-skipped.js (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-empty.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-empty.js (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-prop-ary-init.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-prop-ary-init.js (previously Failed)
test/language/expressions/object/dstr/gen-meth-dflt-obj-ptrn-prop-obj-value-undef.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/gen-meth-dflt-obj-ptrn-prop-obj-value-undef.js (previously Failed)
test/language/expressions/object/dstr/gen-meth-obj-ptrn-prop-ary-value-null.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/gen-meth-obj-ptrn-prop-ary-value-null.js (previously Failed)
test/language/expressions/object/dstr/gen-meth-dflt-obj-init-undefined.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/gen-meth-dflt-obj-init-undefined.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-id-init-exhausted.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-id-init-exhausted.js (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-rest-getter.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-rest-getter.js (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-prop-obj.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-prop-obj.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-obj-id.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-obj-id.js (previously Failed)
test/language/expressions/object/dstr/gen-meth-obj-init-null.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/gen-meth-obj-init-null.js (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-prop-ary-trailing-comma.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-prop-ary-trailing-comma.js (previously Failed)
test/language/expressions/object/dstr/gen-meth-dflt-obj-ptrn-prop-obj-value-null.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/gen-meth-dflt-obj-ptrn-prop-obj-value-null.js (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-id-init-skipped.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-id-init-skipped.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-init-iter-no-close.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-init-iter-no-close.js (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-prop-obj-init.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-prop-obj-init.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-rest-ary-elem.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-rest-ary-elem.js (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-prop-id-init-skipped.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-prop-id-init-skipped.js (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-rest-getter.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-rest-getter.js (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-prop-id-trailing-comma.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-dflt-obj-ptrn-prop-id-trailing-comma.js (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-prop-id-init.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-obj-ptrn-prop-id-init.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-ary-empty-iter.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-ary-empty-iter.js (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-id-iter-done.js [strict mode] (previously Failed)
test/language/expressions/object/dstr/meth-ary-ptrn-elem-id-iter-done.js (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-empty.js [strict mode] (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-empty.js (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-obj-id.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-obj-id.js (previously Failed)
test/language/statements/function/dstr/obj-ptrn-rest-getter.js [strict mode] (previously Failed)
test/language/statements/function/dstr/obj-ptrn-rest-getter.js (previously Failed)
test/language/statements/function/dstr/obj-ptrn-prop-id-init.js [strict mode] (previously Failed)
test/language/statements/function/dstr/obj-ptrn-prop-id-init.js (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-id-iter-val.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-id-iter-val.js (previously Failed)
test/language/statements/function/dstr/obj-ptrn-prop-id.js [strict mode] (previously Failed)
test/language/statements/function/dstr/obj-ptrn-prop-id.js (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-obj-prop-id-init.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-obj-prop-id-init.js (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-ary-empty-iter.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-ary-empty-iter.js (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-id-init-undef.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-id-init-undef.js (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-id-iter-complete.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-id-iter-complete.js (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-prop-ary.js [strict mode] (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-prop-ary.js (previously Failed)
test/language/statements/function/dstr/obj-ptrn-prop-obj-init.js [strict mode] (previously Failed)
test/language/statements/function/dstr/obj-ptrn-prop-obj-init.js (previously Failed)
test/language/statements/function/dstr/ary-name-iter-val.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-name-iter-val.js (previously Failed)
test/language/statements/function/dstr/obj-ptrn-prop-ary-init.js [strict mode] (previously Failed)
test/language/statements/function/dstr/obj-ptrn-prop-ary-init.js (previously Failed)
test/language/statements/function/dstr/ary-ptrn-rest-ary-rest.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-ptrn-rest-ary-rest.js (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-ary-rest-init.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-ary-rest-init.js (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-prop-id-init.js [strict mode] (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-prop-id-init.js (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-prop-obj.js [strict mode] (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-prop-obj.js (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-rest-getter.js [strict mode] (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-rest-getter.js (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-id-trailing-comma.js [strict mode] (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-id-trailing-comma.js (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-ary-elision-iter.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-ary-elision-iter.js (previously Failed)
test/language/statements/function/dstr/ary-ptrn-rest-obj-id.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-ptrn-rest-obj-id.js (previously Failed)
test/language/statements/function/dstr/obj-ptrn-empty.js [strict mode] (previously Failed)
test/language/statements/function/dstr/obj-ptrn-empty.js (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-ary-elem-iter.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-ary-elem-iter.js (previously Failed)
test/language/statements/function/dstr/obj-ptrn-prop-ary.js [strict mode] (previously Failed)
test/language/statements/function/dstr/obj-ptrn-prop-ary.js (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-ary-rest-iter.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-ary-rest-iter.js (previously Failed)
test/language/statements/function/dstr/obj-ptrn-id-trailing-comma.js [strict mode] (previously Failed)
test/language/statements/function/dstr/obj-ptrn-id-trailing-comma.js (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-prop-id-trailing-comma.js [strict mode] (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-prop-id-trailing-comma.js (previously Failed)
test/language/statements/function/dstr/obj-ptrn-prop-id-trailing-comma.js [strict mode] (previously Failed)
test/language/statements/function/dstr/obj-ptrn-prop-id-trailing-comma.js (previously Failed)
test/language/statements/function/dstr/obj-ptrn-prop-ary-trailing-comma.js [strict mode] (previously Failed)
test/language/statements/function/dstr/obj-ptrn-prop-ary-trailing-comma.js (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-prop-ary-init.js [strict mode] (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-prop-ary-init.js (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-id-init-hole.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-id-init-hole.js (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-obj-prop-id.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-obj-prop-id.js (previously Failed)
test/language/statements/function/dstr/obj-ptrn-prop-id-init-skipped.js [strict mode] (previously Failed)
test/language/statements/function/dstr/obj-ptrn-prop-id-init-skipped.js (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-id-iter-done.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-id-iter-done.js (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-obj-id-init.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-obj-id-init.js (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-prop-obj-init.js [strict mode] (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-prop-obj-init.js (previously Failed)
test/language/statements/function/dstr/obj-ptrn-id-init-skipped.js [strict mode] (previously Failed)
test/language/statements/function/dstr/obj-ptrn-id-init-skipped.js (previously Failed)
test/language/statements/function/dstr/ary-ptrn-rest-id-elision.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-ptrn-rest-id-elision.js (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-prop-id.js [strict mode] (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-prop-id.js (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-ary-elem-init.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-ary-elem-init.js (previously Failed)
test/language/statements/function/dstr/ary-ptrn-rest-id-direct.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-ptrn-rest-id-direct.js (previously Failed)
test/language/statements/function/dstr/obj-ptrn-prop-obj.js [strict mode] (previously Failed)
test/language/statements/function/dstr/obj-ptrn-prop-obj.js (previously Failed)
test/language/statements/function/dstr/ary-ptrn-rest-id-exhausted.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-ptrn-rest-id-exhausted.js (previously Failed)
test/language/statements/function/dstr/ary-ptrn-rest-id.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-ptrn-rest-id.js (previously Failed)
test/language/statements/function/dstr/ary-ptrn-rest-ary-elem.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-ptrn-rest-ary-elem.js (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-id-init-skipped.js [strict mode] (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-id-init-skipped.js (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-id-init-skipped.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-id-init-skipped.js (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-prop-id-init-skipped.js [strict mode] (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-prop-id-init-skipped.js (previously Failed)
test/language/statements/function/dstr/ary-init-iter-no-close.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-init-iter-no-close.js (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-id-init-exhausted.js [strict mode] (previously Failed)
test/language/statements/function/dstr/ary-ptrn-elem-id-init-exhausted.js (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-prop-ary-trailing-comma.js [strict mode] (previously Failed)
test/language/statements/function/dstr/dflt-obj-ptrn-prop-ary-trailing-comma.js (previously Failed)
test/language/statements/generators/dstr/obj-ptrn-prop-id-init-unresolvable.js [strict mode] (previously Failed)
test/language/statements/generators/dstr/obj-ptrn-prop-id-init-unresolvable.js (previously Failed)
test/language/statements/generators/dstr/obj-ptrn-id-init-unresolvable.js [strict mode] (previously Failed)
test/language/statements/generators/dstr/obj-ptrn-id-init-unresolvable.js (previously Failed)
test/language/statements/generators/dstr/dflt-obj-ptrn-prop-id-init-unresolvable.js [strict mode] (previously Failed)
test/language/statements/generators/dstr/dflt-obj-ptrn-prop-id-init-unresolvable.js (previously Failed)
test/language/statements/generators/dstr/dflt-obj-ptrn-id-init-unresolvable.js [strict mode] (previously Failed)
test/language/statements/generators/dstr/dflt-obj-ptrn-id-init-unresolvable.js (previously Failed)
test/language/statements/generators/dstr/ary-ptrn-elem-id-init-unresolvable.js [strict mode] (previously Failed)
test/language/statements/generators/dstr/ary-ptrn-elem-id-init-unresolvable.js (previously Failed)
test/language/rest-parameters/array-pattern.js [strict mode] (previously Failed)
test/language/rest-parameters/array-pattern.js (previously Failed)
test/language/rest-parameters/object-pattern.js [strict mode] (previously Failed)
test/language/rest-parameters/object-pattern.js (previously Failed)
test/language/arguments-object/unmapped/via-params-dstr.js [strict mode] (previously Failed)
Broken tests (56):
test/language/expressions/async-function/named-array-destructuring-param-strict-body.js [strict mode] (previously Passed)
test/language/expressions/async-function/named-array-destructuring-param-strict-body.js (previously Passed)
test/language/expressions/async-function/nameless-object-destructuring-param-strict-body.js [strict mode] (previously Passed)
test/language/expressions/async-function/nameless-object-destructuring-param-strict-body.js (previously Passed)
test/language/expressions/async-function/nameless-dflt-params-rest.js [strict mode] (previously Passed)
test/language/expressions/async-function/nameless-dflt-params-rest.js (previously Passed)
test/language/expressions/async-function/nameless-array-destructuring-param-strict-body.js [strict mode] (previously Passed)
test/language/expressions/async-function/nameless-array-destructuring-param-strict-body.js (previously Passed)
test/language/expressions/async-function/named-object-destructuring-param-strict-body.js [strict mode] (previously Passed)
test/language/expressions/async-function/named-object-destructuring-param-strict-body.js (previously Passed)
test/language/expressions/async-function/named-dflt-params-rest.js [strict mode] (previously Passed)
test/language/expressions/async-function/named-dflt-params-rest.js (previously Passed)
test/language/expressions/function/dflt-params-rest.js [strict mode] (previously Passed)
test/language/expressions/function/dflt-params-rest.js (previously Passed)
test/language/expressions/function/object-destructuring-param-strict-body.js [strict mode] (previously Passed)
test/language/expressions/function/object-destructuring-param-strict-body.js (previously Passed)
test/language/expressions/function/array-destructuring-param-strict-body.js [strict mode] (previously Passed)
test/language/expressions/function/array-destructuring-param-strict-body.js (previously Passed)
test/language/expressions/generators/dflt-params-rest.js [strict mode] (previously Passed)
test/language/expressions/generators/dflt-params-rest.js (previously Passed)
test/language/expressions/generators/object-destructuring-param-strict-body.js [strict mode] (previously Passed)
test/language/expressions/generators/object-destructuring-param-strict-body.js (previously Passed)
test/language/expressions/generators/array-destructuring-param-strict-body.js [strict mode] (previously Passed)
test/language/expressions/generators/array-destructuring-param-strict-body.js (previously Passed)
test/language/expressions/object/method-definition/gen-meth-object-destructuring-param-strict-body.js [strict mode] (previously Passed)
test/language/expressions/object/method-definition/gen-meth-object-destructuring-param-strict-body.js (previously Passed)
test/language/expressions/object/method-definition/meth-dflt-params-rest.js [strict mode] (previously Passed)
test/language/expressions/object/method-definition/meth-dflt-params-rest.js (previously Passed)
test/language/expressions/object/method-definition/gen-meth-dflt-params-rest.js [strict mode] (previously Passed)
test/language/expressions/object/method-definition/gen-meth-dflt-params-rest.js (previously Passed)
test/language/expressions/object/method-definition/meth-object-destructuring-param-strict-body.js [strict mode] (previously Passed)
test/language/expressions/object/method-definition/meth-object-destructuring-param-strict-body.js (previously Passed)
test/language/expressions/object/method-definition/meth-array-destructuring-param-strict-body.js [strict mode] (previously Passed)
test/language/expressions/object/method-definition/meth-array-destructuring-param-strict-body.js (previously Passed)
test/language/expressions/object/method-definition/gen-meth-array-destructuring-param-strict-body.js [strict mode] (previously Passed)
test/language/expressions/object/method-definition/gen-meth-array-destructuring-param-strict-body.js (previously Passed)
test/language/expressions/arrow-function/dflt-params-rest.js [strict mode] (previously Passed)
test/language/expressions/arrow-function/dflt-params-rest.js (previously Passed)
test/language/statements/async-function/dflt-params-rest.js [strict mode] (previously Passed)
test/language/statements/async-function/dflt-params-rest.js (previously Passed)
test/language/statements/async-function/object-destructuring-param-strict-body.js [strict mode] (previously Passed)
test/language/statements/async-function/object-destructuring-param-strict-body.js (previously Passed)
test/language/statements/async-function/array-destructuring-param-strict-body.js [strict mode] (previously Passed)
test/language/statements/async-function/array-destructuring-param-strict-body.js (previously Passed)
test/language/statements/function/dflt-params-rest.js [strict mode] (previously Passed)
test/language/statements/function/dflt-params-rest.js (previously Passed)
test/language/statements/function/object-destructuring-param-strict-body.js [strict mode] (previously Passed)
test/language/statements/function/object-destructuring-param-strict-body.js (previously Passed)
test/language/statements/function/array-destructuring-param-strict-body.js [strict mode] (previously Passed)
test/language/statements/function/array-destructuring-param-strict-body.js (previously Passed)
test/language/statements/generators/dflt-params-rest.js [strict mode] (previously Passed)
test/language/statements/generators/dflt-params-rest.js (previously Passed)
test/language/statements/generators/object-destructuring-param-strict-body.js [strict mode] (previously Passed)
test/language/statements/generators/object-destructuring-param-strict-body.js (previously Passed)
test/language/statements/generators/array-destructuring-param-strict-body.js [strict mode] (previously Passed)
test/language/statements/generators/array-destructuring-param-strict-body.js (previously Passed)

Copy link
Member

@raskad raskad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work. I did a first review.

Could you look at the tests that are failing now? Based on the names of those tests, most of them seem to be related to strict mode. My guess is, that we have to add some conditions to the is_simple evaluation for FormalParameterList like defined here: https://tc39.es/ecma262/#sec-static-semantics-issimpleparameterlist

boa/src/syntax/ast/node/mod.rs Outdated Show resolved Hide resolved
boa/src/syntax/ast/node/mod.rs Outdated Show resolved Hide resolved
boa/src/syntax/ast/node/mod.rs Outdated Show resolved Hide resolved
boa/src/builtins/function/mod.rs Outdated Show resolved Hide resolved
boa/src/builtins/function/arguments.rs Outdated Show resolved Hide resolved
boa/src/object/internal_methods/function.rs Outdated Show resolved Hide resolved
@am-a-man am-a-man requested a review from raskad October 14, 2021 16:39
.gitignore Outdated Show resolved Hide resolved
Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work! I have some suggestions to make the code a bit more performant :)

boa/src/builtins/function/mod.rs Outdated Show resolved Hide resolved
boa/src/builtins/function/arguments.rs Outdated Show resolved Hide resolved
boa/src/builtins/function/mod.rs Outdated Show resolved Hide resolved
boa/src/builtins/function/mod.rs Outdated Show resolved Hide resolved
@am-a-man am-a-man requested a review from jedel1043 October 16, 2021 12:28
Copy link
Member

@Razican Razican left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good :) I would like to point to some formatting things, though, and an import that can be removed (as far as I can tell)

@@ -16,6 +16,7 @@ use std::{
borrow::Cow,
fmt,
ops::{Deref, DerefMut},
option::Option,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this in the prelude? Can we avoid this import?

@@ -109,7 +109,6 @@ impl JsObject {
pub fn equals(lhs: &Self, rhs: &Self) -> bool {
std::ptr::eq(lhs.as_ref(), rhs.as_ref())
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line removal seems unrelated to the changes here, and I prefer to have a line between two functions, it makes the code clearer.

@@ -693,6 +723,7 @@ unsafe impl Trace for PropertyName {
/// are using different indents in their source files. This fixes
/// any strings which may have been changed in a different indent
/// level.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer to keep the documentation together with the code, and it seems there was no related change here.

@am-a-man am-a-man requested review from Razican and raskad October 29, 2021 03:51
@am-a-man
Copy link
Contributor Author

am-a-man commented Oct 29, 2021

@raskad Hey, the code causing this CI to fail does not exist in the changed version,

Error:    --> boa/src/syntax/parser/expression/primary/object_initializer/mod.rs:310:68
    |
310 |                         if lexically_declared_names.contains(param.name()) {
    |                                                                    ^^^^ help: there is an associated function with a similar name: `names`

is one of the errors but FormalParameter::name() is not even called in this line.
CI tests does not return any errors on my local shell as well

@raskad
Copy link
Member

raskad commented Oct 29, 2021

There my be a new change on main for that function. can you try a rebase?

@raskad
Copy link
Member

raskad commented Oct 29, 2021

@am-a-man When I checkout your branch, I get the errors now.

@codecov
Copy link

codecov bot commented Oct 29, 2021

Codecov Report

Merging #1666 (4b4af36) into main (98333b0) will decrease coverage by 0.06%.
The diff coverage is 38.61%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1666      +/-   ##
==========================================
- Coverage   50.91%   50.85%   -0.07%     
==========================================
  Files         199      199              
  Lines       17709    17803      +94     
==========================================
+ Hits         9016     9053      +37     
- Misses       8693     8750      +57     
Impacted Files Coverage Δ
...pression/primary/async_generator_expression/mod.rs 46.51% <0.00%> (-1.11%) ⬇️
...ser/expression/primary/generator_expression/mod.rs 43.90% <0.00%> (-1.10%) ⬇️
...arser/expression/primary/object_initializer/mod.rs 49.44% <0.00%> (-0.75%) ⬇️
...xpression/primary/async_function_expression/mod.rs 52.27% <28.57%> (+1.10%) ⬆️
...rser/expression/primary/function_expression/mod.rs 40.47% <28.57%> (+1.45%) ⬆️
...ntax/parser/statement/declaration/hoistable/mod.rs 52.11% <28.57%> (+0.68%) ⬆️
boa/src/syntax/parser/function/mod.rs 49.65% <37.31%> (-12.15%) ⬇️
...tax/parser/expression/assignment/arrow_function.rs 63.49% <40.00%> (+0.15%) ⬆️
boa/src/syntax/ast/node/mod.rs 70.16% <57.14%> (-1.27%) ⬇️
boa/src/builtins/function/mod.rs 35.63% <63.63%> (+1.06%) ⬆️
... and 2 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 98333b0...4b4af36. Read the comment docs.

Copy link
Member

@raskad raskad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@am-a-man
Copy link
Contributor Author

@jedel1043 please review the requested changes

None => Position::new(1, 1),
},
)));
for param_name in param.names().iter() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for param_name in param.names().iter() {
for param_name in param.names() {

The iter call is unnecessary in a lot of these, the for expression automatically calls into_iter if you pass something implementing the IntoIterator trait.

.parse(cursor)?;

let init = if let Some(t) = cursor.peek(0)? {
// Check that this is an initilizer before attempting parse.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// Check that this is an initilizer before attempting parse.
// Check that this is an initializer before attempting parse.

Comment on lines 210 to 222
let init = if let Some(t) = cursor.peek(0)? {
// Check that this is an initilizer before attempting parse.
if *t.kind() == TokenKind::Punctuator(Punctuator::Assign) {
Some(
Initializer::new(true, self.allow_yield, self.allow_await)
.parse(cursor)?,
)
} else {
None
}
} else {
None
};
Copy link
Member

@jedel1043 jedel1043 Oct 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be simpler with a functional approach:

Suggested change
let init = if let Some(t) = cursor.peek(0)? {
// Check that this is an initilizer before attempting parse.
if *t.kind() == TokenKind::Punctuator(Punctuator::Assign) {
Some(
Initializer::new(true, self.allow_yield, self.allow_await)
.parse(cursor)?,
)
} else {
None
}
} else {
None
};
let init = cursor.peek(0)?.filter(|t| {
// Check that this is an initilizer before attempting parse.
*t.kind() == TokenKind::Punctuator(Punctuator::Assign)
}).map(|_|
Initializer::new(true, self.allow_yield, self.allow_await).parse(cursor)
).transpose()?;

Applies to all patterns similar to this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jedel1043
above changes gives errors because borrow occurs at cursor.peek() and *cursor is needed in the same closure,
should I implement below code using .cloned or is there an efficient way to do it?

let init = cursor.peek(0)?.cloned().filter(|t| {
                        // Check that this is an initializer before attempting parse.
                        *t.kind() == TokenKind::Punctuator(Punctuator::Assign)
                    }).map(|_|
                        Initializer::new(true, self.allow_yield, self.allow_await).parse(cursor)
                    ).transpose()?;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let init = cursor.peek(0)?;
let init = init.filter(..)
...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same problem still exists

Copy link
Member

@jedel1043 jedel1043 Oct 30, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then the problem must be map. Hmm... does this work?

let init = cursor.peek(0)?
    .filter(|t| {
        // Check that this is an initilizer before attempting parse.
        *t.kind() == TokenKind::Punctuator(Punctuator::Assign)
    }).map(|t| {
        drop(t);
        Initializer::new(true, self.allow_yield, self.allow_await).parse(cursor)
    }).transpose()?;

If it doesn't, just clone. I prefer focusing on the readability of the code, we can optimize later.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

filter expects a bool

expected type `bool`
               found enum `Result<Node, parser::error::ParseError>`

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reedited the code, had a missing \n

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the original error again

boa/src/builtins/function/mod.rs Show resolved Hide resolved
Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Good work 😁

bors r+

@bors
Copy link

bors bot commented Oct 30, 2021

🕐 Waiting for PR status (Github check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@am-a-man
Copy link
Contributor Author

@jedel1043 Cargo.lock is already a file in current project, my branch failed in security audit because of

/usr/share/rust/.cargo/bin/cargo generate-lockfile
error: failed to load manifest for workspace member `/home/runner/work/boa/boa/boa`

Caused by:
  failed to parse manifest at `/home/runner/work/boa/boa/boa/Cargo.toml`

Caused by:
  feature `edition2021` is required

do you want me to delete Cargo.lock or just revert to the previous version?

@jedel1043
Copy link
Member

Sorry! I thought it was a lock file for the boa crate 😅

@jedel1043
Copy link
Member

bors r+

@bors
Copy link

bors bot commented Oct 31, 2021

👎 Rejected by code reviews

Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors r+

@bors
Copy link

bors bot commented Oct 31, 2021

🕐 Waiting for PR status (Github check) to be set, probably by CI. Bors will automatically try to run when all required PR statuses are set.

@Razican
Copy link
Member

Razican commented Nov 1, 2021

bors retry

bors bot pushed a commit that referenced this pull request Nov 1, 2021
<!---
Thank you for contributing to Boa! Please fill out the template below, and remove or add any
information as you feel neccesary.
--->

This Pull Request fixes/closes #1601

It changes the following:

- implements `FormalParameter` using `syntax::ast::node::declaration::Declaration` as 
```
pub struct FormalParameter {

    declaration: Declaration,
    is_rest_param: bool,

}
```
- changes `fn test_formatting(source: &'static str)` in `ast::node` to setup tests based on the new struct definition
- changes in various tests using `FormalParameter`
- changes in files using `FormalParameter`

What it does not change:
- if the function uses `FormalParameter` but does not seem affected due to the changed definition it is not altered while keeping all the required features i.e. if it wasn't affected but ended up giving undesired (not error) behaviour it has been changed


Co-authored-by: Aman Kumar <57605821+am-a-man@users.noreply.github.com>
@bors
Copy link

bors bot commented Nov 1, 2021

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Allow BindingPattern in function parameters [Merged by Bors] - Allow BindingPattern in function parameters Nov 1, 2021
@bors bors bot closed this Nov 1, 2021
@Razican Razican added the hacktoberfest-accepted PR accepted for Hacktoberfest label Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ast Issue surrounding the abstract syntax tree enhancement New feature or request Hacktoberfest Hacktoberfest 2021 - https://hacktoberfest.digitalocean.com hacktoberfest-accepted PR accepted for Hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow BindingPattern in function parameters
4 participants