gcl.git - GNU Common Lisp

index : gcl.git
GNU Common Lisp
summary refs log tree commit diff
diff options
context:
space:
mode:
authorCamm Maguire <camm@debian.org>2014年08月22日 13:11:34 +0000
committerCamm Maguire <camm@debian.org>2014年08月22日 13:11:34 +0000
commitf90c1a7b29484aa8bae6ff332c3ed0bbcf952240 (patch)
tree12dc7eb8e52e21b166cecc396ed181a3142da153
parenta9eab76e37ddf2b630865687bc264b9b2a14fdf9 (diff)
downloadgcl-f90c1a7b29484aa8bae6ff332c3ed0bbcf952240.tar.gz
fix calls in closures to other local funs
Diffstat
-rwxr-xr-xgcl/cmpnew/gcl_cmpflet.lsp 3
-rwxr-xr-xgcl/cmpnew/gcl_cmptop.lsp 3
2 files changed, 4 insertions, 2 deletions
diff --git a/gcl/cmpnew/gcl_cmpflet.lsp b/gcl/cmpnew/gcl_cmpflet.lsp
index 1c039dff2..941061411 100755
--- a/gcl/cmpnew/gcl_cmpflet.lsp
+++ b/gcl/cmpnew/gcl_cmpflet.lsp
@@ -394,7 +394,8 @@
(fun-name (car fd))))
(t (push-args args)
(wt-nl (c-function-name "L" (fun-cfun (car fd)) (fun-name (car fd))) "(")
- (dotimes** (n (fun-level (car fd))) (wt "base" n ","))
+ (dotimes** (n (fun-level (car fd)))
+ (if (when *closure-p* (zerop n)) (wt "fun->cc.cc_turbo,") (wt "base" n ",")))
(wt "base")
(unless (= (fun-level (car fd)) *level*) (wt (fun-level (car fd))))
(wt ");")
diff --git a/gcl/cmpnew/gcl_cmptop.lsp b/gcl/cmpnew/gcl_cmptop.lsp
index f9915f1a7..80830f434 100755
--- a/gcl/cmpnew/gcl_cmptop.lsp
+++ b/gcl/cmpnew/gcl_cmptop.lsp
@@ -1722,10 +1722,11 @@
;; will let it default to ccb-vs, which will be the value of *ccb-vs*
;; prevalent at the time the environment stack was pushed and the
;; closure was created. CM 20031130
+(defvar *closure-p* nil)
(defun t3local-fun (closure-p clink ccb-vs fun lambda-expr &optional (initial-ccb-vs ccb-vs)
&aux (level (if closure-p 0 (fun-level fun)))
(*volatile* (volatile (cadr lambda-expr)))
- *downward-closures*)
+ *downward-closures* (*closure-p* closure-p))
(declare (fixnum level))
(if (eq closure-p 'dclosure)
(return-from t3local-fun
generated by cgit v1.2.3 (git 2.25.1) at 2025年09月04日 15:55:25 +0000

AltStyle によって変換されたページ (->オリジナル) /