Skip to content
This repository has been archived by the owner on Feb 12, 2022. It is now read-only.

Move GetPartial/SetPartial #2345

Closed

Conversation

sebmarkbage
Copy link
Contributor

This is part of a larger set of features for the object model to fully model the Set/Get phases for partial and abstract objects. I wanted to break it down into smaller steps.

This is just a plain move of GetPartial and SetPartial to get.js/properties.js. All other property modeling for concrete keys are already there. You can tell that a lot of imports and logic becomes duplicated because they do similar things.

An alternative could be to move all the logic into ObjectValue but that's not how the spec is structured.
This also causes trouble for me trying to generalize these operations for abstract object values which may not consult the ObjectValue's virtual dispatch.

The properties module is really responsible for all kind of mutation to
an object and managing properties. The equivalent logic for known
properties is all here.

By moving it here it opens up for adding support for richer types too
which we already support for non-partial properties.
Copy link

@facebook-github-bot facebook-github-bot left a comment

Choose a reason for hiding this comment

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

sebmarkbage is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants