-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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 GDScript code generation abstraction #41338
Conversation
Does this close godotengine/godot-proposals#1176? Alternatively, does this PR make that proposal non-applicable? |
No and no. It might make a tad easier to implement that though, as it could be done as an implementation of this interface without having to touch the compiler. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some quick commemts at a glance. Ill need to wait until i have more time to sit down and give it a thorough review
#41355 should get you there. 🙂 |
261afb0
to
2f74b37
Compare
Implement the abstraction by targeting the current VM.
2f74b37
to
8963035
Compare
8963035
to
635c6a0
Compare
This adds an interface for code generation to GDScript. In itself it does not make much of a difference, but it does make it easier to add a new backend without having to worry about the parse tree, instead just implementing a lower-level interface.
This will be useful for the new typed VM, since it can be made without creating a new compiler code. Could also be useful in the future if we want to compile GDScript to other targets.
Also includes a disassembler for the current VM which I used to debug the code generation. It can't be accessed currently since the command for the old tests isn't available anymore, but this is useful to have for when we have a new way to trigger those.