-
-
Notifications
You must be signed in to change notification settings - Fork 82
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
Procedure qualifiers #991
Comments
Common Lisp uses
|
It would be generally useful to have CLHS: |
Good idea. It's flexible. I do intend, though, to introduce optional type declaration, and although using |
shirok
added a commit
that referenced
this issue
Feb 27, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
define-cproc
allows some qualifiers for defined subrs, notably:constant
. It setsconstant
flag of<procedure>
and allows the compile to perform constant folding.We don't have a corresponding mechanism for Scheme-defined procedures.
Syntax-wise, we can allow meta-info between formals and body, e.g.
(lambda (x y ..) :constant body ...)
. How to carry over that information within IForm needs some cleverness. That meta info needs to be saved in the packed IForm.We have
flags
slot in$LAMBDA
node. It has already been used in non-extensible way. We may change it to contain, say, a list of symbols and/or packed IForm. We still need to recognize the old form, for the precompiled code may contain the old form.The text was updated successfully, but these errors were encountered: