diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2018-11-16 07:26:54 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2018-11-16 07:26:54 -0800 |
commit | 877cb438262b5ab98e25ae88fa66d9f22aace9cd (patch) | |
tree | cb5cbefd20ee198f8a62f9ad5701037ff83120c7 /utf8.c | |
parent | edc808bf0ccba62aee1a5e49ae31baebdfc1c9a5 (diff) | |
download | txr-877cb438262b5ab98e25ae88fa66d9f22aace9cd.tar.gz txr-877cb438262b5ab98e25ae88fa66d9f22aace9cd.tar.bz2 txr-877cb438262b5ab98e25ae88fa66d9f22aace9cd.zip |
compiler: use binary versions of common math functions.
* arith.c (arith_init): Register functions in the sys package:
b<, b>, b<=, b=, b+, b-, b*, b/ and neg.
* share/txr/stdlib/compiler.tl (%nary-ops%, %bin-ops%,
%bin-op%): New global variables.
(compiler comp-fun-form): Transform two-argument calls to any
of the variadic functions in %nary-ops% functions into calls
to their binary counterpart. These calls are faster, since
they bypass the wrapper which deals with the variable argument
list. Also, we detect unary - and map it to the new sys:neg
function, and reduce the one-argument cases of certain
functions to noops.
Diffstat (limited to 'utf8.c')
0 files changed, 0 insertions, 0 deletions