Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

[Merged by Bors] - Remove strict flag from Context #2069

Closed
wants to merge 3 commits into from

Conversation

raskad
Copy link
Member

@raskad raskad commented May 11, 2022

The Context currently contains a strict flag that indicates is global strict mode is active. This is redundant to the strict flag that is set on every function and causes some non spec compliant situations. This pull request removes the strict flag from Context and fixes some resulting errors.

Detailed changes:

  • Remove strict flag from Context
  • Make 262 tester compliant with the strict section in test262/INTERPRETING.md
  • Make 262 tester compliant with the raw flag in test262/INTERPRETING.md
  • Allow function declarations in strict mode
  • Fix parser flag propagation for classes
  • Move some early errors from the lexer to the parser
  • Add / fix some early errors for 'arguments' and 'eval' identifier usage in strict mode
  • Refactor ArrayLiteral parser for readability and correct early errors

@raskad raskad added enhancement New feature or request parser Issues surrounding the parser lexer Issues surrounding the lexer test Issues and PRs related to the tests. API labels May 11, 2022
@github-actions
Copy link

github-actions bot commented May 11, 2022

Test262 conformance changes

VM implementation

Test result main count PR count difference
Total 90,192 90,163 -29
Passed 54,661 54,889 +228
Ignored 23,279 23,277 -2
Failed 12,252 11,997 -255
Panics 0 0 0
Conformance 60.61% 60.88% +0.27%
Fixed tests (267):
test/built-ins/ThrowTypeError/forbidden-caller.js [strict mode] (previously Failed)
test/built-ins/ThrowTypeError/forbidden-caller.js (previously Failed)
test/built-ins/ThrowTypeError/length.js [strict mode] (previously Failed)
test/built-ins/ThrowTypeError/length.js (previously Failed)
test/built-ins/ThrowTypeError/forbidden-arguments.js [strict mode] (previously Failed)
test/built-ins/ThrowTypeError/forbidden-arguments.js (previously Failed)
test/built-ins/ThrowTypeError/unique-per-realm-unmapped-args.js [strict mode] (previously Failed)
test/built-ins/ThrowTypeError/unique-per-realm-unmapped-args.js (previously Failed)
test/built-ins/ThrowTypeError/is-function.js [strict mode] (previously Failed)
test/built-ins/ThrowTypeError/is-function.js (previously Failed)
test/built-ins/ThrowTypeError/throws-type-error.js [strict mode] (previously Failed)
test/built-ins/ThrowTypeError/throws-type-error.js (previously Failed)
test/built-ins/ThrowTypeError/prototype.js [strict mode] (previously Failed)
test/built-ins/ThrowTypeError/prototype.js (previously Failed)
test/built-ins/ThrowTypeError/unique-per-realm-non-simple.js [strict mode] (previously Failed)
test/built-ins/ThrowTypeError/unique-per-realm-non-simple.js (previously Failed)
test/built-ins/Function/15.3.5.4_2-33gs.js (previously Failed)
test/built-ins/Function/15.3.5.4_2-36gs.js (previously Failed)
test/built-ins/Function/15.3.5.4_2-30gs.js (previously Failed)
test/built-ins/Function/prototype/apply/S15.3.4.3_A5_T3.js (previously Failed)
test/built-ins/Function/prototype/call/S15.3.4.4_A5_T3.js (previously Failed)
test/built-ins/Array/prototype/concat/Array.prototype.concat_strict-arguments.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/concat/Array.prototype.concat_strict-arguments.js (previously Failed)
test/built-ins/Array/prototype/concat/Array.prototype.concat_non-array.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/concat/Array.prototype.concat_non-array.js (previously Failed)
test/language/directive-prologue/10.1.1-5-s.js (previously Failed)
test/language/directive-prologue/10.1.1-14-s.js (previously Failed)
test/language/directive-prologue/func-decl-inside-func-decl-runtime.js (previously Failed)
test/language/directive-prologue/10.1.1-8-s.js (previously Failed)
test/language/eval-code/indirect/block-decl-strict.js [strict mode] (previously Failed)
test/language/eval-code/indirect/block-decl-strict.js (previously Failed)
test/language/eval-code/indirect/global-env-rec-eval.js [strict mode] (previously Failed)
test/language/eval-code/direct/block-decl-eval-source-is-strict-nostrict.js (previously Failed)
test/language/eval-code/direct/block-decl-onlystrict.js [strict mode] (previously Failed)
test/language/eval-code/direct/strict-caller-function-context.js (previously Failed)
test/language/eval-code/direct/block-decl-eval-source-is-strict-onlystrict.js [strict mode] (previously Failed)
test/language/expressions/class/cpn-class-expr-fields-computed-property-name-from-yield-expression.js [strict mode] (previously Failed)
test/language/expressions/class/cpn-class-expr-fields-computed-property-name-from-yield-expression.js (previously Failed)
test/language/expressions/class/cpn-class-expr-fields-methods-computed-property-name-from-yield-expression.js [strict mode] (previously Failed)
test/language/expressions/class/cpn-class-expr-fields-methods-computed-property-name-from-yield-expression.js (previously Failed)
test/language/expressions/class/accessor-name-inst-computed-yield-expr.js [strict mode] (previously Failed)
test/language/expressions/class/accessor-name-inst-computed-yield-expr.js (previously Failed)
test/language/expressions/class/cpn-class-expr-accessors-computed-property-name-from-yield-expression.js [strict mode] (previously Failed)
test/language/expressions/class/cpn-class-expr-accessors-computed-property-name-from-yield-expression.js (previously Failed)
test/language/expressions/class/cpn-class-expr-computed-property-name-from-yield-expression.js [strict mode] (previously Failed)
test/language/expressions/class/cpn-class-expr-computed-property-name-from-yield-expression.js (previously Failed)
test/language/expressions/class/accessor-name-static-computed-yield-expr.js [strict mode] (previously Failed)
test/language/expressions/class/accessor-name-static-computed-yield-expr.js (previously Failed)
test/language/expressions/class/static-init-await-binding.js [strict mode] (previously Failed)
test/language/expressions/class/static-init-await-binding.js (previously Failed)
test/language/expressions/class/elements/nested-private-derived-cls-indirect-eval-err-contains-supercall-2.js [strict mode] (previously Failed)
test/language/expressions/class/elements/nested-private-derived-cls-indirect-eval-err-contains-supercall-2.js (previously Failed)
test/language/expressions/class/elements/private-method-access-on-inner-function.js [strict mode] (previously Failed)
test/language/expressions/class/elements/private-method-access-on-inner-function.js (previously Failed)
test/language/expressions/class/elements/private-field-access-on-inner-function.js [strict mode] (previously Failed)
test/language/expressions/class/elements/private-field-access-on-inner-function.js (previously Failed)
test/language/expressions/class/elements/nested-private-indirect-eval-err-contains-newtarget.js [strict mode] (previously Failed)
test/language/expressions/class/elements/nested-private-indirect-eval-err-contains-newtarget.js (previously Failed)
test/language/expressions/class/elements/arrow-body-derived-cls-indirect-eval-err-contains-supercall-1.js [strict mode] (previously Failed)
test/language/expressions/class/elements/arrow-body-derived-cls-indirect-eval-err-contains-supercall-1.js (previously Failed)
test/language/expressions/class/elements/nested-derived-cls-indirect-eval-err-contains-supercall-1.js [strict mode] (previously Failed)
test/language/expressions/class/elements/nested-derived-cls-indirect-eval-err-contains-supercall-1.js (previously Failed)
test/language/expressions/class/elements/arrow-body-indirect-eval-err-contains-newtarget.js [strict mode] (previously Failed)
test/language/expressions/class/elements/arrow-body-indirect-eval-err-contains-newtarget.js (previously Failed)
test/language/expressions/class/elements/arrow-body-private-indirect-eval-err-contains-newtarget.js [strict mode] (previously Failed)
test/language/expressions/class/elements/arrow-body-private-indirect-eval-err-contains-newtarget.js (previously Failed)
test/language/expressions/class/elements/nested-indirect-eval-err-contains-newtarget.js [strict mode] (previously Failed)
test/language/expressions/class/elements/nested-indirect-eval-err-contains-newtarget.js (previously Failed)
test/language/expressions/class/elements/static-private-method-access-on-inner-function.js [strict mode] (previously Failed)
test/language/expressions/class/elements/static-private-method-access-on-inner-function.js (previously Failed)
test/language/expressions/class/elements/private-derived-cls-indirect-eval-err-contains-supercall.js [strict mode] (previously Failed)
test/language/expressions/class/elements/private-derived-cls-indirect-eval-err-contains-supercall.js (previously Failed)
test/language/expressions/class/elements/nested-indirect-eval-contains-arguments.js (previously Failed)
test/language/expressions/class/elements/private-derived-cls-indirect-eval-contains-superproperty-2.js [strict mode] (previously Failed)
test/language/expressions/class/elements/private-derived-cls-indirect-eval-contains-superproperty-2.js (previously Failed)
test/language/expressions/class/elements/nested-private-derived-cls-indirect-eval-contains-superproperty-1.js [strict mode] (previously Failed)
test/language/expressions/class/elements/nested-private-derived-cls-indirect-eval-contains-superproperty-1.js (previously Failed)
test/language/expressions/class/elements/nested-derived-cls-indirect-eval-contains-superproperty-2.js [strict mode] (previously Failed)
test/language/expressions/class/elements/nested-derived-cls-indirect-eval-contains-superproperty-2.js (previously Failed)
test/language/expressions/class/elements/arrow-body-derived-cls-indirect-eval-contains-superproperty-1.js [strict mode] (previously Failed)
test/language/expressions/class/elements/arrow-body-derived-cls-indirect-eval-contains-superproperty-1.js (previously Failed)
test/language/expressions/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-2.js [strict mode] (previously Failed)
test/language/expressions/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-2.js (previously Failed)
test/language/expressions/class/elements/derived-cls-indirect-eval-contains-superproperty-1.js [strict mode] (previously Failed)
test/language/expressions/class/elements/derived-cls-indirect-eval-contains-superproperty-1.js (previously Failed)
test/language/expressions/class/elements/derived-cls-indirect-eval-contains-superproperty-2.js [strict mode] (previously Failed)
test/language/expressions/class/elements/derived-cls-indirect-eval-contains-superproperty-2.js (previously Failed)
test/language/expressions/class/elements/arrow-body-private-derived-cls-indirect-eval-contains-superproperty-2.js [strict mode] (previously Failed)
test/language/expressions/class/elements/arrow-body-private-derived-cls-indirect-eval-contains-superproperty-2.js (previously Failed)
test/language/expressions/class/elements/nested-private-indirect-eval-contains-arguments.js (previously Failed)
test/language/expressions/class/elements/arrow-body-private-derived-cls-indirect-eval-err-contains-supercall-2.js [strict mode] (previously Failed)
test/language/expressions/class/elements/arrow-body-private-derived-cls-indirect-eval-err-contains-supercall-2.js (previously Failed)
test/language/expressions/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-1.js [strict mode] (previously Failed)
test/language/expressions/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-1.js (previously Failed)
test/language/expressions/class/elements/arrow-body-private-derived-cls-indirect-eval-contains-superproperty-1.js [strict mode] (previously Failed)
test/language/expressions/class/elements/arrow-body-private-derived-cls-indirect-eval-contains-superproperty-1.js (previously Failed)
test/language/expressions/class/elements/regular-definitions-rs-static-privatename-identifier-initializer.js [strict mode] (previously Failed)
test/language/expressions/class/elements/regular-definitions-rs-static-privatename-identifier-initializer.js (previously Failed)
test/language/expressions/class/elements/arrow-body-private-derived-cls-indirect-eval-err-contains-supercall-1.js [strict mode] (previously Failed)
test/language/expressions/class/elements/arrow-body-private-derived-cls-indirect-eval-err-contains-supercall-1.js (previously Failed)
test/language/expressions/class/elements/regular-definitions-rs-static-privatename-identifier-initializer-alt.js [strict mode] (previously Failed)
test/language/expressions/class/elements/regular-definitions-rs-static-privatename-identifier-initializer-alt.js (previously Failed)
test/language/expressions/class/elements/nested-derived-cls-indirect-eval-err-contains-supercall-2.js [strict mode] (previously Failed)
test/language/expressions/class/elements/nested-derived-cls-indirect-eval-err-contains-supercall-2.js (previously Failed)
test/language/expressions/class/elements/private-getter-access-on-inner-function.js [strict mode] (previously Failed)
test/language/expressions/class/elements/private-getter-access-on-inner-function.js (previously Failed)
test/language/expressions/class/elements/private-derived-cls-indirect-eval-contains-superproperty-1.js [strict mode] (previously Failed)
test/language/expressions/class/elements/private-derived-cls-indirect-eval-contains-superproperty-1.js (previously Failed)
test/language/expressions/class/elements/nested-derived-cls-indirect-eval-err-contains-supercall.js [strict mode] (previously Failed)
test/language/expressions/class/elements/nested-derived-cls-indirect-eval-err-contains-supercall.js (previously Failed)
test/language/expressions/class/elements/arrow-body-private-derived-cls-indirect-eval-err-contains-supercall.js [strict mode] (previously Failed)
test/language/expressions/class/elements/arrow-body-private-derived-cls-indirect-eval-err-contains-supercall.js (previously Failed)
test/language/expressions/class/elements/derived-cls-indirect-eval-err-contains-supercall.js [strict mode] (previously Failed)
test/language/expressions/class/elements/derived-cls-indirect-eval-err-contains-supercall.js (previously Failed)
test/language/expressions/class/elements/static-private-getter-access-on-inner-function.js [strict mode] (previously Failed)
test/language/expressions/class/elements/static-private-getter-access-on-inner-function.js (previously Failed)
test/language/expressions/class/elements/regular-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js [strict mode] (previously Failed)
test/language/expressions/class/elements/regular-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js (previously Failed)
test/language/expressions/class/elements/derived-cls-indirect-eval-err-contains-supercall-1.js [strict mode] (previously Failed)
test/language/expressions/class/elements/derived-cls-indirect-eval-err-contains-supercall-1.js (previously Failed)
test/language/expressions/class/elements/private-indirect-eval-contains-arguments.js (previously Failed)
test/language/expressions/class/elements/indirect-eval-err-contains-newtarget.js [strict mode] (previously Failed)
test/language/expressions/class/elements/indirect-eval-err-contains-newtarget.js (previously Failed)
test/language/expressions/class/elements/derived-cls-indirect-eval-err-contains-supercall-2.js [strict mode] (previously Failed)
test/language/expressions/class/elements/derived-cls-indirect-eval-err-contains-supercall-2.js (previously Failed)
test/language/expressions/class/elements/private-indirect-eval-err-contains-newtarget.js [strict mode] (previously Failed)
test/language/expressions/class/elements/private-indirect-eval-err-contains-newtarget.js (previously Failed)
test/language/expressions/class/elements/nested-private-derived-cls-indirect-eval-err-contains-supercall-1.js [strict mode] (previously Failed)
test/language/expressions/class/elements/nested-private-derived-cls-indirect-eval-err-contains-supercall-1.js (previously Failed)
test/language/expressions/class/elements/nested-derived-cls-indirect-eval-contains-superproperty-1.js [strict mode] (previously Failed)
test/language/expressions/class/elements/nested-derived-cls-indirect-eval-contains-superproperty-1.js (previously Failed)
test/language/expressions/class/elements/nested-private-derived-cls-indirect-eval-contains-superproperty-2.js [strict mode] (previously Failed)
test/language/expressions/class/elements/nested-private-derived-cls-indirect-eval-contains-superproperty-2.js (previously Failed)
test/language/expressions/class/elements/arrow-body-derived-cls-indirect-eval-err-contains-supercall-2.js [strict mode] (previously Failed)
test/language/expressions/class/elements/arrow-body-derived-cls-indirect-eval-err-contains-supercall-2.js (previously Failed)
test/language/expressions/class/elements/nested-private-derived-cls-indirect-eval-err-contains-supercall.js [strict mode] (previously Failed)
test/language/expressions/class/elements/nested-private-derived-cls-indirect-eval-err-contains-supercall.js (previously Failed)
test/language/expressions/class/elements/arrow-body-derived-cls-indirect-eval-err-contains-supercall.js [strict mode] (previously Failed)
test/language/expressions/class/elements/arrow-body-derived-cls-indirect-eval-err-contains-supercall.js (previously Failed)
test/language/expressions/class/elements/arrow-body-derived-cls-indirect-eval-contains-superproperty-2.js [strict mode] (previously Failed)
test/language/expressions/class/elements/arrow-body-derived-cls-indirect-eval-contains-superproperty-2.js (previously Failed)
test/language/expressions/class/elements/indirect-eval-contains-arguments.js (previously Failed)
test/language/expressions/class/elements/syntax/valid/grammar-privatemeth-duplicate-meth-nestedclassmeth.js [strict mode] (previously Failed)
test/language/expressions/class/elements/syntax/valid/grammar-privatemeth-duplicate-meth-nestedclassmeth.js (previously Failed)
test/language/expressions/assignment/assignment-operator-calls-putvalue-lref--rval--1.js (previously Failed)
test/language/function-code/10.4.3-1-2-s.js (previously Failed)
test/language/function-code/10.4.3-1-4-s.js (previously Failed)
test/language/function-code/10.4.3-1-1-s.js (previously Failed)
test/language/statements/for-of/arguments-unmapped-mutation.js (previously Failed)
test/language/statements/for-of/arguments-unmapped-aliasing.js (previously Failed)
test/language/statements/for-of/arguments-unmapped.js (previously Failed)
test/language/statements/function/static-init-await-binding-valid.js [strict mode] (previously Failed)
test/language/statements/function/static-init-await-binding-valid.js (previously Failed)
test/language/statements/class/cpn-class-decl-fields-methods-computed-property-name-from-yield-expression.js [strict mode] (previously Failed)
test/language/statements/class/cpn-class-decl-fields-methods-computed-property-name-from-yield-expression.js (previously Failed)
test/language/statements/class/static-init-await-binding-valid.js [strict mode] (previously Failed)
test/language/statements/class/static-init-await-binding-valid.js (previously Failed)
test/language/statements/class/cpn-class-decl-computed-property-name-from-yield-expression.js [strict mode] (previously Failed)
test/language/statements/class/cpn-class-decl-computed-property-name-from-yield-expression.js (previously Failed)
test/language/statements/class/cpn-class-decl-fields-computed-property-name-from-yield-expression.js [strict mode] (previously Failed)
test/language/statements/class/cpn-class-decl-fields-computed-property-name-from-yield-expression.js (previously Failed)
test/language/statements/class/accessor-name-inst-computed-yield-expr.js [strict mode] (previously Failed)
test/language/statements/class/accessor-name-inst-computed-yield-expr.js (previously Failed)
test/language/statements/class/accessor-name-static-computed-yield-expr.js [strict mode] (previously Failed)
test/language/statements/class/accessor-name-static-computed-yield-expr.js (previously Failed)
test/language/statements/class/cpn-class-decl-accessors-computed-property-name-from-yield-expression.js [strict mode] (previously Failed)
test/language/statements/class/cpn-class-decl-accessors-computed-property-name-from-yield-expression.js (previously Failed)
test/language/statements/class/elements/nested-private-derived-cls-indirect-eval-err-contains-supercall-2.js [strict mode] (previously Failed)
test/language/statements/class/elements/nested-private-derived-cls-indirect-eval-err-contains-supercall-2.js (previously Failed)
test/language/statements/class/elements/privatename-not-valid-eval-earlyerr-4.js [strict mode] (previously Failed)
test/language/statements/class/elements/privatename-not-valid-eval-earlyerr-4.js (previously Failed)
test/language/statements/class/elements/private-method-access-on-inner-function.js [strict mode] (previously Failed)
test/language/statements/class/elements/private-method-access-on-inner-function.js (previously Failed)
test/language/statements/class/elements/private-field-access-on-inner-function.js [strict mode] (previously Failed)
test/language/statements/class/elements/private-field-access-on-inner-function.js (previously Failed)
test/language/statements/class/elements/nested-private-indirect-eval-err-contains-newtarget.js [strict mode] (previously Failed)
test/language/statements/class/elements/nested-private-indirect-eval-err-contains-newtarget.js (previously Failed)
test/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-err-contains-supercall-1.js [strict mode] (previously Failed)
test/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-err-contains-supercall-1.js (previously Failed)
test/language/statements/class/elements/nested-derived-cls-indirect-eval-err-contains-supercall-1.js [strict mode] (previously Failed)
test/language/statements/class/elements/nested-derived-cls-indirect-eval-err-contains-supercall-1.js (previously Failed)
test/language/statements/class/elements/arrow-body-indirect-eval-err-contains-newtarget.js [strict mode] (previously Failed)
test/language/statements/class/elements/arrow-body-indirect-eval-err-contains-newtarget.js (previously Failed)
test/language/statements/class/elements/arrow-body-private-indirect-eval-err-contains-newtarget.js [strict mode] (previously Failed)
test/language/statements/class/elements/arrow-body-private-indirect-eval-err-contains-newtarget.js (previously Failed)
test/language/statements/class/elements/nested-indirect-eval-err-contains-newtarget.js [strict mode] (previously Failed)
test/language/statements/class/elements/nested-indirect-eval-err-contains-newtarget.js (previously Failed)
test/language/statements/class/elements/static-private-method-access-on-inner-function.js [strict mode] (previously Failed)
test/language/statements/class/elements/static-private-method-access-on-inner-function.js (previously Failed)
test/language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall.js [strict mode] (previously Failed)
test/language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall.js (previously Failed)
test/language/statements/class/elements/nested-indirect-eval-contains-arguments.js (previously Failed)
test/language/statements/class/elements/private-derived-cls-indirect-eval-contains-superproperty-2.js [strict mode] (previously Failed)
test/language/statements/class/elements/private-derived-cls-indirect-eval-contains-superproperty-2.js (previously Failed)
test/language/statements/class/elements/nested-private-derived-cls-indirect-eval-contains-superproperty-1.js [strict mode] (previously Failed)
test/language/statements/class/elements/nested-private-derived-cls-indirect-eval-contains-superproperty-1.js (previously Failed)
test/language/statements/class/elements/nested-derived-cls-indirect-eval-contains-superproperty-2.js [strict mode] (previously Failed)
test/language/statements/class/elements/nested-derived-cls-indirect-eval-contains-superproperty-2.js (previously Failed)
test/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-contains-superproperty-1.js [strict mode] (previously Failed)
test/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-contains-superproperty-1.js (previously Failed)
test/language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-2.js [strict mode] (previously Failed)
test/language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-2.js (previously Failed)
test/language/statements/class/elements/derived-cls-indirect-eval-contains-superproperty-1.js [strict mode] (previously Failed)
test/language/statements/class/elements/derived-cls-indirect-eval-contains-superproperty-1.js (previously Failed)
test/language/statements/class/elements/derived-cls-indirect-eval-contains-superproperty-2.js [strict mode] (previously Failed)
test/language/statements/class/elements/derived-cls-indirect-eval-contains-superproperty-2.js (previously Failed)
test/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-contains-superproperty-2.js [strict mode] (previously Failed)
test/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-contains-superproperty-2.js (previously Failed)
test/language/statements/class/elements/nested-private-indirect-eval-contains-arguments.js (previously Failed)
test/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-err-contains-supercall-2.js [strict mode] (previously Failed)
test/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-err-contains-supercall-2.js (previously Failed)
test/language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-1.js [strict mode] (previously Failed)
test/language/statements/class/elements/private-derived-cls-indirect-eval-err-contains-supercall-1.js (previously Failed)
test/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-contains-superproperty-1.js [strict mode] (previously Failed)
test/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-contains-superproperty-1.js (previously Failed)
test/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-initializer.js [strict mode] (previously Failed)
test/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-initializer.js (previously Failed)
test/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-err-contains-supercall-1.js [strict mode] (previously Failed)
test/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-err-contains-supercall-1.js (previously Failed)
test/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-initializer-alt.js [strict mode] (previously Failed)
test/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-initializer-alt.js (previously Failed)
test/language/statements/class/elements/nested-derived-cls-indirect-eval-err-contains-supercall-2.js [strict mode] (previously Failed)
test/language/statements/class/elements/nested-derived-cls-indirect-eval-err-contains-supercall-2.js (previously Failed)
test/language/statements/class/elements/private-getter-access-on-inner-function.js [strict mode] (previously Failed)
test/language/statements/class/elements/private-getter-access-on-inner-function.js (previously Failed)
test/language/statements/class/elements/private-derived-cls-indirect-eval-contains-superproperty-1.js [strict mode] (previously Failed)
test/language/statements/class/elements/private-derived-cls-indirect-eval-contains-superproperty-1.js (previously Failed)
test/language/statements/class/elements/nested-derived-cls-indirect-eval-err-contains-supercall.js [strict mode] (previously Failed)
test/language/statements/class/elements/nested-derived-cls-indirect-eval-err-contains-supercall.js (previously Failed)
test/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-err-contains-supercall.js [strict mode] (previously Failed)
test/language/statements/class/elements/arrow-body-private-derived-cls-indirect-eval-err-contains-supercall.js (previously Failed)
test/language/statements/class/elements/derived-cls-indirect-eval-err-contains-supercall.js [strict mode] (previously Failed)
test/language/statements/class/elements/derived-cls-indirect-eval-err-contains-supercall.js (previously Failed)
test/language/statements/class/elements/static-private-getter-access-on-inner-function.js [strict mode] (previously Failed)
test/language/statements/class/elements/static-private-getter-access-on-inner-function.js (previously Failed)
test/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js [strict mode] (previously Failed)
test/language/statements/class/elements/regular-definitions-rs-static-privatename-identifier-initializer-alt-by-classname.js (previously Failed)
test/language/statements/class/elements/derived-cls-indirect-eval-err-contains-supercall-1.js [strict mode] (previously Failed)
test/language/statements/class/elements/derived-cls-indirect-eval-err-contains-supercall-1.js (previously Failed)
test/language/statements/class/elements/private-indirect-eval-contains-arguments.js (previously Failed)
test/language/statements/class/elements/indirect-eval-err-contains-newtarget.js [strict mode] (previously Failed)
test/language/statements/class/elements/indirect-eval-err-contains-newtarget.js (previously Failed)
test/language/statements/class/elements/derived-cls-indirect-eval-err-contains-supercall-2.js [strict mode] (previously Failed)
test/language/statements/class/elements/derived-cls-indirect-eval-err-contains-supercall-2.js (previously Failed)
test/language/statements/class/elements/private-indirect-eval-err-contains-newtarget.js [strict mode] (previously Failed)
test/language/statements/class/elements/private-indirect-eval-err-contains-newtarget.js (previously Failed)
test/language/statements/class/elements/nested-private-derived-cls-indirect-eval-err-contains-supercall-1.js [strict mode] (previously Failed)
test/language/statements/class/elements/nested-private-derived-cls-indirect-eval-err-contains-supercall-1.js (previously Failed)
test/language/statements/class/elements/nested-derived-cls-indirect-eval-contains-superproperty-1.js [strict mode] (previously Failed)
test/language/statements/class/elements/nested-derived-cls-indirect-eval-contains-superproperty-1.js (previously Failed)
test/language/statements/class/elements/nested-private-derived-cls-indirect-eval-contains-superproperty-2.js [strict mode] (previously Failed)
test/language/statements/class/elements/nested-private-derived-cls-indirect-eval-contains-superproperty-2.js (previously Failed)
test/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-err-contains-supercall-2.js [strict mode] (previously Failed)
test/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-err-contains-supercall-2.js (previously Failed)
test/language/statements/class/elements/nested-private-derived-cls-indirect-eval-err-contains-supercall.js [strict mode] (previously Failed)
test/language/statements/class/elements/nested-private-derived-cls-indirect-eval-err-contains-supercall.js (previously Failed)
test/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-err-contains-supercall.js [strict mode] (previously Failed)
test/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-err-contains-supercall.js (previously Failed)
test/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-contains-superproperty-2.js [strict mode] (previously Failed)
test/language/statements/class/elements/arrow-body-derived-cls-indirect-eval-contains-superproperty-2.js (previously Failed)
test/language/statements/class/elements/indirect-eval-contains-arguments.js (previously Failed)
test/language/statements/class/elements/syntax/valid/grammar-privatemeth-duplicate-meth-nestedclassmeth.js [strict mode] (previously Failed)
test/language/statements/class/elements/syntax/valid/grammar-privatemeth-duplicate-meth-nestedclassmeth.js (previously Failed)
test/language/statements/variable/12.2.1-9-s.js [strict mode] (previously Failed)
test/language/statements/variable/12.2.1-20-s.js [strict mode] (previously Failed)
test/language/statements/variable/12.2.1-21-s.js [strict mode] (previously Failed)
test/language/statements/variable/12.2.1-10-s.js [strict mode] (previously Failed)
Broken tests (13):
test/language/expressions/class/elements/direct-eval-err-contains-arguments.js [strict mode] (previously Passed)
test/language/expressions/class/elements/private-direct-eval-err-contains-arguments.js [strict mode] (previously Passed)
test/language/expressions/class/elements/nested-direct-eval-err-contains-arguments.js [strict mode] (previously Passed)
test/language/expressions/class/elements/arrow-body-private-direct-eval-err-contains-arguments.js [strict mode] (previously Passed)
test/language/expressions/class/elements/nested-private-direct-eval-err-contains-arguments.js [strict mode] (previously Passed)
test/language/expressions/class/elements/arrow-body-direct-eval-err-contains-arguments.js [strict mode] (previously Passed)
test/language/statements/class/static-init-invalid-await.js [strict mode] (previously Passed)
test/language/statements/class/elements/direct-eval-err-contains-arguments.js [strict mode] (previously Passed)
test/language/statements/class/elements/private-direct-eval-err-contains-arguments.js [strict mode] (previously Passed)
test/language/statements/class/elements/nested-direct-eval-err-contains-arguments.js [strict mode] (previously Passed)
test/language/statements/class/elements/arrow-body-private-direct-eval-err-contains-arguments.js [strict mode] (previously Passed)
test/language/statements/class/elements/nested-private-direct-eval-err-contains-arguments.js [strict mode] (previously Passed)
test/language/statements/class/elements/arrow-body-direct-eval-err-contains-arguments.js [strict mode] (previously Passed)

