-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Reduce number of addressing modes in GDScript VM #47727
Conversation
https://github.com/qarmin/Qarminer/archive/refs/heads/4.0.zip shows error
https://github.com/qarmin/RegressionTestProject/archive/refs/heads/4.0.zip shows this errors
Both projects works fine in master |
Also with first project I have crash when running project without editor
|
There's now only 3 addressing modes: stack, constant, and member. Self, class, and nil are now present respectively in the first 3 stack slots. Global and class constants are moved to local constants when compiling. Named globals is only present on editor to use on tool singletons, so its use now emits a new instruction to copy the global to the stack. This allow us to further optimize the VM later by embedding the addressing modes in the instructions themselves, which is better done with less permutations.
a6840b3
to
cf4079c
Compare
@qarmin Thanks! It seems I had forgot to account for the new stack space in one case. Tested with both projects and I don't get script errors anymore nor crashes (with or without editor). |
Thanks! |
There's now only 3 addressing modes: stack, constant, and member.
Self, class, and nil are now present respectively in the first 3 stack slots. Global and class constants are moved to local constants when compiling. Named globals is only present on editor to use on tool singletons, so its use now emits a new instruction to copy the global to the stack.
This allow us to further optimize the VM later by embedding the addressing modes in the instructions themselves, which is better done with less permutations.