diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-01-21 23:04:50 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-01-21 23:04:50 -0800 |
commit | fefb370caf071daf97c33c3e0dd06a55ef1255db (patch) | |
tree | 850849c75c77d0a377bd4a52628606673669552d /stdlib/compiler.tl | |
parent | 85bd4d95c5615b39324d5c82434b616cfdb7cf3f (diff) | |
download | txr-fefb370caf071daf97c33c3e0dd06a55ef1255db.tar.gz txr-fefb370caf071daf97c33c3e0dd06a55ef1255db.tar.bz2 txr-fefb370caf071daf97c33c3e0dd06a55ef1255db.zip |
typecase: merge with etypecase, handle t differnetly.
* stdlib/type.tl (sys:typecase-expander): New function, formed
from body of typecase. Bad clause syntax now handled with
compile-error rather than (throwf 'eval-error). The t symbol
is handled specially: it turns into a t conditon in the
resulting cond rather than a typep test. The compiler will
nicely eliminate dead code after that. Now etypecase is handled
here also: if we are expanding etypecase, we just emit the
extra clause.
(typecase, etypecase): Reduced to sys:typecase-expander calls.
* tests/012/typecase.tl: New file.
* tests/012/compile.tl: Add type.tl to list of compile-tested
files.
Diffstat (limited to 'stdlib/compiler.tl')
0 files changed, 0 insertions, 0 deletions