* keyboard interrupts are now continuable.

This commit is contained in:
Abdulaziz Ghuloum 2007-11-15 13:40:36 -05:00
parent 55254257fb
commit 3a3bc7dcc1
6 changed files with 3406 additions and 10 deletions

View File

@ -25,7 +25,10 @@
(run-benchmark (run-benchmark
"sum1" "sum1"
sum1-iters sum1-iters
(lambda (result) (and (fl>=? result 15794.974999999) (lambda (result)
(display result)
(newline)
(and (fl>=? result 15794.974999999)
(fl<=? result 15794.975000001))) (fl<=? result 15794.975000001)))
(lambda () (lambda () (go)))))) (lambda () (lambda () (go))))))

File diff suppressed because it is too large Load Diff

View File

@ -421,12 +421,26 @@
(if value-dest (if value-dest
(make-seq body (make-set value-dest return-value-register)) (make-seq body (make-set value-dest return-value-register))
body))))) body)))))
;;; (define (alloc-check size)
;;; (E (make-conditional ;;; PCB ALLOC-REDLINE
;;; (make-primcall '<=
;;; (list (make-primcall 'int+ (list apr size))
;;; (make-primcall 'mref (list pcr (make-constant 4)))))
;;; (make-primcall 'nop '())
;;; (make-funcall
;;; (make-primcall 'mref
;;; (list
;;; (make-constant (make-object (primref->symbol 'do-overflow)))
;;; (make-constant (- disp-symbol-record-proc symbol-ptag))))
;;; (list size)))))
(define (alloc-check size) (define (alloc-check size)
(E (make-conditional ;;; PCB ALLOC-REDLINE (E (make-shortcut
(make-conditional ;;; PCB ALLOC-REDLINE
(make-primcall '<= (make-primcall '<=
(list (make-primcall 'int+ (list apr size)) (list (make-primcall 'int+ (list apr size))
(make-primcall 'mref (list pcr (make-constant 4))))) (make-primcall 'mref (list pcr (make-constant 4)))))
(make-primcall 'nop '()) (make-primcall 'nop '())
(make-primcall 'interrupt '()))
(make-funcall (make-funcall
(make-primcall 'mref (make-primcall 'mref
(list (list

View File

@ -45,8 +45,13 @@
(define interrupt-handler (define interrupt-handler
(make-parameter (make-parameter
(lambda () (lambda ()
(define-condition-type &interrupted &condition
make-interrupted-condition interrupted-condition?)
(set-port-output-index! (console-output-port) 0) (set-port-output-index! (console-output-port) 0)
(error #f "interrupted")) (raise-continuable
(condition
(make-interrupted-condition)
(make-message-condition "received an interrupt signal"))))
(lambda (x) (lambda (x)
(if (procedure? x) (if (procedure? x)
x x

View File

@ -30,6 +30,7 @@
(tests string-to-number) (tests string-to-number)
(tests input-ports) (tests input-ports)
(tests fldiv-and-mod) (tests fldiv-and-mod)
(tests parse-flonums)
) )
(define (test-exact-integer-sqrt) (define (test-exact-integer-sqrt)
@ -45,6 +46,8 @@
(f 0 536870911000 536870911) (f 0 536870911000 536870911)
(printf "[exact-integer-sqrt] Happy Happy Joy Joy\n")) (printf "[exact-integer-sqrt] Happy Happy Joy Joy\n"))
(test-parse-flonums)
(test-reader) (test-reader)
(test-char-syntax) (test-char-syntax)
(test-bytevectors) (test-bytevectors)