@codecov
Copy link

codecov bot commented May 11, 2022

Codecov Report

Merging #2069 (989232b) into main (ace28e5) will decrease coverage by 0.36%.
The diff coverage is 19.92%.

@@            Coverage Diff             @@
##             main    #2069      +/-   ##
==========================================
- Coverage   44.17%   43.80%   -0.37%     
==========================================
  Files         216      216              
  Lines       19383    19543     +160     
==========================================
- Hits         8562     8561       -1     
- Misses      10821    10982     +161     
Impacted Files Coverage Δ
boa_cli/src/main.rs 5.55% <0.00%> (ø)
boa_engine/src/builtins/eval/mod.rs 9.09% <0.00%> (-0.91%) ⬇️
boa_engine/src/syntax/ast/node/await_expr/mod.rs 28.57% <0.00%> (-11.43%) ⬇️
boa_engine/src/syntax/ast/node/declaration/mod.rs 35.65% <0.00%> (-14.35%) ⬇️
..._engine/src/syntax/ast/node/operator/assign/mod.rs 23.00% <0.00%> (-0.96%) ⬇️
boa_engine/src/syntax/lexer/identifier.rs 56.25% <ø> (+3.70%) ⬆️
boa_engine/src/syntax/parser/error.rs 43.18% <0.00%> (-2.28%) ⬇️
...engine/src/syntax/parser/expression/identifiers.rs 30.58% <ø> (+1.17%) ⬆️
boa_engine/src/syntax/parser/expression/mod.rs 40.68% <ø> (ø)
...engine/src/syntax/parser/expression/primary/mod.rs 45.90% <0.00%> (-0.38%) ⬇️
... and 27 more

