summaryrefslogtreecommitdiffstats
path: root/lisplib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2021-03-04 06:19:12 -0800
committerKaz Kylheku <kaz@kylheku.com>2021-03-04 06:19:12 -0800
commite4b8ced9469facaddae849f982eab90c290ba820 (patch)
tree382f0c5347ca11c1a8482054c1e67fa28e8f996a /lisplib.c
parent12bd13a955936fe1ee30bb4f2a202ecadd2cce9e (diff)
downloadtxr-e4b8ced9469facaddae849f982eab90c290ba820.tar.gz
txr-e4b8ced9469facaddae849f982eab90c290ba820.tar.bz2
txr-e4b8ced9469facaddae849f982eab90c290ba820.zip
compiler: bug: duplicate code in load-time lifting.
This issue affects the original code which lifts lambdas to load-time, as well as the new, recently added code for similarly lifting functional combinator expressions. The problem is that the trick works by compiling an expression twice. The result of the first compile is thrown away in the case when we compile it again in the load-time context. But compiling has a side effect: the expression itself may have an embedded load-time-liftable expression, which gets deposited into the load-time fragment list. Thus garbage ends up in the list of load-time fragments. We likely want to save and restore other things, like allocated D regisers. * share/txr/stdlib/compiler.tl (compiler shapshot, compiler restore): New methods. (comp-lambda-impl, comp-fun): Save a snapshot of the compiler state before doing the speculative compilation. If we don't use that compilation, we restore the state from the snapshot.
Diffstat (limited to 'lisplib.c')
0 files changed, 0 insertions, 0 deletions