Add --without-keep-formals
option to configure
#635
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @egallesio !
This PR partially addresses issue #260 . It adds optional formal parameter information for closures in core STklos and provided libraries -- but not for primitive procedures.
Description
This adds a new option ot the configure script.
If the user passes
--without-keep-formals
to configure, then the compilerkeep-formals
parameter will be true when compiling closures in core STklos and all provided libraries.However, this does not affect primitive procedures, because they are C functions, and having the C compiler include the code to add the formal parameters is, although possible... Tricky, at least.
How it works:
We have three autoconf variables:
The tmpcomp file needs to be called in the Makefiles with the shell variable
For the boot image, the variable
SCM_BOOT_KEEP_FORMALS
is directly used.And... Well, autotools is reeeeeally not something I ever got to understand well, so perhaps there are better ways to achieve what I did.
Future work (primitive procedures)
Since primitives are defined as C functions, this becomes tricky.
The options I thought: