summaryrefslogtreecommitdiffstats
path: root/stdlib/error.tl
Commit message (Collapse)AuthorAgeFilesLines
* compiler: typo in lambda error.Kaz Kylheku2021-07-021-1/+1
| | | | * stdlib/error.tl (lambda-too-few-args): Fix "inufficient".
* compiler: bug: diagnose excess args from apply list.Kaz Kylheku2021-06-291-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | When we compile an immediately applied lambda like (apply (lambda (a b c) ...) list), we are not emitting code to handle the run-time situation when there are too many elements in the list. This shows up in exception handling, for instance; the compiled version of this executes silently and returns 42: (catch (throw 'foo 5) (foo () 42))) foo is must have a parameter to capture the 5; interpreted code enforces this. * stdlib/compiler.tl (lambda-apply-transform): In the apply-list case, at the end of binding all the optional arguments, if the parameter list doesn't have a rest parameter to take any remaining items, we emit code to check that there aren't any; that everything has been popped out of the apply list, leaving it nil. If not, we call the run-time support function lambda-excess-apply-list. * stdlib/error.tl (lambda-excess-apply-list): New function.
* file layout: moving share/txr/stdlib to stdlib.Kaz Kylheku2021-06-241-0/+95
This affects run-time also. Txr installations where the executable is not in directory ending in ${bindir} will look for stdlib rather than share/txr/stdlib, relative to the determined installation directory. * txr.c (sysroot_init): If we detect relative to the short name, or fall back on the program directory, use stdlib rather than share/txr/stdlib as the stdlib_path. * INSTALL: Update some installation notes not to refer to share/txr/stdlib but stdlib. * Makefile (STDLIB_SRCS): Refer to stdlib, not share/txr/stdlib. (clean): In unconfigured mode, remove the old share/txr/stdlib entirely. Remove .tlo files from stdlib. (install): Install lib materials from stdlib. * txr.1: Updated documentation under Deployment Directory Structure. * share/txr/stdlib/{asm,awk,build,cadr}.tl: Renamed to stdlib/{asm,awk,build,cadr}.tl. * share/txr/stdlib/{compiler,conv,copy-file,debugger}.tl: Renamed to stdlib/{compiler,conv,copy-file,debugger}.tl. * share/txr/stdlib/{defset,doc-lookup,doc-syms,doloop}.tl: Renamed to stdlib/{defset,doc-lookup,doc-syms,doloop}.tl. * share/txr/stdlib/{each-prod,error,except,ffi}.tl: Renamed to stdlib/{each-prod,error,except,ffi}.tl. * share/txr/stdlib/{getopts,getput,hash,ifa}.tl: Renamed to stdlib/{getopts,getput,hash,ifa}.tl. * share/txr/stdlib/{keyparams,match,op,optimize}.tl: Renamed to stdlib/{keyparams,match,op,optimize}.tl. * share/txr/stdlib/{package,param,path-test,pic}.tl: Renamed to stdlib/{package,param,path-test,pic}.tl. * share/txr/stdlib/{place,pmac,quips,save-exe}.tl: Renamed to stdlib/{place,pmac,quips,save-exe}.tl. * share/txr/stdlib/{socket,stream-wrap,struct,tagbody}.tl: Renamed to stdlib/{socket,stream-wrap,struct,tagbody}.tl. * share/txr/stdlib/{termios,trace,txr-case,type}.tl: Renamed to stdlib/{termios,trace,txr-case,type}.tl. * share/txr/stdlib/{ver,vm-param,with-resources,with-stream}.tl: Renamed to stdlib/{ver,vm-param,with-resources,with-stream}.tl. * share/txr/stdlib/yield.tl: Renamed to stdlib/yield.tl. * share/txr/stdlib/{txr-case,ver}.txr: Renamed to stdlib/{txr-case,ver}.txr. * gencadr.txr: Update to stdlib/place.tl. * genman.txr: Update to stdlib/cadr.tl.