bug correction
svn: r11531
This commit is contained in:
parent
93c88b9370
commit
9c4eaa2c22
|
@ -69,29 +69,29 @@
|
|||
((or) (or left right)))))
|
||||
|
||||
;divide-dynamic: number number -> number
|
||||
(define (divide-dynamic left right)
|
||||
(define (divide-dynamic left right marks)
|
||||
(if (or (inexact? left) (inexact? right))
|
||||
(divide-float left right)
|
||||
(divide-int left right)))
|
||||
|
||||
;divide-int: int int -> int
|
||||
(define (divide-int left right)
|
||||
(define (divide-int left right marks)
|
||||
(when (zero? right)
|
||||
(raise (create-java-exception ArithmeticException
|
||||
"Illegal division by zero"
|
||||
(lambda (exn msg)
|
||||
(send exn ArithmeticException-constructor-java.lang.String msg))
|
||||
(current-continuation-marks))))
|
||||
marks)))
|
||||
(quotient left right))
|
||||
|
||||
;divide-float: float float -> float
|
||||
(define (divide-float left right)
|
||||
(define (divide-float left right marks)
|
||||
(when (zero? right)
|
||||
(raise (create-java-exception ArithmeticException
|
||||
"Illegal division by zero"
|
||||
(lambda (exn msg)
|
||||
(send exn ArithmeticException-constructor-java.lang.String msg))
|
||||
(current-continuation-marks))))
|
||||
marks)))
|
||||
(if (and (exact? left) (exact? right))
|
||||
(exact->inexact (/ left right))
|
||||
(/ left right)))
|
||||
|
|
|
@ -2026,7 +2026,6 @@
|
|||
(lambda () (error 'descendent-Runtime "Internal Error: class record is not in table")))))
|
||||
(member `("java" "lang" "RuntimeException") (class-record-parents class-record)))))
|
||||
|
||||
;Converted
|
||||
;translate-switch: syntax (list CaseStatements) src type-records -> syntax
|
||||
(define translate-switch
|
||||
(lambda (expr cases src type-recs)
|
||||
|
@ -2042,7 +2041,6 @@
|
|||
cases))
|
||||
(build-src src))))
|
||||
|
||||
;Converted
|
||||
;translate-block: (list (U Statement (U var-decl var-init))) src type-recs -> syntax
|
||||
(define translate-block
|
||||
(lambda (statements src type-recs)
|
||||
|
@ -2414,7 +2412,7 @@
|
|||
'javaRuntime:divide-dynamic)
|
||||
(else
|
||||
'javaRuntime:divide-int))))
|
||||
(make-syntax #f `(,(create-syntax #f div-op key-src) ,left ,right) source)))
|
||||
(make-syntax #f `(,(create-syntax #f div-op key-src) ,left ,right (current-continuation-marks)) source)))
|
||||
((%) (make-syntax #f `(,(create-syntax #f 'javaRuntime:mod key-src) ,left ,right) source))
|
||||
;Shift operations
|
||||
((<< >> >>>)
|
||||
|
|
|
@ -760,7 +760,7 @@
|
|||
(set! compiled? #t)
|
||||
(set! modules (order compilation-units))
|
||||
(when rep (send rep set-user-types execute-types))
|
||||
(set! extras (process-extras (send execute-types get-interactions-boxes) execute-types))
|
||||
#;(set! extras (process-extras (send execute-types get-interactions-boxes) execute-types))
|
||||
(set! tests examples))
|
||||
(datum->syntax #f '(void) #f)]
|
||||
[else
|
||||
|
@ -836,15 +836,16 @@
|
|||
eof
|
||||
(begin
|
||||
(set! executed? #t)
|
||||
(syntax-as-top
|
||||
(compile-interactions-ast
|
||||
(parse-interactions port name level)
|
||||
name level types #t)
|
||||
|
||||
(errortrace-annotate
|
||||
(syntax-as-top
|
||||
(compile-interactions-ast
|
||||
(parse-interactions port name level)
|
||||
name level types #t)
|
||||
|
||||
#;(datum->syntax
|
||||
#f
|
||||
`(parse-java-interactions ,(parse-interactions port name level) ,name)
|
||||
#f)))))))
|
||||
#f))))))))
|
||||
(define/public (front-end/finished-complete-program settings) (void))
|
||||
|
||||
(define (get-defn-editor port-name)
|
||||
|
|
|
@ -174,7 +174,7 @@
|
|||
(when current-testcase
|
||||
(set-tc-stat-checks!
|
||||
current-testcase
|
||||
(cons (make-failed-check src msg)
|
||||
(cons (make-failed-check src msg exn)
|
||||
(tc-stat-checks current-testcase))))
|
||||
(inner (void) check-failed msg src exn))
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user