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

feat(ecmascript): array and object assignment pattern #592

Merged
merged 14 commits into from
Mar 15, 2025

Conversation

kermanx
Copy link
Contributor

@kermanx kermanx commented Mar 14, 2025

This PR adds support for array and object assignment pattern.

TODO: Object assignment pattern's rest part. (I am not sure how to design it. The existing implementation of object binding pattern requires many special instructions, but are they also required in Object assignment pattern?)

@kermanx kermanx marked this pull request as ready for review March 15, 2025 05:07
aapoalas
aapoalas previously approved these changes Mar 15, 2025
Copy link
Member

@aapoalas aapoalas left a comment

Choose a reason for hiding this comment

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

Wow, amazing work, figuring out how the bytecode compiler works and especially how on earth all the assignment expressions work, those complicated devils!

How did you like the bytecode work? I've always found it pretty fun and amazing, how the small instructions come together to form something great. I look forward to one day maybe making an optimising compiler out of this all :)

I'm perfectly happy to merge this as-is; I did leave one or two nitpicks and suggestions, if you want to take those up. Also, if you want to still finish up some of the remaining todo!'s then that's fine as well. Let me know how you want to go forward with this, and thank you <3

@kermanx
Copy link
Contributor Author

kermanx commented Mar 15, 2025

Thank you for reviewing~

Also, if you want to still finish up some of the remaining todo!'s then that's fine as well. Let me know how you want to go forward with this, and thank you <3

At the moment I mostly choose what to do at random. In the future I would like to do things that improve performance :)

@aapoalas aapoalas merged commit 7eaa965 into trynova:main Mar 15, 2025
2 checks passed
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.

2 participants