JVM-semantics fixes and small cleanups
- take-last / drop-last return seqs, not vectors: take-last wraps in seq; drop-last is the JVM (map (fn [x _] x) coll (drop n coll)) form (lazy, () when empty). - cycle is lazy ((lazy-seq (concat coll (cycle coll)))) so it no longer counts its argument and terminates on a lazy/infinite input. - fold's foldable-call catch uses :default, matching the rest of jolt-core and also catching a raw host condition from a folding primitive. - alts! rejects non-channel ports with a clear error (put specs / :default are unsupported) instead of crashing inside ac-poll!. - Misc: drop the unreachable second getCause clause; jolt-nth on a string raises 'nth "index out of bounds" like the vector branch; name the inline fixpoint cap; bld-sh-capture rejoins lines with newlines; clarify a couple of comments.
This commit is contained in:
parent
524d4cd8d1
commit
14547bd1d5
11 changed files with 642 additions and 616 deletions
|
|
@ -174,7 +174,9 @@
|
|||
(keyword #f "name") (jolt-symbol jolt-nil name-str)
|
||||
(keyword #f "methods") methods))
|
||||
|
||||
;; register-protocol-methods!: a no-op for Chez dispatch.
|
||||
;; register-protocol-methods!: intentional no-op. Chez dispatches a protocol method
|
||||
;; by the receiver's type tag at call time, so there is no method table to register;
|
||||
;; this binding exists only because defprotocol-emitted code calls it.
|
||||
(define (register-protocol-methods! proto-name method-names) jolt-nil)
|
||||
|
||||
;; register-method: extend-type/extend register an impl. Host type names keep a
|
||||
|
|
@ -329,7 +331,7 @@
|
|||
((string=? method-name "toString") (condition->message-string obj))
|
||||
((string=? method-name "getCause") jolt-nil)
|
||||
;; java.sql.SQLException chaining — jolt errors don't chain (nil).
|
||||
((or (string=? method-name "getNextException") (string=? method-name "getCause")) jolt-nil)
|
||||
((string=? method-name "getNextException") jolt-nil)
|
||||
((string=? method-name "getStackTrace") (jolt-vector))
|
||||
((string=? method-name "printStackTrace") jolt-nil)
|
||||
(else (error #f (string-append "No method " method-name " on Throwable")))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue