Open jpellegrini opened 1 month ago
Forgot to mention: the idea is to have formal parameters included by default, but allow the user to not have them for embedded systems or whatever, where size could be an issue.
The --without-keep-formals
name means "without the compiler flag keep-formals", but it sounds a bit strange. Maybe we could change that to --without-formal-arguments
? I don't know.
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: