exception handling for vm model

This commit is contained in:
Burke Fetscher 2014-03-19 12:29:46 -05:00
parent 9bb9f2b150
commit 4612775a75
6 changed files with 23 additions and 47 deletions

View File

@ -443,13 +443,9 @@
(with-handlers (with-handlers
([exn:fail? (λ (exc) ([exn:fail? (λ (exc)
(unless (unless
(or (regexp-match?
(regexp-match? #"counterexample|domain|clauses"
#rx"^counterexample" (exn-message exc))
(exn-message exc))
(regexp-match?
#rx"domain"
(exn-message exc)))
(printf "exception on ~s\n~s\n" e (printf "exception on ~s\n~s\n" e
(exn-message exc))) (exn-message exc)))
#f)]) #f)])
@ -481,6 +477,7 @@
(generate-term bytecode e #:i-th index) (generate-term bytecode e #:i-th index)
(set! index (add1 index)))))) (set! index (add1 index))))))
(define fixed '())
(test-equal (test-equal
(bytecode-ok? (bytecode-ok?
'(let-one 'x '(let-one 'x
@ -488,4 +485,3 @@
'x))) 'x)))
#t) #t)
(define fixed '())

View File

@ -440,13 +440,9 @@
(with-handlers (with-handlers
([exn:fail? (λ (exc) ([exn:fail? (λ (exc)
(unless (unless
(or (regexp-match?
(regexp-match? #"counterexample|domain|clauses"
#rx"^counterexample" (exn-message exc))
(exn-message exc))
(regexp-match?
#rx"domain"
(exn-message exc)))
(printf "exception on ~s\n~s\n" e (printf "exception on ~s\n~s\n" e
(exn-message exc))) (exn-message exc)))
#f)]) #f)])
@ -478,6 +474,7 @@
(generate-term bytecode e #:i-th index) (generate-term bytecode e #:i-th index)
(set! index (add1 index)))))) (set! index (add1 index))))))
(define fixed '())
(test-equal (test-equal
(bytecode-ok? (bytecode-ok?
'(let-one 42 '(let-one 42
@ -486,4 +483,3 @@
(loc-box 1))))) (loc-box 1)))))
#t) #t)
(define fixed '())

View File

@ -438,13 +438,9 @@
(with-handlers (with-handlers
([exn:fail? (λ (exc) ([exn:fail? (λ (exc)
(unless (unless
(or (regexp-match?
(regexp-match? #"counterexample|domain|clauses"
#rx"^counterexample" (exn-message exc))
(exn-message exc))
(regexp-match?
#rx"domain"
(exn-message exc)))
(printf "exception on ~s\n~s\n" e (printf "exception on ~s\n~s\n" e
(exn-message exc))) (exn-message exc)))
#f)]) #f)])
@ -476,6 +472,7 @@
(generate-term bytecode e #:i-th index) (generate-term bytecode e #:i-th index)
(set! index (add1 index)))))) (set! index (add1 index))))))
(define fixed '())
(test-equal (test-equal
(bytecode-ok? (bytecode-ok?
'(application '(application
@ -484,4 +481,3 @@
(install-value 0 'y (boxenv 0 'z)))) (install-value 0 'y (boxenv 0 'z))))
#t) #t)
(define fixed '())

View File

@ -439,13 +439,9 @@
(with-handlers (with-handlers
([exn:fail? (λ (exc) ([exn:fail? (λ (exc)
(unless (unless
(or (regexp-match?
(regexp-match? #"counterexample|domain|clauses"
#rx"^counterexample" (exn-message exc))
(exn-message exc))
(regexp-match?
#rx"domain"
(exn-message exc)))
(printf "exception on ~s\n~s\n" e (printf "exception on ~s\n~s\n" e
(exn-message exc))) (exn-message exc)))
#f)]) #f)])
@ -477,10 +473,10 @@
(generate-term bytecode e #:i-th index) (generate-term bytecode e #:i-th index)
(set! index (add1 index)))))) (set! index (add1 index))))))
(define fixed '())
(test-equal (test-equal
(bytecode-ok? (bytecode-ok?
'(let-one 'x '(let-one 'x
(branch #f (boxenv 0 'y) (loc-box 0)))) (branch #f (boxenv 0 'y) (loc-box 0))))
#t) #t)
(define fixed '())

View File

@ -439,13 +439,9 @@
(with-handlers (with-handlers
([exn:fail? (λ (exc) ([exn:fail? (λ (exc)
(unless (unless
(or (regexp-match?
(regexp-match? #"counterexample|domain|clauses"
#rx"^counterexample" (exn-message exc))
(exn-message exc))
(regexp-match?
#rx"domain"
(exn-message exc)))
(printf "exception on ~s\n~s\n" e (printf "exception on ~s\n~s\n" e
(exn-message exc))) (exn-message exc)))
#f)]) #f)])
@ -477,6 +473,7 @@
(generate-term bytecode e #:i-th index) (generate-term bytecode e #:i-th index)
(set! index (add1 index)))))) (set! index (add1 index))))))
(define fixed '())
(test-equal (test-equal
(bytecode-ok? (bytecode-ok?
'(let-void 1 '(let-void 1
@ -485,4 +482,3 @@
(loc-noclr 0)))) (loc-noclr 0))))
#t) #t)
(define fixed '())

View File

@ -438,13 +438,9 @@
(with-handlers (with-handlers
([exn:fail? (λ (exc) ([exn:fail? (λ (exc)
(unless (unless
(or (regexp-match?
(regexp-match? #"counterexample|domain|clauses"
#rx"^counterexample" (exn-message exc))
(exn-message exc))
(regexp-match?
#rx"domain"
(exn-message exc)))
(printf "exception on ~s\n~s\n" e (printf "exception on ~s\n~s\n" e
(exn-message exc))) (exn-message exc)))
#f)]) #f)])