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

View File

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

View File

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

View File

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

View File

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

View File

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