Skip to content

Conversation

@MaartenS11
Copy link
Member

@MaartenS11 MaartenS11 commented Nov 12, 2025

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.

  • Emulator
  • Arduino
  • ESP-IDF
  • Zephyr

@MaartenS11 MaartenS11 force-pushed the refactor/primitive-vector branch 2 times, most recently from 04c2e5b to 400a3a6 Compare November 13, 2025 15:23
@tolauwae
Copy link
Member

@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)

@MaartenS11
Copy link
Member Author

MaartenS11 commented Nov 18, 2025

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.

@tolauwae
Copy link
Member

That is good to know. I think we can resume this after the ECOOP deadline.

@MaartenS11 MaartenS11 changed the title Initial work on making primitives a vector in the interpreter Store primitives in a vector in the interpreter Nov 24, 2025
@MaartenS11 MaartenS11 marked this pull request as ready for review November 24, 2025 17:46
@MaartenS11 MaartenS11 force-pushed the refactor/primitive-vector branch from 19140e7 to bddce1a Compare November 24, 2025 17:47
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.

Dynamic sized primitive array

3 participants