From 4356adb0d4747673384d38f35479c8a484687861 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sun, 3 May 2020 20:10:58 -0700 Subject: compile: don't expand. The compile function doesn't need to expand because the input is a function that has already been expanded. * share/txr/stdlib/compiler.tl (compile): Pass the second argument to compile-toplevel to suppress expansion. --- share/txr/stdlib/compiler.tl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl index 4d776296..108c75b4 100644 --- a/share/txr/stdlib/compiler.tl +++ b/share/txr/stdlib/compiler.tl @@ -1871,14 +1871,14 @@ (fun (tree-bind (indicator args . body) (func-get-form obj) (let* ((form (sys:env-to-let (func-get-env obj) ^(lambda ,args ,*body))) - (vm-desc (compile-toplevel form))) + (vm-desc (compile-toplevel form t))) (vm-execute-toplevel vm-desc)))) (t (condlet (((fun (symbol-function obj))) (tree-bind (indicator args . body) (func-get-form fun) (let* ((form (sys:env-to-let (func-get-env fun) ^(lambda ,args ,*body))) - (vm-desc (compile-toplevel form)) + (vm-desc (compile-toplevel form t)) (comp-fun (vm-execute-toplevel vm-desc))) (set (symbol-function obj) comp-fun)))) (t (error "~s: cannot compile ~s" 'compile obj)))))) -- cgit v1.2.3