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(table): ✨ first implementation of pointer system in zencode #752

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

matteo-cristino
Copy link
Collaborator

More testing is needed before merging

@matteo-cristino matteo-cristino marked this pull request as draft October 24, 2023 14:57
@matteo-cristino matteo-cristino marked this pull request as ready for review November 10, 2023 15:17
@jaromil
Copy link
Member

jaromil commented Nov 21, 2023

It is safer to use a pointer that is not inside the HEAP, but in the stack (ZEN.pointer).

Also we can use the keyword "pointer" for all variable names and make it a convention inside Zencode, so that all internal uses of have() will return the pointer contents, in case a ZEN.pointer is non-nil. This will automatically implement all existing statements for usage with pointers. Of course this is theoretical, we need some caution and more test coverage.

@jaromil jaromil self-requested a review November 21, 2023 15:18
@matteo-cristino
Copy link
Collaborator Author

I have a doubt. In the case pointer is stored in the stack, where we should save the codec? Always in the CODEC table or in stack too?
If save in the stack I think we would have some problem with statements that look ups for codec from CODEC table, but on the other hand we will have an element not present in the HEAP which codec is present in the CODEC.

Moreover a look on the then part is needed if pointer is saved in the stack since we can print also the pointer.

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.

None yet

2 participants