Continue to review full report at Codecov.

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

@github-actions
Copy link

Benchmark for 8f850b3

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 548.3±0.93ns 466.4±2.87ns -14.94%
Arithmetic operations (Execution) 573.4±6.82ns 554.2±2.04ns -3.35%
Arithmetic operations (Parser) 5.3±0.01µs 5.1±0.01µs -3.77%
Array access (Compiler) 1297.7±13.89ns 1477.4±2.78ns +13.85%
Array access (Execution) 6.9±0.02µs 6.9±0.02µs 0.00%
Array access (Parser) 12.6±0.02µs 10.9±0.02µs -13.49%
Array creation (Compiler) 2.0±0.02µs 2.0±0.02µs 0.00%
Array creation (Execution) 2.3±0.03ms 2.2±0.00ms -4.35%
Array creation (Parser) 12.7±0.11µs 12.7±0.03µs 0.00%
Array pop (Compiler) 3.5±0.03µs 3.6±0.05µs +2.86%
Array pop (Execution) 1151.3±5.79µs 974.9±2.10µs -15.32%
Array pop (Parser) 127.5±1.63µs 119.7±0.21µs -6.12%
Boolean Object Access (Compiler) 1014.2±19.18ns 1007.1±9.72ns -0.70%
Boolean Object Access (Execution) 3.7±0.03µs 3.6±0.01µs -2.70%
Boolean Object Access (Parser) 13.5±0.04µs 13.5±0.01µs 0.00%
Clean js (Compiler) 4.1±0.04µs 4.2±0.03µs +2.44%
Clean js (Execution) 596.6±8.41µs 591.3±3.19µs -0.89%
Clean js (Parser) 27.6±0.07µs 27.5±0.03µs -0.36%
Create Realm 279.6±1.27ns 281.3±0.15ns +0.61%
Dynamic Object Property Access (Compiler) 1653.4±19.23ns 1612.9±20.20ns -2.45%
Dynamic Object Property Access (Execution) 4.7±0.07µs 4.8±0.04µs +2.13%
Dynamic Object Property Access (Parser) 9.7±0.04µs 9.9±0.01µs +2.06%
Fibonacci (Compiler) 2.4±0.02µs 2.4±0.02µs 0.00%
Fibonacci (Execution) 1166.2±13.27µs 1178.2±4.93µs +1.03%
Fibonacci (Parser) 15.1±0.10µs 15.0±0.06µs -0.66%
For loop (Compiler) 2.6±0.01µs 2.3±0.01µs -11.54%
For loop (Execution) 14.3±0.16µs 14.1±0.07µs -1.40%
For loop (Parser) 13.0±0.04µs 13.0±0.03µs 0.00%
Mini js (Compiler) 3.7±0.05µs 3.8±0.01µs +2.70%
Mini js (Execution) 562.8±8.74µs 557.5±3.08µs -0.94%
Mini js (Parser) 24.2±0.05µs 24.1±0.03µs -0.41%
Number Object Access (Compiler) 954.0±17.95ns 958.2±3.78ns +0.44%
Number Object Access (Execution) 2.9±0.03µs 2.9±0.01µs 0.00%
Number Object Access (Parser) 10.4±0.11µs 10.5±0.01µs +0.96%
Object Creation (Compiler) 1408.3±17.42ns 1451.2±4.80ns +3.05%
Object Creation (Execution) 4.4±0.06µs 4.5±0.02µs +2.27%
Object Creation (Parser) 8.4±0.11µs 8.5±0.02µs +1.19%
RegExp (Compiler) 1636.9±24.49ns 1622.7±22.17ns -0.87%
RegExp (Execution) 12.3±0.09µs 10.3±0.04µs -16.26%
RegExp (Parser) 9.5±0.02µs 9.5±0.01µs 0.00%
RegExp Creation (Compiler) 1423.8±32.96ns 1420.0±17.75ns -0.27%
RegExp Creation (Execution) 8.4±0.04µs 7.9±0.02µs -5.95%
RegExp Creation (Parser) 8.9±0.02µs 7.9±0.01µs -11.24%
RegExp Literal (Compiler) 1682.6±12.04ns 1618.6±20.16ns -3.80%
RegExp Literal (Execution) 10.7±0.14µs 10.3±0.04µs -3.74%
RegExp Literal (Parser) 7.6±0.06µs 7.6±0.01µs 0.00%
RegExp Literal Creation (Compiler) 1439.0±18.94ns 1411.6±18.66ns -1.90%
RegExp Literal Creation (Execution) 8.4±0.03µs 9.0±0.03µs +7.14%
RegExp Literal Creation (Parser) 6.8±0.01µs 6.0±0.01µs -11.76%
Static Object Property Access (Compiler) 1443.2±21.70ns 1660.0±4.02ns +15.02%
Static Object Property Access (Execution) 4.6±0.07µs 4.6±0.03µs 0.00%
Static Object Property Access (Parser) 8.9±0.10µs 9.2±0.02µs +3.37%
String Object Access (Compiler) 1325.7±17.85ns 1331.2±5.53ns +0.41%
String Object Access (Execution) 5.3±0.07µs 5.2±0.01µs -1.89%
String Object Access (Parser) 13.2±0.08µs 13.2±0.02µs 0.00%
String comparison (Compiler) 1983.1±23.34ns 2.0±0.02µs +0.85%
String comparison (Execution) 4.0±0.05µs 4.6±0.01µs +15.00%
String comparison (Parser) 9.9±0.15µs 10.1±0.04µs +2.02%
String concatenation (Compiler) 1835.0±10.58ns 1830.2±8.83ns -0.26%
String concatenation (Execution) 3.8±0.05µs 3.9±0.02µs +2.63%
String concatenation (Parser) 6.9±0.10µs 7.0±0.02µs +1.45%
String copy (Compiler) 1348.5±19.13ns 1502.7±2.09ns +11.43%
String copy (Execution) 3.6±0.03µs 3.6±0.01µs 0.00%
String copy (Parser) 5.2±0.06µs 5.2±0.02µs 0.00%
Symbols (Compiler) 1020.0±4.12ns 992.3±2.44ns -2.72%
Symbols (Execution) 3.6±0.04µs 3.8±0.01µs +5.56%
Symbols (Parser) 4.1±0.08µs 4.2±0.02µs +2.44%

