Host interop fixes: ==/time/subvec/defonce + corpus cleanup
- == 1-arg returns true for any value (Clojure short-circuits before the number check), not 'requires numbers'. - current-time-ms wired to now-millis so the time macro works. - subvec truncates float/ratio indices via long (Scheme quotient rejects flonums). - defonce checks bound? not var-get — in a top-level do the name is already an unbound interned cell, which var-get throws on. - drop the line-seq corpus row (used janet/spit, N/A); allowlist char-array (needs Class/forName "[C"). Corpus 2678->2683, floor raised. Re-minted. Full gate green; CI green. jolt-cf1q.7
This commit is contained in:
parent
dd0e0b55cc
commit
cf0b544baf
7 changed files with 23 additions and 13 deletions
|
|
@ -167,6 +167,9 @@
|
|||
(define (now-millis)
|
||||
(let ((t (current-time 'time-utc)))
|
||||
(+ (* 1000 (time-second t)) (quotient (time-nanosecond t) 1000000))))
|
||||
|
||||
;; clojure.core/current-time-ms — epoch milliseconds; backs the `time` macro.
|
||||
(def-var! "clojure.core" "current-time-ms" (lambda () (->num (now-millis))))
|
||||
(register-class-statics! "System"
|
||||
(list (cons "currentTimeMillis" (lambda () (->num (now-millis))))
|
||||
(cons "nanoTime" (lambda () (->num (* 1000000 (now-millis)))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue