From 1e10ab5d8b40ad449b6f5ee25673dcfb3f6e46e5 Mon Sep 17 00:00:00 2001 From: jjgarcia Date: Thu, 7 Aug 2003 12:24:38 +0000 Subject: [PATCH] Fixed optimization of structure references. --- src/cmp/cmpeval.lsp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cmp/cmpeval.lsp b/src/cmp/cmpeval.lsp index 59ed62ab4..2eef0ba43 100644 --- a/src/cmp/cmpeval.lsp +++ b/src/cmp/cmpeval.lsp @@ -265,7 +265,7 @@ (defun wt-structure-ref (loc name-vv index) (if *safe-compile* - (wt "structure_ref(" loc "," name-vv "," `(COERCE-LOC :object ,index) ")") + (wt "structure_ref(" loc "," name-vv "," `(COERCE-LOC :fixnum ,index) ")") #+clos (wt "(" loc ")->instance.slots[" `(COERCE-LOC :fixnum ,index) "]") #-clos @@ -294,7 +294,7 @@ (new-type (type-and slot-type (info-type (second y))))) (if new-type ; compatible (if (eq 'VAR (car y)) ; it's a variable - (setf (var-type (car (third y))) new-type) ; propagate type + (setf (var-type (third y)) new-type) ; propagate type (setf (info-type (second y)) new-type)) (cmpwarn "The type of the form ~s is not ~s." (fourth args) slot-type))) @@ -308,7 +308,6 @@ &aux locs (*inline-blocks* 0)) ;; the third argument here *c1t* is just a hack to ensure that ;; a variable is introduced for y if it is an expression with side effects - (error) (setq locs (inline-args (list x y *c1t*))) (setq x (second (first locs))) (setq y (second (second locs)))