author | Camm Maguire <camm@debian.org> | 2014年09月12日 09:01:58 -0400 |
---|---|---|
committer | Camm Maguire <camm@debian.org> | 2014年09月12日 09:01:58 -0400 |
commit | 01733e09050c27c73e18af5c189d0ca36f3f3636 (patch) | |
tree | e7cb1b26f6cfa4afad8f504f47b5be8ebcc210b8 | |
parent | 0b6b88baa8e8170c66c7e5fbed0715fb85afc05c (diff) | |
download | gcl-add-object2.tar.gz |
-rwxr-xr-x | gcl/cmpnew/gcl_cmpenv.lsp | 9 | ||||
-rwxr-xr-x | gcl/cmpnew/gcl_cmpfun.lsp | 2 | ||||
-rwxr-xr-x | gcl/cmpnew/gcl_cmptop.lsp | 3 |
diff --git a/gcl/cmpnew/gcl_cmpenv.lsp b/gcl/cmpnew/gcl_cmpenv.lsp index 158e57370..3587dfd53 100755 --- a/gcl/cmpnew/gcl_cmpenv.lsp +++ b/gcl/cmpnew/gcl_cmpenv.lsp @@ -40,7 +40,6 @@ (setq *next-cfun* 0) (setq *last-label* 0) (clrhash *objects*) - (clrhash *rev-objects*) (setq *hash-eq* nil) (setq *constants* nil) (setq *local-funs* nil) @@ -79,7 +78,7 @@ (cond ((gethash object *objects*)) ((push-data-incf (unless init object)) (when init (add-init `(si::setvv ,*next-vv* ,init))) - (setf (gethash *next-vv* *rev-objects*) object (gethash object *objects*) *next-vv*))))) + (setf (gethash object *objects*) *next-vv*))))) ;; Write to a string with all the *print-.. levels bound appropriately. (defun wt-to-string (x &aux @@ -88,6 +87,12 @@ (wt-data1 x) (get-output-stream-string *compiler-output-data*)) +(defun ltvp-eval (form) + (cond ((atom form) form) + ((eq (car form) 'si::|#,|) (ltvp-eval (cdr form))) + ((eq (car form) 'si::nani) (si::nani (cadr form))) + (form))) + (defun ltvp (val) (when (consp val) (eq (car val) 'si::|#,|))) diff --git a/gcl/cmpnew/gcl_cmpfun.lsp b/gcl/cmpnew/gcl_cmpfun.lsp index fb7278e33..4143af2b9 100755 --- a/gcl/cmpnew/gcl_cmpfun.lsp +++ b/gcl/cmpnew/gcl_cmpfun.lsp @@ -913,7 +913,7 @@ (sublis1 ,s ,(second args) ',test)))))) (defun sublis1-inline (a b c) - (let ((tst (cadr c))) + (let ((tst (ltvp-eval (cadr c)))) (or (member tst '(eq equal eql)) (error "bad test")) (wt "(check_alist(" a "),sublis1("a "," b "," (format nil "&o~(~a~)))" tst)))) diff --git a/gcl/cmpnew/gcl_cmptop.lsp b/gcl/cmpnew/gcl_cmptop.lsp index 5bd93d0c0..e68b48e96 100755 --- a/gcl/cmpnew/gcl_cmptop.lsp +++ b/gcl/cmpnew/gcl_cmptop.lsp @@ -22,7 +22,6 @@ (in-package 'compiler) (defvar *objects* (make-hash-table :test 'eq)) -(defvar *rev-objects* (make-hash-table :test 'eql)) ;(defvar *objects* nil) (defvar *constants* nil) (defvar *sharp-commas* nil) @@ -1800,7 +1799,7 @@ (when (eq (car form) 'location) (when (listp (caddr form)) (when (eq 'vv (caaddr form)) - (let ((s (gethash (cadr (caddr form)) *rev-objects*))) + (let ((s (ltvp-eval (cadr (caddr form))))) (when s `(defun ,s))))))) (defun c1fset (args) |