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

Add ForEachOwnPropertyKeyStep #201

Merged
merged 13 commits into from
Jan 18, 2024
Merged

Add ForEachOwnPropertyKeyStep #201

merged 13 commits into from
Jan 18, 2024

Conversation

d01c2
Copy link
Contributor

@d01c2 d01c2 commented Jan 17, 2024

This PR includes adding ForEachOwnPropertyKeyStep to support these statements in spec:

For each own property key _P_ of _O_ such that _P_ is an array index, in ascending numeric index order, do
For each own property key _P_ of _O_ such that _P_ is a String and _P_ is not an array index, in ascending chronological order of property creation, do
For each own property key _P_ of _O_ such that _P_ is a Symbol, in ascending chronological order of property creation, do
For each own property key _P_ of _A_ such that _P_ is an array index and ! ToUint32(_P_) ≥ _newLen_, in descending numeric index order, do
For each own property key _P_ of _O_ such that _P_ is an array index and ! ToIntegerOrInfinity(_P_) ≥ _len_, in ascending numeric index order, do
For each own property key _P_ of _O_ such that _P_ is a String and _P_ is not an array index, in ascending chronological order of property creation, do
For each own property key _P_ of _O_ such that _P_ is a Symbol, in ascending chronological order of property creation, do
For each own property key _P_ of _O_ such that _P_ is a String and _P_ is not an integer index, in ascending chronological order of property creation, do
For each own property key _P_ of _O_ such that _P_ is a Symbol, in ascending chronological order of property creation, do

@d01c2 d01c2 changed the title Added ForEachOwnPropertyKeyStep Add ForEachOwnPropertyKeyStep Jan 17, 2024
@d01c2
Copy link
Contributor Author

d01c2 commented Jan 17, 2024

By supporting compiler for ForEachOwnPropertyKeyStep, we can check ESMeta tests all passed including AnalyzeSmallTest, EvalSmallTest. However after conducting tests on test262, it was observed that some tests were failed as following:

- fail (F): 4
+ fail (F): 18
- not-supported (N): 28,479
+ not-supported (N): 28,422

I guess there would be some implementation error in compiler. So I would like to discuss this matter.

@d01c2
Copy link
Contributor Author

d01c2 commented Jan 18, 2024

In addition, following is fail.json file I've received:

{
  "[InterpreterError] return not undefined: #2979" : [
    "built-ins/Object/freeze/15.2.3.9-2-a-8.js"
  ],
  "[InterpreterError] return not undefined: #5141" : [
    "built-ins/Object/getOwnPropertyNames/non-object-argument-valid.js"
  ],
  "[InterpreterError] return not undefined: #2401" : [
    "built-ins/Object/create/15.2.3.5-4-7.js"
  ],
  "[InterpreterError] return not undefined: #2428" : [
    "built-ins/Object/defineProperties/15.2.3.7-2-8.js"
  ],
  "[InterpreterError] return not undefined: #2650" : [
    "built-ins/Object/getOwnPropertyNames/15.2.3.4-4-43.js"
  ],
  "[InterpreterError] return not undefined: #2630" : [
    "built-ins/Object/getOwnPropertyNames/15.2.3.4-4-42.js"
  ],
  "[InterpreterError] return not undefined: #2363" : [
    "built-ins/Object/create/15.2.3.5-4-30.js"
  ],
  "[InterpreterError] return not undefined: #3263" : [
    "built-ins/Object/getOwnPropertyNames/15.2.3.4-4-44.js"
  ],
  "[InterpreterError] return not undefined: #2399" : [
    "built-ins/Object/defineProperties/15.2.3.7-5-a-9.js"
  ],
  "[InterpreterError] return not undefined: #2990" : [
    "built-ins/Object/getOwnPropertyDescriptors/tamper-with-global-object.js"
  ],
  "Java heap space" : [
    "language/expressions/tagged-template/tco-call.js",
    "language/expressions/tagged-template/tco-member.js"
  ],
  "[InterpreterError] return not undefined: #4193" : [
    "built-ins/Reflect/ownKeys/order-after-define-property.js"
  ],
  "[InterpreterError] return not undefined: #2641" : [
    "built-ins/Object/isFrozen/15.2.3.12-2-a-12.js"
  ],
  "[InterpreterError] return not undefined: #2881" : [
    "built-ins/Object/defineProperties/15.2.3.7-5-b-241.js"
  ],
  "[InterpreterError] return not undefined: #2811" : [
    "built-ins/Object/getOwnPropertyDescriptors/primitive-strings.js"
  ],
  "[InterpreterError] return not undefined: #2217" : [
    "language/types/number/S8.5_A13_T2.js"
  ],
  "[InterpreterError] return not undefined: #3056" : [
    "built-ins/Object/seal/object-seal-p-is-own-property-of-a-string-object-which-implements-its-own-get-own-property.js"
  ]
}

I guess "Java heap space" is occurred due to testing environment, so we have to fix others.

@d01c2 d01c2 marked this pull request as ready for review January 18, 2024 05:10
Copy link
Contributor

@jhnaldo jhnaldo left a comment

Choose a reason for hiding this comment

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

LGTM! 👍🏻

@jhnaldo jhnaldo merged commit d1c37aa into dev Jan 18, 2024
6 checks passed
@jhnaldo jhnaldo deleted the dev-own-property-keys branch January 18, 2024 12:35
@jhnaldo jhnaldo added enhancement Enhance the quality of a feature area:lang Related to metalanguage area:parser Related to parsers labels Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:lang Related to metalanguage area:parser Related to parsers enhancement Enhance the quality of a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants