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

Package locks #1618

Merged
merged 37 commits into from
Aug 20, 2024
Merged

Package locks #1618

merged 37 commits into from
Aug 20, 2024

Conversation

Bike
Copy link
Member

@Bike Bike commented Aug 13, 2024

Adding package locks like SBCL's. Based on #1608.

@Bike Bike force-pushed the package-locks branch 4 times, most recently from c5999e0 to c0de8e4 Compare August 13, 2024 17:29
kalinda and others added 9 commits August 13, 2024 13:31
This fixes a build problem where we were "returning" nil from a
function declared as returning Package_sp, the nil being a
placeholder since the error never actually returned.
Doing it in macros is too high level, I've realized belatedly. This
might not be low level enough - in particular there are cells to
worry about - but it's something.
Bike added 15 commits August 13, 2024 13:55
might as well reuse some slot names
If we try to export after uninterning, we get an error about the
symbol not being accessible.
weird macro that resulted in error messages referring to e.g.
"cl__member" instead of cl:member. It interned a symbol, so this
could cause package lock problems, on top of being ugly.
It might be possible to get the lisp symbol based off of
__FUNCTION__, but I think that would be error-prone.
separate user and system locks are probably unnecessary anyway
Eventually this should be expanded to something like SBCL's
"implementation packages". In any case this allows things like
cando and the static analyzer to build using clasp-builder.
(Cando has some actual package lock violations, though.)
uint16_t basically so I don't need to teach the analyzer about
uint8_t. Plus it's future proof if we need four more flags somehow.
This parallel search code seems to assume that it's being loaded
through the clasp-builder, but this is not necessarily the case,
and in fact isn't the case with how we usually use the analyzer
now - this code is rotten. Instead let's just use the previously
unused parameter.
The reference to *number-of-jobs* breaks with package locks on,
since without clasp-builder the symbol doesn't even exist, let
alone the variable.
Bike added 11 commits August 15, 2024 15:16
SBCL has a separate system package thing for some reason, so I'll
keep that bit around.

This commit also makes the flag constants static. Oops!
mimicking SBCL's names, which are better anyway.
this is an external interface, so i think locking it is important
like SBCL's. and way less awkward
Another exported interface.
and let these things accept lists
@Bike Bike marked this pull request as ready for review August 19, 2024 18:03
@Bike Bike merged commit 54673de into main Aug 20, 2024
8 checks passed
@Bike Bike deleted the package-locks branch August 20, 2024 11:54
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