* keyboard interrupts are now continuable.
This commit is contained in:
parent
55254257fb
commit
3a3bc7dcc1
|
@ -25,7 +25,10 @@
|
||||||
(run-benchmark
|
(run-benchmark
|
||||||
"sum1"
|
"sum1"
|
||||||
sum1-iters
|
sum1-iters
|
||||||
(lambda (result) (and (fl>=? result 15794.974999999)
|
(lambda (result)
|
||||||
(fl<=? result 15794.975000001)))
|
(display result)
|
||||||
|
(newline)
|
||||||
|
(and (fl>=? result 15794.974999999)
|
||||||
|
(fl<=? result 15794.975000001)))
|
||||||
(lambda () (lambda () (go))))))
|
(lambda () (lambda () (go))))))
|
||||||
|
|
||||||
|
|
3371
benchmarks/timelog
3371
benchmarks/timelog
File diff suppressed because it is too large
Load Diff
|
@ -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-primcall '<=
|
(make-conditional ;;; PCB ALLOC-REDLINE
|
||||||
(list (make-primcall 'int+ (list apr size))
|
(make-primcall '<=
|
||||||
(make-primcall 'mref (list pcr (make-constant 4)))))
|
(list (make-primcall 'int+ (list apr size))
|
||||||
(make-primcall 'nop '())
|
(make-primcall 'mref (list pcr (make-constant 4)))))
|
||||||
|
(make-primcall 'nop '())
|
||||||
|
(make-primcall 'interrupt '()))
|
||||||
(make-funcall
|
(make-funcall
|
||||||
(make-primcall 'mref
|
(make-primcall 'mref
|
||||||
(list
|
(list
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue