summaryrefslogtreecommitdiffstats
path: root/socket.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-03-29 07:03:52 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-03-29 07:03:52 -0700
commit5a332d3f4391edc17222c02975583c95cde4727e (patch)
tree9771cde0106c3a7d5c3209194ff51c4b8cddad13 /socket.h
parentfb2b2f38a417776cdf2c6623a63e268e9ce7fe3e (diff)
downloadtxr-5a332d3f4391edc17222c02975583c95cde4727e.tar.gz
txr-5a332d3f4391edc17222c02975583c95cde4727e.tar.bz2
txr-5a332d3f4391edc17222c02975583c95cde4727e.zip
compiler: improve register use when compiling calls.
* share/txr/stdlib/compiler.tl (compiler comp-call-impl): Instead of allocating N temporary registers for N arguments, some (or even none) of which may actually be used, we do this one argument at a time: allocate just one register, compile the argument expression, and then free the register immediately if that fragment specifies its own output location instead of the register. Otherwise keep the register and push it on a stack. This strategy lowers maximum register use. Also, since we are pushing the used registers on a stack, when we call free-tregs, they get liberated in reverse order of allocation, which keeps things tidy.
Diffstat (limited to 'socket.h')
0 files changed, 0 insertions, 0 deletions