Copy link
Member

@HalidOdat HalidOdat left a comment

Choose a reason for hiding this comment

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

Looks good to me! :)

@raskad raskad force-pushed the strict-refactor branch from 6067de8 to 989232b Compare May 21, 2022 23:10
Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

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

Looks great! Good job!

@jedel1043
Copy link
Member

I suppose the new failing errors are cases where the tests passed because of missing features or so?

@raskad
Copy link
Member Author

raskad commented May 21, 2022

I suppose the new failing errors are cases where the tests passed because of missing features or so?

Exactly. I have a fix for those in the pipeline together with some other fixes.

@jedel1043
Copy link
Member

I suppose the new failing errors are cases where the tests passed because of missing features or so?

Exactly. I have a fix for those in the pipeline together with some other fixes.

Nice! Let's merge this then :)

@jedel1043
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request May 21, 2022
The `Context` currently contains a `strict` flag that indicates is global strict mode is active. This is redundant to the strict flag that is set on every function and causes some non spec compliant situations. This pull request removes the strict flag from `Context` and fixes some resulting errors.

Detailed changes:

- Remove strict flag from `Context`
- Make 262 tester compliant with the strict section in [test262/INTERPRETING.md](https://github.com/tc39/test262/blob/2e7cdfbe18eae4309677033673bb4b5ac6b1de40/INTERPRETING.md#strict-mode)
- Make 262 tester compliant with the `raw` flag in [test262/INTERPRETING.md](https://github.com/tc39/test262/blob/2e7cdfbe18eae4309677033673bb4b5ac6b1de40/INTERPRETING.md#flags)
- Allow function declarations in strict mode
- Fix parser flag propagation for classes
- Move some early errors from the lexer to the parser
- Add / fix some early errors for 'arguments' and 'eval' identifier usage in strict mode
- Refactor `ArrayLiteral` parser for readability and correct early errors
@bors
Copy link

bors bot commented May 21, 2022

Pull request successfully merged into main.

Build succeeded:

@bors bors bot changed the title Remove strict flag from Context [Merged by Bors] - Remove strict flag from Context May 21, 2022
@bors bors bot closed this May 21, 2022
@bors bors bot deleted the strict-refactor branch May 21, 2022 23:48
@github-actions
Copy link

Benchmark for e1b7c57

Click to view benchmark
Test Base PR %
Arithmetic operations (Compiler) 509.4±2.04ns 544.7±1.36ns +6.93%
Arithmetic operations (Execution) 524.4±0.45ns 530.0±1.23ns +1.07%
Arithmetic operations (Parser) 6.6±0.03µs 6.5±0.05µs -1.52%
Array access (Compiler) 1580.9±6.25ns 1539.1±7.07ns -2.64%
Array access (Execution) 9.1±0.06µs 9.3±0.05µs +2.20%
Array access (Parser) 14.6±0.04µs 14.2±0.05µs -2.74%
Array creation (Compiler) 2.5±0.01µs 2.5±0.01µs 0.00%
Array creation (Execution) 2.6±0.00ms 2.5±0.00ms -3.85%
Array creation (Parser) 16.7±0.05µs 16.4±0.04µs -1.80%
Array pop (Compiler) 4.2±0.01µs 4.0±0.01µs -4.76%
Array pop (Execution) 1165.3±18.72µs 1167.1±8.14µs +0.15%
Array pop (Parser) 169.5±0.20µs 158.5±0.25µs -6.49%
Boolean Object Access (Compiler) 1164.1±4.71ns 1184.0±5.21ns +1.71%
Boolean Object Access (Execution) 4.7±0.02µs 4.7±0.01µs 0.00%
Boolean Object Access (Parser) 17.0±0.05µs 17.1±0.03µs +0.59%
Clean js (Compiler) 5.2±0.03µs 5.2±0.02µs 0.00%
Clean js (Execution) 772.5±5.66µs 774.8±5.31µs +0.30%
Clean js (Parser) 35.9±0.05µs 36.0±0.07µs +0.28%
Create Realm 271.1±2.06ns 273.0±0.36ns +0.70%
Dynamic Object Property Access (Compiler) 2.0±0.00µs 2.0±0.00µs 0.00%
Dynamic Object Property Access (Execution) 5.8±0.02µs 5.8±0.02µs 0.00%
Dynamic Object Property Access (Parser) 12.9±0.03µs 12.8±0.04µs -0.78%
Fibonacci (Compiler) 3.1±0.06µs 3.1±0.05µs 0.00%
Fibonacci (Execution) 1493.9±7.14µs 1503.7±2.99µs +0.66%
Fibonacci (Parser) 19.6±0.08µs 19.4±0.04µs -1.02%
For loop (Compiler) 2.9±0.01µs 2.9±0.01µs 0.00%
For loop (Execution) 16.9±0.06µs 17.1±0.04µs +1.18%
For loop (Parser) 17.1±0.03µs 17.0±0.03µs -0.58%
Mini js (Compiler) 4.6±0.05µs 4.5±0.03µs -2.17%
Mini js (Execution) 725.1±12.00µs 720.9±9.03µs -0.58%
Mini js (Parser) 31.4±0.03µs 31.4±0.27µs 0.00%
Number Object Access (Compiler) 1113.7±2.44ns 1129.9±2.86ns +1.45%
Number Object Access (Execution) 3.7±0.02µs 3.6±0.01µs -2.70%
Number Object Access (Parser) 13.1±0.08µs 13.2±0.04µs +0.76%
Object Creation (Compiler) 1690.1±6.09ns 1738.7±3.62ns +2.88%
Object Creation (Execution) 5.5±0.01µs 5.5±0.02µs 0.00%
Object Creation (Parser) 11.2±0.02µs 11.2±0.04µs 0.00%
RegExp (Compiler) 2.0±0.01µs 1954.9±5.93ns -2.25%
RegExp (Execution) 12.9±0.08µs 13.0±0.08µs +0.78%
RegExp (Parser) 12.2±0.06µs 12.2±0.05µs 0.00%
RegExp Creation (Compiler) 1720.3±4.08ns 1717.7±3.76ns -0.15%
RegExp Creation (Execution) 9.8±0.03µs 9.9±0.03µs +1.02%
RegExp Creation (Parser) 10.2±0.04µs 10.1±0.03µs -0.98%
RegExp Literal (Compiler) 1954.8±18.51ns 1936.3±4.25ns -0.95%
RegExp Literal (Execution) 12.8±0.09µs 13.0±0.09µs +1.56%
RegExp Literal (Parser) 9.9±0.02µs 9.7±0.02µs -2.02%
RegExp Literal Creation (Compiler) 1705.4±3.45ns 1730.6±2.88ns +1.48%
RegExp Literal Creation (Execution) 9.8±0.03µs 9.9±0.02µs +1.02%
RegExp Literal Creation (Parser) 7.7±0.05µs 7.7±0.03µs 0.00%
Static Object Property Access (Compiler) 1729.8±2.94ns 1744.6±3.15ns +0.86%
Static Object Property Access (Execution) 5.7±0.02µs 5.8±0.02µs +1.75%
Static Object Property Access (Parser) 12.0±0.02µs 11.8±0.03µs -1.67%
String Object Access (Compiler) 1556.1±4.08ns 1572.6±6.33ns +1.06%
String Object Access (Execution) 6.8±0.03µs 6.8±0.04µs 0.00%
String Object Access (Parser) 16.9±0.03µs 16.8±0.03µs -0.59%
String comparison (Compiler) 2.4±0.01µs 2.5±0.01µs +4.17%
String comparison (Execution) 5.0±0.02µs 5.1±0.02µs +2.00%
String comparison (Parser) 13.2±0.02µs 13.2±0.04µs 0.00%
String concatenation (Compiler) 1953.6±4.97ns 1917.7±5.94ns -1.84%
String concatenation (Execution) 4.8±0.03µs 4.8±0.03µs 0.00%
String concatenation (Parser) 9.3±0.01µs 9.2±0.03µs -1.08%
String copy (Compiler) 1627.6±5.19ns 1589.5±6.78ns -2.34%
String copy (Execution) 4.5±0.01µs 4.6±0.02µs +2.22%
String copy (Parser) 7.0±0.03µs 6.9±0.02µs -1.43%
Symbols (Compiler) 1177.2±5.44ns 1215.5±26.53ns +3.25%
Symbols (Execution) 4.6±0.01µs 4.6±0.02µs 0.00%
Symbols (Parser) 5.3±0.03µs 5.4±0.02µs +1.89%

@raskad raskad added this to the v0.15.0 milestone May 22, 2022
Razican pushed a commit that referenced this pull request Jun 8, 2022
The `Context` currently contains a `strict` flag that indicates is global strict mode is active. This is redundant to the strict flag that is set on every function and causes some non spec compliant situations. This pull request removes the strict flag from `Context` and fixes some resulting errors.

Detailed changes:

- Remove strict flag from `Context`
- Make 262 tester compliant with the strict section in [test262/INTERPRETING.md](https://github.com/tc39/test262/blob/2e7cdfbe18eae4309677033673bb4b5ac6b1de40/INTERPRETING.md#strict-mode)
- Make 262 tester compliant with the `raw` flag in [test262/INTERPRETING.md](https://github.com/tc39/test262/blob/2e7cdfbe18eae4309677033673bb4b5ac6b1de40/INTERPRETING.md#flags)
- Allow function declarations in strict mode
- Fix parser flag propagation for classes
- Move some early errors from the lexer to the parser
- Add / fix some early errors for 'arguments' and 'eval' identifier usage in strict mode
- Refactor `ArrayLiteral` parser for readability and correct early errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API enhancement New feature or request lexer Issues surrounding the lexer parser Issues surrounding the parser test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants