-
Notifications
You must be signed in to change notification settings - Fork 145
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
No adequate specialization of MAKE-LOAD-FORM for an object of type GLOBAL-BYTECODE-SIMPLE-FUN #1517
Comments
I'm afraid this is probably going to be a WONTFIX. Our It's possible the standard requires this code to compile - I'm not sure, which is why I'm leaving the issue open. However, even if we did check that a constant value is serializable before doing this, I don't think your code is a good idea. On SBCL, the file compiles, but loading it in the same image fails because it tries to evaluate the |
Well, I admit that the example is a bit inappropriate because I simplified it for illustration purposes. In my case, |
Hmkay. Don't understand your use case, but that's fine. Looking at SBCL, when it compiles a constant variable reference it goes a bit out of its way to ensure references to named constants aren't compiled the same way as anonymous literals (which is what Clasp does, which causes this issue). The constant structure in the IR gets a name (https://github.com/sbcl/sbcl/blob/master/src/compiler/ir1tran.lisp#L320) and then during FASL dump, any references with a name just use that (https://github.com/sbcl/sbcl/blob/master/src/compiler/dump.lisp#L1159-L1160). It would probably be nice to do this in Clasp as well. Will take some fiddling with infrastructure in both the bytecode and Cleavir, though. ETA: Nice to make this work, but probably more importantly so that we don't end up multiply reconstructing constants, which I think we might be doing and which would definitely be unfortunate. |
See #1517. This allows FASLs to reference constants bound to unserializable objects without error. For example: (defconstant +foo+ #'foo) (defun bar () +foo+)
Took a minute to try getting it working with bytecode FASLs. Doesn't seem to present any difficulty. I have not done it for FASOs, and I'm debating whether to bother doing that now or continue on the slower path to removing FASOs entirely. |
Describe the bug
In a Lisp source file, an error occurs when assigning the
macro-function
of a macro to a constant, and then using that constant to create an alias for the macro using(setf macro-function)
.Code at issue
setf-macro-function.lisp
Context
The text was updated successfully, but these errors were encountered: