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

Variable cells #1499

Merged
merged 12 commits into from
Sep 25, 2023
Merged

Variable cells #1499

merged 12 commits into from
Sep 25, 2023

Conversation

Bike
Copy link
Member

@Bike Bike commented Sep 25, 2023

Since I just did #1496 might as well knock this one out too. Stores dynamic variable values in cells rather than straight in the symbols. Bla bla bla separation of concerns is good, and this will make first class environments easier.

Bike added 12 commits September 24, 2023 11:59
This is a bit cleaner, and also paves the way for non-symbols
having bindings (i.e., variable cells).
Besides the benefits with first class environments and etc., this
saves 32 bits from symbols that aren't bound (the _BindingIdx).
This is necessary to let them signal unbound errors without needing
a provided name. Also for printing nicely.
ALso work more directly with the TL indices in the compiled code.
Little microoptimization to save a lookup.
Symbols should have had cleanup for the same reason - reusing
TL indices - but don't seem to have for quite some time. It's
probably not that important in practice since symbols/cells are
hardly ever gonna be garbage collected, but we might as well try
to get it right.
Used by Cando. It's fine I guess.

Should really be changed to a proper setf though.
@Bike Bike marked this pull request as ready for review September 25, 2023 19:08
@Bike Bike merged commit b61c990 into main Sep 25, 2023
8 checks passed
@Bike Bike deleted the vcell branch September 25, 2023 19:19
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.

1 participant