summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--share/txr/stdlib/compiler.tl14
1 files changed, 13 insertions, 1 deletions
diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl
index d95254bb..798514f7 100644
--- a/share/txr/stdlib/compiler.tl
+++ b/share/txr/stdlib/compiler.tl
@@ -653,7 +653,19 @@
(((fbind env.(lookup-fun sym)))
me.(comp-call-impl oreg env 'call fbind.loc args))
(((fidx me.(get-fidx sym)))
- me.(comp-call-impl oreg env 'gcall fidx args))))
+ (caseq sym
+ (call me.(comp-call oreg env args))
+ (t me.(comp-call-impl oreg env 'gcall fidx args))))))
+
+(defmeth compiler comp-call (me oreg env args)
+ (tree-bind (fform . fargs) args
+ (let* ((ffrag me.(compile oreg env fform))
+ (cfrag me.(comp-call-impl oreg env 'call ffrag.oreg fargs)))
+ (new (frag cfrag.oreg
+ (append ffrag.code
+ cfrag.code)
+ (uni ffrag.fvars cfrag.fvars)
+ (uni ffrag.ffuns cfrag.ffuns))))))
(defmeth compiler comp-call-impl (me oreg env opcode freg args)
(let* ((sugg-oregs (mapcar (ret me.(alloc-treg)) args))