diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2025-06-19 21:28:26 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2025-06-19 21:28:26 -0700 |
commit | 53f92425856734cb680525f3d4ede2a7b3e3dde3 (patch) | |
tree | c37397d4afba0f9183573d7230f9a311cae4d37a /autoload.c | |
parent | c03f27f7d282dffb35b1746fd067ab24e0354421 (diff) | |
download | txr-53f92425856734cb680525f3d4ede2a7b3e3dde3.tar.gz txr-53f92425856734cb680525f3d4ede2a7b3e3dde3.tar.bz2 txr-53f92425856734cb680525f3d4ede2a7b3e3dde3.zip |
compiler: opt-tail-calls compiler option.
* stdlib/comp-opts.tl (compile-opts): New slot, opt-tail-calls.
(%warning-syms%): Variable removed; this just lists the slots
of compile-opts, which can be obtained with the slots function.
Moreover, it is badly named, since there is now a non-diagnostic
option.
(*compile-opts*): Specify an initial value of : for opt-tail-calls.
This means that *opt-level* controls whether it is enabled.
* stdlib/compiler.tl: Update comment about optimization
levels, since level 2 now does tail calls.
(compiler comp-lambda-impl): Only enable tail calls if
the option has the default value : and *opt-level* is at
least two, or else if the option has value t.
(with-compile-opts): Recognize : as valid option value.
Don't refer to %warning-syms% but the slots of compile-opts.
We use load-time to avoid calculating this repeatedly.
The wording of the error message has to be adjusted since
not all options are diagnosic any more.
* autoload.c (compiler_set_entries): Add opt-tail-calls to
slot-name autoload triggers for the compiler module.
* txr.1: Mention tail calls and the opt-tail-calls option
in the description of *opt-level* 2. Document opt-tail-calls
under compile-opts section. We describe what tail calls are
there and also adjust the wording since not all options
diagnostic. Describe the three-valued system for code
generation options.
Diffstat (limited to 'autoload.c')
-rw-r--r-- | autoload.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -686,7 +686,7 @@ static val compiler_set_entries(val fun) }; val slname[] = { lit("shadow-fun"), lit("shadow-var"), lit("shadow-cross"), - lit("unused"), lit("log-level"), nil + lit("unused"), lit("log-level"), lit("opt-tail-calls"), nil }; autoload_sys_set(al_struct, sys_name, fun); autoload_set(al_struct, sname, fun); |