From ac955573b3c4115511244304047add6158430395 Mon Sep 17 00:00:00 2001 From: William Harold Newman Date: Thu, 23 Aug 2001 14:09:01 +0000 Subject: [PATCH] 0.pre7.14.flaky4.9: (This version builds itself without :SB-INTERPRETER. Still a few regression tests commented out, though..) I looked at nlx stuff in byte-comp.lisp for a while, without getting much insight. So I mailed in a bug report to cmucl-imp@cons.org, in hopes that they'll fix it (or maybe even have already fixed it since 18c). Meanwhile I made a workaround, adding declarations to force the ARRAY translator to be compiled to native code. --- BUGS | 19 +++++++++++++++++++ src/code/debug-int.lisp | 7 ------- src/code/host-alieneval.lisp | 13 +++++++++++++ src/compiler/byte-comp.lisp | 18 +++++++++--------- version.lisp-expr | 2 +- 5 files changed, 42 insertions(+), 17 deletions(-) diff --git a/BUGS b/BUGS index 042ad53..925e4b7 100644 --- a/BUGS +++ b/BUGS @@ -1128,6 +1128,25 @@ Error in function C::GET-LAMBDA-TO-COMPILE: although the name of the uninitialized-element placeholder will be shorter. + The same thing happens if the compiler macro expansion of + EVERY into MAP is hand-expanded: + (defun bar2 (dims) + (if (block blockname + (map nil + (lambda (dim) + (let ((pred-value (funcall #'integerp dim))) + (unless pred-value + (return-from blockname + nil)))) + dims) + t) + 1 + 2)) + CMU CL doesn't have this compiler macro expansion, so it was + immune to the original bug in BAR, but once we hand-expand it + into BAR2, CMU CL 18c has the same bug. (Run (BAR '(NIL NIL)).) + + The native compiler handles it fine, both in SBCL and in CMU CL. KNOWN BUGS RELATED TO THE IR1 INTERPRETER diff --git a/src/code/debug-int.lisp b/src/code/debug-int.lisp index ea6149b..e04aa31 100644 --- a/src/code/debug-int.lisp +++ b/src/code/debug-int.lisp @@ -1106,13 +1106,6 @@ #!+x86 (defun find-escaped-frame (frame-pointer) (declare (type system-area-pointer frame-pointer)) - - ;; FIXME: These conditionals are a hack to get the system to - ;; bootstrap itself despite a byte interpreter/compiler bug. Without - ;; it, the byte interpreter blows up when trying to cross-compile - ;; this function, hitting #:UNINITIALIZED-EVAL-STACK-ELEMENT while - ;; executing (SB-XC:MACRO-FUNCTION 'SB!EXT:WITH-ALIEN). - #+sb-xc (values nil 0 nil) #-sb-xc ; REMOVEME (dotimes (index *free-interrupt-context-index* (values nil 0 nil)) (sb!alien:with-alien ((lisp-interrupt-contexts (array (* os-context-t) nil) diff --git a/src/code/host-alieneval.lisp b/src/code/host-alieneval.lisp index b380b60..e2f1757 100644 --- a/src/code/host-alieneval.lisp +++ b/src/code/host-alieneval.lisp @@ -846,6 +846,19 @@ (dimensions (required-argument) :type list)) (def-alien-type-translator array (ele-type &rest dims &environment env) + + ;; This declaration is a workaround for bug 119, which causes the + ;; EVERY #'INTEGERP expression below to be compiled incorrectly + ;; by the byte compiler. Since as of sbcl-0.pre7.x we are using + ;; the byte compiler to do all the tricky stuff for the 'interpreter', + ;; and since we use 'interpreted' definitions of these type translators + ;; at cross-compilation time, this means that cross-compilation + ;; doesn't work properly unless we force this function to be + ;; native compiled instead of byte-compiled. + ;; + ;; FIXME: So, when bug 119 is fixed, this declaration can go away. + (declare (optimize (speed 2))) ; i.e. not byte-compiled + (when dims (unless (typep (first dims) '(or index null)) (error "The first dimension is not a non-negative fixnum or NIL: ~S" diff --git a/src/compiler/byte-comp.lisp b/src/compiler/byte-comp.lisp index acc1d7c..0fe11fc 100644 --- a/src/compiler/byte-comp.lisp +++ b/src/compiler/byte-comp.lisp @@ -635,8 +635,8 @@ (ecase (cleanup-kind (nlx-info-cleanup nlx-info)) ((:catch :unwind-protect) (consume :nlx-entry)) - ;; If for a lexical exit, we will see a breakup later, so - ;; don't consume :NLX-ENTRY now. + ;; If for a lexical exit, we will see a breakup + ;; later, so don't consume :NLX-ENTRY now. (:tagbody) (:block (let ((cont (nlx-info-continuation nlx-info))) @@ -1861,9 +1861,9 @@ ;; Process all of the lambdas in component, and assign stack frame ;; locations for all the locals. (dolist (lambda (component-lambdas component)) - ;; We don't generate any code for :external lambdas, so we don't need - ;; to allocate stack space. Also, we don't use the ``more'' entry, - ;; so we don't need code for it. + ;; We don't generate any code for :EXTERNAL lambdas, so we don't + ;; need to allocate stack space. Also, we don't use the ``more'' + ;; entry, so we don't need code for it. (cond ((or (eq (lambda-kind lambda) :external) (and (eq (lambda-kind lambda) :optional) @@ -1927,12 +1927,12 @@ ;; stay in the argument area and which need to be moved into locals. (assign-locals component) - ;; Annotate every continuation with information about how we want the - ;; values. + ;; Annotate every continuation with information about how we want + ;; the values. (annotate-ir1 component) - ;; Determine what stack values are dead, and emit cleanup code to pop - ;; them. + ;; Determine what stack values are dead, and emit cleanup code to + ;; pop them. (byte-stack-analyze component) ;; Make sure any newly added blocks have a block-number. diff --git a/version.lisp-expr b/version.lisp-expr index 953a74f..8f43acd 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -16,4 +16,4 @@ ;;; four numeric fields, is used for versions which aren't released ;;; but correspond only to CVS tags or snapshots. -"0.pre7.14.flaky4.8" +"0.pre7.14.flaky4.9" -- 1.7.10.4