Update of /project/movitz/cvsroot/movitz/losp/muerte In directory common-lisp.net:/tmp/cvs-serv21696
Modified Files: primitive-functions.lisp Log Message: Make ensure-heap-cons-variable be more defensive: Check that the old value is a cons/list.
Date: Thu Jun 10 05:19:47 2004 Author: ffjeld
Index: movitz/losp/muerte/primitive-functions.lisp diff -u movitz/losp/muerte/primitive-functions.lisp:1.20 movitz/losp/muerte/primitive-functions.lisp:1.21 --- movitz/losp/muerte/primitive-functions.lisp:1.20 Mon Jun 7 15:16:53 2004 +++ movitz/losp/muerte/primitive-functions.lisp Thu Jun 10 05:19:47 2004 @@ -10,7 +10,7 @@ ;;;; Author: Frode Vatvedt Fjeld frodef@acm.org ;;;; Created at: Tue Oct 2 21:02:18 2001 ;;;; -;;;; $Id: primitive-functions.lisp,v 1.20 2004/06/07 22:16:53 ffjeld Exp $ +;;;; $Id: primitive-functions.lisp,v 1.21 2004/06/10 12:19:47 ffjeld Exp $ ;;;; ;;;;------------------------------------------------------------------
@@ -491,6 +491,10 @@ (define-primitive-function ensure-heap-cons-variable () "Call with lended variable (a cons) in EAX. Preserves EDX." (with-inline-assembly (:returns :multiple-values) + ;; Be defensive: Check that EAX is LISTP. + (:leal (:eax -1) :ecx) + (:testb 3 :cl) + (:jnz '(:sub-program () (:int 50))) (:cmpl :ebp :eax) ; is cons above stack-frame? (:jge 'return-ok) (:cmpl :esp :eax) ; is cons below stack-frame?