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

Remove typeq #1510

Merged
merged 12 commits into from
Nov 24, 2023
Merged

Remove typeq #1510

merged 12 commits into from
Nov 24, 2023

Conversation

Bike
Copy link
Member

@Bike Bike commented Nov 7, 2023

The typeq special operator is the main remaining messy point we have to worry about in the compiler. It works poorly with the bytecode, adds a complication to code walking, yada yada yada.

This PR leaves (most) things as typep calls but puts in optimizations clasp-cleavir can use to replace those calls with header checks &c. like we have. It also improves clasp-cleavir type inference a bit with information about predicate functions like consp.

Bike added 11 commits November 3, 2023 15:49
Moving away from compiler macros and inlining so things work
better with bytecode.
Not integrated with the atomics though.

Hoping to use this for headerq.
HEADERP is like a functional version of most of TYPEQ - you can
use it to check the "header class" of a general object.
clasp-cleavir doesn't yet optimize HEADERP calls.
This should put us basically where we were with typep before,
except without needing the typeq special operator.
ideally this primop would be removed in favor of vref, and ditto
aset, but that'll take a bit more sophistication in rewriting.
@Bike Bike marked this pull request as ready for review November 22, 2023 18:37
@Bike Bike merged commit 3b77763 into main Nov 24, 2023
4 of 8 checks passed
@Bike Bike deleted the no-typeq branch December 21, 2023 18:48
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