From b3e8118eb4d6dc0518993d4063c56bb12da7cbc1 Mon Sep 17 00:00:00 2001 From: jjgarcia Date: Thu, 25 Mar 2004 09:00:53 +0000 Subject: [PATCH] The values assigned to a structure must be always of type :OBJECT. --- src/cmp/cmpeval.lsp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cmp/cmpeval.lsp b/src/cmp/cmpeval.lsp index f256cc9cf..e26ad6d4e 100644 --- a/src/cmp/cmpeval.lsp +++ b/src/cmp/cmpeval.lsp @@ -180,7 +180,7 @@ ;;; Structures (defun c1structure-ref (args) - (if (and (not *safe-compile*) ; Beppe + (if (and (not (safe-compile)) ; Beppe (not (endp args)) (not (endp (cdr args))) (consp (second args)) @@ -212,7 +212,7 @@ ) (defun wt-structure-ref (loc name-vv index) - (if *safe-compile* + (if (safe-compile) (wt "structure_ref(" loc "," name-vv "," `(COERCE-LOC :fixnum ,index) ")") #+clos (wt "(" loc ")->instance.slots[" `(COERCE-LOC :fixnum ,index) "]") @@ -220,7 +220,7 @@ (wt "(" loc ")->str.self[" `(COERCE-LOC :fixnum ,index) "]"))) (defun c1structure-set (args) - (if (and (not *safe-compile*) ; Beppe + (if (and (not (safe-compile)) ; Beppe (not (endp args)) (not (endp (cdr args))) (consp (second args)) @@ -256,8 +256,8 @@ ;; a variable is introduced for y if it is an expression with side effects (setq locs (inline-args (list x y *c1t*))) (setq x (second (first locs))) - (setq y (second (second locs))) - (if *safe-compile* + (setq y `(coerce-loc :object ,(second (second locs)))) + (if (safe-compile) (wt-nl "structure_set(" x "," name-vv "," index "," y ");") #+clos (wt-nl "(" x ")->instance.slots[" index "]= " y ";")