diff --git a/Jint.Tests.Test262/Test262Harness.settings.json b/Jint.Tests.Test262/Test262Harness.settings.json index cdc1b1cf7b..443d8f1e08 100644 --- a/Jint.Tests.Test262/Test262Harness.settings.json +++ b/Jint.Tests.Test262/Test262Harness.settings.json @@ -8,7 +8,6 @@ "Array.fromAsync", "async-iteration", "Atomics", - "generators", "import-assertions", "iterator-helpers", "regexp-duplicate-named-groups", @@ -73,35 +72,951 @@ "language/expressions/function/scope-name-var-open-non-strict.js", "language/expressions/function/scope-name-var-open-strict.js", - // yield not implemented - "built-ins/TypedArrayConstructors/ctors-bigint/object-arg/as-generator-iterable-returns.js", - "built-ins/TypedArrayConstructors/ctors-bigint/object-arg/iterating-throws.js", - "language/expressions/object/accessor-name-computed-yield-id.js", // accessor / yield not implemented - "language/expressions/object/accessor-name-computed.js", - "built-ins/TypedArrayConstructors/ctors/object-arg/as-generator-iterable-returns.js", - "language/expressions/object/method-definition/name-prop-name-yield-id.js", - "language/statements/class/elements/*-generator-method-*.js", - "language/expressions/class/elements/*-generator-method-*.js", - "built-ins/Set/prototype/union/allows-set-like-class.js", - "built-ins/Set/prototype/union/allows-set-like-object.js", - "built-ins/Set/prototype/symmetricDifference/allows-set-like-class.js", - "built-ins/Set/prototype/symmetricDifference/allows-set-like-object.js", - "built-ins/Set/prototype/isSupersetOf/allows-set-like-class.js", - "built-ins/Set/prototype/isSupersetOf/allows-set-like-object.js", - "built-ins/Set/prototype/isSupersetOf/set-like-class-mutation.js", - - // generators not implemented - "built-ins/Object/prototype/toString/proxy-function.js", - "built-ins/ShadowRealm/prototype/evaluate/wrapped-function-from-return-values-share-no-identity.js", - "built-ins/ShadowRealm/prototype/evaluate/wrapped-functions-share-no-properties-extended.js", - "language/expressions/async-generator/name.js", - "language/expressions/dynamic-import/assignment-expression/yield-assign-expr.js", - "language/expressions/dynamic-import/assignment-expression/yield-expr.js", - "language/statements/class/subclass/builtin-objects/GeneratorFunction/*.js", - "language/**/*-yield-*.js", - "language/module-code/instn-local-bndng-gen.js", - "language/module-code/instn-local-bndng-export-gen.js", + // generators + "built-ins/GeneratorFunction/instance-yield-expr-in-param.js", + "built-ins/GeneratorFunction/instance-yield-expr-in-param.js", + "built-ins/GeneratorPrototype/next/return-yield-expr.js", + "built-ins/GeneratorPrototype/next/return-yield-expr.js", + "built-ins/GeneratorPrototype/return/try-catch-before-try.js", + "built-ins/GeneratorPrototype/return/try-catch-before-try.js", + "built-ins/GeneratorPrototype/return/try-catch-following-catch.js", + "built-ins/GeneratorPrototype/return/try-catch-following-catch.js", + "built-ins/GeneratorPrototype/return/try-catch-within-catch.js", + "built-ins/GeneratorPrototype/return/try-catch-within-catch.js", + "built-ins/GeneratorPrototype/return/try-catch-within-try.js", + "built-ins/GeneratorPrototype/return/try-catch-within-try.js", + "built-ins/GeneratorPrototype/return/try-finally-before-try.js", + "built-ins/GeneratorPrototype/return/try-finally-before-try.js", + "built-ins/GeneratorPrototype/return/try-finally-following-finally.js", + "built-ins/GeneratorPrototype/return/try-finally-following-finally.js", + "built-ins/GeneratorPrototype/return/try-finally-nested-try-catch-within-catch.js", + "built-ins/GeneratorPrototype/return/try-finally-nested-try-catch-within-catch.js", + "built-ins/GeneratorPrototype/return/try-finally-nested-try-catch-within-finally.js", + "built-ins/GeneratorPrototype/return/try-finally-nested-try-catch-within-finally.js", + "built-ins/GeneratorPrototype/return/try-finally-nested-try-catch-within-inner-try.js", + "built-ins/GeneratorPrototype/return/try-finally-nested-try-catch-within-inner-try.js", + "built-ins/GeneratorPrototype/return/try-finally-nested-try-catch-within-outer-try-after-nested.js", + "built-ins/GeneratorPrototype/return/try-finally-nested-try-catch-within-outer-try-after-nested.js", + "built-ins/GeneratorPrototype/return/try-finally-nested-try-catch-within-outer-try-before-nested.js", + "built-ins/GeneratorPrototype/return/try-finally-nested-try-catch-within-outer-try-before-nested.js", + "built-ins/GeneratorPrototype/return/try-finally-within-finally.js", + "built-ins/GeneratorPrototype/return/try-finally-within-finally.js", + "built-ins/GeneratorPrototype/return/try-finally-within-try.js", + "built-ins/GeneratorPrototype/return/try-finally-within-try.js", + "built-ins/GeneratorPrototype/throw/try-catch-before-try.js", + "built-ins/GeneratorPrototype/throw/try-catch-before-try.js", + "built-ins/GeneratorPrototype/throw/try-catch-following-catch.js", + "built-ins/GeneratorPrototype/throw/try-catch-following-catch.js", + "built-ins/GeneratorPrototype/throw/try-catch-within-catch.js", + "built-ins/GeneratorPrototype/throw/try-catch-within-catch.js", + "built-ins/GeneratorPrototype/throw/try-catch-within-try.js", + "built-ins/GeneratorPrototype/throw/try-catch-within-try.js", + "built-ins/GeneratorPrototype/throw/try-finally-before-try.js", + "built-ins/GeneratorPrototype/throw/try-finally-before-try.js", + "built-ins/GeneratorPrototype/throw/try-finally-following-finally.js", + "built-ins/GeneratorPrototype/throw/try-finally-following-finally.js", + "built-ins/GeneratorPrototype/throw/try-finally-nested-try-catch-within-catch.js", + "built-ins/GeneratorPrototype/throw/try-finally-nested-try-catch-within-catch.js", + "built-ins/GeneratorPrototype/throw/try-finally-nested-try-catch-within-finally.js", + "built-ins/GeneratorPrototype/throw/try-finally-nested-try-catch-within-finally.js", + "built-ins/GeneratorPrototype/throw/try-finally-nested-try-catch-within-inner-try.js", + "built-ins/GeneratorPrototype/throw/try-finally-nested-try-catch-within-inner-try.js", + "built-ins/GeneratorPrototype/throw/try-finally-nested-try-catch-within-outer-try-after-nested.js", + "built-ins/GeneratorPrototype/throw/try-finally-nested-try-catch-within-outer-try-after-nested.js", + "built-ins/GeneratorPrototype/throw/try-finally-nested-try-catch-within-outer-try-before-nested.js", + "built-ins/GeneratorPrototype/throw/try-finally-nested-try-catch-within-outer-try-before-nested.js", + "built-ins/GeneratorPrototype/throw/try-finally-within-finally.js", + "built-ins/GeneratorPrototype/throw/try-finally-within-finally.js", + "built-ins/GeneratorPrototype/throw/try-finally-within-try.js", + "built-ins/GeneratorPrototype/throw/try-finally-within-try.js", + "language/expressions/arrow-function/dstr/ary-ptrn-elem-ary-elision-init.js", + "language/expressions/arrow-function/dstr/ary-ptrn-elem-ary-elision-init.js", + "language/expressions/arrow-function/dstr/ary-ptrn-elision.js", + "language/expressions/arrow-function/dstr/ary-ptrn-elision.js", + "language/expressions/arrow-function/dstr/dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/arrow-function/dstr/dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/arrow-function/dstr/dflt-ary-ptrn-elision.js", + "language/expressions/arrow-function/dstr/dflt-ary-ptrn-elision.js", + "language/expressions/assignment/dstr/array-elem-init-yield-expr.js", + "language/expressions/assignment/dstr/array-elem-init-yield-expr.js", + "language/expressions/assignment/dstr/array-elem-iter-rtrn-close-err.js", + "language/expressions/assignment/dstr/array-elem-iter-rtrn-close-err.js", + "language/expressions/assignment/dstr/array-elem-iter-rtrn-close-null.js", + "language/expressions/assignment/dstr/array-elem-iter-rtrn-close-null.js", + "language/expressions/assignment/dstr/array-elem-iter-rtrn-close.js", + "language/expressions/assignment/dstr/array-elem-iter-rtrn-close.js", + "language/expressions/assignment/dstr/array-elem-nested-array-yield-expr.js", + "language/expressions/assignment/dstr/array-elem-nested-array-yield-expr.js", + "language/expressions/assignment/dstr/array-elem-nested-obj-yield-expr.js", + "language/expressions/assignment/dstr/array-elem-nested-obj-yield-expr.js", + "language/expressions/assignment/dstr/array-elem-target-yield-expr.js", + "language/expressions/assignment/dstr/array-elem-target-yield-expr.js", + "language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-err.js", + "language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-err.js", + "language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-null.js", + "language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close-null.js", + "language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close.js", + "language/expressions/assignment/dstr/array-elem-trlg-iter-list-rtrn-close.js", + "language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-err.js", + "language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-err.js", + "language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-null.js", + "language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close-null.js", + "language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close.js", + "language/expressions/assignment/dstr/array-elem-trlg-iter-rest-rtrn-close.js", + "language/expressions/assignment/dstr/array-iteration.js", + "language/expressions/assignment/dstr/array-iteration.js", + "language/expressions/assignment/dstr/array-rest-iter-rtrn-close-err.js", + "language/expressions/assignment/dstr/array-rest-iter-rtrn-close-err.js", + "language/expressions/assignment/dstr/array-rest-iter-rtrn-close-null.js", + "language/expressions/assignment/dstr/array-rest-iter-rtrn-close-null.js", + "language/expressions/assignment/dstr/array-rest-iter-rtrn-close.js", + "language/expressions/assignment/dstr/array-rest-iter-rtrn-close.js", + "language/expressions/assignment/dstr/array-rest-nested-array-yield-expr.js", + "language/expressions/assignment/dstr/array-rest-nested-array-yield-expr.js", + "language/expressions/assignment/dstr/array-rest-nested-obj-yield-expr.js", + "language/expressions/assignment/dstr/array-rest-nested-obj-yield-expr.js", + "language/expressions/assignment/dstr/array-rest-yield-expr.js", + "language/expressions/assignment/dstr/array-rest-yield-expr.js", + "language/expressions/assignment/dstr/obj-id-identifier-yield-ident-valid.js", + "language/expressions/assignment/dstr/obj-id-init-yield-expr.js", + "language/expressions/assignment/dstr/obj-id-init-yield-expr.js", + "language/expressions/assignment/dstr/obj-prop-elem-init-yield-expr.js", + "language/expressions/assignment/dstr/obj-prop-elem-init-yield-expr.js", + "language/expressions/assignment/dstr/obj-prop-elem-target-yield-expr.js", + "language/expressions/assignment/dstr/obj-prop-elem-target-yield-expr.js", + "language/expressions/assignment/dstr/obj-prop-nested-array-yield-expr.js", + "language/expressions/assignment/dstr/obj-prop-nested-array-yield-expr.js", + "language/expressions/assignment/dstr/obj-prop-nested-obj-yield-expr.js", + "language/expressions/assignment/dstr/obj-prop-nested-obj-yield-expr.js", + "language/expressions/class/accessor-name-inst-computed-yield-expr.js", + "language/expressions/class/accessor-name-inst-computed-yield-expr.js", + "language/expressions/class/accessor-name-static-computed-yield-expr.js", + "language/expressions/class/accessor-name-static-computed-yield-expr.js", + "language/expressions/class/dstr/gen-meth-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/gen-meth-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/gen-meth-ary-ptrn-elision.js", + "language/expressions/class/dstr/gen-meth-ary-ptrn-elision.js", + "language/expressions/class/dstr/gen-meth-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/gen-meth-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/gen-meth-dflt-ary-ptrn-elision.js", + "language/expressions/class/dstr/gen-meth-dflt-ary-ptrn-elision.js", + "language/expressions/class/dstr/gen-meth-static-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/gen-meth-static-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/gen-meth-static-ary-ptrn-elision.js", + "language/expressions/class/dstr/gen-meth-static-ary-ptrn-elision.js", + "language/expressions/class/dstr/gen-meth-static-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/gen-meth-static-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/gen-meth-static-dflt-ary-ptrn-elision.js", + "language/expressions/class/dstr/gen-meth-static-dflt-ary-ptrn-elision.js", + "language/expressions/class/dstr/meth-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/meth-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/meth-ary-ptrn-elision.js", + "language/expressions/class/dstr/meth-ary-ptrn-elision.js", + "language/expressions/class/dstr/meth-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/meth-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/meth-dflt-ary-ptrn-elision.js", + "language/expressions/class/dstr/meth-dflt-ary-ptrn-elision.js", + "language/expressions/class/dstr/meth-static-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/meth-static-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/meth-static-ary-ptrn-elision.js", + "language/expressions/class/dstr/meth-static-ary-ptrn-elision.js", + "language/expressions/class/dstr/meth-static-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/meth-static-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/meth-static-dflt-ary-ptrn-elision.js", + "language/expressions/class/dstr/meth-static-dflt-ary-ptrn-elision.js", + "language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/private-gen-meth-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/private-gen-meth-ary-ptrn-elision.js", + "language/expressions/class/dstr/private-gen-meth-ary-ptrn-elision.js", + "language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elision.js", + "language/expressions/class/dstr/private-gen-meth-dflt-ary-ptrn-elision.js", + "language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elision.js", + "language/expressions/class/dstr/private-gen-meth-static-ary-ptrn-elision.js", + "language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elision.js", + "language/expressions/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elision.js", + "language/expressions/class/dstr/private-meth-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/private-meth-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/private-meth-ary-ptrn-elision.js", + "language/expressions/class/dstr/private-meth-ary-ptrn-elision.js", + "language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elision.js", + "language/expressions/class/dstr/private-meth-dflt-ary-ptrn-elision.js", + "language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/private-meth-static-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/private-meth-static-ary-ptrn-elision.js", + "language/expressions/class/dstr/private-meth-static-ary-ptrn-elision.js", + "language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elision.js", + "language/expressions/class/dstr/private-meth-static-dflt-ary-ptrn-elision.js", + "language/expressions/class/elements/after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/after-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/after-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/after-same-line-gen-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/after-same-line-gen-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/after-same-line-method-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/after-same-line-method-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/after-same-line-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/after-same-line-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/after-same-line-method-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/after-same-line-method-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/after-same-line-static-async-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/after-same-line-static-async-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/after-same-line-static-async-method-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/after-same-line-static-async-method-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/after-same-line-static-gen-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/after-same-line-static-gen-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/after-same-line-static-gen-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/after-same-line-static-gen-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/after-same-line-static-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/after-same-line-static-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/after-same-line-static-method-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/after-same-line-static-method-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/gen-private-method-static/yield-spread-arr-multiple.js", + "language/expressions/class/elements/gen-private-method-static/yield-spread-arr-multiple.js", + "language/expressions/class/elements/gen-private-method-static/yield-spread-arr-single.js", + "language/expressions/class/elements/gen-private-method-static/yield-spread-arr-single.js", + "language/expressions/class/elements/gen-private-method-static/yield-spread-obj.js", + "language/expressions/class/elements/gen-private-method-static/yield-spread-obj.js", + "language/expressions/class/elements/gen-private-method/yield-spread-arr-multiple.js", + "language/expressions/class/elements/gen-private-method/yield-spread-arr-multiple.js", + "language/expressions/class/elements/gen-private-method/yield-spread-arr-single.js", + "language/expressions/class/elements/gen-private-method/yield-spread-arr-single.js", + "language/expressions/class/elements/gen-private-method/yield-spread-obj.js", + "language/expressions/class/elements/gen-private-method/yield-spread-obj.js", + "language/expressions/class/elements/multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/multiple-definitions-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/multiple-definitions-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/multiple-definitions-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/multiple-definitions-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/multiple-definitions-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/multiple-definitions-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/multiple-stacked-definitions-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/multiple-stacked-definitions-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/multiple-stacked-definitions-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/multiple-stacked-definitions-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/new-no-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/new-no-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/new-no-sc-line-method-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/new-no-sc-line-method-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/new-sc-line-gen-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/new-sc-line-gen-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/new-sc-line-gen-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/new-sc-line-gen-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/new-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/new-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/new-sc-line-method-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/new-sc-line-method-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/regular-definitions-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/regular-definitions-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/regular-definitions-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/regular-definitions-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/regular-definitions-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/regular-definitions-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/same-line-async-method-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/same-line-async-method-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/same-line-async-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/same-line-async-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/same-line-async-method-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/same-line-async-method-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/same-line-gen-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/same-line-gen-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/same-line-gen-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/same-line-gen-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/same-line-gen-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/same-line-gen-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/same-line-method-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/same-line-method-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/same-line-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/same-line-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/same-line-method-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/same-line-method-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js", + "language/expressions/class/elements/wrapped-in-sc-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/wrapped-in-sc-rs-static-generator-method-privatename-identifier-alt.js", + "language/expressions/class/elements/wrapped-in-sc-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/elements/wrapped-in-sc-rs-static-generator-method-privatename-identifier.js", + "language/expressions/class/gen-method-static/yield-spread-arr-multiple.js", + "language/expressions/class/gen-method-static/yield-spread-arr-multiple.js", + "language/expressions/class/gen-method-static/yield-spread-arr-single.js", + "language/expressions/class/gen-method-static/yield-spread-arr-single.js", + "language/expressions/class/gen-method-static/yield-spread-obj.js", + "language/expressions/class/gen-method-static/yield-spread-obj.js", + "language/expressions/class/gen-method/yield-spread-arr-multiple.js", + "language/expressions/class/gen-method/yield-spread-arr-multiple.js", + "language/expressions/class/gen-method/yield-spread-arr-single.js", + "language/expressions/class/gen-method/yield-spread-arr-single.js", + "language/expressions/class/gen-method/yield-spread-obj.js", + "language/expressions/class/gen-method/yield-spread-obj.js", + "language/expressions/dynamic-import/eval-export-dflt-expr-gen-anon.js", + "language/expressions/dynamic-import/eval-export-dflt-expr-gen-named.js", + "language/expressions/dynamic-import/import-attributes/2nd-param-evaluation-abrupt-return.js", "language/expressions/dynamic-import/import-attributes/2nd-param-evaluation-abrupt-return.js", + "language/expressions/dynamic-import/import-attributes/2nd-param-yield-expr.js", + "language/expressions/dynamic-import/import-attributes/2nd-param-yield-expr.js", + "language/expressions/function/dstr/ary-ptrn-elem-ary-elision-init.js", + "language/expressions/function/dstr/ary-ptrn-elem-ary-elision-init.js", + "language/expressions/function/dstr/ary-ptrn-elision.js", + "language/expressions/function/dstr/ary-ptrn-elision.js", + "language/expressions/function/dstr/dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/function/dstr/dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/function/dstr/dflt-ary-ptrn-elision.js", + "language/expressions/function/dstr/dflt-ary-ptrn-elision.js", + "language/expressions/generators/dstr/ary-ptrn-elem-ary-elision-init.js", + "language/expressions/generators/dstr/ary-ptrn-elem-ary-elision-init.js", + "language/expressions/generators/dstr/ary-ptrn-elision.js", + "language/expressions/generators/dstr/ary-ptrn-elision.js", + "language/expressions/generators/dstr/dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/generators/dstr/dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/generators/dstr/dflt-ary-ptrn-elision.js", + "language/expressions/generators/dstr/dflt-ary-ptrn-elision.js", + "language/expressions/generators/eval-var-scope-syntax-err.js", + "language/expressions/generators/named-yield-identifier-non-strict.js", + "language/expressions/generators/named-yield-identifier-spread-non-strict.js", + "language/expressions/generators/named-yield-spread-arr-multiple.js", + "language/expressions/generators/named-yield-spread-arr-multiple.js", + "language/expressions/generators/named-yield-spread-arr-single.js", + "language/expressions/generators/named-yield-spread-arr-single.js", + "language/expressions/generators/named-yield-spread-obj.js", + "language/expressions/generators/named-yield-spread-obj.js", + "language/expressions/generators/scope-param-elem-var-close.js", + "language/expressions/generators/scope-param-elem-var-open.js", + "language/expressions/generators/scope-param-rest-elem-var-close.js", + "language/expressions/generators/scope-param-rest-elem-var-open.js", + "language/expressions/generators/yield-as-function-expression-binding-identifier.js", + "language/expressions/generators/yield-as-literal-property-name.js", + "language/expressions/generators/yield-as-literal-property-name.js", + "language/expressions/generators/yield-as-property-name.js", + "language/expressions/generators/yield-as-property-name.js", + "language/expressions/generators/yield-as-yield-operand.js", + "language/expressions/generators/yield-as-yield-operand.js", + "language/expressions/generators/yield-identifier-non-strict.js", + "language/expressions/generators/yield-identifier-spread-non-strict.js", + "language/expressions/generators/yield-newline.js", + "language/expressions/generators/yield-newline.js", + "language/expressions/generators/yield-spread-arr-multiple.js", + "language/expressions/generators/yield-spread-arr-multiple.js", + "language/expressions/generators/yield-spread-arr-single.js", + "language/expressions/generators/yield-spread-arr-single.js", + "language/expressions/generators/yield-spread-obj.js", + "language/expressions/generators/yield-spread-obj.js", + "language/expressions/generators/yield-star-before-newline.js", + "language/expressions/generators/yield-star-before-newline.js", + "language/expressions/in/private-field-rhs-yield-present.js", + "language/expressions/in/private-field-rhs-yield-present.js", + "language/expressions/in/rhs-yield-present.js", + "language/expressions/in/rhs-yield-present.js", + "language/expressions/object/accessor-name-computed-yield-expr.js", + "language/expressions/object/accessor-name-computed-yield-expr.js", + "language/expressions/object/accessor-name-computed.js", + "language/expressions/object/accessor-name-computed.js", + "language/expressions/object/dstr/gen-meth-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/object/dstr/gen-meth-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/object/dstr/gen-meth-ary-ptrn-elision.js", + "language/expressions/object/dstr/gen-meth-ary-ptrn-elision.js", + "language/expressions/object/dstr/gen-meth-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/object/dstr/gen-meth-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/object/dstr/gen-meth-dflt-ary-ptrn-elision.js", + "language/expressions/object/dstr/gen-meth-dflt-ary-ptrn-elision.js", + "language/expressions/object/dstr/meth-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/object/dstr/meth-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/object/dstr/meth-ary-ptrn-elision.js", + "language/expressions/object/dstr/meth-ary-ptrn-elision.js", + "language/expressions/object/dstr/meth-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/object/dstr/meth-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/expressions/object/dstr/meth-dflt-ary-ptrn-elision.js", + "language/expressions/object/dstr/meth-dflt-ary-ptrn-elision.js", + "language/expressions/object/method-definition/computed-property-name-yield-expression.js", + "language/expressions/object/method-definition/gen-meth-eval-var-scope-syntax-err.js", + "language/expressions/object/method-definition/gen-yield-identifier-non-strict.js", + "language/expressions/object/method-definition/gen-yield-identifier-spread-non-strict.js", + "language/expressions/object/method-definition/gen-yield-spread-arr-multiple.js", + "language/expressions/object/method-definition/gen-yield-spread-arr-multiple.js", + "language/expressions/object/method-definition/gen-yield-spread-arr-single.js", + "language/expressions/object/method-definition/gen-yield-spread-arr-single.js", + "language/expressions/object/method-definition/gen-yield-spread-obj.js", + "language/expressions/object/method-definition/gen-yield-spread-obj.js", + "language/expressions/object/method-definition/generator-prop-name-yield-expr.js", + "language/expressions/object/method-definition/name-prop-name-yield-expr.js", + "language/expressions/object/method-definition/yield-as-expression-with-rhs.js", + "language/expressions/object/method-definition/yield-as-expression-with-rhs.js", + "language/expressions/object/method-definition/yield-as-expression-without-rhs.js", + "language/expressions/object/method-definition/yield-as-expression-without-rhs.js", + "language/expressions/object/method-definition/yield-as-function-expression-binding-identifier.js", + "language/expressions/object/method-definition/yield-as-generator-method-binding-identifier.js", + "language/expressions/object/method-definition/yield-as-generator-method-binding-identifier.js", + "language/expressions/object/method-definition/yield-as-literal-property-name.js", + "language/expressions/object/method-definition/yield-as-literal-property-name.js", + "language/expressions/object/method-definition/yield-as-property-name.js", + "language/expressions/object/method-definition/yield-as-property-name.js", + "language/expressions/object/method-definition/yield-as-yield-operand.js", + "language/expressions/object/method-definition/yield-as-yield-operand.js", + "language/expressions/object/method-definition/yield-newline.js", + "language/expressions/object/method-definition/yield-newline.js", + "language/expressions/object/method-definition/yield-star-before-newline.js", + "language/expressions/object/method-definition/yield-star-before-newline.js", + "language/expressions/object/scope-gen-meth-param-elem-var-close.js", + "language/expressions/object/scope-gen-meth-param-elem-var-open.js", + "language/expressions/object/scope-gen-meth-param-rest-elem-var-close.js", + "language/expressions/object/scope-gen-meth-param-rest-elem-var-open.js", + "language/expressions/yield/in-rltn-expr.js", + "language/expressions/yield/in-rltn-expr.js", + "language/expressions/yield/iter-value-specified.js", + "language/expressions/yield/iter-value-specified.js", + "language/expressions/yield/rhs-omitted.js", + "language/expressions/yield/rhs-omitted.js", + "language/expressions/yield/rhs-primitive.js", + "language/expressions/yield/rhs-primitive.js", + "language/expressions/yield/rhs-regexp.js", + "language/expressions/yield/rhs-regexp.js", + "language/expressions/yield/rhs-template-middle.js", + "language/expressions/yield/rhs-template-middle.js", + "language/expressions/yield/rhs-unresolvable.js", + "language/expressions/yield/rhs-unresolvable.js", + "language/expressions/yield/rhs-yield.js", + "language/expressions/yield/rhs-yield.js", + "language/expressions/yield/star-array.js", + "language/expressions/yield/star-array.js", + "language/expressions/yield/star-in-rltn-expr.js", + "language/expressions/yield/star-in-rltn-expr.js", + "language/expressions/yield/star-iterable.js", + "language/expressions/yield/star-iterable.js", + "language/expressions/yield/star-return-is-null.js", + "language/expressions/yield/star-return-is-null.js", + "language/expressions/yield/star-rhs-iter-get-call-err.js", + "language/expressions/yield/star-rhs-iter-get-call-err.js", + "language/expressions/yield/star-rhs-iter-get-call-non-obj.js", + "language/expressions/yield/star-rhs-iter-get-call-non-obj.js", + "language/expressions/yield/star-rhs-iter-get-get-err.js", + "language/expressions/yield/star-rhs-iter-get-get-err.js", + "language/expressions/yield/star-rhs-iter-nrml-next-call-err.js", + "language/expressions/yield/star-rhs-iter-nrml-next-call-err.js", + "language/expressions/yield/star-rhs-iter-nrml-next-call-non-obj.js", + "language/expressions/yield/star-rhs-iter-nrml-next-call-non-obj.js", + "language/expressions/yield/star-rhs-iter-nrml-next-get-err.js", + "language/expressions/yield/star-rhs-iter-nrml-next-get-err.js", + "language/expressions/yield/star-rhs-iter-nrml-next-invoke.js", + "language/expressions/yield/star-rhs-iter-nrml-next-invoke.js", + "language/expressions/yield/star-rhs-iter-nrml-res-done-no-value.js", + "language/expressions/yield/star-rhs-iter-nrml-res-done-no-value.js", + "language/expressions/yield/star-rhs-iter-nrml-res-value-err.js", + "language/expressions/yield/star-rhs-iter-nrml-res-value-err.js", + "language/expressions/yield/star-rhs-iter-nrml-res-value-final.js", + "language/expressions/yield/star-rhs-iter-nrml-res-value-final.js", + "language/expressions/yield/star-rhs-iter-rtrn-no-rtrn.js", + "language/expressions/yield/star-rhs-iter-rtrn-no-rtrn.js", + "language/expressions/yield/star-rhs-iter-rtrn-res-done-err.js", + "language/expressions/yield/star-rhs-iter-rtrn-res-done-err.js", + "language/expressions/yield/star-rhs-iter-rtrn-res-done-no-value.js", + "language/expressions/yield/star-rhs-iter-rtrn-res-done-no-value.js", + "language/expressions/yield/star-rhs-iter-rtrn-res-value-err.js", + "language/expressions/yield/star-rhs-iter-rtrn-res-value-err.js", + "language/expressions/yield/star-rhs-iter-rtrn-res-value-final.js", + "language/expressions/yield/star-rhs-iter-rtrn-res-value-final.js", + "language/expressions/yield/star-rhs-iter-rtrn-rtrn-call-err.js", + "language/expressions/yield/star-rhs-iter-rtrn-rtrn-call-err.js", + "language/expressions/yield/star-rhs-iter-rtrn-rtrn-get-err.js", + "language/expressions/yield/star-rhs-iter-rtrn-rtrn-get-err.js", + "language/expressions/yield/star-rhs-iter-rtrn-rtrn-invoke.js", + "language/expressions/yield/star-rhs-iter-rtrn-rtrn-invoke.js", + "language/expressions/yield/star-rhs-iter-thrw-res-done-err.js", + "language/expressions/yield/star-rhs-iter-thrw-res-done-err.js", + "language/expressions/yield/star-rhs-iter-thrw-res-done-no-value.js", + "language/expressions/yield/star-rhs-iter-thrw-res-done-no-value.js", + "language/expressions/yield/star-rhs-iter-thrw-res-value-err.js", + "language/expressions/yield/star-rhs-iter-thrw-res-value-err.js", + "language/expressions/yield/star-rhs-iter-thrw-res-value-final.js", + "language/expressions/yield/star-rhs-iter-thrw-res-value-final.js", + "language/expressions/yield/star-rhs-iter-thrw-thrw-call-err.js", + "language/expressions/yield/star-rhs-iter-thrw-thrw-call-err.js", + "language/expressions/yield/star-rhs-iter-thrw-thrw-call-non-obj.js", + "language/expressions/yield/star-rhs-iter-thrw-thrw-call-non-obj.js", + "language/expressions/yield/star-rhs-iter-thrw-thrw-get-err.js", + "language/expressions/yield/star-rhs-iter-thrw-thrw-get-err.js", + "language/expressions/yield/star-rhs-iter-thrw-thrw-invoke.js", + "language/expressions/yield/star-rhs-iter-thrw-thrw-invoke.js", + "language/expressions/yield/star-rhs-iter-thrw-violation-no-rtrn.js", + "language/expressions/yield/star-rhs-iter-thrw-violation-no-rtrn.js", + "language/expressions/yield/star-rhs-iter-thrw-violation-rtrn-call-err.js", + "language/expressions/yield/star-rhs-iter-thrw-violation-rtrn-call-err.js", + "language/expressions/yield/star-rhs-iter-thrw-violation-rtrn-call-non-obj.js", + "language/expressions/yield/star-rhs-iter-thrw-violation-rtrn-call-non-obj.js", + "language/expressions/yield/star-rhs-iter-thrw-violation-rtrn-get-err.js", + "language/expressions/yield/star-rhs-iter-thrw-violation-rtrn-get-err.js", + "language/expressions/yield/star-rhs-iter-thrw-violation-rtrn-invoke.js", + "language/expressions/yield/star-rhs-iter-thrw-violation-rtrn-invoke.js", + "language/expressions/yield/star-rhs-unresolvable.js", + "language/expressions/yield/star-rhs-unresolvable.js", + "language/expressions/yield/star-string.js", + "language/expressions/yield/star-string.js", + "language/expressions/yield/star-throw-is-null.js", + "language/expressions/yield/star-throw-is-null.js", + "language/expressions/yield/within-for.js", + "language/expressions/yield/within-for.js", + "language/statements/class/accessor-name-inst-computed-yield-expr.js", + "language/statements/class/accessor-name-inst-computed-yield-expr.js", + "language/statements/class/accessor-name-static-computed-yield-expr.js", + "language/statements/class/accessor-name-static-computed-yield-expr.js", + "language/statements/class/definition/methods-gen-yield-as-expression-with-rhs.js", + "language/statements/class/definition/methods-gen-yield-as-expression-with-rhs.js", + "language/statements/class/definition/methods-gen-yield-as-expression-without-rhs.js", + "language/statements/class/definition/methods-gen-yield-as-expression-without-rhs.js", + "language/statements/class/definition/methods-gen-yield-as-generator-method-binding-identifier.js", + "language/statements/class/definition/methods-gen-yield-as-generator-method-binding-identifier.js", + "language/statements/class/definition/methods-gen-yield-as-literal-property-name.js", + "language/statements/class/definition/methods-gen-yield-as-literal-property-name.js", + "language/statements/class/definition/methods-gen-yield-as-property-name.js", + "language/statements/class/definition/methods-gen-yield-as-property-name.js", + "language/statements/class/definition/methods-gen-yield-as-yield-operand.js", + "language/statements/class/definition/methods-gen-yield-as-yield-operand.js", + "language/statements/class/definition/methods-gen-yield-newline.js", + "language/statements/class/definition/methods-gen-yield-newline.js", + "language/statements/class/definition/methods-gen-yield-star-before-newline.js", + "language/statements/class/definition/methods-gen-yield-star-before-newline.js", + "language/statements/class/dstr/gen-meth-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/gen-meth-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/gen-meth-ary-ptrn-elision.js", + "language/statements/class/dstr/gen-meth-ary-ptrn-elision.js", + "language/statements/class/dstr/gen-meth-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/gen-meth-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/gen-meth-dflt-ary-ptrn-elision.js", + "language/statements/class/dstr/gen-meth-dflt-ary-ptrn-elision.js", + "language/statements/class/dstr/gen-meth-static-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/gen-meth-static-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/gen-meth-static-ary-ptrn-elision.js", + "language/statements/class/dstr/gen-meth-static-ary-ptrn-elision.js", + "language/statements/class/dstr/gen-meth-static-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/gen-meth-static-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/gen-meth-static-dflt-ary-ptrn-elision.js", + "language/statements/class/dstr/gen-meth-static-dflt-ary-ptrn-elision.js", + "language/statements/class/dstr/meth-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/meth-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/meth-ary-ptrn-elision.js", + "language/statements/class/dstr/meth-ary-ptrn-elision.js", + "language/statements/class/dstr/meth-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/meth-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/meth-dflt-ary-ptrn-elision.js", + "language/statements/class/dstr/meth-dflt-ary-ptrn-elision.js", + "language/statements/class/dstr/meth-static-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/meth-static-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/meth-static-ary-ptrn-elision.js", + "language/statements/class/dstr/meth-static-ary-ptrn-elision.js", + "language/statements/class/dstr/meth-static-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/meth-static-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/meth-static-dflt-ary-ptrn-elision.js", + "language/statements/class/dstr/meth-static-dflt-ary-ptrn-elision.js", + "language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/private-gen-meth-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/private-gen-meth-ary-ptrn-elision.js", + "language/statements/class/dstr/private-gen-meth-ary-ptrn-elision.js", + "language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elision.js", + "language/statements/class/dstr/private-gen-meth-dflt-ary-ptrn-elision.js", + "language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elision.js", + "language/statements/class/dstr/private-gen-meth-static-ary-ptrn-elision.js", + "language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elision.js", + "language/statements/class/dstr/private-gen-meth-static-dflt-ary-ptrn-elision.js", + "language/statements/class/dstr/private-meth-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/private-meth-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/private-meth-ary-ptrn-elision.js", + "language/statements/class/dstr/private-meth-ary-ptrn-elision.js", + "language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/private-meth-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/private-meth-dflt-ary-ptrn-elision.js", + "language/statements/class/dstr/private-meth-dflt-ary-ptrn-elision.js", + "language/statements/class/dstr/private-meth-static-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/private-meth-static-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/private-meth-static-ary-ptrn-elision.js", + "language/statements/class/dstr/private-meth-static-ary-ptrn-elision.js", + "language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elem-ary-elision-init.js", + "language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elision.js", + "language/statements/class/dstr/private-meth-static-dflt-ary-ptrn-elision.js", + "language/statements/class/elements/after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/after-same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/after-same-line-gen-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/after-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/after-same-line-gen-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/after-same-line-gen-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/after-same-line-gen-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/after-same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/after-same-line-method-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/after-same-line-method-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/after-same-line-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/after-same-line-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/after-same-line-method-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/after-same-line-method-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/after-same-line-static-async-method-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/after-same-line-static-async-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/after-same-line-static-async-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/after-same-line-static-async-method-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/after-same-line-static-async-method-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/after-same-line-static-gen-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/after-same-line-static-gen-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/after-same-line-static-gen-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/after-same-line-static-gen-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/after-same-line-static-gen-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/after-same-line-static-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/after-same-line-static-method-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/after-same-line-static-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/after-same-line-static-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/after-same-line-static-method-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/after-same-line-static-method-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/gen-private-method-static/yield-spread-arr-multiple.js", + "language/statements/class/elements/gen-private-method-static/yield-spread-arr-multiple.js", + "language/statements/class/elements/gen-private-method-static/yield-spread-arr-single.js", + "language/statements/class/elements/gen-private-method-static/yield-spread-arr-single.js", + "language/statements/class/elements/gen-private-method-static/yield-spread-obj.js", + "language/statements/class/elements/gen-private-method-static/yield-spread-obj.js", + "language/statements/class/elements/gen-private-method/yield-spread-arr-multiple.js", + "language/statements/class/elements/gen-private-method/yield-spread-arr-multiple.js", + "language/statements/class/elements/gen-private-method/yield-spread-arr-single.js", + "language/statements/class/elements/gen-private-method/yield-spread-arr-single.js", + "language/statements/class/elements/gen-private-method/yield-spread-obj.js", + "language/statements/class/elements/gen-private-method/yield-spread-obj.js", + "language/statements/class/elements/multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/multiple-definitions-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/multiple-definitions-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/multiple-definitions-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/multiple-definitions-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/multiple-definitions-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/multiple-definitions-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/multiple-definitions-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/multiple-stacked-definitions-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/multiple-stacked-definitions-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/multiple-stacked-definitions-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/multiple-stacked-definitions-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/multiple-stacked-definitions-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/new-no-sc-line-method-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/new-no-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/new-no-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/new-no-sc-line-method-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/new-no-sc-line-method-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/new-sc-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/new-sc-line-gen-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/new-sc-line-gen-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/new-sc-line-gen-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/new-sc-line-gen-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/new-sc-line-gen-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/new-sc-line-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/new-sc-line-method-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/new-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/new-sc-line-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/new-sc-line-method-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/new-sc-line-method-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/regular-definitions-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/regular-definitions-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/regular-definitions-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/regular-definitions-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/regular-definitions-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/regular-definitions-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/regular-definitions-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/same-line-async-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/same-line-async-method-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/same-line-async-method-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/same-line-async-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/same-line-async-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/same-line-async-method-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/same-line-async-method-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/same-line-gen-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/same-line-gen-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/same-line-gen-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/same-line-gen-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/same-line-gen-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/same-line-gen-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/same-line-gen-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/same-line-method-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/same-line-method-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/same-line-method-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/same-line-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/same-line-method-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/same-line-method-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/same-line-method-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/wrapped-in-sc-rs-static-async-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/wrapped-in-sc-rs-static-async-generator-method-privatename-identifier.js", + "language/statements/class/elements/wrapped-in-sc-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/wrapped-in-sc-rs-static-generator-method-privatename-identifier-alt.js", + "language/statements/class/elements/wrapped-in-sc-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/elements/wrapped-in-sc-rs-static-generator-method-privatename-identifier.js", + "language/statements/class/gen-method-static/yield-spread-arr-multiple.js", + "language/statements/class/gen-method-static/yield-spread-arr-multiple.js", + "language/statements/class/gen-method-static/yield-spread-arr-single.js", + "language/statements/class/gen-method-static/yield-spread-arr-single.js", + "language/statements/class/gen-method-static/yield-spread-obj.js", + "language/statements/class/gen-method-static/yield-spread-obj.js", + "language/statements/class/gen-method/yield-spread-arr-multiple.js", + "language/statements/class/gen-method/yield-spread-arr-multiple.js", + "language/statements/class/gen-method/yield-spread-arr-single.js", + "language/statements/class/gen-method/yield-spread-arr-single.js", + "language/statements/class/gen-method/yield-spread-obj.js", + "language/statements/class/gen-method/yield-spread-obj.js", + "language/statements/const/dstr/ary-ptrn-elem-ary-elision-init.js", + "language/statements/const/dstr/ary-ptrn-elem-ary-elision-init.js", + "language/statements/const/dstr/ary-ptrn-elision.js", + "language/statements/const/dstr/ary-ptrn-elision.js", + "language/statements/for-of/break-from-catch.js", + "language/statements/for-of/break-from-catch.js", + "language/statements/for-of/break-from-finally.js", + "language/statements/for-of/break-from-finally.js", + "language/statements/for-of/break-from-try.js", + "language/statements/for-of/break-from-try.js", + "language/statements/for-of/break-label-from-catch.js", + "language/statements/for-of/break-label-from-catch.js", + "language/statements/for-of/break-label-from-finally.js", + "language/statements/for-of/break-label-from-finally.js", + "language/statements/for-of/break-label-from-try.js", + "language/statements/for-of/break-label-from-try.js", + "language/statements/for-of/break-label.js", + "language/statements/for-of/break-label.js", + "language/statements/for-of/break.js", + "language/statements/for-of/break.js", + "language/statements/for-of/dstr/array-elem-init-yield-expr.js", + "language/statements/for-of/dstr/array-elem-init-yield-expr.js", + "language/statements/for-of/dstr/array-elem-iter-rtrn-close-err.js", + "language/statements/for-of/dstr/array-elem-iter-rtrn-close-err.js", + "language/statements/for-of/dstr/array-elem-iter-rtrn-close-null.js", + "language/statements/for-of/dstr/array-elem-iter-rtrn-close-null.js", + "language/statements/for-of/dstr/array-elem-iter-rtrn-close.js", + "language/statements/for-of/dstr/array-elem-iter-rtrn-close.js", + "language/statements/for-of/dstr/array-elem-nested-array-yield-expr.js", + "language/statements/for-of/dstr/array-elem-nested-array-yield-expr.js", + "language/statements/for-of/dstr/array-elem-nested-obj-yield-expr.js", + "language/statements/for-of/dstr/array-elem-nested-obj-yield-expr.js", + "language/statements/for-of/dstr/array-elem-target-yield-expr.js", + "language/statements/for-of/dstr/array-elem-target-yield-expr.js", + "language/statements/for-of/dstr/array-elem-trlg-iter-list-rtrn-close-err.js", + "language/statements/for-of/dstr/array-elem-trlg-iter-list-rtrn-close-err.js", + "language/statements/for-of/dstr/array-elem-trlg-iter-list-rtrn-close-null.js", + "language/statements/for-of/dstr/array-elem-trlg-iter-list-rtrn-close-null.js", + "language/statements/for-of/dstr/array-elem-trlg-iter-list-rtrn-close.js", + "language/statements/for-of/dstr/array-elem-trlg-iter-list-rtrn-close.js", + "language/statements/for-of/dstr/array-elem-trlg-iter-rest-rtrn-close-err.js", + "language/statements/for-of/dstr/array-elem-trlg-iter-rest-rtrn-close-err.js", + "language/statements/for-of/dstr/array-elem-trlg-iter-rest-rtrn-close-null.js", + "language/statements/for-of/dstr/array-elem-trlg-iter-rest-rtrn-close-null.js", + "language/statements/for-of/dstr/array-elem-trlg-iter-rest-rtrn-close.js", + "language/statements/for-of/dstr/array-elem-trlg-iter-rest-rtrn-close.js", + "language/statements/for-of/dstr/array-iteration.js", + "language/statements/for-of/dstr/array-iteration.js", + "language/statements/for-of/dstr/array-rest-iter-rtrn-close-err.js", + "language/statements/for-of/dstr/array-rest-iter-rtrn-close-err.js", + "language/statements/for-of/dstr/array-rest-iter-rtrn-close-null.js", + "language/statements/for-of/dstr/array-rest-iter-rtrn-close-null.js", + "language/statements/for-of/dstr/array-rest-iter-rtrn-close.js", + "language/statements/for-of/dstr/array-rest-iter-rtrn-close.js", + "language/statements/for-of/dstr/array-rest-nested-array-yield-expr.js", + "language/statements/for-of/dstr/array-rest-nested-array-yield-expr.js", + "language/statements/for-of/dstr/array-rest-nested-obj-yield-expr.js", + "language/statements/for-of/dstr/array-rest-nested-obj-yield-expr.js", + "language/statements/for-of/dstr/array-rest-yield-expr.js", + "language/statements/for-of/dstr/array-rest-yield-expr.js", + "language/statements/for-of/dstr/const-ary-ptrn-elem-ary-elision-init.js", + "language/statements/for-of/dstr/const-ary-ptrn-elem-ary-elision-init.js", + "language/statements/for-of/dstr/const-ary-ptrn-elision.js", + "language/statements/for-of/dstr/const-ary-ptrn-elision.js", + "language/statements/for-of/dstr/let-ary-ptrn-elem-ary-elision-init.js", + "language/statements/for-of/dstr/let-ary-ptrn-elem-ary-elision-init.js", + "language/statements/for-of/dstr/let-ary-ptrn-elision.js", + "language/statements/for-of/dstr/let-ary-ptrn-elision.js", + "language/statements/for-of/dstr/obj-id-identifier-yield-ident-valid.js", + "language/statements/for-of/dstr/obj-id-init-yield-expr.js", + "language/statements/for-of/dstr/obj-id-init-yield-expr.js", + "language/statements/for-of/dstr/obj-prop-elem-init-yield-expr.js", + "language/statements/for-of/dstr/obj-prop-elem-init-yield-expr.js", + "language/statements/for-of/dstr/obj-prop-elem-target-yield-expr.js", + "language/statements/for-of/dstr/obj-prop-elem-target-yield-expr.js", + "language/statements/for-of/dstr/obj-prop-nested-array-yield-expr.js", + "language/statements/for-of/dstr/obj-prop-nested-array-yield-expr.js", + "language/statements/for-of/dstr/obj-prop-nested-obj-yield-expr.js", + "language/statements/for-of/dstr/obj-prop-nested-obj-yield-expr.js", + "language/statements/for-of/dstr/var-ary-ptrn-elem-ary-elision-init.js", + "language/statements/for-of/dstr/var-ary-ptrn-elem-ary-elision-init.js", + "language/statements/for-of/dstr/var-ary-ptrn-elision.js", + "language/statements/for-of/dstr/var-ary-ptrn-elision.js", + "language/statements/for-of/generator-close-via-break.js", + "language/statements/for-of/generator-close-via-break.js", + "language/statements/for-of/generator-close-via-continue.js", + "language/statements/for-of/generator-close-via-continue.js", + "language/statements/for-of/generator-close-via-return.js", + "language/statements/for-of/generator-close-via-return.js", + "language/statements/for-of/generator-close-via-throw.js", + "language/statements/for-of/generator-close-via-throw.js", + "language/statements/for-of/nested.js", + "language/statements/for-of/nested.js", + "language/statements/for-of/return-from-catch.js", + "language/statements/for-of/return-from-catch.js", + "language/statements/for-of/return-from-finally.js", + "language/statements/for-of/return-from-finally.js", + "language/statements/for-of/return-from-try.js", + "language/statements/for-of/return-from-try.js", + "language/statements/for-of/return.js", + "language/statements/for-of/return.js", + "language/statements/for-of/yield-from-catch.js", + "language/statements/for-of/yield-from-catch.js", + "language/statements/for-of/yield-from-finally.js", + "language/statements/for-of/yield-from-finally.js", + "language/statements/for-of/yield-from-try.js", + "language/statements/for-of/yield-from-try.js", + "language/statements/for-of/yield-star-from-catch.js", + "language/statements/for-of/yield-star-from-catch.js", + "language/statements/for-of/yield-star-from-finally.js", + "language/statements/for-of/yield-star-from-finally.js", + "language/statements/for-of/yield-star-from-try.js", + "language/statements/for-of/yield-star-from-try.js", + "language/statements/for-of/yield-star.js", + "language/statements/for-of/yield-star.js", + "language/statements/for-of/yield.js", + "language/statements/for-of/yield.js", + "language/statements/for/dstr/const-ary-ptrn-elem-ary-elision-init.js", + "language/statements/for/dstr/const-ary-ptrn-elem-ary-elision-init.js", + "language/statements/for/dstr/const-ary-ptrn-elision.js", + "language/statements/for/dstr/const-ary-ptrn-elision.js", + "language/statements/for/dstr/let-ary-ptrn-elem-ary-elision-init.js", + "language/statements/for/dstr/let-ary-ptrn-elem-ary-elision-init.js", + "language/statements/for/dstr/let-ary-ptrn-elision.js", + "language/statements/for/dstr/let-ary-ptrn-elision.js", + "language/statements/for/dstr/var-ary-ptrn-elem-ary-elision-init.js", + "language/statements/for/dstr/var-ary-ptrn-elem-ary-elision-init.js", + "language/statements/for/dstr/var-ary-ptrn-elision.js", + "language/statements/for/dstr/var-ary-ptrn-elision.js", + "language/statements/function/dstr/ary-ptrn-elem-ary-elision-init.js", + "language/statements/function/dstr/ary-ptrn-elem-ary-elision-init.js", + "language/statements/function/dstr/ary-ptrn-elision.js", + "language/statements/function/dstr/ary-ptrn-elision.js", + "language/statements/function/dstr/dflt-ary-ptrn-elem-ary-elision-init.js", + "language/statements/function/dstr/dflt-ary-ptrn-elem-ary-elision-init.js", + "language/statements/function/dstr/dflt-ary-ptrn-elision.js", + "language/statements/function/dstr/dflt-ary-ptrn-elision.js", + "language/statements/generators/dstr/ary-ptrn-elem-ary-elision-init.js", + "language/statements/generators/dstr/ary-ptrn-elem-ary-elision-init.js", + "language/statements/generators/dstr/ary-ptrn-elision.js", + "language/statements/generators/dstr/ary-ptrn-elision.js", + "language/statements/generators/dstr/dflt-ary-ptrn-elem-ary-elision-init.js", + "language/statements/generators/dstr/dflt-ary-ptrn-elem-ary-elision-init.js", + "language/statements/generators/dstr/dflt-ary-ptrn-elision.js", + "language/statements/generators/dstr/dflt-ary-ptrn-elision.js", + "language/statements/generators/eval-var-scope-syntax-err.js", + "language/statements/generators/scope-param-elem-var-close.js", + "language/statements/generators/scope-param-elem-var-open.js", + "language/statements/generators/scope-param-rest-elem-var-close.js", + "language/statements/generators/scope-param-rest-elem-var-open.js", + "language/statements/generators/yield-as-function-expression-binding-identifier.js", + "language/statements/generators/yield-as-generator-declaration-binding-identifier.js", + "language/statements/generators/yield-as-literal-property-name.js", + "language/statements/generators/yield-as-literal-property-name.js", + "language/statements/generators/yield-as-property-name.js", + "language/statements/generators/yield-as-property-name.js", + "language/statements/generators/yield-as-yield-operand.js", + "language/statements/generators/yield-as-yield-operand.js", + "language/statements/generators/yield-identifier-non-strict.js", + "language/statements/generators/yield-identifier-spread-non-strict.js", + "language/statements/generators/yield-newline.js", + "language/statements/generators/yield-newline.js", + "language/statements/generators/yield-spread-arr-multiple.js", + "language/statements/generators/yield-spread-arr-multiple.js", + "language/statements/generators/yield-spread-arr-single.js", + "language/statements/generators/yield-spread-arr-single.js", + "language/statements/generators/yield-spread-obj.js", + "language/statements/generators/yield-spread-obj.js", + "language/statements/generators/yield-star-before-newline.js", + "language/statements/generators/yield-star-before-newline.js", + "language/statements/labeled/value-yield-non-strict-escaped.js", + "language/statements/labeled/value-yield-non-strict.js", + "language/statements/let/dstr/ary-ptrn-elem-ary-elision-init.js", + "language/statements/let/dstr/ary-ptrn-elem-ary-elision-init.js", + "language/statements/let/dstr/ary-ptrn-elision.js", + "language/statements/let/dstr/ary-ptrn-elision.js", + "language/statements/try/dstr/ary-ptrn-elem-ary-elision-init.js", + "language/statements/try/dstr/ary-ptrn-elem-ary-elision-init.js", + "language/statements/try/dstr/ary-ptrn-elision.js", + "language/statements/try/dstr/ary-ptrn-elision.js", + "language/statements/variable/dstr/ary-ptrn-elem-ary-elision-init.js", + "language/statements/variable/dstr/ary-ptrn-elem-ary-elision-init.js", + "language/statements/variable/dstr/ary-ptrn-elision.js", + "language/statements/variable/dstr/ary-ptrn-elision.js", // Esprima problem "language/expressions/object/let-non-strict-access.js", diff --git a/Jint.Tests.Test262/Test262Test.cs b/Jint.Tests.Test262/Test262Test.cs index 48f5e6a411..8ba8467d43 100644 --- a/Jint.Tests.Test262/Test262Test.cs +++ b/Jint.Tests.Test262/Test262Test.cs @@ -15,6 +15,7 @@ private Engine BuildTestExecutor(Test262File file) { var relativePath = Path.GetDirectoryName(file.FileName); cfg.EnableModules(new Test262ModuleLoader(State.Test262Stream.Options.FileSystem, relativePath)); + cfg.ExperimentalFeatures = ExperimentalFeature.All; }); if (file.Flags.Contains("raw")) diff --git a/Jint.Tests/Runtime/GeneratorTests.cs b/Jint.Tests/Runtime/GeneratorTests.cs new file mode 100644 index 0000000000..ef4531945c --- /dev/null +++ b/Jint.Tests/Runtime/GeneratorTests.cs @@ -0,0 +1,251 @@ +namespace Jint.Tests.Runtime; + +public class GeneratorTests +{ + private readonly Engine _engine; + + public GeneratorTests() + { + _engine = new Engine(options => options.ExperimentalFeatures = ExperimentalFeature.Generators); + } + + [Fact] + public void LoopYield() + { + const string Script = """ + const foo = function*() { + yield 'a'; + yield 'b'; + yield 'c'; + }; + + let str = ''; + for (const val of foo()) { + str += val; + } + return str; + """; + + Assert.Equal("abc", _engine.Evaluate(Script)); + } + + [Fact] + public void ReturnDuringYield() + { + const string Script = """ + const foo = function*() { + yield 'a'; + return; + yield 'c'; + }; + + let str = ''; + for (const val of foo()) { + str += val; + } + return str; + """; + + Assert.Equal("a", _engine.Evaluate(Script)); + } + + [Fact] + public void LoneReturnInYield() + { + const string Script = """ + const foo = function*() { + return; + }; + + let str = ''; + for (const val of foo()) { + str += val; + } + return str; + """; + + Assert.Equal("", _engine.Evaluate(Script)); + } + + [Fact] + public void LoneReturnValueInYield() + { + const string Script = """ + const foo = function*() { + return 'a'; + }; + + let str = ''; + for (const val of foo()) { + str += val; + } + return str; + """; + + Assert.Equal("", _engine.Evaluate(Script)); + } + + [Fact] + public void YieldUndefined() + { + const string Script = """ + const foo = function*() { + yield undefined; + }; + + let str = ''; + for (const val of foo()) { + str += val; + } + return str; + """; + + Assert.Equal("undefined", _engine.Evaluate(Script)); + } + + [Fact] + public void ReturnUndefined() + { + const string Script = """ + const foo = function*() { + return undefined; + }; + + let str = ''; + for (const val of foo()) { + str += val; + } + return str; + """; + + Assert.Equal("", _engine.Evaluate(Script)); + } + + [Fact] + public void Basic() + { + _engine.Execute("function * generator() { yield 5; yield 6; };"); + _engine.Execute("var iterator = generator(); var item = iterator.next();"); + Assert.Equal(5, _engine.Evaluate("item.value")); + Assert.False(_engine.Evaluate("item.done").AsBoolean()); + _engine.Execute("item = iterator.next();"); + Assert.Equal(6, _engine.Evaluate("item.value")); + Assert.False(_engine.Evaluate("item.done").AsBoolean()); + _engine.Execute("item = iterator.next();"); + Assert.True(_engine.Evaluate("item.value === void undefined").AsBoolean()); + Assert.True(_engine.Evaluate("item.done").AsBoolean()); + } + + [Fact] + public void FunctionExpressions() + { + _engine.Execute("var generator = function * () { yield 5; yield 6; };"); + _engine.Execute("var iterator = generator(); var item = iterator.next();"); + Assert.Equal(5, _engine.Evaluate("item.value")); + Assert.False(_engine.Evaluate("item.done").AsBoolean()); + _engine.Execute("item = iterator.next();"); + Assert.Equal(6, _engine.Evaluate("item.value")); + Assert.False(_engine.Evaluate("item.done").AsBoolean()); + _engine.Execute("item = iterator.next();"); + Assert.True(_engine.Evaluate("item.value === void undefined").AsBoolean()); + Assert.True(_engine.Evaluate("item.done").AsBoolean()); + } + + [Fact] + public void CorrectThisBinding() + { + _engine.Execute("var generator = function * () { yield 5; yield 6; };"); + _engine.Execute("var iterator = { g: generator, x: 5, y: 6 }.g(); var item = iterator.next();"); + Assert.Equal(5, _engine.Evaluate("item.value")); + Assert.False(_engine.Evaluate("item.done").AsBoolean()); + _engine.Execute("item = iterator.next();"); + Assert.Equal(6, _engine.Evaluate("item.value")); + Assert.False(_engine.Evaluate("item.done").AsBoolean()); + _engine.Execute("item = iterator.next();"); + Assert.True(_engine.Evaluate("item.value === void undefined").AsBoolean()); + Assert.True(_engine.Evaluate("item.done").AsBoolean()); + } + + [Fact(Skip = "TODO es6-generators")] + public void Sending() + { + const string Script = """ + var sent; + function * generator() { + sent = [yield 5, yield 6]; + }; + var iterator = generator(); + iterator.next(); + iterator.next("foo"); + iterator.next("bar"); + """; + + _engine.Execute(Script); + + Assert.Equal("foo", _engine.Evaluate("sent[0]")); + Assert.Equal("bar", _engine.Evaluate("sent[1]")); + } + + [Fact(Skip = "TODO es6-generators")] + public void Sending2() + { + const string Script = """ + function* counter(value) { + while (true) { + const step = yield value++; + + if (step) { + value += step; + } + } + } + + const generatorFunc = counter(0); + """; + + _engine.Execute(Script); + + Assert.Equal(0, _engine.Evaluate("generatorFunc.next().value")); // 0 + Assert.Equal(1, _engine.Evaluate("generatorFunc.next().value")); // 1 + Assert.Equal(2, _engine.Evaluate("generatorFunc.next().value")); // 2 + Assert.Equal(3, _engine.Evaluate("generatorFunc.next().value")); // 3 + Assert.Equal(14, _engine.Evaluate("generatorFunc.next(10).value")); // 14 + Assert.Equal(15, _engine.Evaluate("generatorFunc.next().value")); // 15 + Assert.Equal(26, _engine.Evaluate("generatorFunc.next(10).value")); // 26 + } + + [Fact(Skip = "TODO es6-generators")] + public void Fibonacci() + { + const string Script = """ + function* fibonacci() { + let current = 0; + let next = 1; + while (true) { + const reset = yield current; + [current, next] = [next, next + current]; + if (reset) { + current = 0; + next = 1; + } + } + } + + const sequence = fibonacci(); + """; + + _engine.Execute(Script); + + Assert.Equal(0, _engine.Evaluate("sequence.next().value")); + Assert.Equal(1, _engine.Evaluate("sequence.next().value")); + Assert.Equal(1, _engine.Evaluate("sequence.next().value")); + Assert.Equal(2, _engine.Evaluate("sequence.next().value")); + Assert.Equal(3, _engine.Evaluate("sequence.next().value")); + Assert.Equal(5, _engine.Evaluate("sequence.next().value")); + Assert.Equal(9, _engine.Evaluate("sequence.next().value")); + Assert.Equal(0, _engine.Evaluate("sequence.next(true).value")); + Assert.Equal(1, _engine.Evaluate("sequence.next().value)")); + Assert.Equal(1, _engine.Evaluate("sequence.next().value)")); + Assert.Equal(2, _engine.Evaluate("sequence.next().value)")); + } +} diff --git a/Jint/Options.cs b/Jint/Options.cs index 546b0ab260..e4ab735e8c 100644 --- a/Jint/Options.cs +++ b/Jint/Options.cs @@ -11,447 +11,473 @@ using Jint.Runtime.Modules; using Jint.Runtime.CallStack; -namespace Jint +namespace Jint; + +public class Options { - public class Options - { - private static readonly CultureInfo _defaultCulture = CultureInfo.CurrentCulture; - private static readonly TimeZoneInfo _defaultTimeZone = TimeZoneInfo.Local; + private static readonly CultureInfo _defaultCulture = CultureInfo.CurrentCulture; + private static readonly TimeZoneInfo _defaultTimeZone = TimeZoneInfo.Local; - private ITimeSystem? _timeSystem; - internal List> _configurations { get; } = new(); + private ITimeSystem? _timeSystem; + internal List> _configurations { get; } = new(); - public delegate JsValue? MemberAccessorDelegate(Engine engine, object target, string member); + public delegate JsValue? MemberAccessorDelegate(Engine engine, object target, string member); - public delegate ObjectInstance? WrapObjectDelegate(Engine engine, object target, Type? type); + public delegate ObjectInstance? WrapObjectDelegate(Engine engine, object target, Type? type); - public delegate bool ExceptionHandlerDelegate(Exception exception); + public delegate bool ExceptionHandlerDelegate(Exception exception); - /// - /// Execution constraints for the engine. - /// - public ConstraintOptions Constraints { get; } = new(); + /// + /// Execution constraints for the engine. + /// + public ConstraintOptions Constraints { get; } = new(); - /// - /// CLR interop related options. - /// - public InteropOptions Interop { get; } = new(); + /// + /// CLR interop related options. + /// + public InteropOptions Interop { get; } = new(); - /// - /// Debugger configuration. - /// - public DebuggerOptions Debugger { get; } = new(); + /// + /// Debugger configuration. + /// + public DebuggerOptions Debugger { get; } = new(); - /// - /// Host options. - /// - internal HostOptions Host { get; } = new(); + /// + /// Host options. + /// + internal HostOptions Host { get; } = new(); - /// - /// Module options - /// - public ModuleOptions Modules { get; } = new(); + /// + /// Module options + /// + public ModuleOptions Modules { get; } = new(); - /// - /// Whether the code should be always considered to be in strict mode. Can improve performance. - /// - public bool Strict { get; set; } + /// + /// Whether the code should be always considered to be in strict mode. Can improve performance. + /// + public bool Strict { get; set; } - /// - /// The culture the engine runs on, defaults to current culture. - /// - public CultureInfo Culture { get; set; } = _defaultCulture; + /// + /// The culture the engine runs on, defaults to current culture. + /// + public CultureInfo Culture { get; set; } = _defaultCulture; - /// - /// Configures a time system to use. Defaults to DefaultTimeSystem using local time. - /// - public ITimeSystem TimeSystem - { - get => _timeSystem ??= new DefaultTimeSystem(TimeZone, Culture); - set => _timeSystem = value; - } + /// + /// Configures a time system to use. Defaults to DefaultTimeSystem using local time. + /// + public ITimeSystem TimeSystem + { + get => _timeSystem ??= new DefaultTimeSystem(TimeZone, Culture); + set => _timeSystem = value; + } - /// - /// The time zone the engine runs on, defaults to local. Same as setting DefaultTimeSystem with the time zone. - /// - public TimeZoneInfo TimeZone { get; set; } = _defaultTimeZone; + /// + /// The time zone the engine runs on, defaults to local. Same as setting DefaultTimeSystem with the time zone. + /// + public TimeZoneInfo TimeZone { get; set; } = _defaultTimeZone; - /// - /// Reference resolver allows customizing behavior for reference resolving. This can be useful in cases where - /// you want to ignore long chain of property accesses that might throw if anything is null or undefined. - /// An example of such is var a = obj.field.subField.value. Custom resolver could accept chain to return - /// null/undefined on first occurrence. - /// - public IReferenceResolver ReferenceResolver { get; set; } = DefaultReferenceResolver.Instance; + /// + /// Reference resolver allows customizing behavior for reference resolving. This can be useful in cases where + /// you want to ignore long chain of property accesses that might throw if anything is null or undefined. + /// An example of such is var a = obj.field.subField.value. Custom resolver could accept chain to return + /// null/undefined on first occurrence. + /// + public IReferenceResolver ReferenceResolver { get; set; } = DefaultReferenceResolver.Instance; - /// - /// Whether calling 'eval' with custom code and function constructors taking function code as string is allowed. - /// Defaults to true. - /// - /// - /// https://tc39.es/ecma262/#sec-hostensurecancompilestrings - /// - public bool StringCompilationAllowed { get; set; } = true; + /// + /// Whether calling 'eval' with custom code and function constructors taking function code as string is allowed. + /// Defaults to true. + /// + /// + /// https://tc39.es/ecma262/#sec-hostensurecancompilestrings + /// + public bool StringCompilationAllowed { get; set; } = true; - /// - /// Options for the built-in JSON (de)serializer which - /// gets used using JSON.parse or JSON.stringify - /// - public JsonOptions Json { get; set; } = new(); + /// + /// Options for the built-in JSON (de)serializer which + /// gets used using JSON.parse or JSON.stringify + /// + public JsonOptions Json { get; set; } = new(); - /// - /// Called by the instance that loads this - /// once it is loaded. - /// - internal void Apply(Engine engine) + /// + /// What experimental features are allowed, functionality may lacking or even plain wrong. Defaults to having none. + /// + public ExperimentalFeature ExperimentalFeatures { get; set; } + + /// + /// Called by the instance that loads this + /// once it is loaded. + /// + internal void Apply(Engine engine) + { + foreach (var configuration in _configurations) { - foreach (var configuration in _configurations) - { - configuration(engine); - } + configuration(engine); + } - // add missing bits if needed - if (Interop.Enabled) - { + // add missing bits if needed + if (Interop.Enabled) + { #pragma warning disable IL2026 - engine.Realm.GlobalObject.SetProperty("System", new PropertyDescriptor(new NamespaceReference(engine, "System"), PropertyFlag.AllForbidden)); + engine.Realm.GlobalObject.SetProperty("System", new PropertyDescriptor(new NamespaceReference(engine, "System"), PropertyFlag.AllForbidden)); - engine.Realm.GlobalObject.SetProperty("importNamespace", new PropertyDescriptor(new ClrFunction( - engine, - "importNamespace", - (thisObj, arguments) => - new NamespaceReference(engine, TypeConverter.ToString(arguments.At(0)))), - PropertyFlag.AllForbidden)); + engine.Realm.GlobalObject.SetProperty("importNamespace", new PropertyDescriptor(new ClrFunction( + engine, + "importNamespace", + (thisObj, arguments) => + new NamespaceReference(engine, TypeConverter.ToString(arguments.At(0)))), + PropertyFlag.AllForbidden)); - engine.Realm.GlobalObject.SetProperty("clrHelper", new PropertyDescriptor(ObjectWrapper.Create(engine, new ClrHelper(Interop)), PropertyFlag.AllForbidden)); + engine.Realm.GlobalObject.SetProperty("clrHelper", new PropertyDescriptor(ObjectWrapper.Create(engine, new ClrHelper(Interop)), PropertyFlag.AllForbidden)); #pragma warning restore IL2026 - } - - if (Interop.ExtensionMethodTypes.Count > 0) - { - AttachExtensionMethodsToPrototypes(engine); - } + } - if (Modules.RegisterRequire) - { - // Node js like loading of modules - engine.Realm.GlobalObject.SetProperty("require", new PropertyDescriptor(new ClrFunction( - engine, - "require", - (thisObj, arguments) => - { - var specifier = TypeConverter.ToString(arguments.At(0)); - return engine.Modules.Import(specifier); - }), - PropertyFlag.AllForbidden)); - } + if (Interop.ExtensionMethodTypes.Count > 0) + { + AttachExtensionMethodsToPrototypes(engine); + } - engine.Modules = new Engine.ModuleOperations(engine, Modules.ModuleLoader); + if (Modules.RegisterRequire) + { + // Node js like loading of modules + engine.Realm.GlobalObject.SetProperty("require", new PropertyDescriptor(new ClrFunction( + engine, + "require", + (thisObj, arguments) => + { + var specifier = TypeConverter.ToString(arguments.At(0)); + return engine.Modules.Import(specifier); + }), + PropertyFlag.AllForbidden)); } - private static void AttachExtensionMethodsToPrototypes(Engine engine) + engine.Modules = new Engine.ModuleOperations(engine, Modules.ModuleLoader); + } + + private static void AttachExtensionMethodsToPrototypes(Engine engine) + { + AttachExtensionMethodsToPrototype(engine, engine.Realm.Intrinsics.Array.PrototypeObject, typeof(Array)); + AttachExtensionMethodsToPrototype(engine, engine.Realm.Intrinsics.Boolean.PrototypeObject, typeof(bool)); + AttachExtensionMethodsToPrototype(engine, engine.Realm.Intrinsics.Date.PrototypeObject, typeof(DateTime)); + AttachExtensionMethodsToPrototype(engine, engine.Realm.Intrinsics.Number.PrototypeObject, typeof(double)); + AttachExtensionMethodsToPrototype(engine, engine.Realm.Intrinsics.Object.PrototypeObject, typeof(ExpandoObject)); + AttachExtensionMethodsToPrototype(engine, engine.Realm.Intrinsics.RegExp.PrototypeObject, typeof(System.Text.RegularExpressions.Regex)); + AttachExtensionMethodsToPrototype(engine, engine.Realm.Intrinsics.String.PrototypeObject, typeof(string)); + } + + private static void AttachExtensionMethodsToPrototype(Engine engine, ObjectInstance prototype, Type objectType) + { + if (!engine._extensionMethods.TryGetExtensionMethods(objectType, out var methods)) { - AttachExtensionMethodsToPrototype(engine, engine.Realm.Intrinsics.Array.PrototypeObject, typeof(Array)); - AttachExtensionMethodsToPrototype(engine, engine.Realm.Intrinsics.Boolean.PrototypeObject, typeof(bool)); - AttachExtensionMethodsToPrototype(engine, engine.Realm.Intrinsics.Date.PrototypeObject, typeof(DateTime)); - AttachExtensionMethodsToPrototype(engine, engine.Realm.Intrinsics.Number.PrototypeObject, typeof(double)); - AttachExtensionMethodsToPrototype(engine, engine.Realm.Intrinsics.Object.PrototypeObject, typeof(ExpandoObject)); - AttachExtensionMethodsToPrototype(engine, engine.Realm.Intrinsics.RegExp.PrototypeObject, typeof(System.Text.RegularExpressions.Regex)); - AttachExtensionMethodsToPrototype(engine, engine.Realm.Intrinsics.String.PrototypeObject, typeof(string)); + return; } - private static void AttachExtensionMethodsToPrototype(Engine engine, ObjectInstance prototype, Type objectType) + foreach (var overloads in methods.GroupBy(x => x.Name, StringComparer.Ordinal)) { - if (!engine._extensionMethods.TryGetExtensionMethods(objectType, out var methods)) + PropertyDescriptor CreateMethodInstancePropertyDescriptor(ClrFunction? function) { - return; + var instance = new MethodInfoFunction( + engine, + objectType, + target: null, + overloads.Key, + methods: MethodDescriptor.Build(overloads.ToList()), + function); + + return new PropertyDescriptor(instance, PropertyFlag.AllForbidden); } - foreach (var overloads in methods.GroupBy(x => x.Name, StringComparer.Ordinal)) + JsValue key = overloads.Key; + PropertyDescriptor? descriptorWithFallback = null; + PropertyDescriptor? descriptorWithoutFallback = null; + + if (prototype.HasOwnProperty(key) && + prototype.GetOwnProperty(key).Value is ClrFunction clrFunctionInstance) { - PropertyDescriptor CreateMethodInstancePropertyDescriptor(ClrFunction? function) - { - var instance = new MethodInfoFunction( - engine, - objectType, - target: null, - overloads.Key, - methods: MethodDescriptor.Build(overloads.ToList()), - function); - - return new PropertyDescriptor(instance, PropertyFlag.AllForbidden); - } + descriptorWithFallback = CreateMethodInstancePropertyDescriptor(clrFunctionInstance); + prototype.SetOwnProperty(key, descriptorWithFallback); + } + else + { + descriptorWithoutFallback = CreateMethodInstancePropertyDescriptor(null); + prototype.SetOwnProperty(key, descriptorWithoutFallback); + } - JsValue key = overloads.Key; - PropertyDescriptor? descriptorWithFallback = null; - PropertyDescriptor? descriptorWithoutFallback = null; + // make sure we register both lower case and upper case + if (char.IsUpper(overloads.Key[0])) + { + key = char.ToLower(overloads.Key[0], CultureInfo.InvariantCulture) + overloads.Key.Substring(1); if (prototype.HasOwnProperty(key) && - prototype.GetOwnProperty(key).Value is ClrFunction clrFunctionInstance) + prototype.GetOwnProperty(key).Value is ClrFunction lowerclrFunctionInstance) { - descriptorWithFallback = CreateMethodInstancePropertyDescriptor(clrFunctionInstance); + descriptorWithFallback ??= CreateMethodInstancePropertyDescriptor(lowerclrFunctionInstance); prototype.SetOwnProperty(key, descriptorWithFallback); } else { - descriptorWithoutFallback = CreateMethodInstancePropertyDescriptor(null); + descriptorWithoutFallback ??= CreateMethodInstancePropertyDescriptor(null); prototype.SetOwnProperty(key, descriptorWithoutFallback); } - - // make sure we register both lower case and upper case - if (char.IsUpper(overloads.Key[0])) - { - key = char.ToLower(overloads.Key[0], CultureInfo.InvariantCulture) + overloads.Key.Substring(1); - - if (prototype.HasOwnProperty(key) && - prototype.GetOwnProperty(key).Value is ClrFunction lowerclrFunctionInstance) - { - descriptorWithFallback ??= CreateMethodInstancePropertyDescriptor(lowerclrFunctionInstance); - prototype.SetOwnProperty(key, descriptorWithFallback); - } - else - { - descriptorWithoutFallback ??= CreateMethodInstancePropertyDescriptor(null); - prototype.SetOwnProperty(key, descriptorWithoutFallback); - } - } } } + } - public class DebuggerOptions - { - /// - /// Whether debugger functionality is enabled, defaults to false. - /// - public bool Enabled { get; set; } - - /// - /// Configures the statement handling strategy, defaults to Ignore. - /// - public DebuggerStatementHandling StatementHandling { get; set; } = DebuggerStatementHandling.Ignore; - - /// - /// Configures the step mode used when entering the script. - /// - public StepMode InitialStepMode { get; set; } = StepMode.None; - } + public class DebuggerOptions + { + /// + /// Whether debugger functionality is enabled, defaults to false. + /// + public bool Enabled { get; set; } - public class InteropOptions - { - /// - /// Whether accessing CLR and it's types and methods is allowed from JS code, defaults to false. - /// - public bool Enabled { get; set; } - - /// - /// Whether to expose which can allow bypassing allow lists and open a way to reflection. - /// Defaults to false. - /// - public bool AllowGetType { get; set; } - - /// - /// Whether Jint should allow wrapping objects from System.Reflection namespace. - /// Defaults to false. - /// - public bool AllowSystemReflection { get; set; } - - /// - /// Whether writing to CLR objects is allowed (set properties), defaults to true. - /// - public bool AllowWrite { get; set; } = true; - - /// - /// Whether operator overloading resolution is allowed, defaults to false. - /// - public bool AllowOperatorOverloading { get; set; } - - /// - /// Types holding extension methods that should be considered when resolving methods. - /// - public List ExtensionMethodTypes { get; } = new(); - - /// - /// Object converters to try when build-in conversions. - /// - public List ObjectConverters { get; } = new(); - - /// - /// Whether identity map is persisted for object wrappers in order to maintain object identity. This can cause - /// memory usage to grow when targeting large set and freeing of memory can be delayed due to ConditionalWeakTable semantics. - /// Defaults to false. - /// - public bool TrackObjectWrapperIdentity { get; set; } - - /// - /// If no known type could be guessed, objects are by default wrapped as an - /// ObjectInstance using class ObjectWrapper. This function can be used to - /// change the behavior. - /// - public WrapObjectDelegate WrapObjectHandler { get; set; } = static (engine, target, type) => ObjectWrapper.Create(engine, target, type); - - /// - /// - /// - public MemberAccessorDelegate MemberAccessor { get; set; } = static (engine, target, member) => null; - - /// - /// Exceptions that thrown from CLR code are converted to JavaScript errors and - /// can be used in at try/catch statement. By default these exceptions are bubbled - /// to the CLR host and interrupt the script execution. If handler returns true these exceptions are converted - /// to JS errors that can be caught by the script. - /// - public ExceptionHandlerDelegate ExceptionHandler { get; set; } = _defaultExceptionHandler; - - /// - /// Assemblies to allow scripts to call CLR types directly like System.IO.File. - /// - public List AllowedAssemblies { get; set; } = new(); - - /// - /// Type and member resolving strategy, which allows filtering allowed members and configuring member - /// name matching comparison. - /// - /// - /// As this object holds caching state same instance should be shared between engines, if possible. - /// - public TypeResolver TypeResolver { get; set; } = TypeResolver.Default; - - /// - /// When writing values to CLR objects, how should JS values be coerced to CLR types. - /// Defaults to only coercing to string values when writing to string targets. - /// - public ValueCoercionType ValueCoercion { get; set; } = ValueCoercionType.String; - - /// - /// Strategy to create a CLR object to hold converted . - /// - public Func>? CreateClrObject = _ => new ExpandoObject(); - - /// - /// Strategy to create a CLR object from TypeReference. - /// Defaults to retuning null which makes TypeReference attempt to find suitable constructor. - /// - public Func CreateTypeReferenceObject = (_, _, _) => null; - - internal static readonly ExceptionHandlerDelegate _defaultExceptionHandler = static exception => false; - - /// - /// When not null, is used to serialize any CLR object in an - /// passing through 'JSON.stringify'. - /// - public Func? SerializeToJson { get; set; } - - /// - /// What kind of date time should be produced when JavaScript date is converted to DateTime. If Local, uses . - /// Defaults to . - /// - public DateTimeKind DateTimeKind { get; set; } = DateTimeKind.Utc; - } + /// + /// Configures the statement handling strategy, defaults to Ignore. + /// + public DebuggerStatementHandling StatementHandling { get; set; } = DebuggerStatementHandling.Ignore; - public class ConstraintOptions - { - /// - /// Registered constraints. - /// - public List Constraints { get; } = new(); - - /// - /// Maximum recursion depth allowed, defaults to -1 (no checks). - /// - public int MaxRecursionDepth { get; set; } = -1; - - /// - /// Maximum recursion stack count, defaults to -1 (as-is dotnet stacktrace). - /// - /// - /// Chrome and V8 based engines (ClearScript) that can handle 13955. - /// When set to a different value except -1, it can reduce slight performance/stack trace readability drawback. (after hitting the engine's own limit), - /// When max stack size to be exceeded, Engine throws an exception . - /// - public int MaxExecutionStackCount { get; set; } = StackGuard.Disabled; - - /// - /// Maximum time a Regex is allowed to run, defaults to 10 seconds. - /// - public TimeSpan RegexTimeout { get; set; } = TimeSpan.FromSeconds(10); - - /// - /// The maximum size for JavaScript array, defaults to . - /// - public uint MaxArraySize { get; set; } = uint.MaxValue; - } + /// + /// Configures the step mode used when entering the script. + /// + public StepMode InitialStepMode { get; set; } = StepMode.None; + } + public class InteropOptions + { /// - /// Host related customization, still work in progress. + /// Whether accessing CLR and it's types and methods is allowed from JS code, defaults to false. /// - public class HostOptions - { - internal Func Factory { get; set; } = _ => new Host(); - } + public bool Enabled { get; set; } /// - /// Module related customization + /// Whether to expose which can allow bypassing allow lists and open a way to reflection. + /// Defaults to false. /// - public class ModuleOptions - { - /// - /// Whether to register require function to engine which will delegate to module loader, defaults to false. - /// - public bool RegisterRequire { get; set; } - - /// - /// Module loader implementation, by default exception will be thrown if module loading is not enabled. - /// - public IModuleLoader ModuleLoader { get; set; } = FailFastModuleLoader.Instance; - } + public bool AllowGetType { get; set; } /// - /// JSON.parse / JSON.stringify related customization + /// Whether Jint should allow wrapping objects from System.Reflection namespace. + /// Defaults to false. /// - public class JsonOptions - { - /// - /// The maximum depth allowed when parsing JSON files using "JSON.parse", - /// defaults to 64. - /// - public int MaxParseDepth { get; set; } = 64; - } + public bool AllowSystemReflection { get; set; } + + /// + /// Whether writing to CLR objects is allowed (set properties), defaults to true. + /// + public bool AllowWrite { get; set; } = true; + + /// + /// Whether operator overloading resolution is allowed, defaults to false. + /// + public bool AllowOperatorOverloading { get; set; } + + /// + /// Types holding extension methods that should be considered when resolving methods. + /// + public List ExtensionMethodTypes { get; } = new(); + + /// + /// Object converters to try when build-in conversions. + /// + public List ObjectConverters { get; } = new(); + + /// + /// Whether identity map is persisted for object wrappers in order to maintain object identity. This can cause + /// memory usage to grow when targeting large set and freeing of memory can be delayed due to ConditionalWeakTable semantics. + /// Defaults to false. + /// + public bool TrackObjectWrapperIdentity { get; set; } + + /// + /// If no known type could be guessed, objects are by default wrapped as an + /// ObjectInstance using class ObjectWrapper. This function can be used to + /// change the behavior. + /// + public WrapObjectDelegate WrapObjectHandler { get; set; } = static (engine, target, type) => ObjectWrapper.Create(engine, target, type); + + /// + /// + /// + public MemberAccessorDelegate MemberAccessor { get; set; } = static (engine, target, member) => null; + + /// + /// Exceptions that thrown from CLR code are converted to JavaScript errors and + /// can be used in at try/catch statement. By default these exceptions are bubbled + /// to the CLR host and interrupt the script execution. If handler returns true these exceptions are converted + /// to JS errors that can be caught by the script. + /// + public ExceptionHandlerDelegate ExceptionHandler { get; set; } = _defaultExceptionHandler; + + /// + /// Assemblies to allow scripts to call CLR types directly like System.IO.File. + /// + public List AllowedAssemblies { get; set; } = new(); + + /// + /// Type and member resolving strategy, which allows filtering allowed members and configuring member + /// name matching comparison. + /// + /// + /// As this object holds caching state same instance should be shared between engines, if possible. + /// + public TypeResolver TypeResolver { get; set; } = TypeResolver.Default; + + /// + /// When writing values to CLR objects, how should JS values be coerced to CLR types. + /// Defaults to only coercing to string values when writing to string targets. + /// + public ValueCoercionType ValueCoercion { get; set; } = ValueCoercionType.String; + + /// + /// Strategy to create a CLR object to hold converted . + /// + public Func>? CreateClrObject = _ => new ExpandoObject(); + + /// + /// Strategy to create a CLR object from TypeReference. + /// Defaults to retuning null which makes TypeReference attempt to find suitable constructor. + /// + public Func CreateTypeReferenceObject = (_, _, _) => null; + + internal static readonly ExceptionHandlerDelegate _defaultExceptionHandler = static exception => false; + + /// + /// When not null, is used to serialize any CLR object in an + /// passing through 'JSON.stringify'. + /// + public Func? SerializeToJson { get; set; } + + /// + /// What kind of date time should be produced when JavaScript date is converted to DateTime. If Local, uses . + /// Defaults to . + /// + public DateTimeKind DateTimeKind { get; set; } = DateTimeKind.Utc; } - /// - /// Rules for writing values to CLR fields. - /// - [Flags] - public enum ValueCoercionType + public class ConstraintOptions { /// - /// No coercion will be done. If there's no type converter, and error will be thrown. + /// Registered constraints. + /// + public List Constraints { get; } = new(); + + /// + /// Maximum recursion depth allowed, defaults to -1 (no checks). + /// + public int MaxRecursionDepth { get; set; } = -1; + + /// + /// Maximum recursion stack count, defaults to -1 (as-is dotnet stacktrace). + /// + /// + /// Chrome and V8 based engines (ClearScript) that can handle 13955. + /// When set to a different value except -1, it can reduce slight performance/stack trace readability drawback. (after hitting the engine's own limit), + /// When max stack size to be exceeded, Engine throws an exception . + /// + public int MaxExecutionStackCount { get; set; } = StackGuard.Disabled; + + /// + /// Maximum time a Regex is allowed to run, defaults to 10 seconds. /// - None = 0, + public TimeSpan RegexTimeout { get; set; } = TimeSpan.FromSeconds(10); /// - /// JS coercion using boolean rules "dog" == true, "" == false, 1 == true, 3 == true, 0 == false, { "prop": 1 } == true etc. + /// The maximum size for JavaScript array, defaults to . /// - Boolean = 1, + public uint MaxArraySize { get; set; } = uint.MaxValue; + } + /// + /// Host related customization, still work in progress. + /// + public class HostOptions + { + internal Func Factory { get; set; } = _ => new Host(); + } + + /// + /// Module related customization + /// + public class ModuleOptions + { /// - /// JS coercion to numbers, false == 0, true == 1. valueOf functions will be used when available for object instances. - /// Valid against targets of type: Decimal, Double, Int32, Int64. + /// Whether to register require function to engine which will delegate to module loader, defaults to false. /// - Number = 2, + public bool RegisterRequire { get; set; } /// - /// JS coercion to strings, toString function will be used when available for objects. + /// Module loader implementation, by default exception will be thrown if module loading is not enabled. /// - String = 4, + public IModuleLoader ModuleLoader { get; set; } = FailFastModuleLoader.Instance; + } + /// + /// JSON.parse / JSON.stringify related customization + /// + public class JsonOptions + { /// - /// All coercion rules enabled. + /// The maximum depth allowed when parsing JSON files using "JSON.parse", + /// defaults to 64. /// - All = Boolean | Number | String + public int MaxParseDepth { get; set; } = 64; } } + +/// +/// Rules for writing values to CLR fields. +/// +[Flags] +public enum ValueCoercionType +{ + /// + /// No coercion will be done. If there's no type converter, and error will be thrown. + /// + None = 0, + + /// + /// JS coercion using boolean rules "dog" == true, "" == false, 1 == true, 3 == true, 0 == false, { "prop": 1 } == true etc. + /// + Boolean = 1, + + /// + /// JS coercion to numbers, false == 0, true == 1. valueOf functions will be used when available for object instances. + /// Valid against targets of type: Decimal, Double, Int32, Int64. + /// + Number = 2, + + /// + /// JS coercion to strings, toString function will be used when available for objects. + /// + String = 4, + + /// + /// All coercion rules enabled. + /// + All = Boolean | Number | String +} + +/// +/// Features that only work partially, if all. +/// +[Flags] +public enum ExperimentalFeature +{ + /// + /// No experimental features enabled. + /// + None = 0, + + /// + /// Generator support + /// + Generators = 1, + + /// + /// All coercion rules enabled. + /// + All = Generators +} diff --git a/Jint/Runtime/Interpreter/Expressions/JintExpression.cs b/Jint/Runtime/Interpreter/Expressions/JintExpression.cs index 2329635f1d..cbd8978df7 100644 --- a/Jint/Runtime/Interpreter/Expressions/JintExpression.cs +++ b/Jint/Runtime/Interpreter/Expressions/JintExpression.cs @@ -132,6 +132,7 @@ protected internal static JintExpression Build(Expression expression) ? new JintCallExpression((CallExpression) ((ChainExpression) expression).Expression) : new JintMemberExpression((MemberExpression) ((ChainExpression) expression).Expression), Nodes.AwaitExpression => new JintAwaitExpression((AwaitExpression) expression), + Nodes.YieldExpression => new JintYieldExpression((YieldExpression) expression), _ => null }; diff --git a/Jint/Runtime/Interpreter/Expressions/JintYieldExpression.cs b/Jint/Runtime/Interpreter/Expressions/JintYieldExpression.cs new file mode 100644 index 0000000000..21c45916d9 --- /dev/null +++ b/Jint/Runtime/Interpreter/Expressions/JintYieldExpression.cs @@ -0,0 +1,241 @@ +using Esprima.Ast; +using Jint.Native; +using Jint.Native.Generator; +using Jint.Native.Iterator; +using Jint.Native.Object; + +namespace Jint.Runtime.Interpreter.Expressions; + +internal sealed class JintYieldExpression : JintExpression +{ + public JintYieldExpression(YieldExpression expression) : base(expression) + { + } + + protected override object EvaluateInternal(EvaluationContext context) + { + if (!context.Engine.Options.ExperimentalFeatures.HasFlag(ExperimentalFeature.Generators)) + { + ExceptionHelper.ThrowJavaScriptException( + context.Engine.Intrinsics.Error, + "Yield expressions are not supported in the engine, you can enable the experimental feature 'Generators' in engine options to use them."); + } + + var expression = (YieldExpression) _expression; + + JsValue value; + if (context.Engine.ExecutionContext.Generator?._nextValue is not null) + { + value = context.Engine.ExecutionContext.Generator._nextValue; + } + else if (expression.Argument is not null) + { + value = Build(expression.Argument).GetValue(context); + } + else + { + value = JsValue.Undefined; + } + + if (expression.Delegate) + { + value = YieldDelegate(context, value); + } + + return Yield(context, value); + } + + /// + /// https://tc39.es/ecma262/#sec-generator-function-definitions-runtime-semantics-evaluation + /// + private JsValue YieldDelegate(EvaluationContext context, JsValue value) + { + var engine = context.Engine; + var generatorKind = engine.ExecutionContext.GetGeneratorKind(); + var iterator = value.GetIterator(engine.Realm, generatorKind); + var iteratorRecord = iterator; + var received = new Completion(CompletionType.Normal, JsValue.Undefined, _expression); + while (true) + { + if (received.Type == CompletionType.Normal) + { + iterator.TryIteratorStep(out var innerResult); + if (generatorKind == GeneratorKind.Async) + { + innerResult = Await(innerResult); + } + + if (innerResult is not IteratorResult oi) + { + ExceptionHelper.ThrowTypeError(engine.Realm); + } + + var done = IteratorComplete(innerResult); + if (done) + { + return IteratorValue(innerResult); + } + + if (generatorKind == GeneratorKind.Async) + { + received = AsyncGeneratorYield(IteratorValue(innerResult)); + } + else + { + received = GeneratorYield(innerResult); + } + + } + else if (received.Type == CompletionType.Throw) + { + var throwMethod = iterator.GetMethod("throw"); + if (throwMethod is not null) + { + var innerResult = throwMethod.Call(iterator, new[]{ received.Value }); + if (generatorKind == GeneratorKind.Async) + { + innerResult = Await(innerResult); + } + // NOTE: Exceptions from the inner iterator throw method are propagated. + // Normal completions from an inner throw method are processed similarly to an inner next. + if (innerResult is not ObjectInstance oi) + { + ExceptionHelper.ThrowTypeError(engine.Realm); + } + + var done = IteratorComplete(innerResult); + if (done) + { + IteratorValue(innerResult); + } + + if (generatorKind == GeneratorKind.Async) + { + received = AsyncGeneratorYield(IteratorValue(innerResult)); + } + else + { + received = GeneratorYield(innerResult); + } + } + else + { + // NOTE: If iterator does not have a throw method, this throw is going to terminate the yield* loop. + // But first we need to give iterator a chance to clean up. + var closeCompletion = new Completion(CompletionType.Normal, null!, _expression); + if (generatorKind == GeneratorKind.Async) + { + AsyncIteratorClose(iteratorRecord, CompletionType.Normal); + } + else + { + iteratorRecord.Close(CompletionType.Normal); + } + + ExceptionHelper.ThrowTypeError(engine.Realm, "Iterator does not have close method"); + } + } + else + { + var returnMethod = iterator.GetMethod("return"); + if (returnMethod is null) + { + var temp = received.Value; + if (generatorKind == GeneratorKind.Async) + { + temp = Await(received.Value); + } + + return temp; + } + + var innerReturnResult = returnMethod.Call(iterator, new[] { received.Value }); + if (generatorKind == GeneratorKind.Async) + { + innerReturnResult = Await(innerReturnResult); + } + + if (innerReturnResult is not ObjectInstance oi) + { + ExceptionHelper.ThrowTypeError(engine.Realm); + } + + var done = IteratorComplete(innerReturnResult); + if (done) + { + var val = IteratorValue(innerReturnResult); + return val; + } + + if (generatorKind == GeneratorKind.Async) + { + received = AsyncGeneratorYield(IteratorValue(innerReturnResult)); + } + else + { + received = GeneratorYield(innerReturnResult); + } + } + } + } + + private Completion GeneratorYield(JsValue innerResult) + { + throw new System.NotImplementedException(); + } + + private static bool IteratorComplete(JsValue iterResult) + { + return TypeConverter.ToBoolean(iterResult.Get(CommonProperties.Done)); + } + + private static JsValue IteratorValue(JsValue iterResult) + { + return iterResult.Get(CommonProperties.Value); + } + + private static void AsyncIteratorClose(object iteratorRecord, CompletionType closeCompletion) + { + ExceptionHelper.ThrowNotImplementedException("async"); + } + + /// + /// https://tc39.es/ecma262/#sec-asyncgeneratoryield + /// + private static Completion AsyncGeneratorYield(object iteratorValue) + { + ExceptionHelper.ThrowNotImplementedException("async"); + return default; + } + + /// + /// https://tc39.es/ecma262/#await + /// + private static ObjectInstance Await(JsValue innerResult) + { + ExceptionHelper.ThrowNotImplementedException("await"); + return null; + } + + /// + /// https://tc39.es/ecma262/#sec-yield + /// + private static JsValue Yield(EvaluationContext context, JsValue iterNextObj) + { + var engine = context.Engine; + var generatorKind = engine.ExecutionContext.GetGeneratorKind(); + if (generatorKind == GeneratorKind.Async) + { + // TODO return ? AsyncGeneratorYield(undefined); + ExceptionHelper.ThrowNotImplementedException("async not implemented"); + } + + // https://tc39.es/ecma262/#sec-generatoryield + var genContext = engine.ExecutionContext; + var generator = genContext.Generator; + generator!._generatorState = GeneratorState.SuspendedYield; + //_engine.LeaveExecutionContext(); + + return iterNextObj; + } +}