-
Notifications
You must be signed in to change notification settings - Fork 11
Store primitives in a vector in the interpreter #325
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
base: main
Are you sure you want to change the base?
Conversation
04c2e5b to
400a3a6
Compare
|
@MaartenS11 this looks pretty complete to me. What is holding this PR back from being merged? (I don't mind fixing something if it can help) |
|
It is indeed pretty complete, I might later make some changes (I'll do that in other PRs) but this already removes a lot of boilerplate. I only think reversibility might not work so I should test that with a simple example to make sure, but it would be easy to fix. I also think we should merge this before the mutable globals since that can help reduce duplication in that PR. |
|
That is good to know. I think we can resume this after the ECOOP deadline. |
19140e7 to
bddce1a
Compare
Tested this in the emulator, and it works fine, since the code is shared now it should also work on physical hardware.
TODO: Fix prints in the Interpreter class
Also removed some other unnecessary header files in WARDuino.h.
bddce1a to
339803e
Compare
|
Just rebased on main, this did have some conflicts with the mutable globals as expected since those introduce additional duplicate code for each platform. To not make the scope of this PR too big, I propose this duplication is dealt with in another PR. |
Resolves #323.
This PR moves the primitive table from each of the platforms to a vector that is a member of the interpreter. This way a lot of code can be deduplicated between the platforms and primitives can be added dynamically.