From ffjeld at common-lisp.net Tue Oct 25 19:26:48 2005 From: ffjeld at common-lisp.net (Frode Vatvedt Fjeld) Date: Tue, 25 Oct 2005 21:26:48 +0200 (CEST) Subject: [movitz-cvs] CVS update: movitz/losp/muerte/inspect.lisp Message-ID: <20051025192648.10B898853F@common-lisp.net> Update of /project/movitz/cvsroot/movitz/losp/muerte In directory common-lisp.net:/tmp/cvs-serv5708 Modified Files: inspect.lisp Log Message: Fixed bug in location-in-object-p wrt. vectors of word-sized elements. Date: Tue Oct 25 21:26:47 2005 Author: ffjeld Index: movitz/losp/muerte/inspect.lisp diff -u movitz/losp/muerte/inspect.lisp:1.56 movitz/losp/muerte/inspect.lisp:1.57 --- movitz/losp/muerte/inspect.lisp:1.56 Sat Aug 27 00:38:07 2005 +++ movitz/losp/muerte/inspect.lisp Tue Oct 25 21:26:47 2005 @@ -10,7 +10,7 @@ ;;;; Author: Frode Vatvedt Fjeld ;;;; Created at: Fri Oct 24 09:50:41 2003 ;;;; -;;;; $Id: inspect.lisp,v 1.56 2005/08/26 22:38:07 ffjeld Exp $ +;;;; $Id: inspect.lisp,v 1.57 2005/10/25 19:26:47 ffjeld Exp $ ;;;; ;;;;------------------------------------------------------------------ @@ -402,13 +402,13 @@ location (+ -1 object-location (movitz-type-word-size 'movitz-basic-vector) - (* 2 (truncate (+ (array-dimension object 0) 1) 2))))) + (* 4 (truncate (+ (array-dimension object 0) 3) 4))))) (structure-object (<= object-location location (+ -1 object-location (movitz-type-word-size :movitz-struct) - (* 2 (truncate (+ (structure-object-length object) 1) 2)))))))) + (* 4 (truncate (+ (array-dimension object 0) 3) 4)))))))) (defun location-in-code-vector-p%unsafe (code-vector location) (and (<= (object-location code-vector) location) From ffjeld at common-lisp.net Tue Oct 25 19:27:48 2005 From: ffjeld at common-lisp.net (Frode Vatvedt Fjeld) Date: Tue, 25 Oct 2005 21:27:48 +0200 (CEST) Subject: [movitz-cvs] CVS update: movitz/losp/muerte/typep.lisp Message-ID: <20051025192748.7F9EF88555@common-lisp.net> Update of /project/movitz/cvsroot/movitz/losp/muerte In directory common-lisp.net:/tmp/cvs-serv5735 Modified Files: typep.lisp Log Message: Fixed typep wrt. vectors of 16 and 32-bits element-types. Date: Tue Oct 25 21:27:46 2005 Author: ffjeld Index: movitz/losp/muerte/typep.lisp diff -u movitz/losp/muerte/typep.lisp:1.51 movitz/losp/muerte/typep.lisp:1.52 --- movitz/losp/muerte/typep.lisp:1.51 Wed Aug 24 09:31:57 2005 +++ movitz/losp/muerte/typep.lisp Tue Oct 25 21:27:46 2005 @@ -9,7 +9,7 @@ ;;;; Created at: Fri Dec 8 11:07:53 2000 ;;;; Distribution: See the accompanying file COPYING. ;;;; -;;;; $Id: typep.lisp,v 1.51 2005/08/24 07:31:57 ffjeld Exp $ +;;;; $Id: typep.lisp,v 1.52 2005/10/25 19:27:46 ffjeld Exp $ ;;;; ;;;;------------------------------------------------------------------ @@ -329,6 +329,8 @@ (make-other-typep :basic-vector)) ((movitz:movitz-subtypep et '(unsigned-byte 8)) (make-basic-vector-typep :u8)) + ((movitz:movitz-subtypep et '(unsigned-byte 16)) + (make-basic-vector-typep :u16)) ((movitz:movitz-subtypep et '(unsigned-byte 32)) (make-basic-vector-typep :u32)) ((movitz:movitz-subtypep et 'character) From ffjeld at common-lisp.net Mon Oct 31 09:17:08 2005 From: ffjeld at common-lisp.net (Frode Vatvedt Fjeld) Date: Mon, 31 Oct 2005 10:17:08 +0100 (CET) Subject: [movitz-cvs] CVS update: movitz/losp/lib/readline.lisp Message-ID: <20051031091708.A6E9A88565@common-lisp.net> Update of /project/movitz/cvsroot/movitz/losp/lib In directory common-lisp.net:/tmp/cvs-serv28332 Modified Files: readline.lisp Log Message: For contextual-readline, make NIL designate a global context. Date: Mon Oct 31 10:17:08 2005 Author: ffjeld Index: movitz/losp/lib/readline.lisp diff -u movitz/losp/lib/readline.lisp:1.7 movitz/losp/lib/readline.lisp:1.8 --- movitz/losp/lib/readline.lisp:1.7 Thu Dec 9 15:16:13 2004 +++ movitz/losp/lib/readline.lisp Mon Oct 31 10:17:07 2005 @@ -10,7 +10,7 @@ ;;;; Author: Frode Vatvedt Fjeld ;;;; Created at: Fri Nov 2 13:58:58 2001 ;;;; -;;;; $Id: readline.lisp,v 1.7 2004/12/09 14:16:13 ffjeld Exp $ +;;;; $Id: readline.lisp,v 1.8 2005/10/31 09:17:07 ffjeld Exp $ ;;;; ;;;;------------------------------------------------------------------ @@ -270,6 +270,8 @@ (make-readline-buffer :string (make-string line-length)))) context)) +(defvar *global-readline-context-state* nil) + (defun replace-buffer (to from) (setf (readline-buffer-cursor-position to) (readline-buffer-cursor-position from)) @@ -293,7 +295,10 @@ (with-accessors ((scratch readline-context-state-scratch) (buffers readline-context-state-buffers) (current-buffer readline-context-state-current-buffer)) - context + (or context + *global-readline-context-state* + (setf *global-readline-context-state* + (make-readline-context))) (let* ((edit-buffer current-buffer) (buffer (readline-buffer-string (aref buffers edit-buffer)))) (cond From ffjeld at common-lisp.net Mon Oct 31 09:18:08 2005 From: ffjeld at common-lisp.net (Frode Vatvedt Fjeld) Date: Mon, 31 Oct 2005 10:18:08 +0100 (CET) Subject: [movitz-cvs] CVS update: movitz/losp/los0.lisp Message-ID: <20051031091808.D5EE488565@common-lisp.net> Update of /project/movitz/cvsroot/movitz/losp In directory common-lisp.net:/tmp/cvs-serv28358 Modified Files: los0.lisp Log Message: misc fiddling. Date: Mon Oct 31 10:18:08 2005 Author: ffjeld Index: movitz/losp/los0.lisp diff -u movitz/losp/los0.lisp:1.49 movitz/losp/los0.lisp:1.50 --- movitz/losp/los0.lisp:1.49 Sun Aug 28 23:13:30 2005 +++ movitz/losp/los0.lisp Mon Oct 31 10:18:08 2005 @@ -9,7 +9,7 @@ ;;;; Created at: Fri Dec 1 18:08:32 2000 ;;;; Distribution: See the accompanying file COPYING. ;;;; -;;;; $Id: los0.lisp,v 1.49 2005/08/28 21:13:30 ffjeld Exp $ +;;;; $Id: los0.lisp,v 1.50 2005/10/31 09:18:08 ffjeld Exp $ ;;;; ;;;;------------------------------------------------------------------ @@ -872,10 +872,9 @@ (lambda (seconds) ;; A stupid busy-waiting sleeper. (check-type seconds (real 0 *)) - (let ((start-time (get-internal-run-time))) - (loop with start-time = (get-internal-run-time) - with end-time = (+ start-time (* seconds internal-time-units-per-second)) - while (< (get-internal-run-time) end-time))))) + (loop with start-time = (get-internal-run-time) + with end-time = (+ start-time (* seconds internal-time-units-per-second)) + while (< (get-internal-run-time) end-time)))) (values)) @@ -1207,7 +1206,7 @@ (assert (string= fasit x) () "Failed tesT. Fasit: ~S, X: ~S" fasit x))))) -(defun test-clc (&optional timeout no-timer) +(defun test-clc (&optional (timeout #xfffe) no-timer) (unless no-timer (test-timer timeout)) (loop @@ -1230,7 +1229,6 @@ ;;; (vector-push offset ts) ;;; (vector-push code-vector ts)))) ;;; (muerte::cli) - (pic8259-end-of-interrupt 0) (when (eql #\esc (muerte.x86-pc.keyboard:poll-char)) (break "Test-timer keyboard break.")) (with-inline-assembly (:returns :nothing) @@ -1260,6 +1258,7 @@ ((:gs-override) :movb #x20 (:ecx 159))) #+ignore (setf *timer-prevstack* *timer-stack* *timer-stack* (muerte::copy-current-control-stack)) + (pic8259-end-of-interrupt 0) (setf (pit8253-timer-mode 0) +pit8253-mode-single-timeout+ (pit8253-timer-count 0) (or timeout (+ base (random variation)))) ;;; (muerte::sti) @@ -1353,8 +1352,8 @@ (setf (global-segment-descriptor-table) (muerte::dump-global-segment-table :entries 16))) - (install-los0-consing :kb-size (* 10 1024)) #+ignore + (install-los0-consing :kb-size (* 2 1024)) (install-los0-consing :kb-size (max 50 (truncate (- extended-memsize 2048) 2)))) (let ((muerte::*error-no-condition-for-debugger* t)) @@ -1419,11 +1418,8 @@ (defun read (&optional input-stream eof-error-p eof-value recursive-p) (declare (ignore input-stream recursive-p)) - (let ((string (if *repl-readline-context* - (muerte.readline:contextual-readline *repl-readline-context*) - (muerte.readline:readline (make-string 256) *terminal-io*)))) + (let ((string (muerte.readline:contextual-readline *repl-readline-context*))) (simple-read-from-string string eof-error-p eof-value))) - #+ignore (defun ztstring (physical-address) From ffjeld at common-lisp.net Mon Oct 31 09:19:16 2005 From: ffjeld at common-lisp.net (Frode Vatvedt Fjeld) Date: Mon, 31 Oct 2005 10:19:16 +0100 (CET) Subject: [movitz-cvs] CVS update: movitz/losp/lib/repl.lisp Message-ID: <20051031091916.5DB3C88565@common-lisp.net> Update of /project/movitz/cvsroot/movitz/losp/lib In directory common-lisp.net:/tmp/cvs-serv28380 Modified Files: repl.lisp Log Message: Catch serious-conditions during readline, since readline is used for by the debugger. This to avoid recursive errors. Date: Mon Oct 31 10:19:15 2005 Author: ffjeld Index: movitz/losp/lib/repl.lisp diff -u movitz/losp/lib/repl.lisp:1.16 movitz/losp/lib/repl.lisp:1.17 --- movitz/losp/lib/repl.lisp:1.16 Sun Aug 28 23:12:27 2005 +++ movitz/losp/lib/repl.lisp Mon Oct 31 10:19:15 2005 @@ -10,7 +10,7 @@ ;;;; Author: Frode Vatvedt Fjeld ;;;; Created at: Wed Mar 19 14:58:12 2003 ;;;; -;;;; $Id: repl.lisp,v 1.16 2005/08/28 21:12:27 ffjeld Exp $ +;;;; $Id: repl.lisp,v 1.17 2005/10/31 09:19:15 ffjeld Exp $ ;;;; ;;;;------------------------------------------------------------------ @@ -53,9 +53,14 @@ (handler-case (let ((previous-package *package*) (buffer-string - (if *repl-readline-context* - (muerte.readline:contextual-readline *repl-readline-context*) - (muerte.readline:readline (make-string 256) *terminal-io*)))) + (handler-bind + ((serious-condition + (lambda (c) + (backtrace :frame (muerte:current-stack-frame)) + (format *terminal-io* "~&Error during readline (~S): ~A" + *repl-readline-context* c) + (muerte:halt-cpu)))) + (muerte.readline:contextual-readline *repl-readline-context*)))) (when (plusp (length buffer-string)) (terpri) (multiple-value-bind (form buffer-pointer) From ffjeld at common-lisp.net Mon Oct 31 09:22:56 2005 From: ffjeld at common-lisp.net (Frode Vatvedt Fjeld) Date: Mon, 31 Oct 2005 10:22:56 +0100 (CET) Subject: [movitz-cvs] CVS update: movitz/compiler.lisp Message-ID: <20051031092256.A3CC788565@common-lisp.net> Update of /project/movitz/cvsroot/movitz In directory common-lisp.net:/tmp/cvs-serv28474 Modified Files: compiler.lisp Log Message: Fixed compilation of lambda-forms. It apears there's still some troubles with nested lambdas. Date: Mon Oct 31 10:22:55 2005 Author: ffjeld Index: movitz/compiler.lisp diff -u movitz/compiler.lisp:1.165 movitz/compiler.lisp:1.166 --- movitz/compiler.lisp:1.165 Sun Sep 18 18:20:35 2005 +++ movitz/compiler.lisp Mon Oct 31 10:22:54 2005 @@ -8,7 +8,7 @@ ;;;; Created at: Wed Oct 25 12:30:49 2000 ;;;; Distribution: See the accompanying file COPYING. ;;;; -;;;; $Id: compiler.lisp,v 1.165 2005/09/18 16:20:35 ffjeld Exp $ +;;;; $Id: compiler.lisp,v 1.166 2005/10/31 09:22:54 ffjeld Exp $ ;;;; ;;;;------------------------------------------------------------------ @@ -5535,7 +5535,7 @@ (defun lambda-form-p (form) (and (listp form) - (eq 'cl:lambda (first form)))) + (eq 'muerte.cl:lambda (first form)))) (defun function-name-p (operator) (or (and (symbolp operator) operator) @@ -6055,9 +6055,13 @@ (:int 99) ,not-unbound))))))))) -(define-compiler compile-lambda-form (&form form) +(define-compiler compile-lambda-form (&form form &all all) "3.1.2.2.4 Lambda Forms" - (error "Don't know how to compile lambda form ~A" form)) + (let ((lambda-expression (car form)) + (lambda-args (cdr form))) + (compiler-call #'compile-form-unprotected + :forward all + :form `(muerte.cl:funcall ,lambda-expression , at lambda-args)))) (define-compiler compile-constant-compound (&all all &form form &env env &top-level-p top-level-p) (compiler-call #'compile-self-evaluating From ffjeld at common-lisp.net Mon Oct 31 20:30:33 2005 From: ffjeld at common-lisp.net (Frode Vatvedt Fjeld) Date: Mon, 31 Oct 2005 21:30:33 +0100 (CET) Subject: [movitz-cvs] CVS update: movitz/environment.lisp Message-ID: <20051031203033.D108788575@common-lisp.net> Update of /project/movitz/cvsroot/movitz In directory common-lisp.net:/tmp/cvs-serv12309 Modified Files: environment.lisp Log Message: Fix find-dynamic-extent-scope so as to terminate search when crossing a funobj-env Date: Mon Oct 31 21:30:33 2005 Author: ffjeld Index: movitz/environment.lisp diff -u movitz/environment.lisp:1.14 movitz/environment.lisp:1.15 --- movitz/environment.lisp:1.14 Sat Aug 20 22:30:54 2005 +++ movitz/environment.lisp Mon Oct 31 21:30:32 2005 @@ -9,7 +9,7 @@ ;;;; Created at: Fri Nov 3 11:40:15 2000 ;;;; Distribution: See the accompanying file COPYING. ;;;; -;;;; $Id: environment.lisp,v 1.14 2005/08/20 20:30:54 ffjeld Exp $ +;;;; $Id: environment.lisp,v 1.15 2005/10/31 20:30:32 ffjeld Exp $ ;;;; ;;;;------------------------------------------------------------------ @@ -144,7 +144,7 @@ (defun find-dynamic-extent-scope (env) (loop for e = env then (movitz-environment-uplink e) - while e + while (and e (not (typep e 'funobj-env))) do (when (typep e 'with-dynamic-extent-allocation-env) (return (allocation-env-scope e)))))