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

Implement delete_property_or_throw #1345

Closed
wants to merge 1 commit into from

Conversation

jedel1043
Copy link
Member

@jedel1043 jedel1043 commented Jun 19, 2021

Some functions of Array use remove_property as an equivalent for DeletePropertyOrThrow ( O, P ), but this function is not spec compliant in some cases, as it silently fails when there's an error deleting a property.

This PR changes the following:

  • Adds the function delete_property_or_throw for GcObject
  • Adds the function delete_property_or_throw for Value (temporarily until we separate Objects from Values)
  • Replaces instances of remove_property with delete_property_or_throw in Array functions

@jedel1043 jedel1043 changed the title Implement Value.try_remove_property Implement try_remove_property Jun 19, 2021
@jedel1043 jedel1043 changed the title Implement try_remove_property Implement delete_property_or_throw Jun 19, 2021
@Razican
Copy link
Member

Razican commented Jun 19, 2021

Test262 conformance changes:

Test result master count PR count difference
Total 78,897 78,897 0
Passed 26,940 26,942 +2
Ignored 15,628 15,628 0
Failed 36,329 36,327 -2
Panics 1 1 0
Conformance 34.15% 34.15% +0.00%
Fixed tests:
test/built-ins/Array/prototype/copyWithin/return-abrupt-from-delete-target.js [strict mode] (previously Failed)
test/built-ins/Array/prototype/copyWithin/return-abrupt-from-delete-target.js (previously Failed)
test/built-ins/Map/prototype/keys/returns-iterator.js (previously Panic)
New panics:
test/built-ins/Map/prototype/keys/returns-iterator.js [strict mode] (previously Passed)

@HalidOdat
Copy link
Member

This is implemented in #1422 and many other spec function, so closing this.

@HalidOdat HalidOdat closed this Jul 22, 2021
@jedel1043 jedel1043 deleted the try_remove_prop branch July 22, 2021 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants