(guard (e (#t #f))
  (def-var! "jolt.ir" "const" (letrec ((const (lambda (v) (let fnrec8239 ((v v)) (let* ((_o$8240 (keyword #f "op")) (_o$8241 (keyword #f "const")) (_o$8242 (keyword #f "val")) (_o$8243 v)) (jolt-hash-map _o$8240 _o$8241 _o$8242 _o$8243)))))) const)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "local" (letrec ((local (lambda (name) (let fnrec8244 ((name name)) (let* ((_o$8245 (keyword #f "op")) (_o$8246 (keyword #f "local")) (_o$8247 (keyword #f "name")) (_o$8248 name)) (jolt-hash-map _o$8245 _o$8246 _o$8247 _o$8248)))))) local)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "var-ref" (letrec ((var-ref (lambda (ns name) (let fnrec8249 ((ns ns) (name name)) (let* ((_o$8250 (keyword #f "op")) (_o$8251 (keyword #f "var")) (_o$8252 (keyword #f "ns")) (_o$8253 ns) (_o$8254 (keyword #f "name")) (_o$8255 name)) (jolt-hash-map _o$8250 _o$8251 _o$8252 _o$8253 _o$8254 _o$8255)))))) var-ref)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "the-var" (letrec ((the-var (lambda (ns name) (let fnrec8256 ((ns ns) (name name)) (let* ((_o$8257 (keyword #f "op")) (_o$8258 (keyword #f "the-var")) (_o$8259 (keyword #f "ns")) (_o$8260 ns) (_o$8261 (keyword #f "name")) (_o$8262 name)) (jolt-hash-map _o$8257 _o$8258 _o$8259 _o$8260 _o$8261 _o$8262)))))) the-var)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "host-ref" (letrec ((host-ref (lambda (name) (let fnrec8263 ((name name)) (let* ((_o$8264 (keyword #f "op")) (_o$8265 (keyword #f "host")) (_o$8266 (keyword #f "name")) (_o$8267 name)) (jolt-hash-map _o$8264 _o$8265 _o$8266 _o$8267)))))) host-ref)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "host-static" (letrec ((host-static (lambda (class member) (let fnrec8268 ((class class) (member member)) (let* ((_o$8269 (keyword #f "op")) (_o$8270 (keyword #f "host-static")) (_o$8271 (keyword #f "class")) (_o$8272 class) (_o$8273 (keyword #f "member")) (_o$8274 member)) (jolt-hash-map _o$8269 _o$8270 _o$8271 _o$8272 _o$8273 _o$8274)))))) host-static)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "host-new" (letrec ((host-new (lambda (class args) (let fnrec8275 ((class class) (args args)) (let* ((_o$8276 (keyword #f "op")) (_o$8277 (keyword #f "host-new")) (_o$8278 (keyword #f "class")) (_o$8279 class) (_o$8280 (keyword #f "args")) (_o$8281 args)) (jolt-hash-map _o$8276 _o$8277 _o$8278 _o$8279 _o$8280 _o$8281)))))) host-new)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "if-node" (letrec ((if-node (lambda (test then _else) (let fnrec8282 ((test test) (then then) (_else _else)) (let* ((_o$8283 (keyword #f "op")) (_o$8284 (keyword #f "if")) (_o$8285 (keyword #f "test")) (_o$8286 test) (_o$8287 (keyword #f "then")) (_o$8288 then) (_o$8289 (keyword #f "else")) (_o$8290 _else)) (jolt-hash-map _o$8283 _o$8284 _o$8285 _o$8286 _o$8287 _o$8288 _o$8289 _o$8290)))))) if-node)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "do-node" (letrec ((do-node (lambda (statements ret) (let fnrec8291 ((statements statements) (ret ret)) (let* ((_o$8292 (keyword #f "op")) (_o$8293 (keyword #f "do")) (_o$8294 (keyword #f "statements")) (_o$8295 statements) (_o$8296 (keyword #f "ret")) (_o$8297 ret)) (jolt-hash-map _o$8292 _o$8293 _o$8294 _o$8295 _o$8296 _o$8297)))))) do-node)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "invoke" (letrec ((invoke (lambda (f args) (let fnrec8298 ((f f) (args args)) (let* ((_o$8299 (keyword #f "op")) (_o$8300 (keyword #f "invoke")) (_o$8301 (keyword #f "fn")) (_o$8302 f) (_o$8303 (keyword #f "args")) (_o$8304 args)) (jolt-hash-map _o$8299 _o$8300 _o$8301 _o$8302 _o$8303 _o$8304)))))) invoke)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "def-node" (letrec ((def-node (case-lambda ((ns name init) (let fnrec8305 ((ns ns) (name name) (init init)) (let* ((_o$8306 (keyword #f "op")) (_o$8307 (keyword #f "def")) (_o$8308 (keyword #f "ns")) (_o$8309 ns) (_o$8310 (keyword #f "name")) (_o$8311 name) (_o$8312 (keyword #f "init")) (_o$8313 init)) (jolt-hash-map _o$8306 _o$8307 _o$8308 _o$8309 _o$8310 _o$8311 _o$8312 _o$8313)))) ((ns name init meta) (let fnrec8314 ((ns ns) (name name) (init init) (meta meta)) (if (jolt-truthy? meta) (let* ((_o$8315 (keyword #f "op")) (_o$8316 (keyword #f "def")) (_o$8317 (keyword #f "ns")) (_o$8318 ns) (_o$8319 (keyword #f "name")) (_o$8320 name) (_o$8321 (keyword #f "init")) (_o$8322 init) (_o$8323 (keyword #f "meta")) (_o$8324 meta)) (jolt-hash-map _o$8315 _o$8316 _o$8317 _o$8318 _o$8319 _o$8320 _o$8321 _o$8322 _o$8323 _o$8324)) (let* ((_o$8325 (keyword #f "op")) (_o$8326 (keyword #f "def")) (_o$8327 (keyword #f "ns")) (_o$8328 ns) (_o$8329 (keyword #f "name")) (_o$8330 name) (_o$8331 (keyword #f "init")) (_o$8332 init)) (jolt-hash-map _o$8325 _o$8326 _o$8327 _o$8328 _o$8329 _o$8330 _o$8331 _o$8332)))))))) def-node)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "let-node" (letrec ((let-node (lambda (bindings body) (let fnrec8333 ((bindings bindings) (body body)) (let* ((_o$8334 (keyword #f "op")) (_o$8335 (keyword #f "let")) (_o$8336 (keyword #f "bindings")) (_o$8337 bindings) (_o$8338 (keyword #f "body")) (_o$8339 body)) (jolt-hash-map _o$8334 _o$8335 _o$8336 _o$8337 _o$8338 _o$8339)))))) let-node)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "fn-node" (letrec ((fn-node (lambda (name arities) (let fnrec8340 ((name name) (arities arities)) (if (jolt-truthy? name) (let* ((_o$8341 (keyword #f "op")) (_o$8342 (keyword #f "fn")) (_o$8343 (keyword #f "name")) (_o$8344 name) (_o$8345 (keyword #f "arities")) (_o$8346 arities)) (jolt-hash-map _o$8341 _o$8342 _o$8343 _o$8344 _o$8345 _o$8346)) (let* ((_o$8347 (keyword #f "op")) (_o$8348 (keyword #f "fn")) (_o$8349 (keyword #f "arities")) (_o$8350 arities)) (jolt-hash-map _o$8347 _o$8348 _o$8349 _o$8350))))))) fn-node)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "vector-node" (letrec ((vector-node (lambda (items) (let fnrec8351 ((items items)) (let* ((_o$8352 (keyword #f "op")) (_o$8353 (keyword #f "vector")) (_o$8354 (keyword #f "items")) (_o$8355 items)) (jolt-hash-map _o$8352 _o$8353 _o$8354 _o$8355)))))) vector-node)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "map-node" (letrec ((map-node (lambda (pairs) (let fnrec8356 ((pairs pairs)) (let* ((_o$8357 (keyword #f "op")) (_o$8358 (keyword #f "map")) (_o$8359 (keyword #f "pairs")) (_o$8360 pairs)) (jolt-hash-map _o$8357 _o$8358 _o$8359 _o$8360)))))) map-node)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "set-node" (letrec ((set-node (lambda (items) (let fnrec8361 ((items items)) (let* ((_o$8362 (keyword #f "op")) (_o$8363 (keyword #f "set")) (_o$8364 (keyword #f "items")) (_o$8365 items)) (jolt-hash-map _o$8362 _o$8363 _o$8364 _o$8365)))))) set-node)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "quote-node" (letrec ((quote-node (lambda (form) (let fnrec8366 ((form form)) (let* ((_o$8367 (keyword #f "op")) (_o$8368 (keyword #f "quote")) (_o$8369 (keyword #f "form")) (_o$8370 form)) (jolt-hash-map _o$8367 _o$8368 _o$8369 _o$8370)))))) quote-node)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "throw-node" (letrec ((throw-node (lambda (expr) (let fnrec8371 ((expr expr)) (let* ((_o$8372 (keyword #f "op")) (_o$8373 (keyword #f "throw")) (_o$8374 (keyword #f "expr")) (_o$8375 expr)) (jolt-hash-map _o$8372 _o$8373 _o$8374 _o$8375)))))) throw-node)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "coerce-node" (letrec ((coerce-node (lambda (kind expr) (let fnrec8376 ((kind kind) (expr expr)) (let* ((_o$8377 (keyword #f "op")) (_o$8378 (keyword #f "coerce")) (_o$8379 (keyword #f "kind")) (_o$8380 kind) (_o$8381 (keyword #f "expr")) (_o$8382 expr)) (jolt-hash-map _o$8377 _o$8378 _o$8379 _o$8380 _o$8381 _o$8382)))))) coerce-node)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "map-ir-children" (letrec ((map-ir-children (lambda (f node) (let fnrec8383 ((f f) (node node)) (let* ((op (jolt-get node (keyword #f "op")))) (if (jolt= op (keyword #f "if")) (let* ((_a$8384 node) (_a$8385 (keyword #f "test")) (_a$8386 (jolt-invoke f (jolt-get node (keyword #f "test")))) (_a$8387 (keyword #f "then")) (_a$8388 (jolt-invoke f (jolt-get node (keyword #f "then")))) (_a$8389 (keyword #f "else")) (_a$8390 (jolt-invoke f (jolt-get node (keyword #f "else"))))) (jolt-assoc _a$8384 _a$8385 _a$8386 _a$8387 _a$8388 _a$8389 _a$8390)) (if (jolt= op (keyword #f "do")) (let* ((_a$8391 node) (_a$8392 (keyword #f "statements")) (_a$8393 (jolt-invoke (var-deref "clojure.core" "mapv") f (jolt-get node (keyword #f "statements")))) (_a$8394 (keyword #f "ret")) (_a$8395 (jolt-invoke f (jolt-get node (keyword #f "ret"))))) (jolt-assoc _a$8391 _a$8392 _a$8393 _a$8394 _a$8395)) (if (jolt= op (keyword #f "throw")) (jolt-assoc node (keyword #f "expr") (jolt-invoke f (jolt-get node (keyword #f "expr")))) (if (jolt= op (keyword #f "coerce")) (jolt-assoc node (keyword #f "expr") (jolt-invoke f (jolt-get node (keyword #f "expr")))) (if (jolt= op (keyword #f "set-var")) (jolt-assoc node (keyword #f "val") (jolt-invoke f (jolt-get node (keyword #f "val")))) (if (jolt= op (keyword #f "set-field")) (let* ((_a$8396 node) (_a$8397 (keyword #f "obj")) (_a$8398 (jolt-invoke f (jolt-get node (keyword #f "obj")))) (_a$8399 (keyword #f "val")) (_a$8400 (jolt-invoke f (jolt-get node (keyword #f "val"))))) (jolt-assoc _a$8396 _a$8397 _a$8398 _a$8399 _a$8400)) (if (jolt= op (keyword #f "defmacro")) (jolt-assoc node (keyword #f "fn") (jolt-invoke f (jolt-get node (keyword #f "fn")))) (if (jolt= op (keyword #f "ffi-callable")) (jolt-assoc node (keyword #f "fn") (jolt-invoke f (jolt-get node (keyword #f "fn")))) (if (jolt= op (keyword #f "invoke")) (let* ((_a$8401 node) (_a$8402 (keyword #f "fn")) (_a$8403 (jolt-invoke f (jolt-get node (keyword #f "fn")))) (_a$8404 (keyword #f "args")) (_a$8405 (jolt-invoke (var-deref "clojure.core" "mapv") f (jolt-get node (keyword #f "args"))))) (jolt-assoc _a$8401 _a$8402 _a$8403 _a$8404 _a$8405)) (if (jolt= op (keyword #f "vector")) (jolt-assoc node (keyword #f "items") (jolt-invoke (var-deref "clojure.core" "mapv") f (jolt-get node (keyword #f "items")))) (if (jolt= op (keyword #f "set")) (jolt-assoc node (keyword #f "items") (jolt-invoke (var-deref "clojure.core" "mapv") f (jolt-get node (keyword #f "items")))) (if (jolt= op (keyword #f "map")) (jolt-assoc node (keyword #f "pairs") (let* ((_a$8409 (var-deref "clojure.core" "mapv")) (_a$8410 (lambda (pr) (let fnrec8406 ((pr pr)) (let* ((_o$8407 (jolt-invoke f (jolt-nth pr 0))) (_o$8408 (jolt-invoke f (jolt-nth pr 1)))) (jolt-vector _o$8407 _o$8408))))) (_a$8411 (jolt-get node (keyword #f "pairs")))) (jolt-invoke _a$8409 _a$8410 _a$8411))) (if (jolt= op (keyword #f "let")) (let* ((_a$8418 node) (_a$8419 (keyword #f "bindings")) (_a$8420 (let* ((_a$8415 (var-deref "clojure.core" "mapv")) (_a$8416 (lambda (b) (let fnrec8412 ((b b)) (let* ((_o$8413 (jolt-nth b 0)) (_o$8414 (jolt-invoke f (jolt-nth b 1)))) (jolt-vector _o$8413 _o$8414))))) (_a$8417 (jolt-get node (keyword #f "bindings")))) (jolt-invoke _a$8415 _a$8416 _a$8417))) (_a$8421 (keyword #f "body")) (_a$8422 (jolt-invoke f (jolt-get node (keyword #f "body"))))) (jolt-assoc _a$8418 _a$8419 _a$8420 _a$8421 _a$8422)) (if (jolt= op (keyword #f "loop")) (let* ((_a$8429 node) (_a$8430 (keyword #f "bindings")) (_a$8431 (let* ((_a$8426 (var-deref "clojure.core" "mapv")) (_a$8427 (lambda (b) (let fnrec8423 ((b b)) (let* ((_o$8424 (jolt-nth b 0)) (_o$8425 (jolt-invoke f (jolt-nth b 1)))) (jolt-vector _o$8424 _o$8425))))) (_a$8428 (jolt-get node (keyword #f "bindings")))) (jolt-invoke _a$8426 _a$8427 _a$8428))) (_a$8432 (keyword #f "body")) (_a$8433 (jolt-invoke f (jolt-get node (keyword #f "body"))))) (jolt-assoc _a$8429 _a$8430 _a$8431 _a$8432 _a$8433)) (if (jolt= op (keyword #f "recur")) (jolt-assoc node (keyword #f "args") (jolt-invoke (var-deref "clojure.core" "mapv") f (jolt-get node (keyword #f "args")))) (if (jolt= op (keyword #f "fn")) (jolt-assoc node (keyword #f "arities") (let* ((_a$8435 (var-deref "clojure.core" "mapv")) (_a$8436 (lambda (a) (let fnrec8434 ((a a)) (jolt-assoc a (keyword #f "body") (jolt-invoke f (jolt-get a (keyword #f "body"))))))) (_a$8437 (jolt-get node (keyword #f "arities")))) (jolt-invoke _a$8435 _a$8436 _a$8437))) (if (jolt= op (keyword #f "def")) (let* ((n (jolt-assoc node (keyword #f "init") (jolt-invoke f (jolt-get node (keyword #f "init")))))) (if (jolt-truthy? (jolt-get node (keyword #f "meta-expr"))) (jolt-assoc n (keyword #f "meta-expr") (jolt-invoke f (jolt-get node (keyword #f "meta-expr")))) n)) (if (jolt= op (keyword #f "host-call")) (let* ((_a$8438 node) (_a$8439 (keyword #f "target")) (_a$8440 (jolt-invoke f (jolt-get node (keyword #f "target")))) (_a$8441 (keyword #f "args")) (_a$8442 (jolt-invoke (var-deref "clojure.core" "mapv") f (jolt-get node (keyword #f "args"))))) (jolt-assoc _a$8438 _a$8439 _a$8440 _a$8441 _a$8442)) (if (jolt= op (keyword #f "host-new")) (jolt-assoc node (keyword #f "args") (jolt-invoke (var-deref "clojure.core" "mapv") f (jolt-get node (keyword #f "args")))) (if (jolt= op (keyword #f "try")) (let* ((n (jolt-assoc node (keyword #f "body") (jolt-invoke f (jolt-get node (keyword #f "body"))))) (n (if (jolt-truthy? (jolt-get node (keyword #f "catch-body"))) (jolt-assoc n (keyword #f "catch-body") (jolt-invoke f (jolt-get node (keyword #f "catch-body")))) n)) (n (if (jolt-truthy? (jolt-get node (keyword #f "finally"))) (jolt-assoc n (keyword #f "finally") (jolt-invoke f (jolt-get node (keyword #f "finally")))) n))) n) (if (jolt-truthy? (keyword #f "else")) node jolt-nil)))))))))))))))))))))))))) map-ir-children)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "reduce-ir-children" (letrec ((reduce-ir-children (lambda (f acc node) (let fnrec8443 ((f f) (acc acc) (node node)) (let* ((op (jolt-get node (keyword #f "op")))) (if (jolt= op (keyword #f "if")) (let* ((_a$8447 f) (_a$8448 (let* ((_a$8444 f) (_a$8445 (jolt-invoke f acc (jolt-get node (keyword #f "test")))) (_a$8446 (jolt-get node (keyword #f "then")))) (jolt-invoke _a$8444 _a$8445 _a$8446))) (_a$8449 (jolt-get node (keyword #f "else")))) (jolt-invoke _a$8447 _a$8448 _a$8449)) (if (jolt= op (keyword #f "do")) (let* ((_a$8450 f) (_a$8451 (jolt-reduce f acc (jolt-get node (keyword #f "statements")))) (_a$8452 (jolt-get node (keyword #f "ret")))) (jolt-invoke _a$8450 _a$8451 _a$8452)) (if (jolt= op (keyword #f "throw")) (jolt-invoke f acc (jolt-get node (keyword #f "expr"))) (if (jolt= op (keyword #f "coerce")) (jolt-invoke f acc (jolt-get node (keyword #f "expr"))) (if (jolt= op (keyword #f "set-var")) (jolt-invoke f acc (jolt-get node (keyword #f "val"))) (if (jolt= op (keyword #f "set-field")) (let* ((_a$8453 f) (_a$8454 (jolt-invoke f acc (jolt-get node (keyword #f "obj")))) (_a$8455 (jolt-get node (keyword #f "val")))) (jolt-invoke _a$8453 _a$8454 _a$8455)) (if (jolt= op (keyword #f "defmacro")) (jolt-invoke f acc (jolt-get node (keyword #f "fn"))) (if (jolt= op (keyword #f "ffi-callable")) (jolt-invoke f acc (jolt-get node (keyword #f "fn"))) (if (jolt= op (keyword #f "invoke")) (let* ((_a$8456 f) (_a$8457 (jolt-invoke f acc (jolt-get node (keyword #f "fn")))) (_a$8458 (jolt-get node (keyword #f "args")))) (jolt-reduce _a$8456 _a$8457 _a$8458)) (if (jolt= op (keyword #f "vector")) (jolt-reduce f acc (jolt-get node (keyword #f "items"))) (if (jolt= op (keyword #f "set")) (jolt-reduce f acc (jolt-get node (keyword #f "items"))) (if (jolt= op (keyword #f "map")) (let* ((_a$8463 (lambda (a pr) (let fnrec8459 ((a a) (pr pr)) (let* ((_a$8460 f) (_a$8461 (jolt-invoke f a (jolt-nth pr 0))) (_a$8462 (jolt-nth pr 1))) (jolt-invoke _a$8460 _a$8461 _a$8462))))) (_a$8464 acc) (_a$8465 (jolt-get node (keyword #f "pairs")))) (jolt-reduce _a$8463 _a$8464 _a$8465)) (if (jolt= op (keyword #f "let")) (let* ((_a$8470 f) (_a$8471 (let* ((_a$8467 (lambda (a b) (let fnrec8466 ((a a) (b b)) (jolt-invoke f a (jolt-nth b 1))))) (_a$8468 acc) (_a$8469 (jolt-get node (keyword #f "bindings")))) (jolt-reduce _a$8467 _a$8468 _a$8469))) (_a$8472 (jolt-get node (keyword #f "body")))) (jolt-invoke _a$8470 _a$8471 _a$8472)) (if (jolt= op (keyword #f "loop")) (let* ((_a$8477 f) (_a$8478 (let* ((_a$8474 (lambda (a b) (let fnrec8473 ((a a) (b b)) (jolt-invoke f a (jolt-nth b 1))))) (_a$8475 acc) (_a$8476 (jolt-get node (keyword #f "bindings")))) (jolt-reduce _a$8474 _a$8475 _a$8476))) (_a$8479 (jolt-get node (keyword #f "body")))) (jolt-invoke _a$8477 _a$8478 _a$8479)) (if (jolt= op (keyword #f "recur")) (jolt-reduce f acc (jolt-get node (keyword #f "args"))) (if (jolt= op (keyword #f "fn")) (let* ((_a$8481 (lambda (a ar) (let fnrec8480 ((a a) (ar ar)) (jolt-invoke f a (jolt-get ar (keyword #f "body")))))) (_a$8482 acc) (_a$8483 (jolt-get node (keyword #f "arities")))) (jolt-reduce _a$8481 _a$8482 _a$8483)) (if (jolt= op (keyword #f "def")) (let* ((a (if (jolt-truthy? (jolt-get node (keyword #f "init"))) (jolt-invoke f acc (jolt-get node (keyword #f "init"))) acc))) (if (jolt-truthy? (jolt-get node (keyword #f "meta-expr"))) (jolt-invoke f a (jolt-get node (keyword #f "meta-expr"))) a)) (if (jolt= op (keyword #f "host-call")) (let* ((_a$8484 f) (_a$8485 (jolt-invoke f acc (jolt-get node (keyword #f "target")))) (_a$8486 (jolt-get node (keyword #f "args")))) (jolt-reduce _a$8484 _a$8485 _a$8486)) (if (jolt= op (keyword #f "host-new")) (jolt-reduce f acc (jolt-get node (keyword #f "args"))) (if (jolt= op (keyword #f "try")) (let* ((a (jolt-invoke f acc (jolt-get node (keyword #f "body")))) (a (if (jolt-truthy? (jolt-get node (keyword #f "catch-body"))) (jolt-invoke f a (jolt-get node (keyword #f "catch-body"))) a)) (a (if (jolt-truthy? (jolt-get node (keyword #f "finally"))) (jolt-invoke f a (jolt-get node (keyword #f "finally"))) a))) a) (if (jolt-truthy? (keyword #f "else")) acc jolt-nil)))))))))))))))))))))))))) reduce-ir-children)))
(guard (e (#t #f))
  (declare-var! "jolt.analyzer" "analyze"))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "handled" (let* ((_o$8487 "quote") (_o$8488 "if") (_o$8489 "do") (_o$8490 "def") (_o$8491 "fn*") (_o$8492 "let*") (_o$8493 "loop*") (_o$8494 "recur") (_o$8495 "throw") (_o$8496 "try") (_o$8497 "syntax-quote") (_o$8498 "var") (_o$8499 "letfn*") (_o$8500 "set!") (_o$8501 "defmacro")) (jolt-hash-set _o$8487 _o$8488 _o$8489 _o$8490 _o$8491 _o$8492 _o$8493 _o$8494 _o$8495 _o$8496 _o$8497 _o$8498 _o$8499 _o$8500 _o$8501)) (let* ((_o$8502 (keyword #f "private")) (_o$8503 #t)) (jolt-hash-map _o$8502 _o$8503))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "uncompilable" (letrec ((uncompilable (lambda (why) (let fnrec8504 ((why why)) (jolt-throw (jolt-invoke (var-deref "clojure.core" "str") "jolt/uncompilable: " why)))))) uncompilable) (let* ((_o$8505 (keyword #f "private")) (_o$8506 #t)) (jolt-hash-map _o$8505 _o$8506))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "gensym-counter" (jolt-invoke (var-deref "clojure.core" "atom") 0) (let* ((_o$8507 (keyword #f "private")) (_o$8508 #t)) (jolt-hash-map _o$8507 _o$8508))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "gen-name" (letrec ((gen-name (lambda (prefix) (let fnrec8509 ((prefix prefix)) (let* ((n (jolt-invoke (var-deref "clojure.core" "deref") (var-deref "jolt.analyzer" "gensym-counter")))) (begin (jolt-invoke (var-deref "clojure.core" "swap!") (var-deref "jolt.analyzer" "gensym-counter") jolt-inc) (jolt-invoke (var-deref "clojure.core" "str") "_r$" prefix n))))))) gen-name) (let* ((_o$8510 (keyword #f "private")) (_o$8511 #t)) (jolt-hash-map _o$8510 _o$8511))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "empty-env" (letrec ((empty-env (lambda () (let fnrec8512 () (let* ((_o$8513 (keyword #f "locals")) (_o$8514 (jolt-hash-set)) (_o$8515 (keyword #f "hints")) (_o$8516 (jolt-hash-map))) (jolt-hash-map _o$8513 _o$8514 _o$8515 _o$8516)))))) empty-env) (let* ((_o$8517 (keyword #f "private")) (_o$8518 #t)) (jolt-hash-map _o$8517 _o$8518))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "local?" (letrec ((local? (lambda (env nm) (let fnrec8519 ((env env) (nm nm)) (jolt-contains? (jolt-get env (keyword #f "locals")) nm))))) local?) (let* ((_o$8520 (keyword #f "private")) (_o$8521 #t)) (jolt-hash-map _o$8520 _o$8521))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "add-locals" (letrec ((add-locals (lambda (env names) (let fnrec8522 ((env env) (names names)) (jolt-invoke (var-deref "clojure.core" "update") env (keyword #f "locals") (lambda (p__90_) (let fnrec8523 ((p__90_ p__90_)) (jolt-reduce jolt-conj p__90_ names)))))))) add-locals) (let* ((_o$8524 (keyword #f "private")) (_o$8525 #t)) (jolt-hash-map _o$8524 _o$8525))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "amp-env-map" (letrec ((amp-env-map (lambda (env) (let fnrec8526 ((env env)) (let* ((_a$8528 (lambda (m n) (let fnrec8527 ((m m) (n n)) (jolt-assoc m (jolt-invoke (var-deref "clojure.core" "symbol") n) jolt-nil)))) (_a$8529 (jolt-hash-map)) (_a$8530 (jolt-get env (keyword #f "locals")))) (jolt-reduce _a$8528 _a$8529 _a$8530)))))) amp-env-map) (let* ((_o$8531 (keyword #f "private")) (_o$8532 #t)) (jolt-hash-map _o$8531 _o$8532))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "with-recur" (letrec ((with-recur (lambda (env name) (let fnrec8533 ((env env) (name name)) (jolt-assoc env (keyword #f "recur") name))))) with-recur) (let* ((_o$8534 (keyword #f "private")) (_o$8535 #t)) (jolt-hash-map _o$8534 _o$8535))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "hint-of" (letrec ((hint-of (lambda (ctx sym) (let fnrec8536 ((ctx ctx) (sym sym)) (let* ((m (jolt-invoke (var-deref "jolt.host" "form-sym-meta") sym))) (if (jolt-nil? m) jolt-nil (if (jolt-truthy? (jolt-get m (keyword #f "struct"))) (keyword #f "struct") (if (jolt-truthy? (keyword #f "else")) (let* ((t (jolt-get m (keyword #f "tag")))) (if (jolt-truthy? (let* ((and__25__auto t)) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.host" "record-type?") ctx t) and__25__auto))) (keyword #f "struct") jolt-nil)) jolt-nil)))))))) hint-of) (let* ((_o$8537 (keyword #f "private")) (_o$8538 #t)) (jolt-hash-map _o$8537 _o$8538))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "add-hint" (letrec ((add-hint (lambda (env nm h) (let fnrec8539 ((env env) (nm nm) (h h)) (if (jolt-truthy? h) (jolt-assoc env (keyword #f "hints") (jolt-assoc (jolt-get env (keyword #f "hints")) nm h)) env))))) add-hint) (let* ((_o$8540 (keyword #f "private")) (_o$8541 #t)) (jolt-hash-map _o$8540 _o$8541))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "phint-of" (letrec ((phint-of (lambda (ctx sym) (let fnrec8542 ((ctx ctx) (sym sym)) (let* ((m (jolt-invoke (var-deref "jolt.host" "form-sym-meta") sym))) (if (jolt-truthy? m) (let* ((t (jolt-get m (keyword #f "tag")))) (if (jolt-truthy? t) (jolt-invoke (var-deref "jolt.host" "record-ctor-key") ctx t) jolt-nil)) jolt-nil)))))) phint-of) (let* ((_o$8543 (keyword #f "private")) (_o$8544 #t)) (jolt-hash-map _o$8543 _o$8544))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "tag->nkind" (letrec ((tag->nkind (lambda (t) (let fnrec8545 ((t t)) (let* ((s (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-sym?") t)) (jolt-invoke (var-deref "jolt.host" "form-sym-name") t) (if (jolt-truthy? (jolt-invoke (var-deref "clojure.core" "string?") t)) t (if (jolt-truthy? (keyword #f "else")) jolt-nil jolt-nil))))) (if (jolt= s "double") (keyword #f "double") (if (jolt= s "long") (keyword #f "long") (if (jolt-truthy? (keyword #f "else")) jolt-nil jolt-nil)))))))) tag->nkind) (let* ((_o$8546 (keyword #f "private")) (_o$8547 #t)) (jolt-hash-map _o$8546 _o$8547))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "nhint-of" (letrec ((nhint-of (lambda (ctx sym) (let fnrec8548 ((ctx ctx) (sym sym)) (let* ((m (jolt-invoke (var-deref "jolt.host" "form-sym-meta") sym))) (if (jolt-truthy? m) (jolt-invoke (var-deref "jolt.analyzer" "tag->nkind") (jolt-get m (keyword #f "tag"))) jolt-nil)))))) nhint-of) (let* ((_o$8549 (keyword #f "private")) (_o$8550 #t)) (jolt-hash-map _o$8549 _o$8550))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "with-ret-nhint" (letrec ((with-ret-nhint (lambda (node kind) (let fnrec8551 ((node node) (kind kind)) (if (jolt-truthy? (let* ((and__25__auto kind)) (if (jolt-truthy? and__25__auto) (jolt= (keyword #f "fn") (jolt-get node (keyword #f "op"))) and__25__auto))) (jolt-assoc node (keyword #f "arities") (let* ((_a$8553 (var-deref "clojure.core" "mapv")) (_a$8554 (lambda (a) (let fnrec8552 ((a a)) (if (jolt-truthy? (jolt-get a (keyword #f "ret-nhint"))) a (jolt-assoc a (keyword #f "ret-nhint") kind))))) (_a$8555 (jolt-get node (keyword #f "arities")))) (jolt-invoke _a$8553 _a$8554 _a$8555))) node))))) with-ret-nhint) (let* ((_o$8556 (keyword #f "private")) (_o$8557 #t)) (jolt-hash-map _o$8556 _o$8557))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "analyze-seq" (letrec ((analyze-seq (lambda (ctx forms env) (let fnrec8558 ((ctx ctx) (forms forms) (env env)) (let* ((v (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (p__91_) (let fnrec8559 ((p__91_ p__91_)) (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx p__91_ env))) forms)) (n (jolt-count v))) (if (jolt-zero? n) (jolt-invoke (var-deref "jolt.ir" "const") jolt-nil) (if (jolt= 1 n) (jolt-first v) (if (jolt-truthy? (keyword #f "else")) (let* ((_a$8560 (var-deref "jolt.ir" "do-node")) (_a$8561 (jolt-invoke (var-deref "clojure.core" "subvec") v 0 (jolt-dec n))) (_a$8562 (jolt-peek v))) (jolt-invoke _a$8560 _a$8561 _a$8562)) jolt-nil)))))))) analyze-seq) (let* ((_o$8563 (keyword #f "private")) (_o$8564 #t)) (jolt-hash-map _o$8563 _o$8564))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "analyze-bindings" (letrec ((analyze-bindings (lambda (ctx bvec env) (let fnrec8565 ((ctx ctx) (bvec bvec) (env env)) (let* ((i 0) (env env) (pairs (jolt-vector))) (let loop8566 ((i i) (env env) (pairs pairs)) (if (< i (jolt-count bvec)) (let* ((bsym (jolt-nth bvec i))) (begin (if (jolt-not (jolt-invoke (var-deref "jolt.host" "form-sym?") bsym)) (jolt-invoke (var-deref "jolt.analyzer" "uncompilable") "destructuring binding") jolt-nil) (let* ((nm (jolt-invoke (var-deref "jolt.host" "form-sym-name") bsym)) (init (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx (jolt-nth bvec (jolt-inc i)) env))) (let* ((_a$8573 (+ i 2)) (_a$8574 (let* ((_a$8567 (var-deref "jolt.analyzer" "add-hint")) (_a$8568 (jolt-invoke (var-deref "jolt.analyzer" "add-locals") env (jolt-vector nm))) (_a$8569 nm) (_a$8570 (jolt-invoke (var-deref "jolt.analyzer" "hint-of") ctx bsym))) (jolt-invoke _a$8567 _a$8568 _a$8569 _a$8570))) (_a$8575 (jolt-conj pairs (let* ((_o$8571 nm) (_o$8572 init)) (jolt-vector _o$8571 _o$8572))))) (loop8566 _a$8573 _a$8574 _a$8575))))) (let* ((_o$8576 pairs) (_o$8577 env)) (jolt-vector _o$8576 _o$8577))))))))) analyze-bindings) (let* ((_o$8578 (keyword #f "private")) (_o$8579 #t)) (jolt-hash-map _o$8578 _o$8579))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "parse-params" (letrec ((parse-params (lambda (ctx pvec) (let fnrec8580 ((ctx ctx) (pvec pvec)) (let* ((i 0) (fixed (jolt-vector)) (rest-name jolt-nil) (hints (jolt-vector)) (phints (jolt-vector)) (nhints (jolt-vector))) (let loop8581 ((i i) (fixed fixed) (rest-name rest-name) (hints hints) (phints phints) (nhints nhints)) (if (< i (jolt-count pvec)) (let* ((p (jolt-nth pvec i))) (begin (if (jolt-not (jolt-invoke (var-deref "jolt.host" "form-sym?") p)) (jolt-invoke (var-deref "jolt.analyzer" "uncompilable") "destructuring fn param") jolt-nil) (if (jolt= "&" (jolt-invoke (var-deref "jolt.host" "form-sym-name") p)) (let* ((r (jolt-nth pvec (jolt-inc i)))) (begin (if (jolt-not (jolt-invoke (var-deref "jolt.host" "form-sym?") r)) (jolt-invoke (var-deref "jolt.analyzer" "uncompilable") "destructuring fn rest") jolt-nil) (let* ((_a$8582 (+ i 2)) (_a$8583 fixed) (_a$8584 (jolt-invoke (var-deref "jolt.host" "form-sym-name") r)) (_a$8585 hints) (_a$8586 phints) (_a$8587 nhints)) (loop8581 _a$8582 _a$8583 _a$8584 _a$8585 _a$8586 _a$8587)))) (let* ((nm (jolt-invoke (var-deref "jolt.host" "form-sym-name") p)) (h (jolt-invoke (var-deref "jolt.analyzer" "hint-of") ctx p)) (ph (jolt-invoke (var-deref "jolt.analyzer" "phint-of") ctx p)) (nh (jolt-invoke (var-deref "jolt.analyzer" "nhint-of") ctx p))) (let* ((_a$8594 (jolt-inc i)) (_a$8595 (jolt-conj fixed nm)) (_a$8596 rest-name) (_a$8597 (if (jolt-truthy? h) (jolt-conj hints (let* ((_o$8588 nm) (_o$8589 h)) (jolt-vector _o$8588 _o$8589))) hints)) (_a$8598 (if (jolt-truthy? ph) (jolt-conj phints (let* ((_o$8590 nm) (_o$8591 ph)) (jolt-vector _o$8590 _o$8591))) phints)) (_a$8599 (if (jolt-truthy? nh) (jolt-conj nhints (let* ((_o$8592 nm) (_o$8593 nh)) (jolt-vector _o$8592 _o$8593))) nhints))) (loop8581 _a$8594 _a$8595 _a$8596 _a$8597 _a$8598 _a$8599)))))) (let* ((_o$8600 (keyword #f "fixed")) (_o$8601 fixed) (_o$8602 (keyword #f "rest")) (_o$8603 rest-name) (_o$8604 (keyword #f "hints")) (_o$8605 hints) (_o$8606 (keyword #f "phints")) (_o$8607 phints) (_o$8608 (keyword #f "nhints")) (_o$8609 nhints)) (jolt-hash-map _o$8600 _o$8601 _o$8602 _o$8603 _o$8604 _o$8605 _o$8606 _o$8607 _o$8608 _o$8609))))))))) parse-params) (let* ((_o$8610 (keyword #f "private")) (_o$8611 #t)) (jolt-hash-map _o$8610 _o$8611))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "uniquify-params" (letrec ((uniquify-params (lambda (names) (let fnrec8612 ((names names)) (let* ((n (jolt-count names))) (let* ((i 0) (out (jolt-vector))) (let loop8613 ((i i) (out out)) (if (< i n) (let* ((nm (jolt-nth names i)) (dup? (let* ((j (jolt-inc i))) (let loop8614 ((j j)) (if (>= j n) #f (if (jolt= nm (jolt-nth names j)) #t (if (jolt-truthy? (keyword #f "else")) (loop8614 (jolt-inc j)) jolt-nil))))))) (let* ((_a$8615 (jolt-inc i)) (_a$8616 (jolt-conj out (if (jolt-truthy? dup?) (jolt-invoke (var-deref "jolt.analyzer" "gen-name") (jolt-invoke (var-deref "clojure.core" "str") nm "_")) nm)))) (loop8613 _a$8615 _a$8616))) out)))))))) uniquify-params) (let* ((_o$8617 (keyword #f "private")) (_o$8618 #t)) (jolt-hash-map _o$8617 _o$8618))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "analyze-arity" (letrec ((analyze-arity (lambda (ctx pvec body env fn-name) (let fnrec8619 ((ctx ctx) (pvec pvec) (body body) (env env) (fn-name fn-name)) (let* ((pp (jolt-invoke (var-deref "jolt.analyzer" "parse-params") ctx (jolt-invoke (var-deref "clojure.core" "vec") (jolt-invoke (var-deref "jolt.host" "form-vec-items") pvec)))) (fixed (jolt-invoke (var-deref "jolt.analyzer" "uniquify-params") (jolt-get pp (keyword #f "fixed")))) (rst (jolt-get pp (keyword #f "rest"))) (rname (jolt-invoke (var-deref "jolt.analyzer" "gen-name") (let* ((_a$8620 (var-deref "clojure.core" "str")) (_a$8621 (jolt-invoke (var-deref "jolt.host" "compile-ns") ctx)) (_a$8622 "/") (_a$8623 (let* ((or__26__auto fn-name)) (if (jolt-truthy? or__26__auto) or__26__auto "fn"))) (_a$8624 "--")) (jolt-invoke _a$8620 _a$8621 _a$8622 _a$8623 _a$8624)))) (names (let* ((G__148 (jolt-invoke (var-deref "clojure.core" "vec") fixed))) (let* ((G__149 (if (jolt-truthy? rst) (jolt-conj G__148 rst) G__148))) (let* ((G__150 (if (jolt-truthy? fn-name) (jolt-conj G__149 fn-name) G__149))) G__150)))) (env0 (jolt-invoke (var-deref "jolt.analyzer" "with-recur") (jolt-invoke (var-deref "jolt.analyzer" "add-locals") env names) rname)) (env* (let* ((_a$8630 (lambda (e pr) (let fnrec8625 ((e e) (pr pr)) (let* ((_a$8626 (var-deref "jolt.analyzer" "add-hint")) (_a$8627 e) (_a$8628 (jolt-nth pr 0)) (_a$8629 (jolt-nth pr 1))) (jolt-invoke _a$8626 _a$8627 _a$8628 _a$8629))))) (_a$8631 env0) (_a$8632 (jolt-get pp (keyword #f "hints")))) (jolt-reduce _a$8630 _a$8631 _a$8632))) (arity (let* ((_o$8633 (keyword #f "params")) (_o$8634 fixed) (_o$8635 (keyword #f "recur-name")) (_o$8636 rname) (_o$8637 (keyword #f "body")) (_o$8638 (jolt-invoke (var-deref "jolt.analyzer" "analyze-seq") ctx body env*))) (jolt-hash-map _o$8633 _o$8634 _o$8635 _o$8636 _o$8637 _o$8638))) (arity (if (jolt-truthy? (jolt-seq (jolt-get pp (keyword #f "phints")))) (jolt-assoc arity (keyword #f "phints") (jolt-get pp (keyword #f "phints"))) arity)) (arity (if (jolt-truthy? (jolt-seq (jolt-get pp (keyword #f "nhints")))) (jolt-assoc arity (keyword #f "nhints") (jolt-get pp (keyword #f "nhints"))) arity))) (if (jolt-truthy? rst) (jolt-assoc arity (keyword #f "rest") rst) arity)))))) analyze-arity) (let* ((_o$8639 (keyword #f "private")) (_o$8640 #t)) (jolt-hash-map _o$8639 _o$8640))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "strip-arglist-meta" (letrec ((strip-arglist-meta (lambda (form) (let fnrec8641 ((form form)) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-list?") form)) (let* ((es (jolt-invoke (var-deref "clojure.core" "vec") (jolt-invoke (var-deref "jolt.host" "form-elements") form)))) (if (jolt-truthy? (let* ((and__25__auto (jolt= 3 (jolt-count es)))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-invoke (var-deref "jolt.host" "form-sym?") (jolt-first es)))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= "with-meta" (jolt-invoke (var-deref "jolt.host" "form-sym-name") (jolt-first es))))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.host" "form-vec?") (jolt-nth es 1)) and__25__auto)) and__25__auto)) and__25__auto))) (jolt-nth es 1) form)) form))))) strip-arglist-meta) (let* ((_o$8642 (keyword #f "private")) (_o$8643 #t)) (jolt-hash-map _o$8642 _o$8643))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "analyze-fn" (letrec ((analyze-fn (lambda (ctx items env) (let fnrec8644 ((ctx ctx) (items items) (env env)) (let* ((named (jolt-invoke (var-deref "jolt.host" "form-sym?") (jolt-nth items 1))) (fn-name (if (jolt-truthy? named) (jolt-invoke (var-deref "jolt.host" "form-sym-name") (jolt-nth items 1)) jolt-nil)) (rest-items (if (jolt-truthy? named) (jolt-drop 2 items) (jolt-drop 1 items))) (first* (jolt-invoke (var-deref "jolt.analyzer" "strip-arglist-meta") (jolt-first rest-items)))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-vec?") first*)) (jolt-invoke (var-deref "jolt.ir" "fn-node") fn-name (jolt-vector (jolt-invoke (var-deref "jolt.analyzer" "analyze-arity") ctx first* (jolt-rest rest-items) env fn-name))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-list?") first*)) (jolt-invoke (var-deref "jolt.ir" "fn-node") fn-name (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (clause) (let fnrec8645 ((clause clause)) (let* ((cl (jolt-invoke (var-deref "clojure.core" "vec") (jolt-invoke (var-deref "jolt.host" "form-elements") clause)))) (let* ((_a$8646 (var-deref "jolt.analyzer" "analyze-arity")) (_a$8647 ctx) (_a$8648 (jolt-invoke (var-deref "jolt.analyzer" "strip-arglist-meta") (jolt-first cl))) (_a$8649 (jolt-rest cl)) (_a$8650 env) (_a$8651 fn-name)) (jolt-invoke _a$8646 _a$8647 _a$8648 _a$8649 _a$8650 _a$8651))))) rest-items)) (if (jolt-truthy? (keyword #f "else")) (jolt-invoke (var-deref "jolt.analyzer" "uncompilable") "fn: bad params") jolt-nil)))))))) analyze-fn) (let* ((_o$8652 (keyword #f "private")) (_o$8653 #t)) (jolt-hash-map _o$8652 _o$8653))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "catch-all-names" (let* ((_o$8654 "Throwable") (_o$8655 "java.lang.Throwable") (_o$8656 "Object") (_o$8657 "java.lang.Object")) (jolt-hash-set _o$8654 _o$8655 _o$8656 _o$8657)) (let* ((_o$8658 (keyword #f "private")) (_o$8659 #t)) (jolt-hash-map _o$8658 _o$8659))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "analyze-try" (letrec ((analyze-try (lambda (ctx items env) (let fnrec8660 ((ctx ctx) (items items) (env env)) (let* ((clauses (jolt-rest items)) (body (jolt-invoke (var-deref "clojure.core" "atom") (jolt-vector))) (catches (jolt-invoke (var-deref "clojure.core" "atom") (jolt-vector))) (finally-body (jolt-invoke (var-deref "clojure.core" "atom") jolt-nil))) (begin (begin (jolt-count (jolt-map (lambda (c) (let fnrec8661 ((c c)) (begin (let* ((head (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-list?") c)) (jolt-first (jolt-invoke (var-deref "clojure.core" "vec") (jolt-invoke (var-deref "jolt.host" "form-elements") c))) jolt-nil)) (hname (if (jolt-truthy? (let* ((and__25__auto head)) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.host" "form-sym?") head) and__25__auto))) (jolt-invoke (var-deref "jolt.host" "form-sym-name") head) jolt-nil))) (if (jolt= hname "catch") (let* ((cl (jolt-invoke (var-deref "clojure.core" "vec") (jolt-invoke (var-deref "jolt.host" "form-elements") c)))) (begin (if (let* ((or__26__auto (< (jolt-count cl) 3))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt-not (jolt-invoke (var-deref "jolt.host" "form-sym?") (jolt-nth cl 2))))) (jolt-throw "Unable to parse catch clause; expected (catch class binding body*)") jolt-nil) (jolt-invoke (var-deref "clojure.core" "swap!") catches jolt-conj cl))) (if (jolt= hname "finally") (jolt-invoke (var-deref "clojure.core" "reset!") finally-body (jolt-rest (jolt-invoke (var-deref "clojure.core" "vec") (jolt-invoke (var-deref "jolt.host" "form-elements") c)))) (if (jolt-truthy? (keyword #f "else")) (jolt-invoke (var-deref "clojure.core" "swap!") body jolt-conj c) jolt-nil)))) jolt-nil))) clauses)) jolt-nil) (let* ((n (let* ((_o$8662 (keyword #f "op")) (_o$8663 (keyword #f "try")) (_o$8664 (keyword #f "body")) (_o$8665 (jolt-invoke (var-deref "jolt.analyzer" "analyze-seq") ctx (jolt-invoke (var-deref "clojure.core" "deref") body) env))) (jolt-hash-map _o$8662 _o$8663 _o$8664 _o$8665))) (n (if (jolt-truthy? (jolt-seq (jolt-invoke (var-deref "clojure.core" "deref") catches))) (let* ((evar-name (jolt-invoke (var-deref "jolt.analyzer" "gen-name") "catch")) (evar (jolt-invoke (var-deref "clojure.core" "symbol") evar-name)) (dispatch (let* ((_a$8670 (lambda (_else cl) (let fnrec8666 ((_else _else) (cl cl)) (let* ((cform (jolt-nth cl 1)) (bindsym (jolt-nth cl 2)) (bodyf (jolt-drop 3 cl)) (letform (jolt-cons (jolt-symbol #f "let") (jolt-cons (jolt-vector bindsym evar) bodyf))) (fullname (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-sym?") cform)) (jolt-invoke (var-deref "jolt.host" "form-sym-name") cform) jolt-nil)) (catch-all? (let* ((or__26__auto (jolt-not (jolt-invoke (var-deref "jolt.host" "form-sym?") cform)))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt-contains? (var-deref "jolt.analyzer" "catch-all-names") fullname))))) (if (jolt-truthy? catch-all?) letform (jolt-list (jolt-symbol #f "if") (let* ((_a$8667 (jolt-symbol #f "or")) (_a$8668 (jolt-list (jolt-symbol #f "instance?") cform evar)) (_a$8669 (jolt-list (jolt-symbol #f "__catch-broad?") fullname evar))) (jolt-list _a$8667 _a$8668 _a$8669)) letform _else)))))) (_a$8671 (jolt-list (jolt-symbol #f "throw") evar)) (_a$8672 (jolt-reverse (jolt-invoke (var-deref "clojure.core" "deref") catches)))) (jolt-reduce _a$8670 _a$8671 _a$8672)))) (jolt-assoc n (keyword #f "catch-sym") evar-name (keyword #f "catch-body") (let* ((_a$8673 (var-deref "jolt.analyzer" "analyze-seq")) (_a$8674 ctx) (_a$8675 (jolt-list dispatch)) (_a$8676 (jolt-invoke (var-deref "jolt.analyzer" "add-locals") env (jolt-vector evar-name)))) (jolt-invoke _a$8673 _a$8674 _a$8675 _a$8676)))) n)) (n (if (jolt-truthy? (jolt-invoke (var-deref "clojure.core" "deref") finally-body)) (jolt-assoc n (keyword #f "finally") (jolt-invoke (var-deref "jolt.analyzer" "analyze-seq") ctx (jolt-invoke (var-deref "clojure.core" "deref") finally-body) env)) n))) n))))))) analyze-try) (let* ((_o$8677 (keyword #f "private")) (_o$8678 #t)) (jolt-hash-map _o$8677 _o$8678))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "analyze-letfn*" (letrec ((analyze-letfn* (lambda (ctx items env) (let fnrec8679 ((ctx ctx) (items items) (env env)) (let* ((bvec (jolt-invoke (var-deref "clojure.core" "vec") (jolt-invoke (var-deref "jolt.host" "form-vec-items") (jolt-nth items 1)))) (n (quotient (jolt-count bvec) 2)) (names (let* ((_a$8681 (var-deref "clojure.core" "mapv")) (_a$8682 (lambda (i) (let fnrec8680 ((i i)) (jolt-invoke (var-deref "jolt.host" "form-sym-name") (jolt-nth bvec (* 2 i)))))) (_a$8683 (jolt-range n))) (jolt-invoke _a$8681 _a$8682 _a$8683))) (env* (jolt-invoke (var-deref "jolt.analyzer" "add-locals") env names)) (binds (let* ((_a$8687 (var-deref "clojure.core" "mapv")) (_a$8688 (lambda (i) (let fnrec8684 ((i i)) (let* ((_o$8685 (jolt-nth names i)) (_o$8686 (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx (jolt-nth bvec (jolt-inc (* 2 i))) env*))) (jolt-vector _o$8685 _o$8686))))) (_a$8689 (jolt-range n))) (jolt-invoke _a$8687 _a$8688 _a$8689)))) (let* ((_o$8690 (keyword #f "op")) (_o$8691 (keyword #f "let")) (_o$8692 (keyword #f "letrec")) (_o$8693 #t) (_o$8694 (keyword #f "bindings")) (_o$8695 binds) (_o$8696 (keyword #f "body")) (_o$8697 (jolt-invoke (var-deref "jolt.analyzer" "analyze-seq") ctx (jolt-drop 2 items) env*))) (jolt-hash-map _o$8690 _o$8691 _o$8692 _o$8693 _o$8694 _o$8695 _o$8696 _o$8697))))))) analyze-letfn*) (let* ((_o$8698 (keyword #f "private")) (_o$8699 #t)) (jolt-hash-map _o$8698 _o$8699))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "field-head?" (letrec ((field-head? (lambda (nm) (let fnrec8700 ((nm nm)) (let* ((and__25__auto (> (jolt-count nm) 2))) (if (jolt-truthy? and__25__auto) (jolt= ".-" (jolt-invoke (var-deref "clojure.core" "subs") nm 0 2)) and__25__auto)))))) field-head?) (let* ((_o$8701 (keyword #f "private")) (_o$8702 #t)) (jolt-hash-map _o$8701 _o$8702))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "def-meta-expr" (letrec ((def-meta-expr (lambda (ctx base env) (let fnrec8703 ((ctx ctx) (base base) (env env)) (if (jolt-pos? (jolt-count base)) (jolt-invoke (var-deref "jolt.ir" "map-node") (let* ((_a$8707 (var-deref "clojure.core" "mapv")) (_a$8708 (lambda (p) (let fnrec8704 ((p p)) (let* ((k (jolt-first p)) (v (jolt-invoke (var-deref "clojure.core" "second") p))) (let* ((_o$8705 (jolt-invoke (var-deref "jolt.ir" "const") k)) (_o$8706 (if (jolt= k (keyword #f "tag")) (jolt-invoke (var-deref "jolt.ir" "quote-node") v) (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx v env)))) (jolt-vector _o$8705 _o$8706)))))) (_a$8709 (jolt-seq base))) (jolt-invoke _a$8707 _a$8708 _a$8709))) jolt-nil))))) def-meta-expr) (let* ((_o$8710 (keyword #f "private")) (_o$8711 #t)) (jolt-hash-map _o$8710 _o$8711))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "analyze-def" (letrec ((analyze-def (lambda (ctx items env) (let fnrec8712 ((ctx ctx) (items items) (env env)) (let* ((name-sym (jolt-nth items 1))) (begin (if (jolt-not (jolt-invoke (var-deref "jolt.host" "form-sym?") name-sym)) (jolt-invoke (var-deref "jolt.analyzer" "uncompilable") "def name with map metadata") jolt-nil) (if (< (jolt-count items) 3) (let* ((nm (jolt-invoke (var-deref "jolt.host" "form-sym-name") name-sym)) (cur (jolt-invoke (var-deref "jolt.host" "compile-ns") ctx))) (begin (jolt-invoke (var-deref "jolt.host" "host-intern!") ctx cur nm) (let* ((_o$8713 (keyword #f "op")) (_o$8714 (keyword #f "def")) (_o$8715 (keyword #f "ns")) (_o$8716 cur) (_o$8717 (keyword #f "name")) (_o$8718 nm) (_o$8719 (keyword #f "no-init")) (_o$8720 #t)) (jolt-hash-map _o$8713 _o$8714 _o$8715 _o$8716 _o$8717 _o$8718 _o$8719 _o$8720)))) (let* ((nm (jolt-invoke (var-deref "jolt.host" "form-sym-name") name-sym)) (cur (jolt-invoke (var-deref "jolt.host" "compile-ns") ctx)) (has-doc (let* ((and__25__auto (> (jolt-count items) 3))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "clojure.core" "string?") (jolt-nth items 2)) and__25__auto))) (val-form (jolt-nth items (if (jolt-truthy? has-doc) 3 2))) (base0 (let* ((or__26__auto (jolt-invoke (var-deref "jolt.host" "form-sym-meta") name-sym))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt-hash-map)))) (tag (jolt-get base0 (keyword #f "tag"))) (tag-name (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-sym?") tag)) (jolt-invoke (var-deref "jolt.host" "form-sym-name") tag) (if (jolt-truthy? (jolt-invoke (var-deref "clojure.core" "string?") tag)) tag (if (jolt-truthy? (keyword #f "else")) jolt-nil jolt-nil)))) (base-meta (if (jolt-truthy? tag-name) (let* ((c (jolt-invoke (var-deref "jolt.host" "resolve-class-hint") tag-name))) (if (jolt-truthy? c) (jolt-assoc base0 (keyword #f "tag") c) base0)) base0)) (node-meta (if (jolt-truthy? has-doc) (jolt-assoc base-meta (keyword #f "doc") (jolt-nth items 2)) base-meta))) (begin (jolt-invoke (var-deref "jolt.host" "host-intern!") ctx cur nm) (let* ((node (jolt-invoke (var-deref "jolt.ir" "def-node") cur nm (let* ((_a$8721 (var-deref "jolt.analyzer" "with-ret-nhint")) (_a$8722 (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx val-form env)) (_a$8723 (jolt-invoke (var-deref "jolt.analyzer" "tag->nkind") tag))) (jolt-invoke _a$8721 _a$8722 _a$8723)) node-meta)) (me (jolt-invoke (var-deref "jolt.analyzer" "def-meta-expr") ctx node-meta env))) (if (jolt-truthy? me) (jolt-assoc node (keyword #f "meta-expr") me) node))))))))))) analyze-def) (let* ((_o$8724 (keyword #f "private")) (_o$8725 #t)) (jolt-hash-map _o$8724 _o$8725))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "analyze-set!" (letrec ((analyze-set! (lambda (ctx items env) (let fnrec8726 ((ctx ctx) (items items) (env env)) (let* ((target (jolt-nth items 1)) (val-node (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx (jolt-nth items 2) env)) (ti (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-list?") target)) (jolt-invoke (var-deref "clojure.core" "vec") (jolt-invoke (var-deref "jolt.host" "form-elements") target)) jolt-nil)) (thead (if (jolt-truthy? (let* ((and__25__auto ti)) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-pos? (jolt-count ti)))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.host" "form-sym?") (jolt-first ti)) and__25__auto)) and__25__auto))) (jolt-invoke (var-deref "jolt.host" "form-sym-name") (jolt-first ti)) jolt-nil))) (if (jolt-truthy? (let* ((and__25__auto thead)) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.analyzer" "field-head?") thead) and__25__auto))) (let* ((_o$8727 (keyword #f "op")) (_o$8728 (keyword #f "set-field")) (_o$8729 (keyword #f "obj")) (_o$8730 (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx (jolt-nth ti 1) env)) (_o$8731 (keyword #f "field")) (_o$8732 (jolt-invoke (var-deref "clojure.core" "subs") thead 2)) (_o$8733 (keyword #f "val")) (_o$8734 val-node)) (jolt-hash-map _o$8727 _o$8728 _o$8729 _o$8730 _o$8731 _o$8732 _o$8733 _o$8734)) (if (jolt-truthy? (let* ((and__25__auto (jolt= thead "."))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (>= (jolt-count ti) 3))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-invoke (var-deref "jolt.host" "form-sym?") (jolt-nth ti 1)))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-invoke (var-deref "jolt.host" "form-sym?") (jolt-nth ti 2)))) (if (jolt-truthy? and__25__auto) (jolt= (keyword #f "class") (jolt-get (jolt-invoke (var-deref "jolt.host" "resolve-global") ctx (jolt-nth ti 1)) (keyword #f "kind"))) and__25__auto)) and__25__auto)) and__25__auto)) and__25__auto))) (let* ((_a$8738 (var-deref "jolt.ir" "invoke")) (_a$8739 (jolt-invoke (var-deref "jolt.ir" "var-ref") "jolt.host" "set-static-field!")) (_a$8740 (let* ((_o$8735 (jolt-invoke (var-deref "jolt.ir" "const") (jolt-get (jolt-invoke (var-deref "jolt.host" "resolve-global") ctx (jolt-nth ti 1)) (keyword #f "name")))) (_o$8736 (jolt-invoke (var-deref "jolt.ir" "const") (jolt-invoke (var-deref "jolt.host" "form-sym-name") (jolt-nth ti 2)))) (_o$8737 val-node)) (jolt-vector _o$8735 _o$8736 _o$8737)))) (jolt-invoke _a$8738 _a$8739 _a$8740)) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-sym?") target)) (begin (if (jolt-truthy? (jolt-invoke (var-deref "jolt.analyzer" "local?") env (jolt-invoke (var-deref "jolt.host" "form-sym-name") target))) (jolt-invoke (var-deref "jolt.analyzer" "uncompilable") "set! of a local") jolt-nil) (let* ((r (jolt-invoke (var-deref "jolt.host" "resolve-global") ctx target))) (begin (if (jolt-not (jolt= (keyword #f "var") (jolt-get r (keyword #f "kind")))) (jolt-invoke (var-deref "jolt.analyzer" "uncompilable") "set! of a non-var") jolt-nil) (let* ((_o$8744 (keyword #f "op")) (_o$8745 (keyword #f "set-var")) (_o$8746 (keyword #f "the-var")) (_o$8747 (let* ((_a$8741 (var-deref "jolt.ir" "the-var")) (_a$8742 (jolt-get r (keyword #f "ns"))) (_a$8743 (jolt-get r (keyword #f "name")))) (jolt-invoke _a$8741 _a$8742 _a$8743))) (_o$8748 (keyword #f "val")) (_o$8749 val-node)) (jolt-hash-map _o$8744 _o$8745 _o$8746 _o$8747 _o$8748 _o$8749))))) (if (jolt-truthy? (keyword #f "else")) (jolt-invoke (var-deref "jolt.analyzer" "uncompilable") "set! of an unsupported target") jolt-nil))))))))) analyze-set!) (let* ((_o$8750 (keyword #f "private")) (_o$8751 #t)) (jolt-hash-map _o$8750 _o$8751))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "analyze-special" (letrec ((analyze-special (lambda (ctx op items env) (let fnrec8752 ((ctx ctx) (op op) (items items) (env env)) (let* ((G__151 op)) (if (jolt= G__151 "quote") (jolt-invoke (var-deref "jolt.ir" "quote-node") (jolt-invoke (var-deref "clojure.core" "second") items)) (if (jolt= G__151 "if") (begin (if (let* ((or__26__auto (< (jolt-count items) 3))) (if (jolt-truthy? or__26__auto) or__26__auto (> (jolt-count items) 4))) (jolt-throw (jolt-invoke (var-deref "clojure.core" "str") "Wrong number of args (" (jolt-dec (jolt-count items)) ") passed to: if")) jolt-nil) (let* ((_a$8753 (var-deref "jolt.ir" "if-node")) (_a$8754 (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx (jolt-nth items 1) env)) (_a$8755 (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx (jolt-nth items 2) env)) (_a$8756 (if (> (jolt-count items) 3) (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx (jolt-nth items 3) env) (jolt-invoke (var-deref "jolt.ir" "const") jolt-nil)))) (jolt-invoke _a$8753 _a$8754 _a$8755 _a$8756))) (if (jolt= G__151 "do") (jolt-invoke (var-deref "jolt.analyzer" "analyze-seq") ctx (jolt-rest items) env) (if (jolt= G__151 "throw") (jolt-invoke (var-deref "jolt.ir" "throw-node") (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx (jolt-nth items 1) env)) (if (jolt= G__151 "def") (jolt-invoke (var-deref "jolt.analyzer" "analyze-def") ctx items env) (if (jolt= G__151 "let*") (let* ((bvec (jolt-invoke (var-deref "clojure.core" "vec") (jolt-invoke (var-deref "jolt.host" "form-vec-items") (jolt-nth items 1)))) (r (jolt-invoke (var-deref "jolt.analyzer" "analyze-bindings") ctx bvec env))) (let* ((_a$8761 (var-deref "jolt.ir" "let-node")) (_a$8762 (jolt-first r)) (_a$8763 (let* ((_a$8757 (var-deref "jolt.analyzer" "analyze-seq")) (_a$8758 ctx) (_a$8759 (jolt-drop 2 items)) (_a$8760 (jolt-invoke (var-deref "clojure.core" "second") r))) (jolt-invoke _a$8757 _a$8758 _a$8759 _a$8760)))) (jolt-invoke _a$8761 _a$8762 _a$8763))) (if (jolt= G__151 "loop*") (let* ((bvec (jolt-invoke (var-deref "clojure.core" "vec") (jolt-invoke (var-deref "jolt.host" "form-vec-items") (jolt-nth items 1)))) (rname (jolt-invoke (var-deref "jolt.analyzer" "gen-name") "loop")) (r (jolt-invoke (var-deref "jolt.analyzer" "analyze-bindings") ctx bvec env)) (env** (jolt-invoke (var-deref "jolt.analyzer" "with-recur") (jolt-invoke (var-deref "clojure.core" "second") r) rname))) (let* ((_o$8764 (keyword #f "op")) (_o$8765 (keyword #f "loop")) (_o$8766 (keyword #f "recur-name")) (_o$8767 rname) (_o$8768 (keyword #f "bindings")) (_o$8769 (jolt-first r)) (_o$8770 (keyword #f "body")) (_o$8771 (jolt-invoke (var-deref "jolt.analyzer" "analyze-seq") ctx (jolt-drop 2 items) env**))) (jolt-hash-map _o$8764 _o$8765 _o$8766 _o$8767 _o$8768 _o$8769 _o$8770 _o$8771))) (if (jolt= G__151 "recur") (let* ((rt (jolt-get env (keyword #f "recur")))) (begin (if (jolt-not rt) (jolt-invoke (var-deref "jolt.analyzer" "uncompilable") "recur outside loop/fn") jolt-nil) (let* ((_o$8776 (keyword #f "op")) (_o$8777 (keyword #f "recur")) (_o$8778 (keyword #f "recur-name")) (_o$8779 rt) (_o$8780 (keyword #f "args")) (_o$8781 (let* ((_a$8773 (var-deref "clojure.core" "mapv")) (_a$8774 (lambda (p__92_) (let fnrec8772 ((p__92_ p__92_)) (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx p__92_ env)))) (_a$8775 (jolt-rest items))) (jolt-invoke _a$8773 _a$8774 _a$8775)))) (jolt-hash-map _o$8776 _o$8777 _o$8778 _o$8779 _o$8780 _o$8781)))) (if (jolt= G__151 "try") (jolt-invoke (var-deref "jolt.analyzer" "analyze-try") ctx items env) (if (jolt= G__151 "letfn*") (jolt-invoke (var-deref "jolt.analyzer" "analyze-letfn*") ctx items env) (if (jolt= G__151 "fn*") (jolt-invoke (var-deref "jolt.analyzer" "analyze-fn") ctx items env) (if (jolt= G__151 "syntax-quote") (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx (jolt-invoke (var-deref "jolt.host" "form-syntax-quote-lower") ctx (jolt-invoke (var-deref "clojure.core" "second") items)) env) (if (jolt= G__151 "var") (let* ((sym (jolt-invoke (var-deref "clojure.core" "second") items)) (r (jolt-invoke (var-deref "jolt.host" "resolve-global") ctx sym))) (if (jolt= (keyword #f "var") (jolt-get r (keyword #f "kind"))) (let* ((_a$8782 (var-deref "jolt.ir" "the-var")) (_a$8783 (jolt-get r (keyword #f "ns"))) (_a$8784 (jolt-get r (keyword #f "name")))) (jolt-invoke _a$8782 _a$8783 _a$8784)) (jolt-invoke (var-deref "jolt.analyzer" "uncompilable") (jolt-invoke (var-deref "clojure.core" "str") "var of non-var " (jolt-invoke (var-deref "jolt.host" "form-sym-name") sym))))) (if (jolt= G__151 "defmacro") (let* ((name-sym (jolt-nth items 1)) (nm (jolt-invoke (var-deref "jolt.host" "form-sym-name") name-sym)) (cur (jolt-invoke (var-deref "jolt.host" "compile-ns") ctx)) (after (jolt-drop 2 items)) (after (if (jolt-truthy? (jolt-invoke (var-deref "clojure.core" "string?") (jolt-first after))) (jolt-rest after) after)) (after (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-map?") (jolt-first after))) (jolt-rest after) after)) (fn-form (jolt-cons (jolt-invoke (var-deref "clojure.core" "symbol") "fn") after))) (begin (jolt-invoke (var-deref "jolt.host" "host-intern!") ctx cur nm) (let* ((_o$8785 (keyword #f "op")) (_o$8786 (keyword #f "defmacro")) (_o$8787 (keyword #f "ns")) (_o$8788 cur) (_o$8789 (keyword #f "name")) (_o$8790 nm) (_o$8791 (keyword #f "fn")) (_o$8792 (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx fn-form env))) (jolt-hash-map _o$8785 _o$8786 _o$8787 _o$8788 _o$8789 _o$8790 _o$8791 _o$8792)))) (if (jolt= G__151 "set!") (jolt-invoke (var-deref "jolt.analyzer" "analyze-set!") ctx items env) (jolt-invoke (var-deref "jolt.analyzer" "uncompilable") (jolt-invoke (var-deref "clojure.core" "str") "special form " op)))))))))))))))))))))) analyze-special) (let* ((_o$8793 (keyword #f "private")) (_o$8794 #t)) (jolt-hash-map _o$8793 _o$8794))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "method-head?" (letrec ((method-head? (lambda (nm) (let fnrec8795 ((nm nm)) (let* ((and__25__auto (> (jolt-count nm) 1))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= "." (jolt-invoke (var-deref "clojure.core" "subs") nm 0 1)))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-not (jolt= "-" (jolt-invoke (var-deref "clojure.core" "subs") nm 1 2))))) (if (jolt-truthy? and__25__auto) (jolt-not (jolt= "." (jolt-invoke (var-deref "clojure.core" "subs") nm 1 2))) and__25__auto)) and__25__auto)) and__25__auto)))))) method-head?) (let* ((_o$8796 (keyword #f "private")) (_o$8797 #t)) (jolt-hash-map _o$8796 _o$8797))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "analyze-host-call" (letrec ((analyze-host-call (lambda (ctx hname items env) (let fnrec8798 ((ctx ctx) (hname hname) (items items) (env env)) (begin (if (< (jolt-count items) 2) (jolt-throw (jolt-invoke (var-deref "clojure.core" "str") "Malformed member expression, expecting (.method target ...): " hname)) jolt-nil) (let* ((_o$8803 (keyword #f "op")) (_o$8804 (keyword #f "host-call")) (_o$8805 (keyword #f "method")) (_o$8806 (jolt-invoke (var-deref "clojure.core" "subs") hname 1)) (_o$8807 (keyword #f "target")) (_o$8808 (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx (jolt-nth items 1) env)) (_o$8809 (keyword #f "args")) (_o$8810 (let* ((_a$8800 (var-deref "clojure.core" "mapv")) (_a$8801 (lambda (p__93_) (let fnrec8799 ((p__93_ p__93_)) (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx p__93_ env)))) (_a$8802 (jolt-drop 2 items))) (jolt-invoke _a$8800 _a$8801 _a$8802)))) (jolt-hash-map _o$8803 _o$8804 _o$8805 _o$8806 _o$8807 _o$8808 _o$8809 _o$8810))))))) analyze-host-call) (let* ((_o$8811 (keyword #f "private")) (_o$8812 #t)) (jolt-hash-map _o$8811 _o$8812))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "ctor-head?" (letrec ((ctor-head? (lambda (nm) (let fnrec8813 ((nm nm)) (let* ((and__25__auto (> (jolt-count nm) 1))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= "." (let* ((_a$8814 (var-deref "clojure.core" "subs")) (_a$8815 nm) (_a$8816 (jolt-dec (jolt-count nm))) (_a$8817 (jolt-count nm))) (jolt-invoke _a$8814 _a$8815 _a$8816 _a$8817))))) (if (jolt-truthy? and__25__auto) (jolt-not (jolt= "." (jolt-invoke (var-deref "clojure.core" "subs") nm 0 1))) and__25__auto)) and__25__auto)))))) ctor-head?) (let* ((_o$8818 (keyword #f "private")) (_o$8819 #t)) (jolt-hash-map _o$8818 _o$8819))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "analyze-ctor" (letrec ((analyze-ctor (lambda (ctx class args env) (let fnrec8820 ((ctx ctx) (class class) (args args) (env env)) (jolt-invoke (var-deref "jolt.ir" "host-new") class (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (p__94_) (let fnrec8821 ((p__94_ p__94_)) (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx p__94_ env))) args)))))) analyze-ctor) (let* ((_o$8822 (keyword #f "private")) (_o$8823 #t)) (jolt-hash-map _o$8822 _o$8823))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "analyze-ffi-fn" (letrec ((analyze-ffi-fn (lambda (ctx items env) (let fnrec8824 ((ctx ctx) (items items) (env env)) (begin (if (jolt-not (<= 4 (jolt-count items) 5)) (jolt-throw (jolt-invoke (var-deref "clojure.core" "str") "jolt.ffi/foreign-fn expects (foreign-fn \"sym\" [argtypes] rettype [:blocking])")) jolt-nil) (let* ((_o$8825 (keyword #f "op")) (_o$8826 (keyword #f "ffi-fn")) (_o$8827 (keyword #f "csym")) (_o$8828 (jolt-nth items 1)) (_o$8829 (keyword #f "argtypes")) (_o$8830 (jolt-invoke (var-deref "clojure.core" "mapv") (var-deref "clojure.core" "name") (jolt-invoke (var-deref "jolt.host" "form-vec-items") (jolt-nth items 2)))) (_o$8831 (keyword #f "rettype")) (_o$8832 (jolt-invoke (var-deref "clojure.core" "name") (jolt-nth items 3))) (_o$8833 (keyword #f "blocking")) (_o$8834 (let* ((and__25__auto (jolt= 5 (jolt-count items)))) (if (jolt-truthy? and__25__auto) (jolt= "blocking" (jolt-invoke (var-deref "clojure.core" "name") (jolt-nth items 4))) and__25__auto)))) (jolt-hash-map _o$8825 _o$8826 _o$8827 _o$8828 _o$8829 _o$8830 _o$8831 _o$8832 _o$8833 _o$8834))))))) analyze-ffi-fn) (let* ((_o$8835 (keyword #f "private")) (_o$8836 #t)) (jolt-hash-map _o$8835 _o$8836))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "analyze-ffi-callable" (letrec ((analyze-ffi-callable (lambda (ctx items env) (let fnrec8837 ((ctx ctx) (items items) (env env)) (begin (if (jolt-not (<= 4 (jolt-count items) 5)) (jolt-throw (jolt-invoke (var-deref "clojure.core" "str") "jolt.ffi/foreign-callable expects (foreign-callable f [argtypes] rettype [:collect-safe])")) jolt-nil) (let* ((_o$8838 (keyword #f "op")) (_o$8839 (keyword #f "ffi-callable")) (_o$8840 (keyword #f "fn")) (_o$8841 (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx (jolt-nth items 1) env)) (_o$8842 (keyword #f "argtypes")) (_o$8843 (jolt-invoke (var-deref "clojure.core" "mapv") (var-deref "clojure.core" "name") (jolt-invoke (var-deref "jolt.host" "form-vec-items") (jolt-nth items 2)))) (_o$8844 (keyword #f "rettype")) (_o$8845 (jolt-invoke (var-deref "clojure.core" "name") (jolt-nth items 3))) (_o$8846 (keyword #f "collect-safe")) (_o$8847 (let* ((and__25__auto (jolt= 5 (jolt-count items)))) (if (jolt-truthy? and__25__auto) (jolt= "collect-safe" (jolt-invoke (var-deref "clojure.core" "name") (jolt-nth items 4))) and__25__auto)))) (jolt-hash-map _o$8838 _o$8839 _o$8840 _o$8841 _o$8842 _o$8843 _o$8844 _o$8845 _o$8846 _o$8847))))))) analyze-ffi-callable) (let* ((_o$8848 (keyword #f "private")) (_o$8849 #t)) (jolt-hash-map _o$8848 _o$8849))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "analyze-dot" (letrec ((analyze-dot (lambda (ctx items env) (let fnrec8850 ((ctx ctx) (items items) (env env)) (begin (if (< (jolt-count items) 3) (jolt-throw (jolt-invoke (var-deref "clojure.core" "str") "Malformed (. target member ...) form")) jolt-nil) (let* ((member0 (jolt-nth items 2)) (items (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-list?") member0)) (let* ((ml (jolt-invoke (var-deref "clojure.core" "vec") (jolt-invoke (var-deref "jolt.host" "form-elements") member0)))) (let* ((_a$8854 (let* ((_o$8851 (jolt-nth items 0)) (_o$8852 (jolt-nth items 1)) (_o$8853 (jolt-first ml))) (jolt-vector _o$8851 _o$8852 _o$8853))) (_a$8855 (jolt-rest ml))) (jolt-into _a$8854 _a$8855))) items)) (target (jolt-nth items 1)) (member (jolt-nth items 2)) (class-target (if (jolt-truthy? (let* ((and__25__auto (jolt-invoke (var-deref "jolt.host" "form-sym?") target))) (if (jolt-truthy? and__25__auto) (jolt-not (jolt-invoke (var-deref "jolt.analyzer" "local?") env (jolt-invoke (var-deref "jolt.host" "form-sym-name") target))) and__25__auto))) (let* ((r (jolt-invoke (var-deref "jolt.host" "resolve-global") ctx target))) (if (jolt= (keyword #f "class") (jolt-get r (keyword #f "kind"))) (jolt-get r (keyword #f "name")) jolt-nil)) jolt-nil))) (if (jolt-truthy? (let* ((and__25__auto class-target)) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.host" "form-sym?") member) and__25__auto))) (let* ((_a$8860 (var-deref "jolt.ir" "invoke")) (_a$8861 (jolt-invoke (var-deref "jolt.ir" "host-static") class-target (jolt-invoke (var-deref "jolt.host" "form-sym-name") member))) (_a$8862 (let* ((_a$8857 (var-deref "clojure.core" "mapv")) (_a$8858 (lambda (p__95_) (let fnrec8856 ((p__95_ p__95_)) (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx p__95_ env)))) (_a$8859 (jolt-drop 3 items))) (jolt-invoke _a$8857 _a$8858 _a$8859)))) (jolt-invoke _a$8860 _a$8861 _a$8862)) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-sym?") member)) (let* ((_o$8867 (keyword #f "op")) (_o$8868 (keyword #f "host-call")) (_o$8869 (keyword #f "method")) (_o$8870 (jolt-invoke (var-deref "jolt.host" "form-sym-name") member)) (_o$8871 (keyword #f "target")) (_o$8872 (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx target env)) (_o$8873 (keyword #f "args")) (_o$8874 (let* ((_a$8864 (var-deref "clojure.core" "mapv")) (_a$8865 (lambda (p__96_) (let fnrec8863 ((p__96_ p__96_)) (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx p__96_ env)))) (_a$8866 (jolt-drop 3 items))) (jolt-invoke _a$8864 _a$8865 _a$8866)))) (jolt-hash-map _o$8867 _o$8868 _o$8869 _o$8870 _o$8871 _o$8872 _o$8873 _o$8874)) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-keyword?") member)) (let* ((_a$8875 (var-deref "jolt.ir" "invoke")) (_a$8876 (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx member env)) (_a$8877 (jolt-vector (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx (jolt-nth items 1) env)))) (jolt-invoke _a$8875 _a$8876 _a$8877)) (if (jolt-truthy? (keyword #f "else")) (jolt-invoke (var-deref "jolt.analyzer" "uncompilable") "special form . (non-symbol member)") jolt-nil)))))))))) analyze-dot) (let* ((_o$8878 (keyword #f "private")) (_o$8879 #t)) (jolt-hash-map _o$8878 _o$8879))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "analyze-field" (letrec ((analyze-field (lambda (ctx hname items env) (let fnrec8880 ((ctx ctx) (hname hname) (items items) (env env)) (begin (if (< (jolt-count items) 2) (jolt-throw (jolt-invoke (var-deref "clojure.core" "str") "Malformed (.-field target) form")) jolt-nil) (let* ((_o$8881 (keyword #f "op")) (_o$8882 (keyword #f "host-call")) (_o$8883 (keyword #f "method")) (_o$8884 (jolt-invoke (var-deref "clojure.core" "subs") hname 1)) (_o$8885 (keyword #f "target")) (_o$8886 (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx (jolt-nth items 1) env)) (_o$8887 (keyword #f "args")) (_o$8888 (jolt-vector))) (jolt-hash-map _o$8881 _o$8882 _o$8883 _o$8884 _o$8885 _o$8886 _o$8887 _o$8888))))))) analyze-field) (let* ((_o$8889 (keyword #f "private")) (_o$8890 #t)) (jolt-hash-map _o$8889 _o$8890))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "analyze-symbol" (letrec ((analyze-symbol (lambda (ctx form env) (let fnrec8891 ((ctx ctx) (form form) (env env)) (let* ((nm (jolt-invoke (var-deref "jolt.host" "form-sym-name") form)) (ns (jolt-invoke (var-deref "jolt.host" "form-sym-ns") form))) (if (jolt-truthy? (let* ((and__25__auto (jolt-nil? ns))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.analyzer" "local?") env nm) and__25__auto))) (let* ((h (jolt-get (jolt-get env (keyword #f "hints")) nm))) (if (jolt-truthy? h) (jolt-assoc (jolt-invoke (var-deref "jolt.ir" "local") nm) (keyword #f "hint") h) (jolt-invoke (var-deref "jolt.ir" "local") nm))) (if (jolt-truthy? ns) (let* ((r (jolt-invoke (var-deref "jolt.host" "resolve-global") ctx form))) (if (jolt= (keyword #f "var") (jolt-get r (keyword #f "kind"))) (let* ((G__152 (let* ((_a$8892 (var-deref "jolt.ir" "var-ref")) (_a$8893 (jolt-get r (keyword #f "ns"))) (_a$8894 (jolt-get r (keyword #f "name")))) (jolt-invoke _a$8892 _a$8893 _a$8894)))) (let* ((G__153 (if (jolt-truthy? (jolt-get r (keyword #f "num-ret"))) (jolt-assoc G__152 (keyword #f "num-ret") (jolt-get r (keyword #f "num-ret"))) G__152))) G__153)) (jolt-invoke (var-deref "jolt.ir" "host-static") ns nm))) (if (jolt-truthy? (keyword #f "else")) (let* ((r (jolt-invoke (var-deref "jolt.host" "resolve-global") ctx form))) (let* ((G__154 (jolt-get r (keyword #f "kind")))) (if (jolt= G__154 (keyword #f "var")) (let* ((G__155 (let* ((_a$8895 (var-deref "jolt.ir" "var-ref")) (_a$8896 (jolt-get r (keyword #f "ns"))) (_a$8897 (jolt-get r (keyword #f "name")))) (jolt-invoke _a$8895 _a$8896 _a$8897)))) (let* ((G__156 (if (jolt-truthy? (jolt-get r (keyword #f "num-ret"))) (jolt-assoc G__155 (keyword #f "num-ret") (jolt-get r (keyword #f "num-ret"))) G__155))) G__156)) (if (jolt= G__154 (keyword #f "host")) (jolt-invoke (var-deref "jolt.ir" "host-ref") (jolt-get r (keyword #f "name"))) (if (jolt= G__154 (keyword #f "class")) (jolt-invoke (var-deref "jolt.ir" "const") (jolt-get r (keyword #f "name"))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "late-bind?") ctx)) (jolt-invoke (var-deref "jolt.ir" "var-ref") (jolt-invoke (var-deref "jolt.host" "compile-ns") ctx) nm) (jolt-invoke (var-deref "jolt.analyzer" "uncompilable") (jolt-invoke (var-deref "clojure.core" "str") "Unable to resolve symbol: " nm " in this context")))))))) jolt-nil)))))))) analyze-symbol) (let* ((_o$8898 (keyword #f "private")) (_o$8899 #t)) (jolt-hash-map _o$8898 _o$8899))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "unchecked-arith" (letrec ((unchecked-arith (lambda (hname n) (let fnrec8900 ((hname hname) (n n)) (if (jolt= hname "+") "unchecked-add" (if (jolt= hname "*") "unchecked-multiply" (if (jolt= hname "-") (if (jolt= n 2) "unchecked-negate" "unchecked-subtract") (if (jolt= hname "inc") "unchecked-inc" (if (jolt= hname "dec") "unchecked-dec" (if (jolt-truthy? (keyword #f "else")) jolt-nil jolt-nil)))))))))) unchecked-arith) (let* ((_o$8901 (keyword #f "private")) (_o$8902 #t)) (jolt-hash-map _o$8901 _o$8902))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "analyze-list" (letrec ((analyze-list (lambda (ctx form env) (let fnrec8903 ((ctx ctx) (form form) (env env)) (let* ((items (jolt-invoke (var-deref "clojure.core" "vec") (jolt-invoke (var-deref "jolt.host" "form-elements") form)))) (if (jolt-zero? (jolt-count items)) (jolt-invoke (var-deref "jolt.ir" "quote-node") form) (let* ((head (jolt-first items)) (hname (if (jolt-truthy? (let* ((and__25__auto (jolt-invoke (var-deref "jolt.host" "form-sym?") head))) (if (jolt-truthy? and__25__auto) (jolt-nil? (jolt-invoke (var-deref "jolt.host" "form-sym-ns") head)) and__25__auto))) (jolt-invoke (var-deref "jolt.host" "form-sym-name") head) jolt-nil)) (sf-name (let* ((or__26__auto hname)) (if (jolt-truthy? or__26__auto) or__26__auto (if (jolt-truthy? (let* ((and__25__auto (jolt-invoke (var-deref "jolt.host" "form-sym?") head))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= "clojure.core" (jolt-invoke (var-deref "jolt.host" "form-sym-ns") head)))) (if (jolt-truthy? and__25__auto) (jolt-contains? (var-deref "jolt.analyzer" "handled") (jolt-invoke (var-deref "jolt.host" "form-sym-name") head)) and__25__auto)) and__25__auto))) (jolt-invoke (var-deref "jolt.host" "form-sym-name") head) jolt-nil)))) (shadowed (let* ((and__25__auto hname)) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.analyzer" "local?") env hname) and__25__auto))) (unm (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "unchecked-math?"))) (let* ((opn (if (jolt-truthy? (let* ((and__25__auto hname)) (if (jolt-truthy? and__25__auto) (jolt-not shadowed) and__25__auto))) hname (if (jolt-truthy? (let* ((and__25__auto (jolt-invoke (var-deref "jolt.host" "form-sym?") head))) (if (jolt-truthy? and__25__auto) (jolt= "clojure.core" (jolt-invoke (var-deref "jolt.host" "form-sym-ns") head)) and__25__auto))) (jolt-invoke (var-deref "jolt.host" "form-sym-name") head) jolt-nil)))) (if (jolt-truthy? opn) (jolt-invoke (var-deref "jolt.analyzer" "unchecked-arith") opn (jolt-count items)) jolt-nil)) jolt-nil))) (if (jolt-truthy? unm) (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx (let* ((_a$8904 (jolt-invoke (var-deref "clojure.core" "symbol") unm)) (_a$8905 (jolt-rest items))) (jolt-cons _a$8904 _a$8905)) env) (if (jolt-truthy? (let* ((and__25__auto (jolt-invoke (var-deref "jolt.host" "form-sym?") head))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-not shadowed))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-not (jolt-contains? (var-deref "jolt.analyzer" "handled") sf-name)))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.host" "form-macro?") ctx head) and__25__auto)) and__25__auto)) and__25__auto))) (let* ((node (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx (jolt-invoke (var-deref "jolt.host" "form-expand-1") ctx form (jolt-invoke (var-deref "jolt.analyzer" "amp-env-map") env)) env)) (p (jolt-invoke (var-deref "jolt.host" "form-position") form))) (if (jolt-truthy? (let* ((and__25__auto p)) (if (jolt-truthy? and__25__auto) (jolt= (keyword #f "def") (jolt-get node (keyword #f "op"))) and__25__auto))) (jolt-assoc node (keyword #f "pos") p) node)) (if (jolt-truthy? (let* ((and__25__auto (jolt-invoke (var-deref "jolt.host" "form-sym?") head))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= "jolt.ffi" (jolt-invoke (var-deref "jolt.host" "form-sym-ns") head)))) (if (jolt-truthy? and__25__auto) (jolt= "__cfn" (jolt-invoke (var-deref "jolt.host" "form-sym-name") head)) and__25__auto)) and__25__auto))) (jolt-invoke (var-deref "jolt.analyzer" "analyze-ffi-fn") ctx items env) (if (jolt-truthy? (let* ((and__25__auto (jolt-invoke (var-deref "jolt.host" "form-sym?") head))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= "jolt.ffi" (jolt-invoke (var-deref "jolt.host" "form-sym-ns") head)))) (if (jolt-truthy? and__25__auto) (jolt= "__ccallable" (jolt-invoke (var-deref "jolt.host" "form-sym-name") head)) and__25__auto)) and__25__auto))) (jolt-invoke (var-deref "jolt.analyzer" "analyze-ffi-callable") ctx items env) (if (jolt-truthy? (let* ((and__25__auto sf-name)) (if (jolt-truthy? and__25__auto) (jolt-contains? (var-deref "jolt.analyzer" "handled") sf-name) and__25__auto))) (let* ((node (jolt-invoke (var-deref "jolt.analyzer" "analyze-special") ctx sf-name items env)) (p (jolt-invoke (var-deref "jolt.host" "form-position") form))) (if (jolt-truthy? (let* ((and__25__auto p)) (if (jolt-truthy? and__25__auto) (jolt= (keyword #f "def") (jolt-get node (keyword #f "op"))) and__25__auto))) (jolt-assoc node (keyword #f "pos") p) node)) (if (jolt-truthy? (let* ((and__25__auto hname)) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-not shadowed))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.analyzer" "method-head?") hname) and__25__auto)) and__25__auto))) (jolt-invoke (var-deref "jolt.analyzer" "analyze-host-call") ctx hname items env) (if (jolt-truthy? (let* ((and__25__auto hname)) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-not shadowed))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.analyzer" "ctor-head?") hname) and__25__auto)) and__25__auto))) (let* ((_a$8906 (var-deref "jolt.analyzer" "analyze-ctor")) (_a$8907 ctx) (_a$8908 (jolt-invoke (var-deref "clojure.core" "subs") hname 0 (jolt-dec (jolt-count hname)))) (_a$8909 (jolt-rest items)) (_a$8910 env)) (jolt-invoke _a$8906 _a$8907 _a$8908 _a$8909 _a$8910)) (if (jolt-truthy? (let* ((and__25__auto (jolt= hname "new"))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-not shadowed))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (>= (jolt-count items) 2))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.host" "form-sym?") (jolt-nth items 1)) and__25__auto)) and__25__auto)) and__25__auto))) (let* ((_a$8911 (var-deref "jolt.analyzer" "analyze-ctor")) (_a$8912 ctx) (_a$8913 (jolt-invoke (var-deref "jolt.host" "form-sym-name") (jolt-nth items 1))) (_a$8914 (jolt-drop 2 items)) (_a$8915 env)) (jolt-invoke _a$8911 _a$8912 _a$8913 _a$8914 _a$8915)) (if (let* ((and__25__auto (jolt= hname "."))) (if (jolt-truthy? and__25__auto) (jolt-not shadowed) and__25__auto)) (jolt-invoke (var-deref "jolt.analyzer" "analyze-dot") ctx items env) (if (jolt-truthy? (let* ((and__25__auto hname)) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-not shadowed))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.analyzer" "field-head?") hname) and__25__auto)) and__25__auto))) (jolt-invoke (var-deref "jolt.analyzer" "analyze-field") ctx hname items env) (if (jolt-truthy? (let* ((and__25__auto hname)) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-not shadowed))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.host" "form-special?") hname) and__25__auto)) and__25__auto))) (jolt-invoke (var-deref "jolt.analyzer" "uncompilable") (jolt-invoke (var-deref "clojure.core" "str") "special form " hname)) (if (jolt-truthy? (keyword #f "else")) (let* ((n (let* ((_a$8920 (var-deref "jolt.ir" "invoke")) (_a$8921 (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx head env)) (_a$8922 (let* ((_a$8917 (var-deref "clojure.core" "mapv")) (_a$8918 (lambda (p__97_) (let fnrec8916 ((p__97_ p__97_)) (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx p__97_ env)))) (_a$8919 (jolt-rest items))) (jolt-invoke _a$8917 _a$8918 _a$8919)))) (jolt-invoke _a$8920 _a$8921 _a$8922))) (p (jolt-invoke (var-deref "jolt.host" "form-position") form))) (if (jolt-truthy? p) (jolt-assoc n (keyword #f "pos") p) n)) jolt-nil))))))))))))))))))) analyze-list) (let* ((_o$8923 (keyword #f "private")) (_o$8924 #t)) (jolt-hash-map _o$8923 _o$8924))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "with-coll-meta" (letrec ((with-coll-meta (lambda (ctx form env node) (let fnrec8925 ((ctx ctx) (form form) (env env) (node node)) (let* ((m (jolt-invoke (var-deref "jolt.host" "form-coll-meta") form))) (if (jolt-nil? m) node (let* ((_a$8928 (var-deref "jolt.ir" "invoke")) (_a$8929 (jolt-invoke (var-deref "jolt.ir" "var-ref") "clojure.core" "with-meta")) (_a$8930 (let* ((_o$8926 node) (_o$8927 (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx m env))) (jolt-vector _o$8926 _o$8927)))) (jolt-invoke _a$8928 _a$8929 _a$8930)))))))) with-coll-meta) (let* ((_o$8931 (keyword #f "private")) (_o$8932 #t)) (jolt-hash-map _o$8931 _o$8932))))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "analyze" (letrec ((analyze (case-lambda ((ctx form) (let fnrec8933 ((ctx ctx) (form form)) (analyze ctx form (jolt-invoke (var-deref "jolt.analyzer" "empty-env"))))) ((ctx form env) (let fnrec8934 ((ctx ctx) (form form) (env env)) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-literal?") form)) (jolt-invoke (var-deref "jolt.ir" "const") form) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-sym?") form)) (jolt-invoke (var-deref "jolt.analyzer" "analyze-symbol") ctx form env) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-vec?") form)) (jolt-invoke (var-deref "jolt.analyzer" "with-coll-meta") ctx form env (jolt-invoke (var-deref "jolt.ir" "vector-node") (let* ((_a$8936 (var-deref "clojure.core" "mapv")) (_a$8937 (lambda (p__98_) (let fnrec8935 ((p__98_ p__98_)) (analyze ctx p__98_ env)))) (_a$8938 (jolt-invoke (var-deref "jolt.host" "form-vec-items") form))) (jolt-invoke _a$8936 _a$8937 _a$8938)))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-map?") form)) (jolt-invoke (var-deref "jolt.analyzer" "with-coll-meta") ctx form env (jolt-invoke (var-deref "jolt.ir" "map-node") (let* ((_a$8942 (var-deref "clojure.core" "mapv")) (_a$8943 (lambda (p) (let fnrec8939 ((p p)) (let* ((_o$8940 (analyze ctx (jolt-first p) env)) (_o$8941 (analyze ctx (jolt-invoke (var-deref "clojure.core" "second") p) env))) (jolt-vector _o$8940 _o$8941))))) (_a$8944 (jolt-invoke (var-deref "jolt.host" "form-map-pairs") form))) (jolt-invoke _a$8942 _a$8943 _a$8944)))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-set?") form)) (jolt-invoke (var-deref "jolt.analyzer" "with-coll-meta") ctx form env (jolt-invoke (var-deref "jolt.ir" "set-node") (let* ((_a$8946 (var-deref "clojure.core" "mapv")) (_a$8947 (lambda (p__99_) (let fnrec8945 ((p__99_ p__99_)) (analyze ctx p__99_ env)))) (_a$8948 (jolt-invoke (var-deref "jolt.host" "form-set-items") form))) (jolt-invoke _a$8946 _a$8947 _a$8948)))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-list?") form)) (jolt-invoke (var-deref "jolt.analyzer" "analyze-list") ctx form env) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-regex?") form)) (let* ((_o$8949 (keyword #f "op")) (_o$8950 (keyword #f "regex")) (_o$8951 (keyword #f "source")) (_o$8952 (jolt-invoke (var-deref "jolt.host" "form-regex-source") form))) (jolt-hash-map _o$8949 _o$8950 _o$8951 _o$8952)) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-inst?") form)) (let* ((_o$8953 (keyword #f "op")) (_o$8954 (keyword #f "inst")) (_o$8955 (keyword #f "source")) (_o$8956 (jolt-invoke (var-deref "jolt.host" "form-inst-source") form))) (jolt-hash-map _o$8953 _o$8954 _o$8955 _o$8956)) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-uuid?") form)) (let* ((_o$8957 (keyword #f "op")) (_o$8958 (keyword #f "uuid")) (_o$8959 (keyword #f "source")) (_o$8960 (jolt-invoke (var-deref "jolt.host" "form-uuid-source") form))) (jolt-hash-map _o$8957 _o$8958 _o$8959 _o$8960)) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-bigdec?") form)) (let* ((_o$8961 (keyword #f "op")) (_o$8962 (keyword #f "bigdec")) (_o$8963 (keyword #f "source")) (_o$8964 (jolt-invoke (var-deref "jolt.host" "form-bigdec-source") form))) (jolt-hash-map _o$8961 _o$8962 _o$8963 _o$8964)) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-ns-value?") form)) (let* ((_o$8965 (keyword #f "op")) (_o$8966 (keyword #f "the-ns")) (_o$8967 (keyword #f "name")) (_o$8968 (jolt-invoke (var-deref "jolt.host" "form-ns-value-name") form))) (jolt-hash-map _o$8965 _o$8966 _o$8967 _o$8968)) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-var-value?") form)) (let* ((_a$8969 (var-deref "jolt.ir" "the-var")) (_a$8970 (jolt-invoke (var-deref "jolt.host" "form-var-value-ns") form)) (_a$8971 (jolt-invoke (var-deref "jolt.host" "form-var-value-name") form))) (jolt-invoke _a$8969 _a$8970 _a$8971)) (if (jolt-truthy? (keyword #f "else")) (jolt-invoke (var-deref "jolt.analyzer" "uncompilable") "unsupported form") jolt-nil)))))))))))))))))) analyze)))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "native-ops" (let* ((_o$7160 "+") (_o$7161 "+") (_o$7162 "-") (_o$7163 "-") (_o$7164 "*") (_o$7165 "*") (_o$7166 "/") (_o$7167 "/") (_o$7168 "<") (_o$7169 "<") (_o$7170 ">") (_o$7171 ">") (_o$7172 "<=") (_o$7173 "<=") (_o$7174 ">=") (_o$7175 ">=") (_o$7176 "=") (_o$7177 "jolt=") (_o$7178 "inc") (_o$7179 "jolt-inc") (_o$7180 "dec") (_o$7181 "jolt-dec") (_o$7182 "not") (_o$7183 "jolt-not") (_o$7184 "min") (_o$7185 "min") (_o$7186 "max") (_o$7187 "max") (_o$7188 "mod") (_o$7189 "modulo") (_o$7190 "rem") (_o$7191 "remainder") (_o$7192 "quot") (_o$7193 "quotient") (_o$7194 "vector") (_o$7195 "jolt-vector") (_o$7196 "hash-map") (_o$7197 "jolt-hash-map-fn") (_o$7198 "hash-set") (_o$7199 "jolt-hash-set") (_o$7200 "conj") (_o$7201 "jolt-conj") (_o$7202 "get") (_o$7203 "jolt-get") (_o$7204 "nth") (_o$7205 "jolt-nth") (_o$7206 "count") (_o$7207 "jolt-count") (_o$7208 "assoc") (_o$7209 "jolt-assoc") (_o$7210 "dissoc") (_o$7211 "jolt-dissoc") (_o$7212 "contains?") (_o$7213 "jolt-contains?") (_o$7214 "empty?") (_o$7215 "jolt-empty?") (_o$7216 "peek") (_o$7217 "jolt-peek") (_o$7218 "pop") (_o$7219 "jolt-pop") (_o$7220 "first") (_o$7221 "jolt-first") (_o$7222 "rest") (_o$7223 "jolt-rest") (_o$7224 "next") (_o$7225 "jolt-next") (_o$7226 "seq") (_o$7227 "jolt-seq") (_o$7228 "cons") (_o$7229 "jolt-cons") (_o$7230 "list") (_o$7231 "jolt-list") (_o$7232 "reverse") (_o$7233 "jolt-reverse") (_o$7234 "last") (_o$7235 "jolt-last") (_o$7236 "map") (_o$7237 "jolt-map") (_o$7238 "filter") (_o$7239 "jolt-filter") (_o$7240 "remove") (_o$7241 "jolt-remove") (_o$7242 "reduce") (_o$7243 "jolt-reduce") (_o$7244 "into") (_o$7245 "jolt-into") (_o$7246 "concat") (_o$7247 "jolt-concat") (_o$7248 "apply") (_o$7249 "jolt-apply") (_o$7250 "range") (_o$7251 "jolt-range") (_o$7252 "take") (_o$7253 "jolt-take") (_o$7254 "drop") (_o$7255 "jolt-drop") (_o$7256 "keys") (_o$7257 "jolt-keys") (_o$7258 "vals") (_o$7259 "jolt-vals") (_o$7260 "even?") (_o$7261 "jolt-even?") (_o$7262 "odd?") (_o$7263 "jolt-odd?") (_o$7264 "pos?") (_o$7265 "jolt-pos?") (_o$7266 "neg?") (_o$7267 "jolt-neg?") (_o$7268 "zero?") (_o$7269 "jolt-zero?") (_o$7270 "identity") (_o$7271 "jolt-identity") (_o$7272 "nil?") (_o$7273 "jolt-nil?") (_o$7274 "some?") (_o$7275 "jolt-some?") (_o$7276 "ex-info") (_o$7277 "jolt-ex-info") (_o$7278 "protocol-dispatch1") (_o$7279 "protocol-dispatch1") (_o$7280 "protocol-dispatch2") (_o$7281 "protocol-dispatch2") (_o$7282 "protocol-dispatch3") (_o$7283 "protocol-dispatch3")) (jolt-hash-map _o$7160 _o$7161 _o$7162 _o$7163 _o$7164 _o$7165 _o$7166 _o$7167 _o$7168 _o$7169 _o$7170 _o$7171 _o$7172 _o$7173 _o$7174 _o$7175 _o$7176 _o$7177 _o$7178 _o$7179 _o$7180 _o$7181 _o$7182 _o$7183 _o$7184 _o$7185 _o$7186 _o$7187 _o$7188 _o$7189 _o$7190 _o$7191 _o$7192 _o$7193 _o$7194 _o$7195 _o$7196 _o$7197 _o$7198 _o$7199 _o$7200 _o$7201 _o$7202 _o$7203 _o$7204 _o$7205 _o$7206 _o$7207 _o$7208 _o$7209 _o$7210 _o$7211 _o$7212 _o$7213 _o$7214 _o$7215 _o$7216 _o$7217 _o$7218 _o$7219 _o$7220 _o$7221 _o$7222 _o$7223 _o$7224 _o$7225 _o$7226 _o$7227 _o$7228 _o$7229 _o$7230 _o$7231 _o$7232 _o$7233 _o$7234 _o$7235 _o$7236 _o$7237 _o$7238 _o$7239 _o$7240 _o$7241 _o$7242 _o$7243 _o$7244 _o$7245 _o$7246 _o$7247 _o$7248 _o$7249 _o$7250 _o$7251 _o$7252 _o$7253 _o$7254 _o$7255 _o$7256 _o$7257 _o$7258 _o$7259 _o$7260 _o$7261 _o$7262 _o$7263 _o$7264 _o$7265 _o$7266 _o$7267 _o$7268 _o$7269 _o$7270 _o$7271 _o$7272 _o$7273 _o$7274 _o$7275 _o$7276 _o$7277 _o$7278 _o$7279 _o$7280 _o$7281 _o$7282 _o$7283)) (let* ((_o$7284 (keyword #f "private")) (_o$7285 #t)) (jolt-hash-map _o$7284 _o$7285))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "core-value-procs" (jolt-invoke (var-deref "clojure.core" "merge") (var-deref "jolt.backend-scheme" "native-ops") (let* ((_o$7286 "+") (_o$7287 "jolt-add") (_o$7288 "-") (_o$7289 "jolt-sub") (_o$7290 "*") (_o$7291 "jolt-mul") (_o$7292 "/") (_o$7293 "jolt-div") (_o$7294 "min") (_o$7295 "jolt-min") (_o$7296 "max") (_o$7297 "jolt-max")) (jolt-hash-map _o$7286 _o$7287 _o$7288 _o$7289 _o$7290 _o$7291 _o$7292 _o$7293 _o$7294 _o$7295 _o$7296 _o$7297))) (let* ((_o$7298 (keyword #f "private")) (_o$7299 #t)) (jolt-hash-map _o$7298 _o$7299))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "op-arity" (let* ((_o$7346 "inc") (_o$7347 (lambda (p__42_) (let fnrec7300 ((p__42_ p__42_)) (jolt= p__42_ 1)))) (_o$7348 "dec") (_o$7349 (lambda (p__43_) (let fnrec7301 ((p__43_ p__43_)) (jolt= p__43_ 1)))) (_o$7350 "not") (_o$7351 (lambda (p__44_) (let fnrec7302 ((p__44_ p__44_)) (jolt= p__44_ 1)))) (_o$7352 "count") (_o$7353 (lambda (p__45_) (let fnrec7303 ((p__45_ p__45_)) (jolt= p__45_ 1)))) (_o$7354 "empty?") (_o$7355 (lambda (p__46_) (let fnrec7304 ((p__46_ p__46_)) (jolt= p__46_ 1)))) (_o$7356 "peek") (_o$7357 (lambda (p__47_) (let fnrec7305 ((p__47_ p__47_)) (jolt= p__47_ 1)))) (_o$7358 "pop") (_o$7359 (lambda (p__48_) (let fnrec7306 ((p__48_ p__48_)) (jolt= p__48_ 1)))) (_o$7360 "mod") (_o$7361 (lambda (p__49_) (let fnrec7307 ((p__49_ p__49_)) (jolt= p__49_ 2)))) (_o$7362 "rem") (_o$7363 (lambda (p__50_) (let fnrec7308 ((p__50_ p__50_)) (jolt= p__50_ 2)))) (_o$7364 "quot") (_o$7365 (lambda (p__51_) (let fnrec7309 ((p__51_ p__51_)) (jolt= p__51_ 2)))) (_o$7366 "contains?") (_o$7367 (lambda (p__52_) (let fnrec7310 ((p__52_ p__52_)) (jolt= p__52_ 2)))) (_o$7368 "get") (_o$7369 (lambda (p__53_) (let fnrec7311 ((p__53_ p__53_)) (let* ((or__26__auto (jolt= p__53_ 2))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt= p__53_ 3)))))) (_o$7370 "nth") (_o$7371 (lambda (p__54_) (let fnrec7312 ((p__54_ p__54_)) (let* ((or__26__auto (jolt= p__54_ 2))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt= p__54_ 3)))))) (_o$7372 "assoc") (_o$7373 (lambda (p__55_) (let fnrec7313 ((p__55_ p__55_)) (let* ((and__25__auto (>= p__55_ 3))) (if (jolt-truthy? and__25__auto) (jolt-odd? p__55_) and__25__auto))))) (_o$7374 "dissoc") (_o$7375 (lambda (p__56_) (let fnrec7314 ((p__56_ p__56_)) (>= p__56_ 1)))) (_o$7376 "conj") (_o$7377 (lambda (p__57_) (let fnrec7315 ((p__57_ p__57_)) (>= p__57_ 1)))) (_o$7378 "first") (_o$7379 (lambda (p__58_) (let fnrec7316 ((p__58_ p__58_)) (jolt= p__58_ 1)))) (_o$7380 "rest") (_o$7381 (lambda (p__59_) (let fnrec7317 ((p__59_ p__59_)) (jolt= p__59_ 1)))) (_o$7382 "next") (_o$7383 (lambda (p__60_) (let fnrec7318 ((p__60_ p__60_)) (jolt= p__60_ 1)))) (_o$7384 "seq") (_o$7385 (lambda (p__61_) (let fnrec7319 ((p__61_ p__61_)) (jolt= p__61_ 1)))) (_o$7386 "reverse") (_o$7387 (lambda (p__62_) (let fnrec7320 ((p__62_ p__62_)) (jolt= p__62_ 1)))) (_o$7388 "last") (_o$7389 (lambda (p__63_) (let fnrec7321 ((p__63_ p__63_)) (jolt= p__63_ 1)))) (_o$7390 "keys") (_o$7391 (lambda (p__64_) (let fnrec7322 ((p__64_ p__64_)) (jolt= p__64_ 1)))) (_o$7392 "vals") (_o$7393 (lambda (p__65_) (let fnrec7323 ((p__65_ p__65_)) (jolt= p__65_ 1)))) (_o$7394 "even?") (_o$7395 (lambda (p__66_) (let fnrec7324 ((p__66_ p__66_)) (jolt= p__66_ 1)))) (_o$7396 "odd?") (_o$7397 (lambda (p__67_) (let fnrec7325 ((p__67_ p__67_)) (jolt= p__67_ 1)))) (_o$7398 "pos?") (_o$7399 (lambda (p__68_) (let fnrec7326 ((p__68_ p__68_)) (jolt= p__68_ 1)))) (_o$7400 "neg?") (_o$7401 (lambda (p__69_) (let fnrec7327 ((p__69_ p__69_)) (jolt= p__69_ 1)))) (_o$7402 "zero?") (_o$7403 (lambda (p__70_) (let fnrec7328 ((p__70_ p__70_)) (jolt= p__70_ 1)))) (_o$7404 "identity") (_o$7405 (lambda (p__71_) (let fnrec7329 ((p__71_ p__71_)) (jolt= p__71_ 1)))) (_o$7406 "nil?") (_o$7407 (lambda (p__72_) (let fnrec7330 ((p__72_ p__72_)) (jolt= p__72_ 1)))) (_o$7408 "some?") (_o$7409 (lambda (p__73_) (let fnrec7331 ((p__73_ p__73_)) (jolt= p__73_ 1)))) (_o$7410 "protocol-dispatch1") (_o$7411 (lambda (p__74_) (let fnrec7332 ((p__74_ p__74_)) (jolt= p__74_ 3)))) (_o$7412 "protocol-dispatch2") (_o$7413 (lambda (p__75_) (let fnrec7333 ((p__75_ p__75_)) (jolt= p__75_ 4)))) (_o$7414 "protocol-dispatch3") (_o$7415 (lambda (p__76_) (let fnrec7334 ((p__76_ p__76_)) (jolt= p__76_ 5)))) (_o$7416 "cons") (_o$7417 (lambda (p__77_) (let fnrec7335 ((p__77_ p__77_)) (jolt= p__77_ 2)))) (_o$7418 "filter") (_o$7419 (lambda (p__78_) (let fnrec7336 ((p__78_ p__78_)) (jolt= p__78_ 2)))) (_o$7420 "remove") (_o$7421 (lambda (p__79_) (let fnrec7337 ((p__79_ p__79_)) (jolt= p__79_ 2)))) (_o$7422 "into") (_o$7423 (lambda (p__80_) (let fnrec7338 ((p__80_ p__80_)) (jolt= p__80_ 2)))) (_o$7424 "take") (_o$7425 (lambda (p__81_) (let fnrec7339 ((p__81_ p__81_)) (jolt= p__81_ 2)))) (_o$7426 "drop") (_o$7427 (lambda (p__82_) (let fnrec7340 ((p__82_ p__82_)) (jolt= p__82_ 2)))) (_o$7428 "map") (_o$7429 (lambda (p__83_) (let fnrec7341 ((p__83_ p__83_)) (>= p__83_ 2)))) (_o$7430 "apply") (_o$7431 (lambda (p__84_) (let fnrec7342 ((p__84_ p__84_)) (>= p__84_ 2)))) (_o$7432 "reduce") (_o$7433 (lambda (p__85_) (let fnrec7343 ((p__85_ p__85_)) (let* ((or__26__auto (jolt= p__85_ 2))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt= p__85_ 3)))))) (_o$7434 "range") (_o$7435 (lambda (p__86_) (let fnrec7344 ((p__86_ p__86_)) (let* ((and__25__auto (>= p__86_ 0))) (if (jolt-truthy? and__25__auto) (<= p__86_ 3) and__25__auto))))) (_o$7436 "ex-info") (_o$7437 (lambda (p__87_) (let fnrec7345 ((p__87_ p__87_)) (let* ((or__26__auto (jolt= p__87_ 2))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt= p__87_ 3))))))) (jolt-hash-map _o$7346 _o$7347 _o$7348 _o$7349 _o$7350 _o$7351 _o$7352 _o$7353 _o$7354 _o$7355 _o$7356 _o$7357 _o$7358 _o$7359 _o$7360 _o$7361 _o$7362 _o$7363 _o$7364 _o$7365 _o$7366 _o$7367 _o$7368 _o$7369 _o$7370 _o$7371 _o$7372 _o$7373 _o$7374 _o$7375 _o$7376 _o$7377 _o$7378 _o$7379 _o$7380 _o$7381 _o$7382 _o$7383 _o$7384 _o$7385 _o$7386 _o$7387 _o$7388 _o$7389 _o$7390 _o$7391 _o$7392 _o$7393 _o$7394 _o$7395 _o$7396 _o$7397 _o$7398 _o$7399 _o$7400 _o$7401 _o$7402 _o$7403 _o$7404 _o$7405 _o$7406 _o$7407 _o$7408 _o$7409 _o$7410 _o$7411 _o$7412 _o$7413 _o$7414 _o$7415 _o$7416 _o$7417 _o$7418 _o$7419 _o$7420 _o$7421 _o$7422 _o$7423 _o$7424 _o$7425 _o$7426 _o$7427 _o$7428 _o$7429 _o$7430 _o$7431 _o$7432 _o$7433 _o$7434 _o$7435 _o$7436 _o$7437)) (let* ((_o$7438 (keyword #f "private")) (_o$7439 #t)) (jolt-hash-map _o$7438 _o$7439))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "cmp1-ops" (let* ((_o$7440 "<") (_o$7441 ">") (_o$7442 "<=") (_o$7443 ">=")) (jolt-hash-set _o$7440 _o$7441 _o$7442 _o$7443)) (let* ((_o$7444 (keyword #f "private")) (_o$7445 #t)) (jolt-hash-map _o$7444 _o$7445))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "supported-host-methods" (let* ((_o$7446 "isDirectory") (_o$7447 "listFiles")) (jolt-hash-set _o$7446 _o$7447)) (let* ((_o$7448 (keyword #f "private")) (_o$7449 #t)) (jolt-hash-map _o$7448 _o$7449))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "bool-returning-ops" (let* ((_o$7450 "<") (_o$7451 "<=") (_o$7452 ">") (_o$7453 ">=") (_o$7454 "jolt=") (_o$7455 "jolt-not") (_o$7456 "jolt-even?") (_o$7457 "jolt-odd?") (_o$7458 "jolt-pos?") (_o$7459 "jolt-neg?") (_o$7460 "jolt-zero?") (_o$7461 "jolt-empty?") (_o$7462 "jolt-contains?") (_o$7463 "jolt-nil?") (_o$7464 "jolt-some?")) (jolt-hash-set _o$7450 _o$7451 _o$7452 _o$7453 _o$7454 _o$7455 _o$7456 _o$7457 _o$7458 _o$7459 _o$7460 _o$7461 _o$7462 _o$7463 _o$7464)) (let* ((_o$7465 (keyword #f "private")) (_o$7466 #t)) (jolt-hash-map _o$7465 _o$7466))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "dbl-ops" (let* ((_o$7467 "+") (_o$7468 "fl+") (_o$7469 "-") (_o$7470 "fl-") (_o$7471 "*") (_o$7472 "fl*") (_o$7473 "/") (_o$7474 "fl/") (_o$7475 "min") (_o$7476 "flmin") (_o$7477 "max") (_o$7478 "flmax") (_o$7479 "<") (_o$7480 "fl<?") (_o$7481 ">") (_o$7482 "fl>?") (_o$7483 "<=") (_o$7484 "fl<=?") (_o$7485 ">=") (_o$7486 "fl>=?") (_o$7487 "=") (_o$7488 "fl=?") (_o$7489 "==") (_o$7490 "fl=?")) (jolt-hash-map _o$7467 _o$7468 _o$7469 _o$7470 _o$7471 _o$7472 _o$7473 _o$7474 _o$7475 _o$7476 _o$7477 _o$7478 _o$7479 _o$7480 _o$7481 _o$7482 _o$7483 _o$7484 _o$7485 _o$7486 _o$7487 _o$7488 _o$7489 _o$7490)) (let* ((_o$7491 (keyword #f "private")) (_o$7492 #t)) (jolt-hash-map _o$7491 _o$7492))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "lng-ops" (let* ((_o$7493 "+") (_o$7494 "fx+") (_o$7495 "-") (_o$7496 "fx-") (_o$7497 "*") (_o$7498 "fx*") (_o$7499 "min") (_o$7500 "jolt-l-min") (_o$7501 "max") (_o$7502 "jolt-l-max") (_o$7503 "unchecked-add") (_o$7504 "jolt-uncadd2") (_o$7505 "unchecked-subtract") (_o$7506 "jolt-uncsub2") (_o$7507 "unchecked-multiply") (_o$7508 "jolt-uncmul2") (_o$7509 "quot") (_o$7510 "jolt-l-quot") (_o$7511 "rem") (_o$7512 "jolt-l-rem") (_o$7513 "mod") (_o$7514 "jolt-l-mod") (_o$7515 "<") (_o$7516 "jolt-l<") (_o$7517 ">") (_o$7518 "jolt-l>") (_o$7519 "<=") (_o$7520 "jolt-l<=") (_o$7521 ">=") (_o$7522 "jolt-l>=") (_o$7523 "=") (_o$7524 "jolt-l=") (_o$7525 "==") (_o$7526 "jolt-l=")) (jolt-hash-map _o$7493 _o$7494 _o$7495 _o$7496 _o$7497 _o$7498 _o$7499 _o$7500 _o$7501 _o$7502 _o$7503 _o$7504 _o$7505 _o$7506 _o$7507 _o$7508 _o$7509 _o$7510 _o$7511 _o$7512 _o$7513 _o$7514 _o$7515 _o$7516 _o$7517 _o$7518 _o$7519 _o$7520 _o$7521 _o$7522 _o$7523 _o$7524 _o$7525 _o$7526)) (let* ((_o$7527 (keyword #f "private")) (_o$7528 #t)) (jolt-hash-map _o$7527 _o$7528))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "bd-ops" (let* ((_o$7529 "+") (_o$7530 "jbd-add") (_o$7531 "-") (_o$7532 "jbd-sub") (_o$7533 "*") (_o$7534 "jbd-mul") (_o$7535 "/") (_o$7536 "jbd-div") (_o$7537 "min") (_o$7538 "jbd-min") (_o$7539 "max") (_o$7540 "jbd-max") (_o$7541 "quot") (_o$7542 "jbd-quot") (_o$7543 "rem") (_o$7544 "jbd-rem") (_o$7545 "<") (_o$7546 "jbd-lt?") (_o$7547 ">") (_o$7548 "jbd-gt?") (_o$7549 "<=") (_o$7550 "jbd-le?") (_o$7551 ">=") (_o$7552 "jbd-ge?") (_o$7553 "zero?") (_o$7554 "jbd-zero?") (_o$7555 "pos?") (_o$7556 "jbd-pos?") (_o$7557 "neg?") (_o$7558 "jbd-neg?")) (jolt-hash-map _o$7529 _o$7530 _o$7531 _o$7532 _o$7533 _o$7534 _o$7535 _o$7536 _o$7537 _o$7538 _o$7539 _o$7540 _o$7541 _o$7542 _o$7543 _o$7544 _o$7545 _o$7546 _o$7547 _o$7548 _o$7549 _o$7550 _o$7551 _o$7552 _o$7553 _o$7554 _o$7555 _o$7556 _o$7557 _o$7558)) (let* ((_o$7559 (keyword #f "private")) (_o$7560 #t)) (jolt-hash-map _o$7559 _o$7560))))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "prelude-mode?" (jolt-invoke (var-deref "clojure.core" "atom") #f)))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "set-prelude-mode!" (letrec ((set-prelude-mode! (lambda (on) (let fnrec7561 ((on on)) (jolt-invoke (var-deref "clojure.core" "reset!") (var-deref "jolt.backend-scheme" "prelude-mode?") on))))) set-prelude-mode!)))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "direct-link?" (jolt-invoke (var-deref "clojure.core" "atom") #f)))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "set-direct-link!" (letrec ((set-direct-link! (lambda (on) (let fnrec7562 ((on on)) (jolt-invoke (var-deref "clojure.core" "reset!") (var-deref "jolt.backend-scheme" "direct-link?") on))))) set-direct-link!)))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "direct-link-defined" (jolt-invoke (var-deref "clojure.core" "atom") (jolt-hash-set))))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "direct-link-fns" (jolt-invoke (var-deref "clojure.core" "atom") (jolt-hash-set))))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "direct-link-reset!" (letrec ((direct-link-reset! (lambda () (let fnrec7563 () (begin (jolt-invoke (var-deref "clojure.core" "reset!") (var-deref "jolt.backend-scheme" "direct-link-defined") (jolt-hash-set)) (jolt-invoke (var-deref "clojure.core" "reset!") (var-deref "jolt.backend-scheme" "direct-link-fns") (jolt-hash-set))))))) direct-link-reset!)))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "dl-munge" (letrec ((dl-munge (lambda (s) (let fnrec7564 ((s s)) (jolt-invoke (var-deref "clojure.string" "replace") (jolt-invoke (var-deref "clojure.string" "replace") (jolt-invoke (var-deref "clojure.string" "replace") s "$" "_D_") "#" "_H_") "'" "_Q_"))))) dl-munge) (let* ((_o$7565 (keyword #f "private")) (_o$7566 #t)) (jolt-hash-map _o$7565 _o$7566))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "dl-name" (letrec ((dl-name (lambda (ns nm) (let fnrec7567 ((ns ns) (nm nm)) (let* ((_a$7568 (var-deref "clojure.core" "str")) (_a$7569 "jv$") (_a$7570 (jolt-invoke (var-deref "jolt.backend-scheme" "dl-munge") ns)) (_a$7571 "$") (_a$7572 (jolt-invoke (var-deref "jolt.backend-scheme" "dl-munge") nm))) (jolt-invoke _a$7568 _a$7569 _a$7570 _a$7571 _a$7572)))))) dl-name) (let* ((_o$7573 (keyword #f "private")) (_o$7574 #t)) (jolt-hash-map _o$7573 _o$7574))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "dl-fqn" (letrec ((dl-fqn (lambda (ns nm) (let fnrec7575 ((ns ns) (nm nm)) (jolt-invoke (var-deref "clojure.core" "str") ns "/" nm))))) dl-fqn) (let* ((_o$7576 (keyword #f "private")) (_o$7577 #t)) (jolt-hash-map _o$7576 _o$7577))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "direct-linkable?" (letrec ((direct-linkable? (lambda (ns nm) (let fnrec7578 ((ns ns) (nm nm)) (let* ((and__25__auto (jolt-invoke (var-deref "clojure.core" "deref") (var-deref "jolt.backend-scheme" "direct-link?")))) (if (jolt-truthy? and__25__auto) (let* ((_a$7579 (jolt-invoke (var-deref "clojure.core" "deref") (var-deref "jolt.backend-scheme" "direct-link-defined"))) (_a$7580 (jolt-invoke (var-deref "jolt.backend-scheme" "dl-fqn") ns nm))) (jolt-contains? _a$7579 _a$7580)) and__25__auto)))))) direct-linkable?) (let* ((_o$7581 (keyword #f "private")) (_o$7582 #t)) (jolt-hash-map _o$7581 _o$7582))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "direct-link-fn?" (letrec ((direct-link-fn? (lambda (ns nm) (let fnrec7583 ((ns ns) (nm nm)) (let* ((_a$7584 (jolt-invoke (var-deref "clojure.core" "deref") (var-deref "jolt.backend-scheme" "direct-link-fns"))) (_a$7585 (jolt-invoke (var-deref "jolt.backend-scheme" "dl-fqn") ns nm))) (jolt-contains? _a$7584 _a$7585)))))) direct-link-fn?) (let* ((_o$7586 (keyword #f "private")) (_o$7587 #t)) (jolt-hash-map _o$7586 _o$7587))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "*recur-target*" jolt-nil (let* ((_o$7588 (keyword #f "dynamic")) (_o$7589 #t)) (jolt-hash-map _o$7588 _o$7589))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "*known-procs*" (jolt-hash-set) (let* ((_o$7590 (keyword #f "dynamic")) (_o$7591 #t)) (jolt-hash-map _o$7590 _o$7591))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "gensym-counter" (jolt-invoke (var-deref "clojure.core" "atom") 0) (let* ((_o$7592 (keyword #f "private")) (_o$7593 #t)) (jolt-hash-map _o$7592 _o$7593))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "fresh-label" (letrec ((fresh-label (lambda (prefix) (let fnrec7594 ((prefix prefix)) (jolt-invoke (var-deref "clojure.core" "str") prefix (jolt-invoke (var-deref "clojure.core" "swap!") (var-deref "jolt.backend-scheme" "gensym-counter") jolt-inc)))))) fresh-label) (let* ((_o$7595 (keyword #f "private")) (_o$7596 #t)) (jolt-hash-map _o$7595 _o$7596))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "devirt-cells" (jolt-invoke (var-deref "clojure.core" "atom") jolt-nil) (let* ((_o$7597 (keyword #f "private")) (_o$7598 #t)) (jolt-hash-map _o$7597 _o$7598))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "scheme-reserved" (let* ((_o$7599 "if") (_o$7600 "begin") (_o$7601 "lambda") (_o$7602 "let") (_o$7603 "let*") (_o$7604 "letrec") (_o$7605 "letrec*") (_o$7606 "quote") (_o$7607 "quasiquote") (_o$7608 "unquote") (_o$7609 "set!") (_o$7610 "define") (_o$7611 "define-syntax") (_o$7612 "cond") (_o$7613 "case") (_o$7614 "when") (_o$7615 "unless") (_o$7616 "and") (_o$7617 "or") (_o$7618 "do") (_o$7619 "else") (_o$7620 "guard") (_o$7621 "parameterize") (_o$7622 "delay") (_o$7623 "values")) (jolt-hash-set _o$7599 _o$7600 _o$7601 _o$7602 _o$7603 _o$7604 _o$7605 _o$7606 _o$7607 _o$7608 _o$7609 _o$7610 _o$7611 _o$7612 _o$7613 _o$7614 _o$7615 _o$7616 _o$7617 _o$7618 _o$7619 _o$7620 _o$7621 _o$7622 _o$7623)) (let* ((_o$7624 (keyword #f "private")) (_o$7625 #t)) (jolt-hash-map _o$7624 _o$7625))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "bare-native-names" (jolt-invoke (var-deref "clojure.core" "set") (jolt-invoke (var-deref "clojure.core" "keep") (lambda (G__138) (let fnrec7626 ((G__138 G__138)) (let* ((G__139 G__138) (k (jolt-nth G__139 0 jolt-nil)) (v (jolt-nth G__139 1 jolt-nil))) (if (jolt= k v) k jolt-nil)))) (var-deref "jolt.backend-scheme" "native-ops"))) (let* ((_o$7627 (keyword #f "private")) (_o$7628 #t)) (jolt-hash-map _o$7627 _o$7628))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "munge-name" (letrec ((munge-name (lambda (s) (let fnrec7629 ((s s)) (let* ((s (jolt-invoke (var-deref "clojure.string" "replace") (jolt-invoke (var-deref "clojure.string" "replace") s "#" "_") "'" "_PRIME_"))) (if (let* ((or__26__auto (jolt-contains? (var-deref "jolt.backend-scheme" "scheme-reserved") s))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt-contains? (var-deref "jolt.backend-scheme" "bare-native-names") s))) (jolt-invoke (var-deref "clojure.core" "str") "_" s) s)))))) munge-name) (let* ((_o$7630 (keyword #f "private")) (_o$7631 #t)) (jolt-hash-map _o$7630 _o$7631))))
(guard (e (#t #f))
  (declare-var! "jolt.backend-scheme" "emit"))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "char-escape" (letrec ((char-escape (lambda (cp) (let fnrec7632 ((cp cp)) (if (jolt= cp 34) "\\\"" (if (jolt= cp 92) "\\\\" (if (jolt= cp 10) "\\n" (if (jolt= cp 9) "\\t" (if (jolt= cp 13) "\\r" (if (let* ((and__25__auto (>= cp 32))) (if (jolt-truthy? and__25__auto) (< cp 127) and__25__auto)) (jolt-invoke (var-deref "clojure.core" "str") (jolt-invoke (var-deref "clojure.core" "char") cp)) (if (jolt-truthy? (keyword #f "else")) (jolt-invoke (var-deref "clojure.core" "str") "\\x" (jolt-invoke (var-deref "clojure.core" "format") "%x" cp) ";") jolt-nil))))))))))) char-escape) (let* ((_o$7633 (keyword #f "private")) (_o$7634 #t)) (jolt-hash-map _o$7633 _o$7634))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "chez-str-lit" (letrec ((chez-str-lit (lambda (s) (let fnrec7635 ((s s)) (jolt-invoke (var-deref "clojure.core" "str") "\"" (jolt-apply (var-deref "clojure.core" "str") (jolt-map (lambda (c) (let fnrec7636 ((c c)) (jolt-invoke (var-deref "jolt.backend-scheme" "char-escape") (jolt-invoke (var-deref "clojure.core" "int") c)))) s)) "\""))))) chez-str-lit) (let* ((_o$7637 (keyword #f "private")) (_o$7638 #t)) (jolt-hash-map _o$7637 _o$7638))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "emit-const" (letrec ((emit-const (lambda (v) (let fnrec7639 ((v v)) (if (jolt-nil? v) "jolt-nil" (if (jolt-truthy? (jolt-invoke (var-deref "clojure.core" "boolean?") v)) (if (jolt-truthy? v) "#t" "#f") (if (jolt-truthy? (jolt-invoke (var-deref "clojure.core" "number?") v)) (if (jolt= v +inf.0) "+inf.0" (if (jolt= v -inf.0) "-inf.0" (if (jolt-truthy? (jolt-invoke (var-deref "clojure.core" "not=") v v)) "+nan.0" (if (jolt-truthy? (jolt-invoke (var-deref "clojure.core" "float?") v)) (let* ((s (jolt-invoke (var-deref "clojure.core" "str") v))) (if (jolt-truthy? (let* ((or__26__auto (jolt-invoke (var-deref "clojure.string" "includes?") s "."))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt-invoke (var-deref "clojure.string" "includes?") s "e")))) s (jolt-invoke (var-deref "clojure.core" "str") s ".0"))) (if (jolt-truthy? (keyword #f "else")) (jolt-invoke (var-deref "clojure.core" "str") v) jolt-nil))))) (if (jolt-truthy? (jolt-invoke (var-deref "clojure.core" "string?") v)) (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") v) (if (jolt-truthy? (jolt-invoke (var-deref "clojure.core" "keyword?") v)) (let* ((temp__16__auto (jolt-invoke (var-deref "clojure.core" "namespace") v))) (if (jolt-truthy? temp__16__auto) (let* ((kns temp__16__auto)) (let* ((_a$7640 (var-deref "clojure.core" "str")) (_a$7641 "(keyword ") (_a$7642 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") kns)) (_a$7643 " ") (_a$7644 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-invoke (var-deref "clojure.core" "name") v))) (_a$7645 ")")) (jolt-invoke _a$7640 _a$7641 _a$7642 _a$7643 _a$7644 _a$7645))) (jolt-invoke (var-deref "clojure.core" "str") "(keyword #f " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-invoke (var-deref "clojure.core" "name") v)) ")"))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-char?") v)) (jolt-invoke (var-deref "clojure.core" "str") "(integer->char " (jolt-invoke (var-deref "jolt.host" "form-char-code") v) ")") (if (jolt-truthy? (keyword #f "else")) (jolt-throw (let* ((_a$7646 (jolt-invoke (var-deref "clojure.core" "str") "emit-const: unsupported literal " (jolt-invoke (var-deref "clojure.core" "pr-str") v))) (_a$7647 (jolt-hash-map))) (jolt-ex-info _a$7646 _a$7647))) jolt-nil))))))))))) emit-const) (let* ((_o$7648 (keyword #f "private")) (_o$7649 #t)) (jolt-hash-map _o$7648 _o$7649))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "emit-ordered" (letrec ((emit-ordered (lambda (ctor arg-strs) (let fnrec7650 ((ctor ctor) (arg-strs arg-strs)) (if (< (jolt-count arg-strs) 2) (jolt-invoke (var-deref "clojure.core" "str") "(" ctor (if (jolt-empty? arg-strs) "" (jolt-invoke (var-deref "clojure.core" "str") " " (jolt-invoke (var-deref "clojure.string" "join") " " arg-strs))) ")") (let* ((tmps (jolt-map (lambda (_) (let fnrec7651 ((_ _)) (jolt-invoke (var-deref "jolt.backend-scheme" "fresh-label") "_o$"))) arg-strs)) (binds (jolt-invoke (var-deref "clojure.string" "join") " " (jolt-map (lambda (t a) (let fnrec7652 ((t t) (a a)) (jolt-invoke (var-deref "clojure.core" "str") "(" t " " a ")"))) tmps arg-strs)))) (jolt-invoke (var-deref "clojure.core" "str") "(let* (" binds ") (" ctor " " (jolt-invoke (var-deref "clojure.string" "join") " " tmps) "))"))))))) emit-ordered) (let* ((_o$7653 (keyword #f "private")) (_o$7654 #t)) (jolt-hash-map _o$7653 _o$7654))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "side-effect-free?" (letrec ((side-effect-free? (lambda (n) (let fnrec7655 ((n n)) (let* ((_a$7661 (let* ((_o$7656 (keyword #f "const")) (_o$7657 (keyword #f "local")) (_o$7658 (keyword #f "var")) (_o$7659 (keyword #f "the-var")) (_o$7660 (keyword #f "quote"))) (jolt-hash-set _o$7656 _o$7657 _o$7658 _o$7659 _o$7660))) (_a$7662 (jolt-get n (keyword #f "op")))) (jolt-contains? _a$7661 _a$7662)))))) side-effect-free?) (let* ((_o$7663 (keyword #f "private")) (_o$7664 #t)) (jolt-hash-map _o$7663 _o$7664))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "needs-order?" (letrec ((needs-order? (lambda (nodes) (let fnrec7665 ((nodes nodes)) (> (jolt-count (jolt-remove (var-deref "jolt.backend-scheme" "side-effect-free?") nodes)) 1))))) needs-order?) (let* ((_o$7666 (keyword #f "private")) (_o$7667 #t)) (jolt-hash-map _o$7666 _o$7667))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "ordered-call" (letrec ((ordered-call (lambda (nodes strs build) (let fnrec7668 ((nodes nodes) (strs strs) (build build)) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.backend-scheme" "needs-order?") nodes)) (let* ((tmps (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (_) (let fnrec7669 ((_ _)) (jolt-invoke (var-deref "jolt.backend-scheme" "fresh-label") "_a$"))) strs)) (binds (jolt-invoke (var-deref "clojure.string" "join") " " (jolt-map (lambda (t a) (let fnrec7670 ((t t) (a a)) (jolt-invoke (var-deref "clojure.core" "str") "(" t " " a ")"))) tmps strs)))) (jolt-invoke (var-deref "clojure.core" "str") "(let* (" binds ") " (jolt-invoke build tmps) ")")) (jolt-invoke build strs)))))) ordered-call) (let* ((_o$7671 (keyword #f "private")) (_o$7672 #t)) (jolt-hash-map _o$7671 _o$7672))))
(guard (e (#t #f))
  (declare-var! "jolt.backend-scheme" "emit-quoted"))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "emit-quoted-map" (letrec ((emit-quoted-map (lambda (pairs) (let fnrec7673 ((pairs pairs)) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-hash-map " (jolt-invoke (var-deref "clojure.string" "join") " " (jolt-invoke (var-deref "clojure.core" "mapcat") (lambda (p) (let fnrec7674 ((p p)) (let* ((_o$7675 (jolt-invoke (var-deref "jolt.backend-scheme" "emit-quoted") (jolt-nth p 0))) (_o$7676 (jolt-invoke (var-deref "jolt.backend-scheme" "emit-quoted") (jolt-nth p 1)))) (jolt-vector _o$7675 _o$7676)))) pairs)) ")"))))) emit-quoted-map) (let* ((_o$7677 (keyword #f "private")) (_o$7678 #t)) (jolt-hash-map _o$7677 _o$7678))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "emit-quoted-map-value" (letrec ((emit-quoted-map-value (lambda (m) (let fnrec7679 ((m m)) (let* ((pairs (jolt-invoke (var-deref "clojure.core" "sort") (let* ((_a$7685 (lambda (k) (let fnrec7680 ((k k)) (let* ((_a$7681 (var-deref "clojure.core" "str")) (_a$7682 (jolt-invoke (var-deref "jolt.backend-scheme" "emit-quoted") k)) (_a$7683 " ") (_a$7684 (jolt-invoke (var-deref "jolt.backend-scheme" "emit-quoted") (jolt-get m k)))) (jolt-invoke _a$7681 _a$7682 _a$7683 _a$7684))))) (_a$7686 (jolt-keys m))) (jolt-map _a$7685 _a$7686))))) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-hash-map " (jolt-invoke (var-deref "clojure.string" "join") " " pairs) ")")))))) emit-quoted-map-value) (let* ((_o$7687 (keyword #f "private")) (_o$7688 #t)) (jolt-hash-map _o$7687 _o$7688))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "emit-quoted" (letrec ((emit-quoted (lambda (form) (let fnrec7689 ((form form)) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-char?") form)) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-const") form) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-literal?") form)) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-const") form) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-sym?") form)) (let* ((m (jolt-invoke (var-deref "jolt.host" "form-sym-meta") form)) (sns (jolt-invoke (var-deref "jolt.host" "form-sym-ns") form)) (nm (jolt-invoke (var-deref "jolt.host" "form-sym-name") form))) (if (jolt-truthy? (let* ((and__25__auto m)) (if (jolt-truthy? and__25__auto) (jolt-pos? (jolt-count m)) and__25__auto))) (let* ((_a$7690 (var-deref "clojure.core" "str")) (_a$7691 "(jolt-symbol/meta ") (_a$7692 (if (jolt-truthy? sns) (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") sns) "#f")) (_a$7693 " ") (_a$7694 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") nm)) (_a$7695 " ") (_a$7696 (emit-quoted m)) (_a$7697 ")")) (jolt-invoke _a$7690 _a$7691 _a$7692 _a$7693 _a$7694 _a$7695 _a$7696 _a$7697)) (let* ((_a$7698 (var-deref "clojure.core" "str")) (_a$7699 "(jolt-symbol ") (_a$7700 (if (jolt-truthy? sns) (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") sns) "#f")) (_a$7701 " ") (_a$7702 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") nm)) (_a$7703 ")")) (jolt-invoke _a$7698 _a$7699 _a$7700 _a$7701 _a$7702 _a$7703)))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-set?") form)) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-hash-set " (jolt-invoke (var-deref "clojure.string" "join") " " (jolt-invoke (var-deref "clojure.core" "sort") (jolt-map emit-quoted (jolt-invoke (var-deref "jolt.host" "form-set-items") form)))) ")") (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-list?") form)) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-list " (jolt-invoke (var-deref "clojure.string" "join") " " (jolt-map emit-quoted (jolt-invoke (var-deref "jolt.host" "form-elements") form))) ")") (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-vec?") form)) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-vector " (jolt-invoke (var-deref "clojure.string" "join") " " (jolt-map emit-quoted (jolt-invoke (var-deref "jolt.host" "form-vec-items") form))) ")") (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-map?") form)) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-quoted-map") (jolt-invoke (var-deref "jolt.host" "form-map-pairs") form)) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-regex?") form)) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-regex " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-invoke (var-deref "jolt.host" "form-regex-source") form)) ")") (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-inst?") form)) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-inst-from-string " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-invoke (var-deref "jolt.host" "form-inst-source") form)) ")") (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-uuid?") form)) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-uuid-from-string " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-invoke (var-deref "jolt.host" "form-uuid-source") form)) ")") (if (jolt-truthy? (jolt-invoke (var-deref "clojure.core" "map?") form)) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-quoted-map-value") form) (if (jolt-truthy? (jolt-invoke (var-deref "clojure.core" "vector?") form)) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-vector " (jolt-invoke (var-deref "clojure.string" "join") " " (jolt-map emit-quoted form)) ")") (if (jolt-truthy? (jolt-invoke (var-deref "clojure.core" "set?") form)) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-hash-set " (jolt-invoke (var-deref "clojure.string" "join") " " (jolt-invoke (var-deref "clojure.core" "sort") (jolt-map emit-quoted form))) ")") (if (jolt-truthy? (jolt-invoke (var-deref "clojure.core" "seq?") form)) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-list " (jolt-invoke (var-deref "clojure.string" "join") " " (jolt-map emit-quoted form)) ")") (if (jolt-truthy? (keyword #f "else")) (jolt-throw (let* ((_a$7704 (jolt-invoke (var-deref "clojure.core" "str") "emit-quoted: unsupported quoted form " (jolt-invoke (var-deref "clojure.core" "pr-str") form))) (_a$7705 (jolt-hash-map))) (jolt-ex-info _a$7704 _a$7705))) jolt-nil))))))))))))))))))) emit-quoted) (let* ((_o$7706 (keyword #f "private")) (_o$7707 #t)) (jolt-hash-map _o$7706 _o$7707))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "jmeta-nonempty?" (letrec ((jmeta-nonempty? (lambda (m) (let fnrec7708 ((m m)) (let* ((and__25__auto (jolt-invoke (var-deref "clojure.core" "map?") m))) (if (jolt-truthy? and__25__auto) (jolt-pos? (jolt-count m)) and__25__auto)))))) jmeta-nonempty?) (let* ((_o$7709 (keyword #f "private")) (_o$7710 #t)) (jolt-hash-map _o$7709 _o$7710))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "emit-def-meta" (letrec ((emit-def-meta (lambda (node) (let fnrec7711 ((node node)) (if (jolt-truthy? (jolt-get node (keyword #f "meta-expr"))) (jolt-invoke (var-deref "jolt.backend-scheme" "emit") (jolt-get node (keyword #f "meta-expr"))) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-quoted") (jolt-get node (keyword #f "meta")))))))) emit-def-meta) (let* ((_o$7712 (keyword #f "private")) (_o$7713 #t)) (jolt-hash-map _o$7712 _o$7713))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "emit-binding" (letrec ((emit-binding (lambda (b) (let fnrec7714 ((b b)) (let* ((_a$7715 (var-deref "clojure.core" "str")) (_a$7716 "(") (_a$7717 (jolt-invoke (var-deref "jolt.backend-scheme" "munge-name") (jolt-nth b 0))) (_a$7718 " ") (_a$7719 (jolt-invoke (var-deref "jolt.backend-scheme" "emit") (jolt-nth b 1))) (_a$7720 ")")) (jolt-invoke _a$7715 _a$7716 _a$7717 _a$7718 _a$7719 _a$7720)))))) emit-binding) (let* ((_o$7721 (keyword #f "private")) (_o$7722 #t)) (jolt-hash-map _o$7721 _o$7722))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "emit-let" (letrec ((emit-let (lambda (node) (let fnrec7723 ((node node)) (let* ((kw (if (jolt-truthy? (jolt-get node (keyword #f "letrec"))) "letrec*" "let*"))) (let* ((_a$7724 (var-deref "clojure.core" "str")) (_a$7725 "(") (_a$7726 kw) (_a$7727 " (") (_a$7728 (jolt-invoke (var-deref "clojure.string" "join") " " (jolt-map (var-deref "jolt.backend-scheme" "emit-binding") (jolt-get node (keyword #f "bindings"))))) (_a$7729 ") ") (_a$7730 (jolt-invoke (var-deref "jolt.backend-scheme" "emit") (jolt-get node (keyword #f "body")))) (_a$7731 ")")) (jolt-invoke _a$7724 _a$7725 _a$7726 _a$7727 _a$7728 _a$7729 _a$7730 _a$7731))))))) emit-let) (let* ((_o$7732 (keyword #f "private")) (_o$7733 #t)) (jolt-hash-map _o$7732 _o$7733))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "emit-loop" (letrec ((emit-loop (lambda (node) (let fnrec7734 ((node node)) (let* ((label (jolt-invoke (var-deref "jolt.backend-scheme" "fresh-label") "loop")) (pairs (jolt-get node (keyword #f "bindings"))) (names (jolt-map (lambda (p__88_) (let fnrec7735 ((p__88_ p__88_)) (jolt-invoke (var-deref "jolt.backend-scheme" "munge-name") (jolt-nth p__88_ 0)))) pairs)) (inits (jolt-map (lambda (p__89_) (let fnrec7736 ((p__89_ p__89_)) (jolt-invoke (var-deref "jolt.backend-scheme" "emit") (jolt-nth p__89_ 1)))) pairs)) (seq-bs (jolt-invoke (var-deref "clojure.string" "join") " " (jolt-map (lambda (n i) (let fnrec7737 ((n n) (i i)) (jolt-invoke (var-deref "clojure.core" "str") "(" n " " i ")"))) names inits))) (rebinds (jolt-invoke (var-deref "clojure.string" "join") " " (jolt-map (lambda (n) (let fnrec7738 ((n n)) (jolt-invoke (var-deref "clojure.core" "str") "(" n " " n ")"))) names))) (body (let* ((frame__20__auto (jolt-invoke (var-deref "clojure.core" "array-map") (jolt-var "jolt.backend-scheme" "*recur-target*") label))) (begin (jolt-invoke (var-deref "clojure.core" "push-thread-bindings") frame__20__auto) (dynamic-wind (lambda () #f) (lambda () (jolt-invoke (var-deref "jolt.backend-scheme" "emit") (jolt-get node (keyword #f "body")))) (lambda () (jolt-invoke (var-deref "clojure.core" "pop-thread-bindings")))))))) (jolt-invoke (var-deref "clojure.core" "str") "(let* (" seq-bs ") (let " label " (" rebinds ") " body "))")))))) emit-loop) (let* ((_o$7739 (keyword #f "private")) (_o$7740 #t)) (jolt-hash-map _o$7739 _o$7740))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "ffi-types" (let* ((_o$7741 "int") (_o$7742 "int") (_o$7743 "uint") (_o$7744 "unsigned-int") (_o$7745 "long") (_o$7746 "long") (_o$7747 "ulong") (_o$7748 "unsigned-long") (_o$7749 "int64") (_o$7750 "integer-64") (_o$7751 "uint64") (_o$7752 "unsigned-64") (_o$7753 "size_t") (_o$7754 "size_t") (_o$7755 "ssize_t") (_o$7756 "ssize_t") (_o$7757 "iptr") (_o$7758 "iptr") (_o$7759 "uptr") (_o$7760 "uptr") (_o$7761 "double") (_o$7762 "double") (_o$7763 "float") (_o$7764 "float") (_o$7765 "pointer") (_o$7766 "void*") (_o$7767 "void*") (_o$7768 "void*") (_o$7769 "string") (_o$7770 "string") (_o$7771 "void") (_o$7772 "void") (_o$7773 "uint8") (_o$7774 "unsigned-8") (_o$7775 "u8") (_o$7776 "unsigned-8") (_o$7777 "byte") (_o$7778 "unsigned-8") (_o$7779 "char") (_o$7780 "char")) (jolt-hash-map _o$7741 _o$7742 _o$7743 _o$7744 _o$7745 _o$7746 _o$7747 _o$7748 _o$7749 _o$7750 _o$7751 _o$7752 _o$7753 _o$7754 _o$7755 _o$7756 _o$7757 _o$7758 _o$7759 _o$7760 _o$7761 _o$7762 _o$7763 _o$7764 _o$7765 _o$7766 _o$7767 _o$7768 _o$7769 _o$7770 _o$7771 _o$7772 _o$7773 _o$7774 _o$7775 _o$7776 _o$7777 _o$7778 _o$7779 _o$7780)) (let* ((_o$7781 (keyword #f "private")) (_o$7782 #t)) (jolt-hash-map _o$7781 _o$7782))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "ffi-type->chez" (letrec ((ffi-type->chez (lambda (t) (let fnrec7783 ((t t)) (let* ((or__26__auto (jolt-invoke (var-deref "jolt.backend-scheme" "ffi-types") t))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt-throw (let* ((_a$7784 (jolt-invoke (var-deref "clojure.core" "str") "jolt.ffi: unknown foreign type :" t)) (_a$7785 (jolt-hash-map))) (jolt-ex-info _a$7784 _a$7785))))))))) ffi-type->chez) (let* ((_o$7786 (keyword #f "private")) (_o$7787 #t)) (jolt-hash-map _o$7786 _o$7787))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "emit-ffi-fn" (letrec ((emit-ffi-fn (lambda (node) (let fnrec7788 ((node node)) (let* ((_a$7789 (var-deref "clojure.core" "str")) (_a$7790 "(foreign-procedure ") (_a$7791 (if (jolt-truthy? (jolt-get node (keyword #f "blocking"))) "__collect_safe " jolt-nil)) (_a$7792 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "csym")))) (_a$7793 " (") (_a$7794 (jolt-invoke (var-deref "clojure.string" "join") " " (jolt-map (var-deref "jolt.backend-scheme" "ffi-type->chez") (jolt-get node (keyword #f "argtypes"))))) (_a$7795 ") ") (_a$7796 (jolt-invoke (var-deref "jolt.backend-scheme" "ffi-type->chez") (jolt-get node (keyword #f "rettype")))) (_a$7797 ")")) (jolt-invoke _a$7789 _a$7790 _a$7791 _a$7792 _a$7793 _a$7794 _a$7795 _a$7796 _a$7797)))))) emit-ffi-fn) (let* ((_o$7798 (keyword #f "private")) (_o$7799 #t)) (jolt-hash-map _o$7798 _o$7799))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "emit-ffi-callable" (letrec ((emit-ffi-callable (lambda (node) (let fnrec7800 ((node node)) (let* ((_a$7801 (var-deref "clojure.core" "str")) (_a$7802 "(jolt-ffi-register-callable! (foreign-callable ") (_a$7803 (if (jolt-truthy? (jolt-get node (keyword #f "collect-safe"))) "__collect_safe " jolt-nil)) (_a$7804 (jolt-invoke (var-deref "jolt.backend-scheme" "emit") (jolt-get node (keyword #f "fn")))) (_a$7805 " (") (_a$7806 (jolt-invoke (var-deref "clojure.string" "join") " " (jolt-map (var-deref "jolt.backend-scheme" "ffi-type->chez") (jolt-get node (keyword #f "argtypes"))))) (_a$7807 ") ") (_a$7808 (jolt-invoke (var-deref "jolt.backend-scheme" "ffi-type->chez") (jolt-get node (keyword #f "rettype")))) (_a$7809 "))")) (jolt-invoke _a$7801 _a$7802 _a$7803 _a$7804 _a$7805 _a$7806 _a$7807 _a$7808 _a$7809)))))) emit-ffi-callable) (let* ((_o$7810 (keyword #f "private")) (_o$7811 #t)) (jolt-hash-map _o$7810 _o$7811))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "emit-recur" (letrec ((emit-recur (lambda (node) (let fnrec7812 ((node node)) (begin (if (jolt-not (var-deref "jolt.backend-scheme" "*recur-target*")) (jolt-throw (jolt-ex-info "emit: recur outside a loop/fn target" (jolt-hash-map))) jolt-nil) (let* ((arg-nodes (jolt-get node (keyword #f "args")))) (let* ((_a$7814 (var-deref "jolt.backend-scheme" "ordered-call")) (_a$7815 arg-nodes) (_a$7816 (jolt-invoke (var-deref "clojure.core" "mapv") (var-deref "jolt.backend-scheme" "emit") arg-nodes)) (_a$7817 (lambda (as) (let fnrec7813 ((as as)) (jolt-invoke (var-deref "clojure.core" "str") "(" (var-deref "jolt.backend-scheme" "*recur-target*") " " (jolt-invoke (var-deref "clojure.string" "join") " " as) ")"))))) (jolt-invoke _a$7814 _a$7815 _a$7816 _a$7817)))))))) emit-recur) (let* ((_o$7818 (keyword #f "private")) (_o$7819 #t)) (jolt-hash-map _o$7818 _o$7819))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "nhint-init" (letrec ((nhint-init (lambda (nh orig munged) (let fnrec7820 ((nh nh) (orig orig) (munged munged)) (let* ((k (jolt-get nh orig))) (if (jolt= k (keyword #f "double")) (jolt-invoke (var-deref "clojure.core" "str") "(exact->inexact " munged ")") (if (jolt= k (keyword #f "long")) (jolt-invoke (var-deref "clojure.core" "str") "(jolt->fx " munged ")") (if (jolt-truthy? (keyword #f "else")) munged jolt-nil)))))))) nhint-init) (let* ((_o$7821 (keyword #f "private")) (_o$7822 #t)) (jolt-hash-map _o$7821 _o$7822))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "emit-arity-clause" (letrec ((emit-arity-clause (lambda (a) (let fnrec7823 ((a a)) (let* ((orig (jolt-get a (keyword #f "params"))) (nh (let* ((_a$7824 (jolt-hash-map)) (_a$7825 (jolt-get a (keyword #f "nhints")))) (jolt-into _a$7824 _a$7825))) (params (jolt-map (var-deref "jolt.backend-scheme" "munge-name") orig)) (restp (let* ((temp__27__auto (jolt-get a (keyword #f "rest")))) (if (jolt-truthy? temp__27__auto) (let* ((r temp__27__auto)) (jolt-invoke (var-deref "jolt.backend-scheme" "munge-name") r)) jolt-nil))) (label (jolt-invoke (var-deref "jolt.backend-scheme" "fresh-label") "fnrec")) (body (let* ((frame__20__auto (jolt-invoke (var-deref "clojure.core" "array-map") (jolt-var "jolt.backend-scheme" "*recur-target*") label))) (begin (jolt-invoke (var-deref "clojure.core" "push-thread-bindings") frame__20__auto) (dynamic-wind (lambda () #f) (lambda () (jolt-invoke (var-deref "jolt.backend-scheme" "emit") (jolt-get a (keyword #f "body")))) (lambda () (jolt-invoke (var-deref "clojure.core" "pop-thread-bindings"))))))) (paramlist (if (jolt-truthy? (let* ((and__25__auto restp)) (if (jolt-truthy? and__25__auto) (jolt-empty? params) and__25__auto))) restp (if (jolt-truthy? restp) (jolt-invoke (var-deref "clojure.core" "str") "(" (jolt-invoke (var-deref "clojure.string" "join") " " params) " . " restp ")") (if (jolt-truthy? (keyword #f "else")) (jolt-invoke (var-deref "clojure.core" "str") "(" (jolt-invoke (var-deref "clojure.string" "join") " " params) ")") jolt-nil)))) (pbind (jolt-map (lambda (o p) (let fnrec7826 ((o o) (p p)) (jolt-invoke (var-deref "clojure.core" "str") "(" p " " (jolt-invoke (var-deref "jolt.backend-scheme" "nhint-init") nh o p) ")"))) orig params)) (binds (if (jolt-truthy? restp) (jolt-concat pbind (jolt-vector (jolt-invoke (var-deref "clojure.core" "str") "(" restp " (list->cseq " restp "))"))) pbind)) (lett (jolt-invoke (var-deref "clojure.core" "str") "(let " label " (" (jolt-invoke (var-deref "clojure.string" "join") " " binds) ") " body ")")) (ret (jolt-get a (keyword #f "ret-nhint")))) (let* ((_o$7827 paramlist) (_o$7828 (if (jolt= ret (keyword #f "double")) (jolt-invoke (var-deref "clojure.core" "str") "(exact->inexact " lett ")") (if (jolt= ret (keyword #f "long")) (jolt-invoke (var-deref "clojure.core" "str") "(jolt->fx " lett ")") (if (jolt-truthy? (keyword #f "else")) lett jolt-nil))))) (jolt-vector _o$7827 _o$7828))))))) emit-arity-clause) (let* ((_o$7829 (keyword #f "private")) (_o$7830 #t)) (jolt-hash-map _o$7829 _o$7830))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "emit-fn" (letrec ((emit-fn (lambda (node) (let fnrec7831 ((node node)) (let* ((arities (jolt-get node (keyword #f "arities"))) (self (let* ((temp__27__auto (jolt-get node (keyword #f "name")))) (if (jolt-truthy? temp__27__auto) (let* ((nm temp__27__auto)) (jolt-invoke (var-deref "jolt.backend-scheme" "munge-name") nm)) jolt-nil))) (clauses (let* ((frame__20__auto (jolt-invoke (var-deref "clojure.core" "array-map") (jolt-var "jolt.backend-scheme" "*known-procs*") (if (jolt-truthy? self) (jolt-conj (var-deref "jolt.backend-scheme" "*known-procs*") self) (var-deref "jolt.backend-scheme" "*known-procs*"))))) (begin (jolt-invoke (var-deref "clojure.core" "push-thread-bindings") frame__20__auto) (dynamic-wind (lambda () #f) (lambda () (jolt-invoke (var-deref "clojure.core" "mapv") (var-deref "jolt.backend-scheme" "emit-arity-clause") arities)) (lambda () (jolt-invoke (var-deref "clojure.core" "pop-thread-bindings"))))))) (_lambda (if (jolt= 1 (jolt-count clauses)) (let* ((c (jolt-first clauses))) (let* ((_a$7832 (var-deref "clojure.core" "str")) (_a$7833 "(lambda ") (_a$7834 (jolt-nth c 0)) (_a$7835 " ") (_a$7836 (jolt-nth c 1)) (_a$7837 ")")) (jolt-invoke _a$7832 _a$7833 _a$7834 _a$7835 _a$7836 _a$7837))) (jolt-invoke (var-deref "clojure.core" "str") "(case-lambda " (jolt-invoke (var-deref "clojure.string" "join") " " (jolt-map (lambda (c) (let fnrec7838 ((c c)) (let* ((_a$7839 (var-deref "clojure.core" "str")) (_a$7840 "(") (_a$7841 (jolt-nth c 0)) (_a$7842 " ") (_a$7843 (jolt-nth c 1)) (_a$7844 ")")) (jolt-invoke _a$7839 _a$7840 _a$7841 _a$7842 _a$7843 _a$7844)))) clauses)) ")")))) (let* ((temp__16__auto (jolt-get node (keyword #f "name")))) (if (jolt-truthy? temp__16__auto) (let* ((nm temp__16__auto)) (let* ((m (jolt-invoke (var-deref "jolt.backend-scheme" "munge-name") nm))) (jolt-invoke (var-deref "clojure.core" "str") "(letrec ((" m " " _lambda ")) " m ")"))) _lambda))))))) emit-fn) (let* ((_o$7845 (keyword #f "private")) (_o$7846 #t)) (jolt-hash-map _o$7845 _o$7846))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "native-op" (letrec ((native-op (lambda (fnode nargs) (let fnrec7847 ((fnode fnode) (nargs nargs)) (let* ((nm (let* ((G__140 (jolt-get fnode (keyword #f "op")))) (if (jolt= G__140 (keyword #f "var")) (if (jolt= "clojure.core" (jolt-get fnode (keyword #f "ns"))) (jolt-get fnode (keyword #f "name")) jolt-nil) (if (jolt= G__140 (keyword #f "host")) (jolt-get fnode (keyword #f "name")) jolt-nil)))) (op (if (jolt-truthy? nm) (jolt-invoke (var-deref "jolt.backend-scheme" "native-ops") nm) jolt-nil)) (arity-ok (if (jolt-truthy? nm) (jolt-invoke (var-deref "jolt.backend-scheme" "op-arity") nm) jolt-nil))) (if (jolt-nil? op) jolt-nil (if (jolt-truthy? (let* ((and__25__auto arity-ok)) (if (jolt-truthy? and__25__auto) (jolt-not (jolt-invoke arity-ok nargs)) and__25__auto))) jolt-nil (if (jolt-truthy? (keyword #f "else")) op jolt-nil)))))))) native-op) (let* ((_o$7848 (keyword #f "private")) (_o$7849 #t)) (jolt-hash-map _o$7848 _o$7849))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "ifn-kind" (letrec ((ifn-kind (lambda (fnode) (let fnrec7850 ((fnode fnode)) (let* ((G__141 (jolt-get fnode (keyword #f "op")))) (if (jolt= G__141 (keyword #f "const")) (if (jolt-truthy? (jolt-invoke (var-deref "clojure.core" "keyword?") (jolt-get fnode (keyword #f "val")))) (keyword #f "keyword") jolt-nil) (if (let* ((or__26__auto (jolt= G__141 (keyword #f "map")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt= G__141 (keyword #f "set")))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt= G__141 (keyword #f "vector")))))) (keyword #f "coll") jolt-nil))))))) ifn-kind) (let* ((_o$7851 (keyword #f "private")) (_o$7852 #t)) (jolt-hash-map _o$7851 _o$7852))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "stdlib-var?" (letrec ((stdlib-var? (lambda (n) (let fnrec7853 ((n n)) (let* ((and__25__auto (jolt= (keyword #f "var") (jolt-get n (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "clojure.string" "starts-with?") (let* ((or__26__auto (jolt-get n (keyword #f "ns")))) (if (jolt-truthy? or__26__auto) or__26__auto "")) "clojure.") and__25__auto)))))) stdlib-var?) (let* ((_o$7854 (keyword #f "private")) (_o$7855 #t)) (jolt-hash-map _o$7854 _o$7855))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "emit-numeric" (letrec ((emit-numeric (lambda (kind nm args order-args) (let fnrec7856 ((kind kind) (nm nm) (args args) (order-args order-args)) (if (let* ((and__25__auto (jolt= kind (keyword #f "double")))) (if (jolt-truthy? and__25__auto) (jolt= nm "inc") and__25__auto)) (jolt-invoke (var-deref "clojure.core" "str") "(fl+ " (jolt-first args) " 1.0)") (if (let* ((and__25__auto (jolt= kind (keyword #f "double")))) (if (jolt-truthy? and__25__auto) (jolt= nm "dec") and__25__auto)) (jolt-invoke (var-deref "clojure.core" "str") "(fl- " (jolt-first args) " 1.0)") (if (let* ((and__25__auto (jolt= kind (keyword #f "long")))) (if (jolt-truthy? and__25__auto) (jolt= nm "inc") and__25__auto)) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-l-inc " (jolt-first args) ")") (if (let* ((and__25__auto (jolt= kind (keyword #f "long")))) (if (jolt-truthy? and__25__auto) (jolt= nm "dec") and__25__auto)) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-l-dec " (jolt-first args) ")") (if (let* ((and__25__auto (jolt= kind (keyword #f "long")))) (if (jolt-truthy? and__25__auto) (jolt= nm "unchecked-inc") and__25__auto)) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-uncinc " (jolt-first args) ")") (if (let* ((and__25__auto (jolt= kind (keyword #f "long")))) (if (jolt-truthy? and__25__auto) (jolt= nm "unchecked-dec") and__25__auto)) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-uncdec " (jolt-first args) ")") (if (jolt-truthy? (keyword #f "else")) (let* ((op (let* ((G__142 kind)) (if (jolt= G__142 (keyword #f "double")) (jolt-invoke (var-deref "jolt.backend-scheme" "dbl-ops") nm) (if (jolt= G__142 (keyword #f "long")) (jolt-invoke (var-deref "jolt.backend-scheme" "lng-ops") nm) (if (jolt= G__142 (keyword #f "bigdec")) (jolt-invoke (var-deref "jolt.backend-scheme" "bd-ops") nm) (jolt-throw (let* ((_a$7857 (jolt-invoke (var-deref "clojure.core" "str") "No matching clause: " G__142)) (_a$7858 (jolt-hash-map))) (jolt-ex-info _a$7857 _a$7858))))))))) (jolt-invoke order-args (lambda (as) (let fnrec7859 ((as as)) (jolt-invoke (var-deref "clojure.core" "str") "(" op " " (jolt-invoke (var-deref "clojure.string" "join") " " as) ")"))))) jolt-nil))))))))))) emit-numeric) (let* ((_o$7860 (keyword #f "private")) (_o$7861 #t)) (jolt-hash-map _o$7860 _o$7861))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "struct-field-index" (letrec ((struct-field-index (lambda (shape kw) (let fnrec7862 ((shape shape) (kw kw)) (if (jolt-truthy? shape) (let* ((i 0)) (let loop7863 ((i i)) (if (>= i (jolt-count shape)) jolt-nil (if (jolt= (jolt-nth shape i) kw) i (if (jolt-truthy? (keyword #f "else")) (loop7863 (jolt-inc i)) jolt-nil))))) jolt-nil))))) struct-field-index) (let* ((_o$7864 (keyword #f "private")) (_o$7865 #t)) (jolt-hash-map _o$7864 _o$7865))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "emit-invoke" (letrec ((emit-invoke (lambda (node) (let fnrec7866 ((node node)) (let* ((fnode (jolt-get node (keyword #f "fn"))) (arg-nodes (jolt-get node (keyword #f "args"))) (args (jolt-invoke (var-deref "clojure.core" "mapv") (var-deref "jolt.backend-scheme" "emit") arg-nodes)) (nop (jolt-invoke (var-deref "jolt.backend-scheme" "native-op") fnode (jolt-count args))) (kind (jolt-invoke (var-deref "jolt.backend-scheme" "ifn-kind") fnode)) (order-args (lambda (build) (let fnrec7867 ((build build)) (jolt-invoke (var-deref "jolt.backend-scheme" "ordered-call") arg-nodes args build)))) (defstr (lambda (as) (let fnrec7868 ((as as)) (if (> (jolt-count as) 1) (jolt-invoke (var-deref "clojure.core" "str") " " (jolt-nth as 1)) "")))) (invoke (lambda () (let fnrec7869 () (let* ((_a$7871 (var-deref "jolt.backend-scheme" "ordered-call")) (_a$7872 (jolt-cons fnode arg-nodes)) (_a$7873 (jolt-cons (jolt-invoke (var-deref "jolt.backend-scheme" "emit") fnode) args)) (_a$7874 (lambda (G__143) (let fnrec7870 ((G__143 G__143)) (let* ((G__144 G__143) (f (jolt-nth G__144 0 jolt-nil)) (as (jolt-invoke (var-deref "clojure.core" "nthnext") G__144 1))) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-invoke " f (if (jolt-truthy? (jolt-seq as)) (jolt-invoke (var-deref "clojure.core" "str") " " (jolt-invoke (var-deref "clojure.string" "join") " " as)) "") ")")))))) (jolt-invoke _a$7871 _a$7872 _a$7873 _a$7874)))))) (if (jolt-truthy? (jolt-get node (keyword #f "devirt-type"))) (jolt-invoke order-args (lambda (as) (let fnrec7875 ((as as)) (let* ((r (jolt-invoke (var-deref "jolt.backend-scheme" "fresh-label") "_r$")) (dv (let* ((_a$7876 (var-deref "clojure.core" "str")) (_a$7877 "(devirt-resolve ") (_a$7878 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "devirt-type")))) (_a$7879 " ") (_a$7880 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "devirt-proto")))) (_a$7881 " ") (_a$7882 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "devirt-method")))) (_a$7883 " ") (_a$7884 r) (_a$7885 ")")) (jolt-invoke _a$7876 _a$7877 _a$7878 _a$7879 _a$7880 _a$7881 _a$7882 _a$7883 _a$7884 _a$7885))) (cells (jolt-invoke (var-deref "clojure.core" "deref") (var-deref "jolt.backend-scheme" "devirt-cells"))) (resolver (if (jolt-truthy? cells) (let* ((c (jolt-invoke (var-deref "jolt.backend-scheme" "fresh-label") "_dvc$"))) (begin (jolt-invoke (var-deref "clojure.core" "swap!") cells jolt-conj c) (jolt-invoke (var-deref "clojure.core" "str") "(or " c " (let ((_f " dv ")) (set! " c " _f) _f))"))) dv))) (let* ((_a$7886 (var-deref "clojure.core" "str")) (_a$7887 "(let* ((") (_a$7888 r) (_a$7889 " ") (_a$7890 (jolt-first as)) (_a$7891 ")) (") (_a$7892 resolver) (_a$7893 " ") (_a$7894 (jolt-invoke (var-deref "clojure.string" "join") " " (jolt-cons r (jolt-rest as)))) (_a$7895 "))")) (jolt-invoke _a$7886 _a$7887 _a$7888 _a$7889 _a$7890 _a$7891 _a$7892 _a$7893 _a$7894 _a$7895)))))) (if (jolt-truthy? (jolt-get node (keyword #f "num-kind"))) (let* ((_a$7896 (var-deref "jolt.backend-scheme" "emit-numeric")) (_a$7897 (jolt-get node (keyword #f "num-kind"))) (_a$7898 (jolt-get fnode (keyword #f "name"))) (_a$7899 args) (_a$7900 order-args)) (jolt-invoke _a$7896 _a$7897 _a$7898 _a$7899 _a$7900)) (if (jolt-truthy? (let* ((and__25__auto nop)) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-empty? args))) (if (jolt-truthy? and__25__auto) (jolt= nop "+") and__25__auto)) and__25__auto))) "0" (if (jolt-truthy? (let* ((and__25__auto nop)) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-empty? args))) (if (jolt-truthy? and__25__auto) (jolt= nop "*") and__25__auto)) and__25__auto))) "1" (if (jolt-truthy? (let* ((and__25__auto nop)) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= 1 (jolt-count args)))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.backend-scheme" "cmp1-ops") nop) and__25__auto)) and__25__auto))) (jolt-invoke (var-deref "clojure.core" "str") "(begin " (jolt-first args) " #t)") (if (jolt-truthy? nop) (jolt-invoke order-args (lambda (as) (let fnrec7901 ((as as)) (jolt-invoke (var-deref "clojure.core" "str") "(" nop " " (jolt-invoke (var-deref "clojure.string" "join") " " as) ")")))) (if (jolt= kind (keyword #f "keyword")) (let* ((recv (jolt-first arg-nodes)) (idx (if (let* ((and__25__auto (jolt= (keyword #f "struct") (jolt-get recv (keyword #f "hint"))))) (if (jolt-truthy? and__25__auto) (jolt= 1 (jolt-count arg-nodes)) and__25__auto)) (let* ((_a$7902 (var-deref "jolt.backend-scheme" "struct-field-index")) (_a$7903 (jolt-get recv (keyword #f "shape"))) (_a$7904 (jolt-get fnode (keyword #f "val")))) (jolt-invoke _a$7902 _a$7903 _a$7904)) jolt-nil))) (if (jolt-truthy? idx) (jolt-invoke order-args (lambda (as) (let fnrec7905 ((as as)) (let* ((_a$7906 (var-deref "clojure.core" "str")) (_a$7907 "(jrec-field-at ") (_a$7908 (jolt-first as)) (_a$7909 " ") (_a$7910 idx) (_a$7911 " ") (_a$7912 (jolt-invoke (var-deref "jolt.backend-scheme" "emit") fnode)) (_a$7913 ")")) (jolt-invoke _a$7906 _a$7907 _a$7908 _a$7909 _a$7910 _a$7911 _a$7912 _a$7913))))) (jolt-invoke order-args (lambda (as) (let fnrec7914 ((as as)) (let* ((_a$7915 (var-deref "clojure.core" "str")) (_a$7916 "(jolt-get ") (_a$7917 (jolt-first as)) (_a$7918 " ") (_a$7919 (jolt-invoke (var-deref "jolt.backend-scheme" "emit") fnode)) (_a$7920 (jolt-invoke defstr as)) (_a$7921 ")")) (jolt-invoke _a$7915 _a$7916 _a$7917 _a$7918 _a$7919 _a$7920 _a$7921))))))) (if (jolt= kind (keyword #f "coll")) (let* ((_a$7923 (var-deref "jolt.backend-scheme" "ordered-call")) (_a$7924 (jolt-cons fnode arg-nodes)) (_a$7925 (jolt-cons (jolt-invoke (var-deref "jolt.backend-scheme" "emit") fnode) args)) (_a$7926 (lambda (G__145) (let fnrec7922 ((G__145 G__145)) (let* ((G__146 G__145) (c (jolt-nth G__146 0 jolt-nil)) (as (jolt-invoke (var-deref "clojure.core" "nthnext") G__146 1))) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-get " c " " (jolt-invoke (var-deref "clojure.string" "join") " " as) ")")))))) (jolt-invoke _a$7923 _a$7924 _a$7925 _a$7926)) (if (jolt-truthy? (let* ((and__25__auto (jolt-invoke (var-deref "jolt.backend-scheme" "stdlib-var?") fnode))) (if (jolt-truthy? and__25__auto) (jolt-not (jolt-invoke (var-deref "clojure.core" "deref") (var-deref "jolt.backend-scheme" "prelude-mode?"))) and__25__auto))) (jolt-throw (let* ((_a$7933 (let* ((_a$7927 (var-deref "clojure.core" "str")) (_a$7928 "emit: unsupported stdlib fn `") (_a$7929 (jolt-get fnode (keyword #f "ns"))) (_a$7930 "/") (_a$7931 (jolt-get fnode (keyword #f "name"))) (_a$7932 "` (no core on Chez yet)")) (jolt-invoke _a$7927 _a$7928 _a$7929 _a$7930 _a$7931 _a$7932))) (_a$7934 (jolt-hash-map))) (jolt-ex-info _a$7933 _a$7934))) (if (jolt= (keyword #f "host-static") (jolt-get fnode (keyword #f "op"))) (jolt-invoke order-args (lambda (as) (let fnrec7935 ((as as)) (let* ((_a$7936 (var-deref "clojure.core" "str")) (_a$7937 "(host-static-call ") (_a$7938 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get fnode (keyword #f "class")))) (_a$7939 " ") (_a$7940 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get fnode (keyword #f "member")))) (_a$7941 (if (jolt-empty? as) "" (jolt-invoke (var-deref "clojure.core" "str") " " (jolt-invoke (var-deref "clojure.string" "join") " " as)))) (_a$7942 ")")) (jolt-invoke _a$7936 _a$7937 _a$7938 _a$7939 _a$7940 _a$7941 _a$7942))))) (if (jolt= (keyword #f "host") (jolt-get fnode (keyword #f "op"))) (jolt-throw (let* ((_a$7943 (jolt-invoke (var-deref "clojure.core" "str") "emit: unsupported host call `" (jolt-get fnode (keyword #f "name")) "`")) (_a$7944 (jolt-hash-map))) (jolt-ex-info _a$7943 _a$7944))) (if (jolt= (keyword #f "local") (jolt-get fnode (keyword #f "op"))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.backend-scheme" "*known-procs*") (jolt-invoke (var-deref "jolt.backend-scheme" "munge-name") (jolt-get fnode (keyword #f "name"))))) (jolt-invoke order-args (lambda (as) (let fnrec7945 ((as as)) (let* ((_a$7946 (var-deref "clojure.core" "str")) (_a$7947 "(") (_a$7948 (jolt-invoke (var-deref "jolt.backend-scheme" "munge-name") (jolt-get fnode (keyword #f "name")))) (_a$7949 (if (jolt-truthy? (jolt-seq as)) (jolt-invoke (var-deref "clojure.core" "str") " " (jolt-invoke (var-deref "clojure.string" "join") " " as)) "")) (_a$7950 ")")) (jolt-invoke _a$7946 _a$7947 _a$7948 _a$7949 _a$7950))))) (jolt-invoke invoke)) (if (jolt-truthy? (let* ((and__25__auto (jolt= (keyword #f "var") (jolt-get fnode (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (let* ((_a$7951 (var-deref "jolt.backend-scheme" "direct-linkable?")) (_a$7952 (jolt-get fnode (keyword #f "ns"))) (_a$7953 (jolt-get fnode (keyword #f "name")))) (jolt-invoke _a$7951 _a$7952 _a$7953)))) (if (jolt-truthy? and__25__auto) (let* ((_a$7954 (var-deref "jolt.backend-scheme" "direct-link-fn?")) (_a$7955 (jolt-get fnode (keyword #f "ns"))) (_a$7956 (jolt-get fnode (keyword #f "name")))) (jolt-invoke _a$7954 _a$7955 _a$7956)) and__25__auto)) and__25__auto))) (jolt-invoke order-args (lambda (as) (let fnrec7957 ((as as)) (let* ((_a$7961 (var-deref "clojure.core" "str")) (_a$7962 "(") (_a$7963 (let* ((_a$7958 (var-deref "jolt.backend-scheme" "dl-name")) (_a$7959 (jolt-get fnode (keyword #f "ns"))) (_a$7960 (jolt-get fnode (keyword #f "name")))) (jolt-invoke _a$7958 _a$7959 _a$7960))) (_a$7964 (if (jolt-truthy? (jolt-seq as)) (jolt-invoke (var-deref "clojure.core" "str") " " (jolt-invoke (var-deref "clojure.string" "join") " " as)) "")) (_a$7965 ")")) (jolt-invoke _a$7961 _a$7962 _a$7963 _a$7964 _a$7965))))) (if (jolt= (keyword #f "var") (jolt-get fnode (keyword #f "op"))) (jolt-invoke invoke) (if (jolt-truthy? (keyword #f "else")) (jolt-invoke invoke) jolt-nil)))))))))))))))))))) emit-invoke) (let* ((_o$7966 (keyword #f "private")) (_o$7967 #t)) (jolt-hash-map _o$7966 _o$7967))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "emit-try" (letrec ((emit-try (lambda (node) (let fnrec7968 ((node node)) (let* ((core (let* ((temp__16__auto (jolt-get node (keyword #f "catch-sym")))) (if (jolt-truthy? temp__16__auto) (let* ((cs temp__16__auto)) (let* ((_a$7969 (var-deref "clojure.core" "str")) (_a$7970 "(guard (") (_a$7971 (jolt-invoke (var-deref "jolt.backend-scheme" "munge-name") cs)) (_a$7972 " (else ") (_a$7973 (jolt-invoke (var-deref "jolt.backend-scheme" "emit") (jolt-get node (keyword #f "catch-body")))) (_a$7974 ")) ") (_a$7975 (jolt-invoke (var-deref "jolt.backend-scheme" "emit") (jolt-get node (keyword #f "body")))) (_a$7976 ")")) (jolt-invoke _a$7969 _a$7970 _a$7971 _a$7972 _a$7973 _a$7974 _a$7975 _a$7976))) (jolt-invoke (var-deref "jolt.backend-scheme" "emit") (jolt-get node (keyword #f "body"))))))) (let* ((temp__16__auto (jolt-get node (keyword #f "finally")))) (if (jolt-truthy? temp__16__auto) (let* ((fin temp__16__auto)) (jolt-invoke (var-deref "clojure.core" "str") "(dynamic-wind (lambda () #f) (lambda () " core ") (lambda () " (jolt-invoke (var-deref "jolt.backend-scheme" "emit") fin) "))")) core))))))) emit-try) (let* ((_o$7977 (keyword #f "private")) (_o$7978 #t)) (jolt-hash-map _o$7977 _o$7978))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "returns-scheme-bool?" (letrec ((returns-scheme-bool? (case-lambda ((node) (let fnrec7979 ((node node)) (returns-scheme-bool? node (jolt-hash-set)))) ((node bools) (let fnrec7980 ((node node) (bools bools)) (if (jolt-truthy? (let* ((and__25__auto (jolt= (keyword #f "const") (jolt-get node (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "clojure.core" "boolean?") (jolt-get node (keyword #f "val"))) and__25__auto))) #t (if (jolt= (keyword #f "invoke") (jolt-get node (keyword #f "op"))) (let* ((nop (let* ((_a$7981 (var-deref "jolt.backend-scheme" "native-op")) (_a$7982 (jolt-get node (keyword #f "fn"))) (_a$7983 (jolt-count (jolt-get node (keyword #f "args"))))) (jolt-invoke _a$7981 _a$7982 _a$7983)))) (jolt-invoke (var-deref "clojure.core" "boolean") (let* ((and__25__auto nop)) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.backend-scheme" "bool-returning-ops") nop) and__25__auto)))) (if (jolt= (keyword #f "local") (jolt-get node (keyword #f "op"))) (jolt-contains? bools (jolt-get node (keyword #f "name"))) (if (jolt= (keyword #f "if") (jolt-get node (keyword #f "op"))) (let* ((and__25__auto (returns-scheme-bool? (jolt-get node (keyword #f "then")) bools))) (if (jolt-truthy? and__25__auto) (returns-scheme-bool? (jolt-get node (keyword #f "else")) bools) and__25__auto)) (if (jolt= (keyword #f "let") (jolt-get node (keyword #f "op"))) (let* ((bools_PRIME_ (let* ((_a$7985 (lambda (s b) (let fnrec7984 ((s s) (b b)) (if (jolt-truthy? (returns-scheme-bool? (jolt-nth b 1) s)) (jolt-conj s (jolt-nth b 0)) (jolt-invoke (var-deref "clojure.core" "disj") s (jolt-nth b 0)))))) (_a$7986 bools) (_a$7987 (jolt-get node (keyword #f "bindings")))) (jolt-reduce _a$7985 _a$7986 _a$7987)))) (returns-scheme-bool? (jolt-get node (keyword #f "body")) bools_PRIME_)) (if (jolt-truthy? (keyword #f "else")) #f jolt-nil))))))))))) returns-scheme-bool?) (let* ((_o$7988 (keyword #f "private")) (_o$7989 #t)) (jolt-hash-map _o$7988 _o$7989))))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "emit" (letrec ((emit (lambda (node) (let fnrec7990 ((node node)) (let* ((G__147 (jolt-get node (keyword #f "op")))) (if (jolt= G__147 (keyword #f "const")) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-const") (jolt-get node (keyword #f "val"))) (if (jolt= G__147 (keyword #f "local")) (jolt-invoke (var-deref "jolt.backend-scheme" "munge-name") (jolt-get node (keyword #f "name"))) (if (jolt= G__147 (keyword #f "var")) (let* ((core-proc (let* ((and__25__auto (jolt= "clojure.core" (jolt-get node (keyword #f "ns"))))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.backend-scheme" "core-value-procs") (jolt-get node (keyword #f "name"))) and__25__auto)))) (if (jolt-truthy? core-proc) core-proc (if (jolt-truthy? (let* ((_a$7991 (var-deref "jolt.backend-scheme" "direct-linkable?")) (_a$7992 (jolt-get node (keyword #f "ns"))) (_a$7993 (jolt-get node (keyword #f "name")))) (jolt-invoke _a$7991 _a$7992 _a$7993))) (let* ((_a$7994 (var-deref "jolt.backend-scheme" "dl-name")) (_a$7995 (jolt-get node (keyword #f "ns"))) (_a$7996 (jolt-get node (keyword #f "name")))) (jolt-invoke _a$7994 _a$7995 _a$7996)) (if (jolt-truthy? (let* ((and__25__auto (jolt-invoke (var-deref "jolt.backend-scheme" "stdlib-var?") node))) (if (jolt-truthy? and__25__auto) (jolt-not (jolt-invoke (var-deref "clojure.core" "deref") (var-deref "jolt.backend-scheme" "prelude-mode?"))) and__25__auto))) (jolt-throw (let* ((_a$8003 (let* ((_a$7997 (var-deref "clojure.core" "str")) (_a$7998 "emit: unsupported stdlib ref `") (_a$7999 (jolt-get node (keyword #f "ns"))) (_a$8000 "/") (_a$8001 (jolt-get node (keyword #f "name"))) (_a$8002 "` (no core on Chez yet)")) (jolt-invoke _a$7997 _a$7998 _a$7999 _a$8000 _a$8001 _a$8002))) (_a$8004 (jolt-hash-map))) (jolt-ex-info _a$8003 _a$8004))) (if (jolt-truthy? (keyword #f "else")) (let* ((_a$8005 (var-deref "clojure.core" "str")) (_a$8006 "(var-deref ") (_a$8007 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "ns")))) (_a$8008 " ") (_a$8009 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "name")))) (_a$8010 ")")) (jolt-invoke _a$8005 _a$8006 _a$8007 _a$8008 _a$8009 _a$8010)) jolt-nil))))) (if (jolt= G__147 (keyword #f "the-var")) (let* ((_a$8011 (var-deref "clojure.core" "str")) (_a$8012 "(jolt-var ") (_a$8013 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "ns")))) (_a$8014 " ") (_a$8015 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "name")))) (_a$8016 ")")) (jolt-invoke _a$8011 _a$8012 _a$8013 _a$8014 _a$8015 _a$8016)) (if (jolt= G__147 (keyword #f "set-var")) (let* ((_a$8017 (var-deref "clojure.core" "str")) (_a$8018 "(jolt-var-set ") (_a$8019 (emit (jolt-get node (keyword #f "the-var")))) (_a$8020 " ") (_a$8021 (emit (jolt-get node (keyword #f "val")))) (_a$8022 ")")) (jolt-invoke _a$8017 _a$8018 _a$8019 _a$8020 _a$8021 _a$8022)) (if (jolt= G__147 (keyword #f "set-field")) (let* ((_a$8023 (var-deref "clojure.core" "str")) (_a$8024 "(jolt-set-field! ") (_a$8025 (emit (jolt-get node (keyword #f "obj")))) (_a$8026 " (keyword #f ") (_a$8027 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "field")))) (_a$8028 ") ") (_a$8029 (emit (jolt-get node (keyword #f "val")))) (_a$8030 ")")) (jolt-invoke _a$8023 _a$8024 _a$8025 _a$8026 _a$8027 _a$8028 _a$8029 _a$8030)) (if (jolt= G__147 (keyword #f "defmacro")) (let* ((_a$8031 (var-deref "clojure.core" "str")) (_a$8032 "(begin (def-var! ") (_a$8033 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "ns")))) (_a$8034 " ") (_a$8035 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "name")))) (_a$8036 " ") (_a$8037 (emit (jolt-get node (keyword #f "fn")))) (_a$8038 ") (mark-macro! ") (_a$8039 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "ns")))) (_a$8040 " ") (_a$8041 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "name")))) (_a$8042 ") jolt-nil)")) (jolt-invoke _a$8031 _a$8032 _a$8033 _a$8034 _a$8035 _a$8036 _a$8037 _a$8038 _a$8039 _a$8040 _a$8041 _a$8042)) (if (jolt= G__147 (keyword #f "host")) (jolt-throw (let* ((_a$8043 (jolt-invoke (var-deref "clojure.core" "str") "emit: unsupported host ref `" (jolt-get node (keyword #f "name")) "`")) (_a$8044 (jolt-hash-map))) (jolt-ex-info _a$8043 _a$8044))) (if (jolt= G__147 (keyword #f "host-static")) (let* ((_a$8045 (var-deref "clojure.core" "str")) (_a$8046 "(host-static-ref ") (_a$8047 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "class")))) (_a$8048 " ") (_a$8049 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "member")))) (_a$8050 ")")) (jolt-invoke _a$8045 _a$8046 _a$8047 _a$8048 _a$8049 _a$8050)) (if (jolt= G__147 (keyword #f "host-new")) (let* ((_a$8051 (var-deref "clojure.core" "str")) (_a$8052 "(host-new ") (_a$8053 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "class")))) (_a$8054 (let* ((args (jolt-map emit (jolt-get node (keyword #f "args"))))) (if (jolt-empty? args) "" (jolt-invoke (var-deref "clojure.core" "str") " " (jolt-invoke (var-deref "clojure.string" "join") " " args))))) (_a$8055 ")")) (jolt-invoke _a$8051 _a$8052 _a$8053 _a$8054 _a$8055)) (if (jolt= G__147 (keyword #f "if")) (let* ((test (jolt-get node (keyword #f "test"))) (t (if (jolt-truthy? (jolt-invoke (var-deref "jolt.backend-scheme" "returns-scheme-bool?") test)) (emit test) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-truthy? " (emit test) ")")))) (let* ((_a$8056 (var-deref "clojure.core" "str")) (_a$8057 "(if ") (_a$8058 t) (_a$8059 " ") (_a$8060 (emit (jolt-get node (keyword #f "then")))) (_a$8061 " ") (_a$8062 (emit (jolt-get node (keyword #f "else")))) (_a$8063 ")")) (jolt-invoke _a$8056 _a$8057 _a$8058 _a$8059 _a$8060 _a$8061 _a$8062 _a$8063))) (if (jolt= G__147 (keyword #f "do")) (let* ((_a$8064 (var-deref "clojure.core" "str")) (_a$8065 "(begin ") (_a$8066 (jolt-invoke (var-deref "clojure.string" "join") " " (jolt-map emit (jolt-get node (keyword #f "statements"))))) (_a$8067 (if (jolt-empty? (jolt-get node (keyword #f "statements"))) "" " ")) (_a$8068 (emit (jolt-get node (keyword #f "ret")))) (_a$8069 ")")) (jolt-invoke _a$8064 _a$8065 _a$8066 _a$8067 _a$8068 _a$8069)) (if (jolt= G__147 (keyword #f "invoke")) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-invoke") node) (if (jolt= G__147 (keyword #f "vector")) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-ordered") "jolt-vector" (jolt-map emit (jolt-get node (keyword #f "items")))) (if (jolt= G__147 (keyword #f "set")) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-ordered") "jolt-hash-set" (jolt-map emit (jolt-get node (keyword #f "items")))) (if (jolt= G__147 (keyword #f "map")) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-ordered") "jolt-hash-map" (let* ((_a$8073 (var-deref "clojure.core" "mapcat")) (_a$8074 (lambda (p) (let fnrec8070 ((p p)) (let* ((_o$8071 (emit (jolt-nth p 0))) (_o$8072 (emit (jolt-nth p 1)))) (jolt-vector _o$8071 _o$8072))))) (_a$8075 (jolt-get node (keyword #f "pairs")))) (jolt-invoke _a$8073 _a$8074 _a$8075))) (if (jolt= G__147 (keyword #f "quote")) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-quoted") (jolt-get node (keyword #f "form"))) (if (jolt= G__147 (keyword #f "throw")) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-throw " (emit (jolt-get node (keyword #f "expr"))) ")") (if (jolt= G__147 (keyword #f "coerce")) (let* ((e (emit (jolt-get node (keyword #f "expr"))))) (if (jolt= (keyword #f "double") (jolt-get node (keyword #f "kind"))) (jolt-invoke (var-deref "clojure.core" "str") "(exact->inexact " e ")") (if (jolt= (keyword #f "long") (jolt-get node (keyword #f "kind"))) (jolt-invoke (var-deref "clojure.core" "str") "(jolt->fx " e ")") (if (jolt-truthy? (keyword #f "else")) e jolt-nil)))) (if (jolt= G__147 (keyword #f "try")) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-try") node) (if (jolt= G__147 (keyword #f "regex")) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-regex " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "source"))) ")") (if (jolt= G__147 (keyword #f "inst")) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-inst-from-string " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "source"))) ")") (if (jolt= G__147 (keyword #f "uuid")) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-uuid-from-string " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "source"))) ")") (if (jolt= G__147 (keyword #f "bigdec")) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-bigdec-from-string " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "source"))) ")") (if (jolt= G__147 (keyword #f "the-ns")) (jolt-invoke (var-deref "clojure.core" "str") "(intern-ns! " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "name"))) ")") (if (jolt= G__147 (keyword #f "host-call")) (let* ((m (jolt-get node (keyword #f "method"))) (target (emit (jolt-get node (keyword #f "target")))) (args (jolt-map emit (jolt-get node (keyword #f "args"))))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.backend-scheme" "supported-host-methods") m)) (let* ((_a$8076 (var-deref "clojure.core" "str")) (_a$8077 "(jolt-host-call ") (_a$8078 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") m)) (_a$8079 " ") (_a$8080 target) (_a$8081 (if (jolt-empty? args) "" (jolt-invoke (var-deref "clojure.core" "str") " " (jolt-invoke (var-deref "clojure.string" "join") " " args)))) (_a$8082 ")")) (jolt-invoke _a$8076 _a$8077 _a$8078 _a$8079 _a$8080 _a$8081 _a$8082)) (let* ((_a$8083 (var-deref "clojure.core" "str")) (_a$8084 "(record-method-dispatch ") (_a$8085 target) (_a$8086 " ") (_a$8087 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") m)) (_a$8088 " (jolt-vector") (_a$8089 (if (jolt-empty? args) "" (jolt-invoke (var-deref "clojure.core" "str") " " (jolt-invoke (var-deref "clojure.string" "join") " " args)))) (_a$8090 "))")) (jolt-invoke _a$8083 _a$8084 _a$8085 _a$8086 _a$8087 _a$8088 _a$8089 _a$8090)))) (if (jolt= G__147 (keyword #f "let")) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-let") node) (if (jolt= G__147 (keyword #f "loop")) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-loop") node) (if (jolt= G__147 (keyword #f "recur")) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-recur") node) (if (jolt= G__147 (keyword #f "ffi-fn")) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-ffi-fn") node) (if (jolt= G__147 (keyword #f "ffi-callable")) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-ffi-callable") node) (if (jolt= G__147 (keyword #f "fn")) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-fn") node) (if (jolt= G__147 (keyword #f "def")) (if (jolt-truthy? (jolt-get node (keyword #f "no-init"))) (let* ((_a$8091 (var-deref "clojure.core" "str")) (_a$8092 "(declare-var! ") (_a$8093 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "ns")))) (_a$8094 " ") (_a$8095 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "name")))) (_a$8096 ")")) (jolt-invoke _a$8091 _a$8092 _a$8093 _a$8094 _a$8095 _a$8096)) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.backend-scheme" "jmeta-nonempty?") (jolt-get node (keyword #f "meta")))) (let* ((_a$8097 (var-deref "clojure.core" "str")) (_a$8098 "(def-var-with-meta! ") (_a$8099 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "ns")))) (_a$8100 " ") (_a$8101 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "name")))) (_a$8102 " ") (_a$8103 (emit (jolt-get node (keyword #f "init")))) (_a$8104 " ") (_a$8105 (jolt-invoke (var-deref "jolt.backend-scheme" "emit-def-meta") node)) (_a$8106 ")")) (jolt-invoke _a$8097 _a$8098 _a$8099 _a$8100 _a$8101 _a$8102 _a$8103 _a$8104 _a$8105 _a$8106)) (if (jolt-truthy? (keyword #f "else")) (let* ((_a$8107 (var-deref "clojure.core" "str")) (_a$8108 "(def-var! ") (_a$8109 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "ns")))) (_a$8110 " ") (_a$8111 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "name")))) (_a$8112 " ") (_a$8113 (emit (jolt-get node (keyword #f "init")))) (_a$8114 ")")) (jolt-invoke _a$8107 _a$8108 _a$8109 _a$8110 _a$8111 _a$8112 _a$8113 _a$8114)) jolt-nil))) (jolt-throw (let* ((_a$8115 (jolt-invoke (var-deref "clojure.core" "str") "emit: op not yet ported / unhandled: " (jolt-invoke (var-deref "clojure.core" "pr-str") (jolt-get node (keyword #f "op"))))) (_a$8116 (jolt-hash-map))) (jolt-ex-info _a$8115 _a$8116))))))))))))))))))))))))))))))))))))))))) emit)))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "dl-opt-out?" (letrec ((dl-opt-out? (lambda (m) (let fnrec8117 ((m m)) (let* ((or__26__auto (jolt-get m (keyword #f "dynamic")))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt-get m (keyword #f "redef")))))))) dl-opt-out?) (let* ((_o$8118 (keyword #f "private")) (_o$8119 #t)) (jolt-hash-map _o$8118 _o$8119))))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "emit-top-form" (letrec ((emit-top-form (lambda (node) (let fnrec8120 ((node node)) (if (jolt-not (jolt-invoke (var-deref "clojure.core" "deref") (var-deref "jolt.backend-scheme" "direct-link?"))) (jolt-invoke (var-deref "jolt.backend-scheme" "emit") node) (if (jolt= (keyword #f "do") (jolt-get node (keyword #f "op"))) (let* ((_a$8121 (var-deref "clojure.core" "str")) (_a$8122 "(begin ") (_a$8123 (jolt-invoke (var-deref "clojure.string" "join") " " (jolt-map emit-top-form (jolt-get node (keyword #f "statements"))))) (_a$8124 (if (jolt-empty? (jolt-get node (keyword #f "statements"))) "" " ")) (_a$8125 (emit-top-form (jolt-get node (keyword #f "ret")))) (_a$8126 ")")) (jolt-invoke _a$8121 _a$8122 _a$8123 _a$8124 _a$8125 _a$8126)) (if (let* ((and__25__auto (jolt= (keyword #f "def") (jolt-get node (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-not (jolt-get node (keyword #f "no-init"))))) (if (jolt-truthy? and__25__auto) (jolt-not (jolt-invoke (var-deref "jolt.backend-scheme" "dl-opt-out?") (jolt-get node (keyword #f "meta")))) and__25__auto)) and__25__auto)) (let* ((ns (jolt-get node (keyword #f "ns"))) (nm (jolt-get node (keyword #f "name"))) (b (jolt-invoke (var-deref "jolt.backend-scheme" "dl-name") ns nm)) (fn? (jolt= (keyword #f "fn") (jolt-get (jolt-get node (keyword #f "init")) (keyword #f "op")))) (pos (jolt-get node (keyword #f "pos"))) (frame-name (if (jolt-truthy? fn?) (let* ((temp__16__auto (jolt-get (jolt-get node (keyword #f "init")) (keyword #f "name")))) (if (jolt-truthy? temp__16__auto) (let* ((fnm temp__16__auto)) (jolt-invoke (var-deref "jolt.backend-scheme" "munge-name") fnm)) b)) jolt-nil)) (reg (if (jolt-truthy? (let* ((and__25__auto fn?)) (if (jolt-truthy? and__25__auto) pos and__25__auto))) (let* ((_a$8127 (var-deref "clojure.core" "str")) (_a$8128 " (jolt-register-source! ") (_a$8129 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") frame-name)) (_a$8130 " ") (_a$8131 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") ns)) (_a$8132 " ") (_a$8133 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") nm)) (_a$8134 " ") (_a$8135 (if (jolt-truthy? (jolt-get pos (keyword #f "file"))) (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get pos (keyword #f "file"))) "jolt-nil")) (_a$8136 " ") (_a$8137 (let* ((or__26__auto (jolt-get pos (keyword #f "line")))) (if (jolt-truthy? or__26__auto) or__26__auto 0))) (_a$8138 ")")) (jolt-invoke _a$8127 _a$8128 _a$8129 _a$8130 _a$8131 _a$8132 _a$8133 _a$8134 _a$8135 _a$8136 _a$8137 _a$8138)) jolt-nil))) (begin (jolt-invoke (var-deref "clojure.core" "swap!") (var-deref "jolt.backend-scheme" "direct-link-defined") jolt-conj (jolt-invoke (var-deref "jolt.backend-scheme" "dl-fqn") ns nm)) (if (jolt-truthy? fn?) (jolt-invoke (var-deref "clojure.core" "swap!") (var-deref "jolt.backend-scheme" "direct-link-fns") jolt-conj (jolt-invoke (var-deref "jolt.backend-scheme" "dl-fqn") ns nm)) jolt-nil) (let* ((cells (jolt-invoke (var-deref "clojure.core" "atom") (jolt-vector))) (_ (jolt-invoke (var-deref "clojure.core" "reset!") (var-deref "jolt.backend-scheme" "devirt-cells") cells)) (raw (jolt-invoke (var-deref "jolt.backend-scheme" "emit") (jolt-get node (keyword #f "init")))) (_ (jolt-invoke (var-deref "clojure.core" "reset!") (var-deref "jolt.backend-scheme" "devirt-cells") jolt-nil)) (init (if (jolt-truthy? (jolt-seq (jolt-invoke (var-deref "clojure.core" "deref") cells))) (jolt-invoke (var-deref "clojure.core" "str") "(let (" (jolt-invoke (var-deref "clojure.string" "join") " " (let* ((_a$8140 (lambda (c) (let fnrec8139 ((c c)) (jolt-invoke (var-deref "clojure.core" "str") "(" c " #f)")))) (_a$8141 (jolt-invoke (var-deref "clojure.core" "deref") cells))) (jolt-map _a$8140 _a$8141))) ") " raw ")") raw))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.backend-scheme" "jmeta-nonempty?") (jolt-get node (keyword #f "meta")))) (let* ((_a$8142 (var-deref "clojure.core" "str")) (_a$8143 "(begin (define ") (_a$8144 b) (_a$8145 " ") (_a$8146 init) (_a$8147 ") (def-var-with-meta! ") (_a$8148 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") ns)) (_a$8149 " ") (_a$8150 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") nm)) (_a$8151 " ") (_a$8152 b) (_a$8153 " ") (_a$8154 (jolt-invoke (var-deref "jolt.backend-scheme" "emit-def-meta") node)) (_a$8155 ")") (_a$8156 (let* ((or__26__auto reg)) (if (jolt-truthy? or__26__auto) or__26__auto ""))) (_a$8157 ")")) (jolt-invoke _a$8142 _a$8143 _a$8144 _a$8145 _a$8146 _a$8147 _a$8148 _a$8149 _a$8150 _a$8151 _a$8152 _a$8153 _a$8154 _a$8155 _a$8156 _a$8157)) (let* ((_a$8158 (var-deref "clojure.core" "str")) (_a$8159 "(begin (define ") (_a$8160 b) (_a$8161 " ") (_a$8162 init) (_a$8163 ") (def-var! ") (_a$8164 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") ns)) (_a$8165 " ") (_a$8166 (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") nm)) (_a$8167 " ") (_a$8168 b) (_a$8169 ")") (_a$8170 (let* ((or__26__auto reg)) (if (jolt-truthy? or__26__auto) or__26__auto ""))) (_a$8171 ")")) (jolt-invoke _a$8158 _a$8159 _a$8160 _a$8161 _a$8162 _a$8163 _a$8164 _a$8165 _a$8166 _a$8167 _a$8168 _a$8169 _a$8170 _a$8171)))))) (if (jolt-truthy? (keyword #f "else")) (jolt-invoke (var-deref "jolt.backend-scheme" "emit") node) jolt-nil)))))))) emit-top-form)))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.fold" "foldable" (let* ((_o$8172 "+") (_o$8173 jolt-add) (_o$8174 "-") (_o$8175 jolt-sub) (_o$8176 "*") (_o$8177 jolt-mul) (_o$8178 "/") (_o$8179 jolt-div) (_o$8180 "<") (_o$8181 <) (_o$8182 ">") (_o$8183 >) (_o$8184 "<=") (_o$8185 <=) (_o$8186 ">=") (_o$8187 >=) (_o$8188 "=") (_o$8189 jolt=) (_o$8190 "inc") (_o$8191 jolt-inc) (_o$8192 "dec") (_o$8193 jolt-dec) (_o$8194 "mod") (_o$8195 modulo) (_o$8196 "rem") (_o$8197 remainder) (_o$8198 "quot") (_o$8199 quotient) (_o$8200 "bit-and") (_o$8201 (var-deref "clojure.core" "__bit-and")) (_o$8202 "bit-or") (_o$8203 (var-deref "clojure.core" "__bit-or")) (_o$8204 "bit-xor") (_o$8205 (var-deref "clojure.core" "__bit-xor"))) (jolt-hash-map _o$8172 _o$8173 _o$8174 _o$8175 _o$8176 _o$8177 _o$8178 _o$8179 _o$8180 _o$8181 _o$8182 _o$8183 _o$8184 _o$8185 _o$8186 _o$8187 _o$8188 _o$8189 _o$8190 _o$8191 _o$8192 _o$8193 _o$8194 _o$8195 _o$8196 _o$8197 _o$8198 _o$8199 _o$8200 _o$8201 _o$8202 _o$8203 _o$8204 _o$8205)) (let* ((_o$8206 (keyword #f "private")) (_o$8207 #t)) (jolt-hash-map _o$8206 _o$8207))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.fold" "const?" (letrec ((const? (lambda (n) (let fnrec8208 ((n n)) (jolt= (keyword #f "const") (jolt-get n (keyword #f "op"))))))) const?) (let* ((_o$8209 (keyword #f "private")) (_o$8210 #t)) (jolt-hash-map _o$8209 _o$8210))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.fold" "const-num?" (letrec ((const-num? (lambda (n) (let fnrec8211 ((n n)) (let* ((and__25__auto (jolt-invoke (var-deref "jolt.passes.fold" "const?") n))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "clojure.core" "number?") (jolt-get n (keyword #f "val"))) and__25__auto)))))) const-num?) (let* ((_o$8212 (keyword #f "private")) (_o$8213 #t)) (jolt-hash-map _o$8212 _o$8213))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.fold" "fold-fn" (letrec ((fold-fn (lambda (fnode) (let fnrec8214 ((fnode fnode)) (let* ((op (jolt-get fnode (keyword #f "op")))) (if (let* ((or__26__auto (let* ((and__25__auto (jolt= op (keyword #f "var")))) (if (jolt-truthy? and__25__auto) (jolt= "clojure.core" (jolt-get fnode (keyword #f "ns"))) and__25__auto)))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt= op (keyword #f "host")))) (jolt-get (var-deref "jolt.passes.fold" "foldable") (jolt-get fnode (keyword #f "name"))) jolt-nil)))))) fold-fn) (let* ((_o$8215 (keyword #f "private")) (_o$8216 #t)) (jolt-hash-map _o$8215 _o$8216))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.fold" "const-fold" (letrec ((const-fold (lambda (node) (let fnrec8217 ((node node)) (let* ((op (jolt-get node (keyword #f "op")))) (if (jolt= op (keyword #f "invoke")) (let* ((n (jolt-invoke (var-deref "jolt.ir" "map-ir-children") const-fold node)) (ff (jolt-invoke (var-deref "jolt.passes.fold" "fold-fn") (jolt-get n (keyword #f "fn")))) (args (jolt-get n (keyword #f "args"))) (folded (if (jolt-truthy? (let* ((and__25__auto ff)) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-pos? (jolt-count args)))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "clojure.core" "every?") (var-deref "jolt.passes.fold" "const-num?") args) and__25__auto)) and__25__auto))) (guard (_r$catch1570 (else (let* ((e _r$catch1570)) jolt-nil))) (let* ((_o$8219 (keyword #f "op")) (_o$8220 (keyword #f "const")) (_o$8221 (keyword #f "val")) (_o$8222 (jolt-apply ff (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (a) (let fnrec8218 ((a a)) (jolt-get a (keyword #f "val")))) args)))) (jolt-hash-map _o$8219 _o$8220 _o$8221 _o$8222))) jolt-nil))) (let* ((or__26__auto folded)) (if (jolt-truthy? or__26__auto) or__26__auto n))) (if (jolt= op (keyword #f "if")) (let* ((t (const-fold (jolt-get node (keyword #f "test"))))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.fold" "const?") t)) (if (let* ((or__26__auto (jolt-nil? (jolt-get t (keyword #f "val"))))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt= #f (jolt-get t (keyword #f "val"))))) (const-fold (jolt-get node (keyword #f "else"))) (const-fold (jolt-get node (keyword #f "then")))) (let* ((_a$8223 node) (_a$8224 (keyword #f "test")) (_a$8225 t) (_a$8226 (keyword #f "then")) (_a$8227 (const-fold (jolt-get node (keyword #f "then")))) (_a$8228 (keyword #f "else")) (_a$8229 (const-fold (jolt-get node (keyword #f "else"))))) (jolt-assoc _a$8223 _a$8224 _a$8225 _a$8226 _a$8227 _a$8228 _a$8229)))) (if (jolt-truthy? (keyword #f "else")) (jolt-invoke (var-deref "jolt.ir" "map-ir-children") const-fold node) jolt-nil)))))))) const-fold) (let* ((_o$8230 (keyword #f "doc")) (_o$8231 "Bottom-up constant folding: a call of a foldable numeric fn whose args are\n  all constant numbers becomes a constant; an if with a constant test becomes\n  the taken branch.")) (jolt-hash-map _o$8230 _o$8231))))
(guard (e (#t #f))
  (def-var! "jolt.passes.fold" "scalar-const?" (letrec ((scalar-const? (lambda (n) (let fnrec8232 ((n n)) (let* ((and__25__auto (jolt= (keyword #f "const") (jolt-get n (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (let* ((v (jolt-get n (keyword #f "val")))) (let* ((or__26__auto (jolt-invoke (var-deref "clojure.core" "keyword?") v))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt-invoke (var-deref "clojure.core" "string?") v))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt-invoke (var-deref "clojure.core" "number?") v))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt-invoke (var-deref "clojure.core" "boolean?") v)))))))) and__25__auto)))))) scalar-const?)))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.fold" "kw-callee?" (letrec ((kw-callee? (lambda (fnode) (let fnrec8233 ((fnode fnode)) (let* ((and__25__auto (jolt= (keyword #f "const") (jolt-get fnode (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "clojure.core" "keyword?") (jolt-get fnode (keyword #f "val"))) and__25__auto)))))) kw-callee?) (let* ((_o$8234 (keyword #f "doc")) (_o$8235 "True if fnode is a constant keyword used as a function head \x2014; the (:k m) form.")) (jolt-hash-map _o$8234 _o$8235))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.fold" "get-callee?" (letrec ((get-callee? (lambda (fnode) (let fnrec8236 ((fnode fnode)) (let* ((or__26__auto (let* ((and__25__auto (jolt= (keyword #f "var") (jolt-get fnode (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= "clojure.core" (jolt-get fnode (keyword #f "ns"))))) (if (jolt-truthy? and__25__auto) (jolt= "get" (jolt-get fnode (keyword #f "name"))) and__25__auto)) and__25__auto)))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((and__25__auto (jolt= (keyword #f "host") (jolt-get fnode (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (jolt= "get" (jolt-get fnode (keyword #f "name"))) and__25__auto)))))))) get-callee?) (let* ((_o$8237 (keyword #f "doc")) (_o$8238 "True if fnode is the clojure.core/get (or host get) callee \x2014; the (get m k) form.")) (jolt-hash-map _o$8237 _o$8238))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.numeric" "int-lit?" (letrec ((int-lit? (lambda (n) (let fnrec6602 ((n n)) (let* ((and__25__auto (jolt= (keyword #f "const") (jolt-get n (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (let* ((v (jolt-get n (keyword #f "val")))) (let* ((and__25__auto (jolt-invoke (var-deref "clojure.core" "number?") v))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "clojure.core" "integer?") v) and__25__auto))) and__25__auto)))))) int-lit?) (let* ((_o$6603 (keyword #f "private")) (_o$6604 #t)) (jolt-hash-map _o$6603 _o$6604))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.numeric" "float-lit?" (letrec ((float-lit? (lambda (n) (let fnrec6605 ((n n)) (let* ((and__25__auto (jolt= (keyword #f "const") (jolt-get n (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (let* ((v (jolt-get n (keyword #f "val")))) (let* ((and__25__auto (jolt-invoke (var-deref "clojure.core" "number?") v))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "clojure.core" "float?") v) and__25__auto))) and__25__auto)))))) float-lit?) (let* ((_o$6606 (keyword #f "private")) (_o$6607 #t)) (jolt-hash-map _o$6606 _o$6607))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.numeric" "dbl-spec" (letrec ((dbl-spec (lambda (nm n) (let fnrec6608 ((nm nm) (n n)) (if (let* ((and__25__auto (>= n 1))) (if (jolt-truthy? and__25__auto) (jolt-contains? (let* ((_o$6609 "+") (_o$6610 "-") (_o$6611 "*") (_o$6612 "/") (_o$6613 "min") (_o$6614 "max")) (jolt-hash-set _o$6609 _o$6610 _o$6611 _o$6612 _o$6613 _o$6614)) nm) and__25__auto)) (keyword #f "double") (if (let* ((and__25__auto (jolt= n 1))) (if (jolt-truthy? and__25__auto) (jolt-contains? (let* ((_o$6615 "inc") (_o$6616 "dec")) (jolt-hash-set _o$6615 _o$6616)) nm) and__25__auto)) (keyword #f "double") (if (let* ((and__25__auto (>= n 2))) (if (jolt-truthy? and__25__auto) (jolt-contains? (let* ((_o$6617 "<") (_o$6618 ">") (_o$6619 "<=") (_o$6620 ">=") (_o$6621 "=") (_o$6622 "==")) (jolt-hash-set _o$6617 _o$6618 _o$6619 _o$6620 _o$6621 _o$6622)) nm) and__25__auto)) (keyword #f "bool") (if (jolt-truthy? (keyword #f "else")) jolt-nil jolt-nil)))))))) dbl-spec) (let* ((_o$6623 (keyword #f "private")) (_o$6624 #t)) (jolt-hash-map _o$6623 _o$6624))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.numeric" "lng-spec" (letrec ((lng-spec (lambda (nm n) (let fnrec6625 ((nm nm) (n n)) (if (let* ((and__25__auto (>= n 1))) (if (jolt-truthy? and__25__auto) (jolt-contains? (let* ((_o$6626 "+") (_o$6627 "-") (_o$6628 "*") (_o$6629 "min") (_o$6630 "max") (_o$6631 "unchecked-add") (_o$6632 "unchecked-subtract") (_o$6633 "unchecked-multiply")) (jolt-hash-set _o$6626 _o$6627 _o$6628 _o$6629 _o$6630 _o$6631 _o$6632 _o$6633)) nm) and__25__auto)) (keyword #f "long") (if (let* ((and__25__auto (jolt= n 1))) (if (jolt-truthy? and__25__auto) (jolt-contains? (let* ((_o$6634 "inc") (_o$6635 "dec") (_o$6636 "unchecked-inc") (_o$6637 "unchecked-dec")) (jolt-hash-set _o$6634 _o$6635 _o$6636 _o$6637)) nm) and__25__auto)) (keyword #f "long") (if (let* ((and__25__auto (jolt= n 2))) (if (jolt-truthy? and__25__auto) (jolt-contains? (let* ((_o$6638 "quot") (_o$6639 "rem") (_o$6640 "mod")) (jolt-hash-set _o$6638 _o$6639 _o$6640)) nm) and__25__auto)) (keyword #f "long") (if (let* ((and__25__auto (>= n 2))) (if (jolt-truthy? and__25__auto) (jolt-contains? (let* ((_o$6641 "<") (_o$6642 ">") (_o$6643 "<=") (_o$6644 ">=") (_o$6645 "=") (_o$6646 "==")) (jolt-hash-set _o$6641 _o$6642 _o$6643 _o$6644 _o$6645 _o$6646)) nm) and__25__auto)) (keyword #f "bool") (if (jolt-truthy? (keyword #f "else")) jolt-nil jolt-nil))))))))) lng-spec) (let* ((_o$6647 (keyword #f "private")) (_o$6648 #t)) (jolt-hash-map _o$6647 _o$6648))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.numeric" "bd-spec" (letrec ((bd-spec (lambda (nm n) (let fnrec6649 ((nm nm) (n n)) (if (let* ((and__25__auto (>= n 1))) (if (jolt-truthy? and__25__auto) (jolt-contains? (let* ((_o$6650 "+") (_o$6651 "-") (_o$6652 "*") (_o$6653 "/") (_o$6654 "min") (_o$6655 "max")) (jolt-hash-set _o$6650 _o$6651 _o$6652 _o$6653 _o$6654 _o$6655)) nm) and__25__auto)) (keyword #f "bigdec") (if (let* ((and__25__auto (jolt= n 2))) (if (jolt-truthy? and__25__auto) (jolt-contains? (let* ((_o$6656 "quot") (_o$6657 "rem")) (jolt-hash-set _o$6656 _o$6657)) nm) and__25__auto)) (keyword #f "bigdec") (if (let* ((and__25__auto (jolt= n 1))) (if (jolt-truthy? and__25__auto) (jolt-contains? (let* ((_o$6658 "zero?") (_o$6659 "pos?") (_o$6660 "neg?")) (jolt-hash-set _o$6658 _o$6659 _o$6660)) nm) and__25__auto)) (keyword #f "bool") (if (let* ((and__25__auto (>= n 2))) (if (jolt-truthy? and__25__auto) (jolt-contains? (let* ((_o$6661 "<") (_o$6662 ">") (_o$6663 "<=") (_o$6664 ">=")) (jolt-hash-set _o$6661 _o$6662 _o$6663 _o$6664)) nm) and__25__auto)) (keyword #f "bool") (if (jolt-truthy? (keyword #f "else")) jolt-nil jolt-nil))))))))) bd-spec) (let* ((_o$6665 (keyword #f "private")) (_o$6666 #t)) (jolt-hash-map _o$6665 _o$6666))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.numeric" "propagate" (letrec ((propagate (lambda (spec) (let fnrec6667 ((spec spec)) (if (jolt= spec (keyword #f "bool")) jolt-nil spec))))) propagate) (let* ((_o$6668 (keyword #f "private")) (_o$6669 #t)) (jolt-hash-map _o$6668 _o$6669))))
(guard (e (#t #f))
  (declare-var! "jolt.passes.numeric" "an"))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.numeric" "recur-kinds" (letrec ((recur-kinds (lambda (node tenv) (let fnrec6670 ((node node) (tenv tenv)) (let* ((op (jolt-get node (keyword #f "op")))) (if (jolt= op (keyword #f "recur")) (jolt-vector (let* ((_a$6672 (var-deref "clojure.core" "mapv")) (_a$6673 (lambda (a) (let fnrec6671 ((a a)) (jolt-nth (jolt-invoke (var-deref "jolt.passes.numeric" "an") a tenv) 0)))) (_a$6674 (jolt-get node (keyword #f "args")))) (jolt-invoke _a$6672 _a$6673 _a$6674))) (if (jolt= op (keyword #f "let")) (let* ((_a$6682 (jolt-get node (keyword #f "body"))) (_a$6683 (let* ((_a$6679 (lambda (te b) (let fnrec6675 ((te te) (b b)) (let* ((_a$6676 te) (_a$6677 (jolt-nth b 0)) (_a$6678 (jolt-nth (jolt-invoke (var-deref "jolt.passes.numeric" "an") (jolt-nth b 1) te) 0))) (jolt-assoc _a$6676 _a$6677 _a$6678))))) (_a$6680 tenv) (_a$6681 (jolt-get node (keyword #f "bindings")))) (jolt-reduce _a$6679 _a$6680 _a$6681)))) (recur-kinds _a$6682 _a$6683)) (if (jolt= op (keyword #f "if")) (let* ((_a$6684 (recur-kinds (jolt-get node (keyword #f "then")) tenv)) (_a$6685 (recur-kinds (jolt-get node (keyword #f "else")) tenv))) (jolt-concat _a$6684 _a$6685)) (if (jolt= op (keyword #f "do")) (recur-kinds (jolt-get node (keyword #f "ret")) tenv) (if (jolt-truthy? (keyword #f "else")) (jolt-vector) jolt-nil)))))))))) recur-kinds) (let* ((_o$6686 (keyword #f "private")) (_o$6687 #t)) (jolt-hash-map _o$6686 _o$6687))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.numeric" "recur-arg-lists" (letrec ((recur-arg-lists (lambda (node) (let fnrec6688 ((node node)) (let* ((op (jolt-get node (keyword #f "op")))) (if (jolt= op (keyword #f "recur")) (jolt-vector (jolt-get node (keyword #f "args"))) (if (jolt= op (keyword #f "let")) (recur-arg-lists (jolt-get node (keyword #f "body"))) (if (jolt= op (keyword #f "if")) (let* ((_a$6689 (recur-arg-lists (jolt-get node (keyword #f "then")))) (_a$6690 (recur-arg-lists (jolt-get node (keyword #f "else"))))) (jolt-concat _a$6689 _a$6690)) (if (jolt= op (keyword #f "do")) (recur-arg-lists (jolt-get node (keyword #f "ret"))) (if (jolt-truthy? (keyword #f "else")) (jolt-vector) jolt-nil)))))))))) recur-arg-lists) (let* ((_o$6691 (keyword #f "private")) (_o$6692 #t)) (jolt-hash-map _o$6691 _o$6692))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.numeric" "counter-step?" (letrec ((counter-step? (lambda (arg vname) (let fnrec6693 ((arg arg) (vname vname)) (if (let* ((and__25__auto (jolt= (keyword #f "local") (jolt-get arg (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (jolt= vname (jolt-get arg (keyword #f "name"))) and__25__auto)) #t (if (jolt= (keyword #f "invoke") (jolt-get arg (keyword #f "op"))) (let* ((f (jolt-get arg (keyword #f "fn"))) (as (jolt-get arg (keyword #f "args")))) (let* ((and__25__auto (jolt= (keyword #f "var") (jolt-get f (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= "clojure.core" (jolt-get f (keyword #f "ns"))))) (if (jolt-truthy? and__25__auto) (let* ((nm (jolt-get f (keyword #f "name"))) (v? (lambda (n) (let fnrec6694 ((n n)) (let* ((and__25__auto (jolt= (keyword #f "local") (jolt-get n (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (jolt= vname (jolt-get n (keyword #f "name"))) and__25__auto)))))) (if (let* ((and__25__auto (jolt-contains? (let* ((_o$6695 "inc") (_o$6696 "dec") (_o$6697 "unchecked-inc") (_o$6698 "unchecked-dec")) (jolt-hash-set _o$6695 _o$6696 _o$6697 _o$6698)) nm))) (if (jolt-truthy? and__25__auto) (jolt= 1 (jolt-count as)) and__25__auto)) (jolt-invoke v? (jolt-nth as 0)) (if (let* ((and__25__auto (jolt-contains? (let* ((_o$6699 "+") (_o$6700 "unchecked-add")) (jolt-hash-set _o$6699 _o$6700)) nm))) (if (jolt-truthy? and__25__auto) (jolt= 2 (jolt-count as)) and__25__auto)) (let* ((or__26__auto (let* ((and__25__auto (jolt-invoke v? (jolt-nth as 0)))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.passes.numeric" "int-lit?") (jolt-nth as 1)) and__25__auto)))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((and__25__auto (jolt-invoke v? (jolt-nth as 1)))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.passes.numeric" "int-lit?") (jolt-nth as 0)) and__25__auto)))) (if (let* ((and__25__auto (jolt-contains? (let* ((_o$6701 "-") (_o$6702 "unchecked-subtract")) (jolt-hash-set _o$6701 _o$6702)) nm))) (if (jolt-truthy? and__25__auto) (jolt= 2 (jolt-count as)) and__25__auto)) (let* ((and__25__auto (jolt-invoke v? (jolt-nth as 0)))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.passes.numeric" "int-lit?") (jolt-nth as 1)) and__25__auto)) (if (jolt-truthy? (keyword #f "else")) #f jolt-nil))))) and__25__auto)) and__25__auto))) (if (jolt-truthy? (keyword #f "else")) #f jolt-nil))))))) counter-step?) (let* ((_o$6703 (keyword #f "private")) (_o$6704 #t)) (jolt-hash-map _o$6703 _o$6704))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.numeric" "loop-kinds" (letrec ((loop-kinds (lambda (names seed body tenv) (let fnrec6705 ((names names) (seed seed) (body body) (tenv tenv)) (let* ((cur seed) (iter 0)) (let loop6706 ((cur cur) (iter iter)) (if (> iter (jolt-count names)) cur (let* ((te (let* ((_a$6711 (lambda (t i) (let fnrec6707 ((t t) (i i)) (let* ((_a$6708 t) (_a$6709 (jolt-nth names i)) (_a$6710 (jolt-nth cur i))) (jolt-assoc _a$6708 _a$6709 _a$6710))))) (_a$6712 tenv) (_a$6713 (jolt-range (jolt-count names)))) (jolt-reduce _a$6711 _a$6712 _a$6713))) (rks (jolt-invoke (var-deref "jolt.passes.numeric" "recur-kinds") body te)) (nxt (let* ((_a$6716 (var-deref "clojure.core" "mapv")) (_a$6717 (lambda (j) (let fnrec6714 ((j j)) (let* ((k (jolt-nth cur j))) (if (jolt-truthy? (let* ((and__25__auto k)) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "clojure.core" "every?") (lambda (rk) (let fnrec6715 ((rk rk)) (jolt= k (jolt-nth rk j)))) rks) and__25__auto))) k jolt-nil))))) (_a$6718 (jolt-range (jolt-count names)))) (jolt-invoke _a$6716 _a$6717 _a$6718)))) (if (jolt= nxt cur) cur (loop6706 nxt (jolt-inc iter))))))))))) loop-kinds) (let* ((_o$6719 (keyword #f "private")) (_o$6720 #t)) (jolt-hash-map _o$6719 _o$6720))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.numeric" "arity-env" (letrec ((arity-env (lambda (tenv a) (let fnrec6721 ((tenv tenv) (a a)) (let* ((nh (let* ((_a$6722 (jolt-hash-map)) (_a$6723 (jolt-get a (keyword #f "nhints")))) (jolt-into _a$6722 _a$6723))) (pe (let* ((_a$6725 (lambda (e p) (let fnrec6724 ((e e) (p p)) (jolt-assoc e p (jolt-get nh p))))) (_a$6726 tenv) (_a$6727 (jolt-get a (keyword #f "params")))) (jolt-reduce _a$6725 _a$6726 _a$6727)))) (if (jolt-truthy? (jolt-get a (keyword #f "rest"))) (jolt-assoc pe (jolt-get a (keyword #f "rest")) jolt-nil) pe)))))) arity-env) (let* ((_o$6728 (keyword #f "private")) (_o$6729 #t)) (jolt-hash-map _o$6728 _o$6729))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.numeric" "an-invoke" (letrec ((an-invoke (lambda (node tenv) (let fnrec6730 ((node node) (tenv tenv)) (let* ((fnode (jolt-get node (keyword #f "fn"))) (nm (if (let* ((and__25__auto (jolt= (keyword #f "var") (jolt-get fnode (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (jolt= "clojure.core" (jolt-get fnode (keyword #f "ns"))) and__25__auto)) (jolt-get fnode (keyword #f "name")) jolt-nil)) (ars (let* ((_a$6732 (var-deref "clojure.core" "mapv")) (_a$6733 (lambda (a) (let fnrec6731 ((a a)) (jolt-invoke (var-deref "jolt.passes.numeric" "an") a tenv)))) (_a$6734 (jolt-get node (keyword #f "args")))) (jolt-invoke _a$6732 _a$6733 _a$6734))) (argnodes (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (r) (let fnrec6735 ((r r)) (jolt-nth r 1))) ars)) (node1 (jolt-assoc node (keyword #f "args") argnodes)) (n (jolt-count ars))) (if (jolt= (keyword #f "double") (jolt-get node (keyword #f "num-read"))) (let* ((_o$6736 (keyword #f "double")) (_o$6737 node1)) (jolt-vector _o$6736 _o$6737)) (if (jolt-truthy? (jolt-get fnode (keyword #f "num-ret"))) (let* ((_o$6738 (jolt-get fnode (keyword #f "num-ret"))) (_o$6739 node1)) (jolt-vector _o$6738 _o$6739)) (if (jolt-nil? nm) (let* ((_o$6740 jolt-nil) (_o$6741 node1)) (jolt-vector _o$6740 _o$6741)) (if (jolt-truthy? (keyword #f "else")) (let* ((cls (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (r) (let fnrec6742 ((r r)) (let* ((k (jolt-nth r 0)) (nd (jolt-nth r 1))) (if (jolt= k (keyword #f "double")) (keyword #f "double") (if (jolt= k (keyword #f "long")) (keyword #f "long") (if (jolt= k (keyword #f "bigdec")) (keyword #f "bigdec") (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.numeric" "int-lit?") nd)) (keyword #f "wild") (if (jolt-truthy? (keyword #f "else")) (keyword #f "no") jolt-nil)))))))) ars)) (ok? (lambda (allowed need) (let fnrec6743 ((allowed allowed) (need need)) (let* ((and__25__auto (jolt-pos? n))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-invoke (var-deref "clojure.core" "every?") (lambda (c) (let fnrec6744 ((c c)) (let* ((or__26__auto (jolt= c (keyword #f "wild")))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt= c allowed))))) cls))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "clojure.core" "some") (lambda (c) (let fnrec6745 ((c c)) (jolt= c need))) cls) and__25__auto)) and__25__auto))))) (ds (jolt-invoke (var-deref "jolt.passes.numeric" "dbl-spec") nm n)) (ls (jolt-invoke (var-deref "jolt.passes.numeric" "lng-spec") nm n)) (bs (jolt-invoke (var-deref "jolt.passes.numeric" "bd-spec") nm n))) (if (jolt-truthy? (let* ((and__25__auto ds)) (if (jolt-truthy? and__25__auto) (jolt-invoke ok? (keyword #f "double") (keyword #f "double")) and__25__auto))) (let* ((args_PRIME_ (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (nd) (let fnrec6746 ((nd nd)) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.numeric" "int-lit?") nd)) (jolt-assoc nd (keyword #f "val") (jolt-invoke (var-deref "clojure.core" "double") (jolt-get nd (keyword #f "val")))) nd))) argnodes))) (let* ((_o$6747 (jolt-invoke (var-deref "jolt.passes.numeric" "propagate") ds)) (_o$6748 (jolt-assoc node1 (keyword #f "args") args_PRIME_ (keyword #f "num-kind") (keyword #f "double")))) (jolt-vector _o$6747 _o$6748))) (if (jolt-truthy? (let* ((and__25__auto ls)) (if (jolt-truthy? and__25__auto) (jolt-invoke ok? (keyword #f "long") (keyword #f "long")) and__25__auto))) (let* ((_o$6749 (jolt-invoke (var-deref "jolt.passes.numeric" "propagate") ls)) (_o$6750 (jolt-assoc node1 (keyword #f "num-kind") (keyword #f "long")))) (jolt-vector _o$6749 _o$6750)) (if (jolt-truthy? (let* ((and__25__auto bs)) (if (jolt-truthy? and__25__auto) (jolt-invoke ok? (keyword #f "bigdec") (keyword #f "bigdec")) and__25__auto))) (let* ((_o$6751 (jolt-invoke (var-deref "jolt.passes.numeric" "propagate") bs)) (_o$6752 (jolt-assoc node1 (keyword #f "num-kind") (keyword #f "bigdec")))) (jolt-vector _o$6751 _o$6752)) (if (jolt-truthy? (keyword #f "else")) (let* ((_o$6753 jolt-nil) (_o$6754 node1)) (jolt-vector _o$6753 _o$6754)) jolt-nil))))) jolt-nil))))))))) an-invoke) (let* ((_o$6755 (keyword #f "private")) (_o$6756 #t) (_o$6757 (keyword #f "doc")) (_o$6758 "Annotate an :invoke with its numeric kind. An arithmetic core op specializes to\n  the Chez fl*/fx* op only when every operand is the same kind (:double or :long),\n  except an integer literal is :wild \x2014; valid in either \x2014; so (+ ^double x 2) stays\n  double. A call to a ^double/^long-returning var yields that kind without lowering\n  the call (its body already coerces the return).")) (jolt-hash-map _o$6755 _o$6756 _o$6757 _o$6758))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.numeric" "an" (letrec ((an (lambda (node tenv) (let fnrec6759 ((node node) (tenv tenv)) (let* ((op (jolt-get node (keyword #f "op")))) (if (jolt= op (keyword #f "const")) (let* ((_o$6760 (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.numeric" "float-lit?") node)) (keyword #f "double") jolt-nil)) (_o$6761 node)) (jolt-vector _o$6760 _o$6761)) (if (jolt= op (keyword #f "bigdec")) (let* ((_o$6762 (keyword #f "bigdec")) (_o$6763 node)) (jolt-vector _o$6762 _o$6763)) (if (jolt= op (keyword #f "local")) (let* ((_o$6764 (jolt-get tenv (jolt-get node (keyword #f "name")))) (_o$6765 node)) (jolt-vector _o$6764 _o$6765)) (if (jolt= op (keyword #f "coerce")) (let* ((_o$6766 (jolt-get node (keyword #f "kind"))) (_o$6767 (jolt-assoc node (keyword #f "expr") (jolt-nth (an (jolt-get node (keyword #f "expr")) tenv) 1)))) (jolt-vector _o$6766 _o$6767)) (if (jolt= op (keyword #f "invoke")) (jolt-invoke (var-deref "jolt.passes.numeric" "an-invoke") node tenv) (if (jolt= op (keyword #f "let")) (let* ((res (let* ((_a$6778 (lambda (acc b) (let fnrec6768 ((acc acc) (b b)) (let* ((te (jolt-nth acc 0)) (binds (jolt-nth acc 1)) (ir (an (jolt-nth b 1) te))) (let* ((_o$6774 (let* ((_a$6769 te) (_a$6770 (jolt-nth b 0)) (_a$6771 (jolt-nth ir 0))) (jolt-assoc _a$6769 _a$6770 _a$6771))) (_o$6775 (jolt-conj binds (let* ((_o$6772 (jolt-nth b 0)) (_o$6773 (jolt-nth ir 1))) (jolt-vector _o$6772 _o$6773))))) (jolt-vector _o$6774 _o$6775)))))) (_a$6779 (let* ((_o$6776 tenv) (_o$6777 (jolt-vector))) (jolt-vector _o$6776 _o$6777))) (_a$6780 (jolt-get node (keyword #f "bindings")))) (jolt-reduce _a$6778 _a$6779 _a$6780))) (br (let* ((_a$6781 (jolt-get node (keyword #f "body"))) (_a$6782 (jolt-nth res 0))) (an _a$6781 _a$6782)))) (let* ((_o$6788 (jolt-nth br 0)) (_o$6789 (let* ((_a$6783 node) (_a$6784 (keyword #f "bindings")) (_a$6785 (jolt-nth res 1)) (_a$6786 (keyword #f "body")) (_a$6787 (jolt-nth br 1))) (jolt-assoc _a$6783 _a$6784 _a$6785 _a$6786 _a$6787)))) (jolt-vector _o$6788 _o$6789))) (if (jolt= op (keyword #f "loop")) (let* ((binds (jolt-get node (keyword #f "bindings"))) (names (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (b) (let fnrec6790 ((b b)) (jolt-nth b 0))) binds)) (ik (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (b) (let fnrec6791 ((b b)) (jolt-nth (an (jolt-nth b 1) tenv) 0))) binds)) (rlists (jolt-invoke (var-deref "jolt.passes.numeric" "recur-arg-lists") (jolt-get node (keyword #f "body")))) (seed (let* ((_a$6797 (var-deref "clojure.core" "mapv")) (_a$6798 (lambda (j) (let fnrec6792 ((j j)) (let* ((k (jolt-nth ik j)) (b (jolt-nth binds j))) (if (jolt-truthy? k) k (if (jolt-truthy? (let* ((and__25__auto (jolt-seq rlists))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-invoke (var-deref "jolt.passes.numeric" "int-lit?") (jolt-nth b 1)))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "clojure.core" "every?") (lambda (args) (let fnrec6793 ((args args)) (let* ((_a$6794 (var-deref "jolt.passes.numeric" "counter-step?")) (_a$6795 (jolt-nth args j)) (_a$6796 (jolt-nth b 0))) (jolt-invoke _a$6794 _a$6795 _a$6796)))) rlists) and__25__auto)) and__25__auto))) (keyword #f "long") (if (jolt-truthy? (keyword #f "else")) jolt-nil jolt-nil))))))) (_a$6799 (jolt-range (jolt-count names)))) (jolt-invoke _a$6797 _a$6798 _a$6799))) (lk (jolt-invoke (var-deref "jolt.passes.numeric" "loop-kinds") names seed (jolt-get node (keyword #f "body")) tenv)) (te (let* ((_a$6804 (lambda (t i) (let fnrec6800 ((t t) (i i)) (let* ((_a$6801 t) (_a$6802 (jolt-nth names i)) (_a$6803 (jolt-nth lk i))) (jolt-assoc _a$6801 _a$6802 _a$6803))))) (_a$6805 tenv) (_a$6806 (jolt-range (jolt-count names)))) (jolt-reduce _a$6804 _a$6805 _a$6806)))) (let* ((_o$6815 jolt-nil) (_o$6816 (let* ((_a$6810 node) (_a$6811 (keyword #f "bindings")) (_a$6812 (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (b) (let fnrec6807 ((b b)) (let* ((_o$6808 (jolt-nth b 0)) (_o$6809 (jolt-nth (an (jolt-nth b 1) tenv) 1))) (jolt-vector _o$6808 _o$6809)))) binds)) (_a$6813 (keyword #f "body")) (_a$6814 (jolt-nth (an (jolt-get node (keyword #f "body")) te) 1))) (jolt-assoc _a$6810 _a$6811 _a$6812 _a$6813 _a$6814)))) (jolt-vector _o$6815 _o$6816))) (if (jolt= op (keyword #f "if")) (let* ((tr (an (jolt-get node (keyword #f "test")) tenv)) (thn (an (jolt-get node (keyword #f "then")) tenv)) (els (an (jolt-get node (keyword #f "else")) tenv)) (tk (jolt-nth thn 0)) (ek (jolt-nth els 0))) (let* ((_o$6824 (if (jolt= tk ek) tk jolt-nil)) (_o$6825 (let* ((_a$6817 node) (_a$6818 (keyword #f "test")) (_a$6819 (jolt-nth tr 1)) (_a$6820 (keyword #f "then")) (_a$6821 (jolt-nth thn 1)) (_a$6822 (keyword #f "else")) (_a$6823 (jolt-nth els 1))) (jolt-assoc _a$6817 _a$6818 _a$6819 _a$6820 _a$6821 _a$6822 _a$6823)))) (jolt-vector _o$6824 _o$6825))) (if (jolt= op (keyword #f "do")) (let* ((stmts (let* ((_a$6827 (var-deref "clojure.core" "mapv")) (_a$6828 (lambda (s) (let fnrec6826 ((s s)) (jolt-nth (an s tenv) 1)))) (_a$6829 (jolt-get node (keyword #f "statements")))) (jolt-invoke _a$6827 _a$6828 _a$6829))) (r (an (jolt-get node (keyword #f "ret")) tenv))) (let* ((_o$6830 (jolt-nth r 0)) (_o$6831 (jolt-assoc node (keyword #f "statements") stmts (keyword #f "ret") (jolt-nth r 1)))) (jolt-vector _o$6830 _o$6831))) (if (jolt= op (keyword #f "fn")) (let* ((_o$6838 jolt-nil) (_o$6839 (jolt-assoc node (keyword #f "arities") (let* ((_a$6835 (var-deref "clojure.core" "mapv")) (_a$6836 (lambda (a) (let fnrec6832 ((a a)) (jolt-assoc a (keyword #f "body") (jolt-nth (let* ((_a$6833 (jolt-get a (keyword #f "body"))) (_a$6834 (jolt-invoke (var-deref "jolt.passes.numeric" "arity-env") tenv a))) (an _a$6833 _a$6834)) 1))))) (_a$6837 (jolt-get node (keyword #f "arities")))) (jolt-invoke _a$6835 _a$6836 _a$6837))))) (jolt-vector _o$6838 _o$6839)) (if (jolt= op (keyword #f "def")) (let* ((_o$6840 jolt-nil) (_o$6841 (jolt-assoc node (keyword #f "init") (jolt-nth (an (jolt-get node (keyword #f "init")) tenv) 1)))) (jolt-vector _o$6840 _o$6841)) (if (jolt-truthy? (keyword #f "else")) (let* ((_o$6843 jolt-nil) (_o$6844 (jolt-invoke (var-deref "jolt.ir" "map-ir-children") (lambda (c) (let fnrec6842 ((c c)) (jolt-nth (an c tenv) 1))) node))) (jolt-vector _o$6843 _o$6844)) jolt-nil))))))))))))))))) an) (let* ((_o$6845 (keyword #f "private")) (_o$6846 #t)) (jolt-hash-map _o$6845 _o$6846))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.numeric" "annotate" (letrec ((annotate (lambda (node) (let fnrec6847 ((node node)) (jolt-nth (jolt-invoke (var-deref "jolt.passes.numeric" "an") node (jolt-hash-map)) 1))))) annotate) (let* ((_o$6848 (keyword #f "doc")) (_o$6849 "Tag arithmetic nodes with :num-kind from local numeric type-flow. Returns the\n  rewritten IR (no kind escapes to the caller).")) (jolt-hash-map _o$6848 _o$6849))))
(guard (e (#t #f))
  (def-var! "jolt.passes.inline" "dirty" (jolt-invoke (var-deref "clojure.core" "atom") #f)))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "mark!" (letrec ((mark! (lambda () (let fnrec6850 () (jolt-invoke (var-deref "clojure.core" "reset!") (var-deref "jolt.passes.inline" "dirty") #t))))) mark!) (let* ((_o$6851 (keyword #f "private")) (_o$6852 #t)) (jolt-hash-map _o$6851 _o$6852))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "rec-shapes" (jolt-invoke (var-deref "clojure.core" "atom") (jolt-hash-map)) (let* ((_o$6853 (keyword #f "private")) (_o$6854 #t)) (jolt-hash-map _o$6853 _o$6854))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "set-rec-shapes!" (letrec ((set-rec-shapes! (lambda (m) (let fnrec6855 ((m m)) (jolt-invoke (var-deref "clojure.core" "reset!") (var-deref "jolt.passes.inline" "rec-shapes") (let* ((or__26__auto m)) (if (jolt-truthy? or__26__auto) or__26__auto (jolt-hash-map)))))))) set-rec-shapes!) (let* ((_o$6856 (keyword #f "doc")) (_o$6857 "Install the record-ctor shape registry the record fold consults.")) (jolt-hash-map _o$6856 _o$6857))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "fresh-counter" (jolt-invoke (var-deref "clojure.core" "atom") 0) (let* ((_o$6858 (keyword #f "private")) (_o$6859 #t)) (jolt-hash-map _o$6858 _o$6859))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "fresh" (letrec ((fresh (lambda (base) (let fnrec6860 ((base base)) (let* ((n (jolt-invoke (var-deref "clojure.core" "deref") (var-deref "jolt.passes.inline" "fresh-counter")))) (begin (jolt-invoke (var-deref "clojure.core" "swap!") (var-deref "jolt.passes.inline" "fresh-counter") jolt-inc) (jolt-invoke (var-deref "clojure.core" "str") base "__il" n))))))) fresh) (let* ((_o$6861 (keyword #f "private")) (_o$6862 #t)) (jolt-hash-map _o$6861 _o$6862))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "safe-op?" (letrec ((safe-op? (lambda (op) (let fnrec6863 ((op op)) (let* ((or__26__auto (jolt= op (keyword #f "const")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt= op (keyword #f "local")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt= op (keyword #f "var")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt= op (keyword #f "host")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt= op (keyword #f "the-var")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt= op (keyword #f "quote")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt= op (keyword #f "if")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt= op (keyword #f "do")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt= op (keyword #f "let")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt= op (keyword #f "invoke")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt= op (keyword #f "map")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt= op (keyword #f "vector")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt= op (keyword #f "set")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt= op (keyword #f "throw")))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt= op (keyword #f "coerce")))))))))))))))))))))))))))))))))) safe-op?) (let* ((_o$6864 (keyword #f "private")) (_o$6865 #t)) (jolt-hash-map _o$6864 _o$6865))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "inline-budget" 120 (let* ((_o$6866 (keyword #f "private")) (_o$6867 #t)) (jolt-hash-map _o$6866 _o$6867))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "body-size" (letrec ((body-size (lambda (node) (let fnrec6868 ((node node)) (if (jolt-not (jolt-invoke (var-deref "jolt.passes.inline" "safe-op?") (jolt-get node (keyword #f "op")))) 100000 (jolt-invoke (var-deref "jolt.ir" "reduce-ir-children") (lambda (acc c) (let fnrec6869 ((acc acc) (c c)) (+ acc (body-size c)))) 1 node)))))) body-size) (let* ((_o$6870 (keyword #f "private")) (_o$6871 #t) (_o$6872 (keyword #f "doc")) (_o$6873 "Node count of an inline-eligible body. A disallowed op contributes a number\n  larger than any budget, so the caller's (<= size budget) test fails and we\n  never try to inline (or alpha-rename) such a body. Only reached for safe ops,\n  so the shared child fold covers it exactly (leaves fold to 1).")) (jolt-hash-map _o$6870 _o$6871 _o$6872 _o$6873))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "subst" (letrec ((subst (lambda (node env) (let fnrec6874 ((node node) (env env)) (let* ((op (jolt-get node (keyword #f "op")))) (if (jolt= op (keyword #f "local")) (let* ((r (jolt-get env (jolt-get node (keyword #f "name"))))) (if (jolt-truthy? r) (if (jolt-truthy? (let* ((and__25__auto (jolt= (keyword #f "local") (jolt-get r (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-get node (keyword #f "hint")))) (if (jolt-truthy? and__25__auto) (jolt-not (jolt-get r (keyword #f "hint"))) and__25__auto)) and__25__auto))) (jolt-assoc r (keyword #f "hint") (jolt-get node (keyword #f "hint"))) r) node)) (if (jolt= op (keyword #f "let")) (let* ((res (let* ((_a$6886 (lambda (acc b) (let fnrec6875 ((acc acc) (b b)) (let* ((e (jolt-nth acc 0)) (binds (jolt-nth acc 1)) (nm (jolt-nth b 0)) (init (subst (jolt-nth b 1) e)) (f (jolt-invoke (var-deref "jolt.passes.inline" "fresh") nm))) (let* ((_o$6882 (jolt-assoc e nm (let* ((_o$6876 (keyword #f "op")) (_o$6877 (keyword #f "local")) (_o$6878 (keyword #f "name")) (_o$6879 f)) (jolt-hash-map _o$6876 _o$6877 _o$6878 _o$6879)))) (_o$6883 (jolt-conj binds (let* ((_o$6880 f) (_o$6881 init)) (jolt-vector _o$6880 _o$6881))))) (jolt-vector _o$6882 _o$6883)))))) (_a$6887 (let* ((_o$6884 env) (_o$6885 (jolt-vector))) (jolt-vector _o$6884 _o$6885))) (_a$6888 (jolt-get node (keyword #f "bindings")))) (jolt-reduce _a$6886 _a$6887 _a$6888)))) (let* ((_a$6891 node) (_a$6892 (keyword #f "bindings")) (_a$6893 (jolt-nth res 1)) (_a$6894 (keyword #f "body")) (_a$6895 (let* ((_a$6889 (jolt-get node (keyword #f "body"))) (_a$6890 (jolt-nth res 0))) (subst _a$6889 _a$6890)))) (jolt-assoc _a$6891 _a$6892 _a$6893 _a$6894 _a$6895))) (if (jolt-truthy? (keyword #f "else")) (jolt-invoke (var-deref "jolt.ir" "map-ir-children") (lambda (c) (let fnrec6896 ((c c)) (subst c env))) node) jolt-nil)))))))) subst) (let* ((_o$6897 (keyword #f "private")) (_o$6898 #t) (_o$6899 (keyword #f "doc")) (_o$6900 "Substitute locals in node per env (a map name -> replacement IR node), and\n  alpha-rename every inner :let binder to a globally fresh name (so the spliced\n  body shares no name with the caller). env seeds the params: a trivial arg\n  (local/const) maps a param straight to the arg node (copy propagation \x2014; this\n  is what lets scalar-replace see a map-literal arg through the call boundary);\n  a non-trivial arg maps the param to a fresh :local that a wrapping let binds.")) (jolt-hash-map _o$6897 _o$6898 _o$6899 _o$6900))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "trivial-arg?" (letrec ((trivial-arg? (lambda (n) (let fnrec6901 ((n n)) (let* ((op (jolt-get n (keyword #f "op")))) (let* ((or__26__auto (jolt= op (keyword #f "local")))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt= op (keyword #f "const"))))))))) trivial-arg?) (let* ((_o$6902 (keyword #f "private")) (_o$6903 #t)) (jolt-hash-map _o$6902 _o$6903))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "body-closed?" (letrec ((body-closed? (lambda (node scope) (let fnrec6904 ((node node) (scope scope)) (let* ((op (jolt-get node (keyword #f "op")))) (if (jolt= op (keyword #f "local")) (jolt-contains? scope (jolt-get node (keyword #f "name"))) (if (jolt= op (keyword #f "let")) (let* ((res (let* ((_a$6910 (lambda (acc b) (let fnrec6905 ((acc acc) (b b)) (let* ((sc (jolt-nth acc 0)) (ok (jolt-nth acc 1))) (if (jolt-not ok) acc (let* ((_o$6906 (jolt-conj sc (jolt-nth b 0))) (_o$6907 (body-closed? (jolt-nth b 1) sc))) (jolt-vector _o$6906 _o$6907))))))) (_a$6911 (let* ((_o$6908 scope) (_o$6909 #t)) (jolt-vector _o$6908 _o$6909))) (_a$6912 (jolt-get node (keyword #f "bindings")))) (jolt-reduce _a$6910 _a$6911 _a$6912)))) (let* ((and__25__auto (jolt-nth res 1))) (if (jolt-truthy? and__25__auto) (let* ((_a$6913 (jolt-get node (keyword #f "body"))) (_a$6914 (jolt-nth res 0))) (body-closed? _a$6913 _a$6914)) and__25__auto))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.inline" "safe-op?") op)) (jolt-invoke (var-deref "jolt.ir" "reduce-ir-children") (lambda (ok c) (let fnrec6915 ((ok ok) (c c)) (let* ((and__25__auto ok)) (if (jolt-truthy? and__25__auto) (body-closed? c scope) and__25__auto)))) #t node) (if (jolt-truthy? (keyword #f "else")) #f jolt-nil))))))))) body-closed?) (let* ((_o$6916 (keyword #f "private")) (_o$6917 #t) (_o$6918 (keyword #f "doc")) (_o$6919 "True if every :local in node is bound \x2014; by a param (in the initial scope set)\n  or by an enclosing :let within the body. A self-recursive fn fails this: the\n  analyzer binds the fn's own name as a local, so its body has a FREE local (the\n  self-reference) that would dangle once the body is spliced elsewhere.")) (jolt-hash-map _o$6916 _o$6917 _o$6918 _o$6919))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "try-inline" (letrec ((try-inline (lambda (node ctx) (let fnrec6920 ((node node) (ctx ctx)) (let* ((f (jolt-get node (keyword #f "fn")))) (if (jolt= (keyword #f "var") (jolt-get f (keyword #f "op"))) (let* ((stash (let* ((_a$6921 (var-deref "jolt.host" "inline-ir")) (_a$6922 ctx) (_a$6923 (jolt-get f (keyword #f "ns"))) (_a$6924 (jolt-get f (keyword #f "name")))) (jolt-invoke _a$6921 _a$6922 _a$6923 _a$6924)))) (if (jolt-truthy? stash) (let* ((params (jolt-get stash (keyword #f "params"))) (body (jolt-get stash (keyword #f "body"))) (nh (let* ((_a$6929 (lambda (m pr) (let fnrec6925 ((m m) (pr pr)) (let* ((_a$6926 m) (_a$6927 (jolt-nth pr 0)) (_a$6928 (jolt-nth pr 1))) (jolt-assoc _a$6926 _a$6927 _a$6928))))) (_a$6930 (jolt-hash-map)) (_a$6931 (jolt-get stash (keyword #f "nhints")))) (jolt-reduce _a$6929 _a$6930 _a$6931))) (ret (jolt-get stash (keyword #f "ret"))) (args (jolt-get node (keyword #f "args")))) (if (jolt-truthy? (let* ((and__25__auto (let* ((_a$6932 (jolt-count params)) (_a$6933 (jolt-count args))) (jolt= _a$6932 _a$6933)))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (<= (jolt-invoke (var-deref "jolt.passes.inline" "body-size") body) (var-deref "jolt.passes.inline" "inline-budget")))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.passes.inline" "body-closed?") body (jolt-reduce jolt-conj (jolt-hash-set) params)) and__25__auto)) and__25__auto))) (let* ((n (jolt-count params)) (res (let* ((i 0) (env (jolt-hash-map)) (binds (jolt-vector))) (let loop6934 ((i i) (env env) (binds binds)) (if (< i n) (let* ((p (jolt-nth params i)) (a (jolt-nth args i)) (k (jolt-get nh p))) (if (jolt-truthy? k) (let* ((f (jolt-invoke (var-deref "jolt.passes.inline" "fresh") p))) (let* ((_a$6941 (jolt-inc i)) (_a$6942 (jolt-assoc env p (let* ((_o$6935 (keyword #f "op")) (_o$6936 (keyword #f "local")) (_o$6937 (keyword #f "name")) (_o$6938 f)) (jolt-hash-map _o$6935 _o$6936 _o$6937 _o$6938)))) (_a$6943 (jolt-conj binds (let* ((_o$6939 f) (_o$6940 (jolt-invoke (var-deref "jolt.ir" "coerce-node") k a))) (jolt-vector _o$6939 _o$6940))))) (loop6934 _a$6941 _a$6942 _a$6943))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.inline" "trivial-arg?") a)) (let* ((_a$6944 (jolt-inc i)) (_a$6945 (jolt-assoc env p a)) (_a$6946 binds)) (loop6934 _a$6944 _a$6945 _a$6946)) (if (jolt-truthy? (keyword #f "else")) (let* ((f (jolt-invoke (var-deref "jolt.passes.inline" "fresh") p))) (let* ((_a$6953 (jolt-inc i)) (_a$6954 (jolt-assoc env p (let* ((_o$6947 (keyword #f "op")) (_o$6948 (keyword #f "local")) (_o$6949 (keyword #f "name")) (_o$6950 f)) (jolt-hash-map _o$6947 _o$6948 _o$6949 _o$6950)))) (_a$6955 (jolt-conj binds (let* ((_o$6951 f) (_o$6952 a)) (jolt-vector _o$6951 _o$6952))))) (loop6934 _a$6953 _a$6954 _a$6955))) jolt-nil)))) (let* ((_o$6956 env) (_o$6957 binds)) (jolt-vector _o$6956 _o$6957)))))) (env (jolt-nth res 0)) (binds (jolt-nth res 1)) (rbody0 (jolt-invoke (var-deref "jolt.passes.inline" "subst") body env)) (rbody (if (jolt-truthy? ret) (jolt-invoke (var-deref "jolt.ir" "coerce-node") ret rbody0) rbody0))) (begin (jolt-invoke (var-deref "jolt.passes.inline" "mark!")) (if (jolt= 0 (jolt-count binds)) rbody (let* ((_o$6958 (keyword #f "op")) (_o$6959 (keyword #f "let")) (_o$6960 (keyword #f "bindings")) (_o$6961 binds) (_o$6962 (keyword #f "body")) (_o$6963 rbody)) (jolt-hash-map _o$6958 _o$6959 _o$6960 _o$6961 _o$6962 _o$6963))))) node)) node)) node)))))) try-inline) (let* ((_o$6964 (keyword #f "private")) (_o$6965 #t) (_o$6966 (keyword #f "doc")) (_o$6967 "node is an :invoke whose children are already inlined. If its :fn is a var\n  with a stashed, in-budget, arity-matching inline body, return the spliced\n  let; else node.")) (jolt-hash-map _o$6964 _o$6965 _o$6966 _o$6967))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "inline-node" (letrec ((inline-node (lambda (node ctx) (let fnrec6968 ((node node) (ctx ctx)) (if (jolt= (keyword #f "invoke") (jolt-get node (keyword #f "op"))) (jolt-invoke (var-deref "jolt.passes.inline" "try-inline") (jolt-invoke (var-deref "jolt.ir" "map-ir-children") (lambda (c) (let fnrec6969 ((c c)) (inline-node c ctx))) node) ctx) (jolt-invoke (var-deref "jolt.ir" "map-ir-children") (lambda (c) (let fnrec6970 ((c c)) (inline-node c ctx))) node)))))) inline-node) (let* ((_o$6971 (keyword #f "doc")) (_o$6972 "Bottom-up: inline children first, then attempt to inline this node.")) (jolt-hash-map _o$6971 _o$6972))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "flatten-let-bindings" (letrec ((flatten-let-bindings (lambda (binds) (let fnrec6973 ((binds binds)) (let* ((_a$6979 (lambda (out b) (let fnrec6974 ((out out) (b b)) (let* ((nm (jolt-nth b 0)) (init (jolt-nth b 1))) (if (jolt= (keyword #f "let") (jolt-get init (keyword #f "op"))) (begin (jolt-invoke (var-deref "jolt.passes.inline" "mark!")) (let* ((_a$6977 (jolt-reduce jolt-conj out (jolt-get init (keyword #f "bindings")))) (_a$6978 (let* ((_o$6975 nm) (_o$6976 (jolt-get init (keyword #f "body")))) (jolt-vector _o$6975 _o$6976)))) (jolt-conj _a$6977 _a$6978))) (jolt-conj out b)))))) (_a$6980 (jolt-vector)) (_a$6981 binds)) (jolt-reduce _a$6979 _a$6980 _a$6981)))))) flatten-let-bindings) (let* ((_o$6982 (keyword #f "private")) (_o$6983 #t)) (jolt-hash-map _o$6982 _o$6983))))
(guard (e (#t #f))
  (def-var! "jolt.passes.inline" "flatten-lets" (letrec ((flatten-lets (lambda (node) (let fnrec6984 ((node node)) (if (jolt= (keyword #f "let") (jolt-get node (keyword #f "op"))) (let* ((n (jolt-invoke (var-deref "jolt.ir" "map-ir-children") flatten-lets node))) (jolt-assoc n (keyword #f "bindings") (jolt-invoke (var-deref "jolt.passes.inline" "flatten-let-bindings") (jolt-get n (keyword #f "bindings"))))) (jolt-invoke (var-deref "jolt.ir" "map-ir-children") flatten-lets node)))))) flatten-lets)))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "pure-fns" (let* ((_o$6985 "+") (_o$6986 "-") (_o$6987 "*") (_o$6988 "/") (_o$6989 "<") (_o$6990 ">") (_o$6991 "<=") (_o$6992 ">=") (_o$6993 "=") (_o$6994 "not=") (_o$6995 "inc") (_o$6996 "dec") (_o$6997 "mod") (_o$6998 "rem") (_o$6999 "quot") (_o$7000 "min") (_o$7001 "max") (_o$7002 "abs") (_o$7003 "nil?") (_o$7004 "some?") (_o$7005 "not") (_o$7006 "get") (_o$7007 "zero?") (_o$7008 "pos?") (_o$7009 "neg?") (_o$7010 "even?") (_o$7011 "odd?") (_o$7012 "bit-and") (_o$7013 "bit-or") (_o$7014 "bit-xor")) (jolt-hash-set _o$6985 _o$6986 _o$6987 _o$6988 _o$6989 _o$6990 _o$6991 _o$6992 _o$6993 _o$6994 _o$6995 _o$6996 _o$6997 _o$6998 _o$6999 _o$7000 _o$7001 _o$7002 _o$7003 _o$7004 _o$7005 _o$7006 _o$7007 _o$7008 _o$7009 _o$7010 _o$7011 _o$7012 _o$7013 _o$7014)) (let* ((_o$7015 (keyword #f "private")) (_o$7016 #t)) (jolt-hash-map _o$7015 _o$7016))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "pure-fn?" (letrec ((pure-fn? (lambda (f) (let fnrec7017 ((f f)) (let* ((op (jolt-get f (keyword #f "op")))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.fold" "kw-callee?") f)) #t (if (jolt= op (keyword #f "var")) (let* ((and__25__auto (jolt= "clojure.core" (jolt-get f (keyword #f "ns"))))) (if (jolt-truthy? and__25__auto) (jolt-contains? (var-deref "jolt.passes.inline" "pure-fns") (jolt-get f (keyword #f "name"))) and__25__auto)) (if (jolt= op (keyword #f "host")) (jolt-contains? (var-deref "jolt.passes.inline" "pure-fns") (jolt-get f (keyword #f "name"))) (if (jolt-truthy? (keyword #f "else")) #f jolt-nil))))))))) pure-fn?) (let* ((_o$7018 (keyword #f "private")) (_o$7019 #t)) (jolt-hash-map _o$7018 _o$7019))))
(guard (e (#t #f))
  (declare-var! "jolt.passes.inline" "ctor-shape"))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "pure?" (letrec ((pure? (lambda (node) (let fnrec7020 ((node node)) (let* ((op (jolt-get node (keyword #f "op")))) (if (jolt= op (keyword #f "invoke")) (let* ((and__25__auto (let* ((or__26__auto (jolt-invoke (var-deref "jolt.passes.inline" "pure-fn?") (jolt-get node (keyword #f "fn"))))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt-invoke (var-deref "jolt.passes.inline" "ctor-shape") node))))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "clojure.core" "every?") pure? (jolt-get node (keyword #f "args"))) and__25__auto)) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.inline" "safe-op?") op)) (jolt-invoke (var-deref "jolt.ir" "reduce-ir-children") (lambda (ok c) (let fnrec7021 ((ok ok) (c c)) (let* ((and__25__auto ok)) (if (jolt-truthy? and__25__auto) (pure? c) and__25__auto)))) #t node) (if (jolt-truthy? (keyword #f "else")) #f jolt-nil)))))))) pure?) (let* ((_o$7022 (keyword #f "private")) (_o$7023 #t) (_o$7024 (keyword #f "doc")) (_o$7025 "Conservative: true only for expressions with no side effects that are safe to\n  duplicate or discard. A var/host ref is a pure read; an invoke is pure for a\n  known-pure fn (arithmetic, comparison, keyword lookup, get) or a record\n  constructor (an immutable struct alloc) whose args are themselves pure.")) (jolt-hash-map _o$7022 _o$7023 _o$7024 _o$7025))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "const-key-map?" (letrec ((const-key-map? (lambda (node) (let fnrec7026 ((node node)) (let* ((prs (jolt-get node (keyword #f "pairs")))) (let* ((and__25__auto (> (jolt-count prs) 0))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "clojure.core" "every?") (lambda (pr) (let fnrec7027 ((pr pr)) (jolt-invoke (var-deref "jolt.passes.fold" "scalar-const?") (jolt-nth pr 0)))) prs) and__25__auto))))))) const-key-map?) (let* ((_o$7028 (keyword #f "private")) (_o$7029 #t)) (jolt-hash-map _o$7028 _o$7029))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "all-vals-pure?" (letrec ((all-vals-pure? (lambda (node) (let fnrec7030 ((node node)) (let* ((_a$7032 (var-deref "clojure.core" "every?")) (_a$7033 (lambda (pr) (let fnrec7031 ((pr pr)) (jolt-invoke (var-deref "jolt.passes.inline" "pure?") (jolt-nth pr 1))))) (_a$7034 (jolt-get node (keyword #f "pairs")))) (jolt-invoke _a$7032 _a$7033 _a$7034)))))) all-vals-pure?) (let* ((_o$7035 (keyword #f "private")) (_o$7036 #t)) (jolt-hash-map _o$7035 _o$7036))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "map-val" (letrec ((map-val (lambda (mapnode k) (let fnrec7037 ((mapnode mapnode) (k k)) (let* ((prs (jolt-get mapnode (keyword #f "pairs"))) (n (jolt-count prs))) (let* ((i 0)) (let loop7038 ((i i)) (if (< i n) (let* ((pr (jolt-nth prs i))) (if (jolt= (jolt-get (jolt-nth pr 0) (keyword #f "val")) k) (jolt-nth pr 1) (loop7038 (jolt-inc i)))) (let* ((_o$7039 (keyword #f "op")) (_o$7040 (keyword #f "const")) (_o$7041 (keyword #f "val")) (_o$7042 jolt-nil)) (jolt-hash-map _o$7039 _o$7040 _o$7041 _o$7042)))))))))) map-val) (let* ((_o$7043 (keyword #f "private")) (_o$7044 #t) (_o$7045 (keyword #f "doc")) (_o$7046 "The value IR at scalar key k in a const-key map node, or a nil constant when k\n  is absent (struct-eligible literal: a missing key reads nil, like the back end).")) (jolt-hash-map _o$7043 _o$7044 _o$7045 _o$7046))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "lookup-key" (letrec ((lookup-key (lambda (node nm) (let fnrec7047 ((node node) (nm nm)) (if (jolt= (keyword #f "invoke") (jolt-get node (keyword #f "op"))) (let* ((f (jolt-get node (keyword #f "fn"))) (args (jolt-get node (keyword #f "args")))) (if (jolt-truthy? (let* ((and__25__auto (jolt-invoke (var-deref "jolt.passes.fold" "kw-callee?") f))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= 1 (jolt-count args)))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= (keyword #f "local") (jolt-get (jolt-nth args 0) (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (jolt= nm (jolt-get (jolt-nth args 0) (keyword #f "name"))) and__25__auto)) and__25__auto)) and__25__auto))) (jolt-get f (keyword #f "val")) (if (jolt-truthy? (let* ((and__25__auto (jolt-invoke (var-deref "jolt.passes.fold" "get-callee?") f))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= 2 (jolt-count args)))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= (keyword #f "local") (jolt-get (jolt-nth args 0) (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= nm (jolt-get (jolt-nth args 0) (keyword #f "name"))))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.passes.fold" "scalar-const?") (jolt-nth args 1)) and__25__auto)) and__25__auto)) and__25__auto)) and__25__auto))) (jolt-get (jolt-nth args 1) (keyword #f "val")) (if (jolt-truthy? (keyword #f "else")) jolt-nil jolt-nil)))) jolt-nil))))) lookup-key) (let* ((_o$7048 (keyword #f "private")) (_o$7049 #t) (_o$7050 (keyword #f "doc")) (_o$7051 "If node is a constant-keyword lookup of (:local nm) \x2014; either (:k nm) or\n  (get nm :k) \x2014; return the keyword k; else nil.")) (jolt-hash-map _o$7048 _o$7049 _o$7050 _o$7051))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "any-binding-named?" (letrec ((any-binding-named? (lambda (binds nm) (let fnrec7052 ((binds binds) (nm nm)) (let* ((i 0)) (let loop7053 ((i i)) (if (< i (jolt-count binds)) (if (jolt= nm (jolt-nth (jolt-nth binds i) 0)) #t (loop7053 (jolt-inc i))) #f))))))) any-binding-named?) (let* ((_o$7054 (keyword #f "private")) (_o$7055 #t)) (jolt-hash-map _o$7054 _o$7055))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "any-name?" (letrec ((any-name? (lambda (names nm) (let fnrec7056 ((names names) (nm nm)) (let* ((i 0)) (let loop7057 ((i i)) (if (< i (jolt-count names)) (if (jolt= nm (jolt-nth names i)) #t (loop7057 (jolt-inc i))) #f))))))) any-name?) (let* ((_o$7058 (keyword #f "private")) (_o$7059 #t)) (jolt-hash-map _o$7058 _o$7059))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "local-escapes?" (letrec ((local-escapes? (lambda (node nm) (let fnrec7060 ((node node) (nm nm)) (let* ((op (jolt-get node (keyword #f "op"))) (k (jolt-invoke (var-deref "jolt.passes.inline" "lookup-key") node nm))) (if (jolt-truthy? k) (let* ((args (jolt-get node (keyword #f "args")))) (if (> (jolt-count args) 1) (let* ((i 1)) (let loop7061 ((i i)) (if (< i (jolt-count args)) (if (jolt-truthy? (local-escapes? (jolt-nth args i) nm)) #t (loop7061 (jolt-inc i))) #f))) #f)) (if (jolt= op (keyword #f "local")) (jolt= nm (jolt-get node (keyword #f "name"))) (if (jolt= op (keyword #f "const")) #f (if (jolt= op (keyword #f "var")) #f (if (jolt= op (keyword #f "host")) #f (if (jolt= op (keyword #f "the-var")) #f (if (jolt= op (keyword #f "quote")) #f (if (jolt= op (keyword #f "if")) (let* ((or__26__auto (local-escapes? (jolt-get node (keyword #f "test")) nm))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (local-escapes? (jolt-get node (keyword #f "then")) nm))) (if (jolt-truthy? or__26__auto) or__26__auto (local-escapes? (jolt-get node (keyword #f "else")) nm))))) (if (jolt= op (keyword #f "do")) (let* ((or__26__auto (let* ((i 0) (ss (jolt-get node (keyword #f "statements")))) (let loop7062 ((i i) (ss ss)) (if (< i (jolt-count ss)) (if (jolt-truthy? (local-escapes? (jolt-nth ss i) nm)) #t (loop7062 (jolt-inc i) ss)) #f))))) (if (jolt-truthy? or__26__auto) or__26__auto (local-escapes? (jolt-get node (keyword #f "ret")) nm))) (if (jolt= op (keyword #f "throw")) (local-escapes? (jolt-get node (keyword #f "expr")) nm) (if (jolt= op (keyword #f "invoke")) (let* ((or__26__auto (local-escapes? (jolt-get node (keyword #f "fn")) nm))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((i 0) (as (jolt-get node (keyword #f "args")))) (let loop7063 ((i i) (as as)) (if (< i (jolt-count as)) (if (jolt-truthy? (local-escapes? (jolt-nth as i) nm)) #t (loop7063 (jolt-inc i) as)) #f))))) (if (jolt= op (keyword #f "vector")) (let* ((i 0) (xs (jolt-get node (keyword #f "items")))) (let loop7064 ((i i) (xs xs)) (if (< i (jolt-count xs)) (if (jolt-truthy? (local-escapes? (jolt-nth xs i) nm)) #t (loop7064 (jolt-inc i) xs)) #f))) (if (jolt= op (keyword #f "set")) (let* ((i 0) (xs (jolt-get node (keyword #f "items")))) (let loop7065 ((i i) (xs xs)) (if (< i (jolt-count xs)) (if (jolt-truthy? (local-escapes? (jolt-nth xs i) nm)) #t (loop7065 (jolt-inc i) xs)) #f))) (if (jolt= op (keyword #f "map")) (let* ((i 0) (ps (jolt-get node (keyword #f "pairs")))) (let loop7066 ((i i) (ps ps)) (if (< i (jolt-count ps)) (if (jolt-truthy? (let* ((or__26__auto (local-escapes? (jolt-nth (jolt-nth ps i) 0) nm))) (if (jolt-truthy? or__26__auto) or__26__auto (local-escapes? (jolt-nth (jolt-nth ps i) 1) nm)))) #t (loop7066 (jolt-inc i) ps)) #f))) (if (jolt= op (keyword #f "let")) (let* ((binds (jolt-get node (keyword #f "bindings")))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.inline" "any-binding-named?") binds nm)) #t (let* ((or__26__auto (let* ((i 0)) (let loop7067 ((i i)) (if (< i (jolt-count binds)) (if (jolt-truthy? (local-escapes? (jolt-nth (jolt-nth binds i) 1) nm)) #t (loop7067 (jolt-inc i))) #f))))) (if (jolt-truthy? or__26__auto) or__26__auto (local-escapes? (jolt-get node (keyword #f "body")) nm))))) (if (jolt= op (keyword #f "recur")) (let* ((i 0) (as (jolt-get node (keyword #f "args")))) (let loop7068 ((i i) (as as)) (if (< i (jolt-count as)) (if (jolt-truthy? (local-escapes? (jolt-nth as i) nm)) #t (loop7068 (jolt-inc i) as)) #f))) (if (jolt= op (keyword #f "loop")) (let* ((binds (jolt-get node (keyword #f "bindings")))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.inline" "any-binding-named?") binds nm)) #t (let* ((or__26__auto (let* ((i 0)) (let loop7069 ((i i)) (if (< i (jolt-count binds)) (if (jolt-truthy? (local-escapes? (jolt-nth (jolt-nth binds i) 1) nm)) #t (loop7069 (jolt-inc i))) #f))))) (if (jolt-truthy? or__26__auto) or__26__auto (local-escapes? (jolt-get node (keyword #f "body")) nm))))) (if (jolt= op (keyword #f "fn")) (let* ((i 0) (ars (jolt-get node (keyword #f "arities")))) (let loop7070 ((i i) (ars ars)) (if (< i (jolt-count ars)) (let* ((ar (jolt-nth ars i)) (ps (jolt-get ar (keyword #f "params")))) (if (jolt-truthy? (let* ((or__26__auto (jolt-invoke (var-deref "jolt.passes.inline" "any-name?") ps nm))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt= nm (jolt-get ar (keyword #f "rest")))))) #t (if (jolt-truthy? (local-escapes? (jolt-get ar (keyword #f "body")) nm)) #t (loop7070 (jolt-inc i) ars)))) #f))) (if (jolt= op (keyword #f "try")) (let* ((or__26__auto (local-escapes? (jolt-get node (keyword #f "body")) nm))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (let* ((cb (jolt-get node (keyword #f "catch-body")))) (let* ((and__25__auto cb)) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-not (jolt= nm (jolt-get node (keyword #f "catch-sym")))))) (if (jolt-truthy? and__25__auto) (local-escapes? cb nm) and__25__auto)) and__25__auto))))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((f (jolt-get node (keyword #f "finally")))) (let* ((and__25__auto f)) (if (jolt-truthy? and__25__auto) (local-escapes? f nm) and__25__auto))))))) (if (jolt= op (keyword #f "def")) (local-escapes? (jolt-get node (keyword #f "init")) nm) (if (jolt-truthy? (keyword #f "else")) #t jolt-nil)))))))))))))))))))))))))) local-escapes?) (let* ((_o$7071 (keyword #f "private")) (_o$7072 #t) (_o$7073 (keyword #f "doc")) (_o$7074 "Does local nm escape in node \x2014; i.e. is it used anywhere other than as the\n  subject of a constant-keyword lookup? Precise over straight-line expression\n  ops; conservatively true for loop/fn/try/recur/def (and any rebinding of nm),\n  so scalar replacement only fires where the whole use region is simple.\n\n  Stays an explicit per-op walk (not the shared reduce-ir-children fold): its\n  default is conservatively TRUE, and the lookup-subject and rebinding cases\n  inspect node shape beyond child purity \x2014; folding an unhandled op over its\n  children would under-report escape and is unsound for scalar replacement.")) (jolt-hash-map _o$7071 _o$7072 _o$7073 _o$7074))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "ctor-shape" (letrec ((ctor-shape (lambda (node) (let fnrec7075 ((node node)) (if (jolt= (keyword #f "invoke") (jolt-get node (keyword #f "op"))) (let* ((f (jolt-get node (keyword #f "fn")))) (if (jolt= (keyword #f "var") (jolt-get f (keyword #f "op"))) (let* ((rs (let* ((_a$7080 (jolt-invoke (var-deref "clojure.core" "deref") (var-deref "jolt.passes.inline" "rec-shapes"))) (_a$7081 (let* ((_a$7076 (var-deref "clojure.core" "str")) (_a$7077 (jolt-get f (keyword #f "ns"))) (_a$7078 "/") (_a$7079 (jolt-get f (keyword #f "name")))) (jolt-invoke _a$7076 _a$7077 _a$7078 _a$7079)))) (jolt-get _a$7080 _a$7081)))) (if (jolt-truthy? (let* ((and__25__auto rs)) (if (jolt-truthy? and__25__auto) (let* ((_a$7082 (jolt-count (jolt-get rs (keyword #f "fields")))) (_a$7083 (jolt-count (jolt-get node (keyword #f "args"))))) (jolt= _a$7082 _a$7083)) and__25__auto))) rs jolt-nil)) jolt-nil)) jolt-nil))))) ctor-shape) (let* ((_o$7084 (keyword #f "private")) (_o$7085 #t) (_o$7086 (keyword #f "doc")) (_o$7087 "If node is a record-constructor :invoke (its :fn a :var whose ns/name is a\n  registered ctor key, with arg count matching the declared field count), return\n  that record's shape entry; else nil.")) (jolt-hash-map _o$7084 _o$7085 _o$7086 _o$7087))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "ctor-all-args-pure?" (letrec ((ctor-all-args-pure? (lambda (node) (let fnrec7088 ((node node)) (jolt-invoke (var-deref "clojure.core" "every?") (var-deref "jolt.passes.inline" "pure?") (jolt-get node (keyword #f "args"))))))) ctor-all-args-pure?) (let* ((_o$7089 (keyword #f "private")) (_o$7090 #t)) (jolt-hash-map _o$7089 _o$7090))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "field-index" (letrec ((field-index (lambda (fields k) (let fnrec7091 ((fields fields) (k k)) (let* ((n (jolt-count fields))) (let* ((i 0)) (let loop7092 ((i i)) (if (< i n) (if (jolt= (jolt-nth fields i) k) i (loop7092 (jolt-inc i))) jolt-nil)))))))) field-index) (let* ((_o$7093 (keyword #f "private")) (_o$7094 #t) (_o$7095 (keyword #f "doc")) (_o$7096 "Index of scalar key k in the declared field tuple fields, or nil.")) (jolt-hash-map _o$7093 _o$7094 _o$7095 _o$7096))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "ctor-val" (letrec ((ctor-val (lambda (ctor rs k) (let fnrec7097 ((ctor ctor) (rs rs) (k k)) (let* ((_a$7098 (jolt-get ctor (keyword #f "args"))) (_a$7099 (jolt-invoke (var-deref "jolt.passes.inline" "field-index") (jolt-get rs (keyword #f "fields")) k))) (jolt-nth _a$7098 _a$7099)))))) ctor-val) (let* ((_o$7100 (keyword #f "private")) (_o$7101 #t) (_o$7102 (keyword #f "doc")) (_o$7103 "The positional arg IR at declared field k of record ctor node (shape rs). Only\n  called for a key known to be a field, so the index is always present.")) (jolt-hash-map _o$7100 _o$7101 _o$7102 _o$7103))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "collect-keys!" (letrec ((collect-keys! (lambda (node nm acc) (let fnrec7104 ((node node) (nm nm) (acc acc)) (let* ((k (jolt-invoke (var-deref "jolt.passes.inline" "lookup-key") node nm))) (if (jolt-truthy? k) (jolt-invoke (var-deref "clojure.core" "swap!") acc jolt-conj k) (jolt-invoke (var-deref "jolt.ir" "map-ir-children") (lambda (c) (let fnrec7105 ((c c)) (begin (collect-keys! c nm acc) c))) node))))))) collect-keys!) (let* ((_o$7106 (keyword #f "private")) (_o$7107 #t) (_o$7108 (keyword #f "doc")) (_o$7109 "Accumulate (into atom acc) every constant-keyword lookup key applied to local\n  nm in node. The caller has proven (via local-escapes?) that nm appears only as\n  a lookup subject and is never rebound, so a uniform recursion suffices: at a\n  lookup of nm we record the key and stop (its subject is nm itself); elsewhere\n  we recurse into children.")) (jolt-hash-map _o$7106 _o$7107 _o$7108 _o$7109))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "lookups-all-fields?" (letrec ((lookups-all-fields? (lambda (nodes nm fields) (let fnrec7110 ((nodes nodes) (nm nm) (fields fields)) (jolt-invoke (var-deref "clojure.core" "every?") (lambda (node) (let fnrec7111 ((node node)) (let* ((acc (jolt-invoke (var-deref "clojure.core" "atom") (jolt-hash-set)))) (begin (jolt-invoke (var-deref "jolt.passes.inline" "collect-keys!") node nm acc) (let* ((_a$7113 (var-deref "clojure.core" "every?")) (_a$7114 (lambda (k) (let fnrec7112 ((k k)) (jolt-invoke (var-deref "jolt.passes.inline" "field-index") fields k)))) (_a$7115 (jolt-invoke (var-deref "clojure.core" "deref") acc))) (jolt-invoke _a$7113 _a$7114 _a$7115)))))) nodes))))) lookups-all-fields?) (let* ((_o$7116 (keyword #f "private")) (_o$7117 #t) (_o$7118 (keyword #f "doc")) (_o$7119 "True if every lookup of nm across nodes uses a declared field in fields \x2014; the\n  record-only guard that keeps a :jolt/deftype/unknown-key read (not a positional\n  arg) from being folded to the wrong value.")) (jolt-hash-map _o$7116 _o$7117 _o$7118 _o$7119))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "src-val" (letrec ((src-val (lambda (src k) (let fnrec7120 ((src src) (k k)) (if (jolt= (keyword #f "map") (jolt-get src (keyword #f "op"))) (jolt-invoke (var-deref "jolt.passes.inline" "map-val") src k) (jolt-invoke (var-deref "jolt.passes.inline" "ctor-val") src (jolt-invoke (var-deref "jolt.passes.inline" "ctor-shape") src) k)))))) src-val) (let* ((_o$7121 (keyword #f "private")) (_o$7122 #t) (_o$7123 (keyword #f "doc")) (_o$7124 "Field value at k from a foldable struct source \x2014; a const-key map (absent key\n  -> nil, struct-map semantics) or a record ctor (k is always a declared field\n  here, guaranteed by lookups-all-fields?).")) (jolt-hash-map _o$7121 _o$7122 _o$7123 _o$7124))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "subst-lookup" (letrec ((subst-lookup (lambda (node nm src) (let fnrec7125 ((node node) (nm nm) (src src)) (let* ((k (jolt-invoke (var-deref "jolt.passes.inline" "lookup-key") node nm))) (if (jolt-truthy? k) (jolt-invoke (var-deref "jolt.passes.inline" "src-val") src k) (jolt-invoke (var-deref "jolt.ir" "map-ir-children") (lambda (c) (let fnrec7126 ((c c)) (subst-lookup c nm src))) node))))))) subst-lookup) (let* ((_o$7127 (keyword #f "private")) (_o$7128 #t) (_o$7129 (keyword #f "doc")) (_o$7130 "Replace every (:k nm)/(get nm :k) in node with the source value at k. The\n  caller guarantees (via local-escapes?) that nm is never rebound here and\n  appears only as a lookup subject, so no shadowing logic is needed.")) (jolt-hash-map _o$7127 _o$7128 _o$7129 _o$7130))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "fold-kw-literal" (letrec ((fold-kw-literal (lambda (node) (let fnrec7131 ((node node)) (let* ((f (jolt-get node (keyword #f "fn"))) (args (jolt-get node (keyword #f "args")))) (if (jolt-truthy? (let* ((and__25__auto (jolt-invoke (var-deref "jolt.passes.fold" "kw-callee?") f))) (if (jolt-truthy? and__25__auto) (jolt= 1 (jolt-count args)) and__25__auto))) (let* ((m (jolt-nth args 0)) (k (jolt-get f (keyword #f "val")))) (if (jolt-truthy? (let* ((and__25__auto (jolt= (keyword #f "map") (jolt-get m (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-invoke (var-deref "jolt.passes.inline" "const-key-map?") m))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.passes.inline" "all-vals-pure?") m) and__25__auto)) and__25__auto))) (begin (jolt-invoke (var-deref "jolt.passes.inline" "mark!")) (jolt-invoke (var-deref "jolt.passes.inline" "map-val") m k)) (let* ((rs (jolt-invoke (var-deref "jolt.passes.inline" "ctor-shape") m))) (if (jolt-truthy? (let* ((and__25__auto rs)) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-invoke (var-deref "jolt.passes.inline" "ctor-all-args-pure?") m))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.passes.inline" "field-index") (jolt-get rs (keyword #f "fields")) k) and__25__auto)) and__25__auto))) (begin (jolt-invoke (var-deref "jolt.passes.inline" "mark!")) (jolt-invoke (var-deref "jolt.passes.inline" "ctor-val") m rs k)) node)))) node)))))) fold-kw-literal) (let* ((_o$7132 (keyword #f "private")) (_o$7133 #t) (_o$7134 (keyword #f "doc")) (_o$7135 "(a) (:k <source>) -> the value at k. <source> is a const-key pure map\n  ((:k {:k a ..}) -> a) or a pure record ctor ((:k (->Rec a ..)) -> the arg for\n  field k). Siblings are duplicated/discarded, so all must be pure; a record\n  lookup folds only for a declared field.")) (jolt-hash-map _o$7132 _o$7133 _o$7134 _o$7135))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "elim-let-structs" (letrec ((elim-let-structs (lambda (node) (let fnrec7136 ((node node)) (let* ((binds (jolt-get node (keyword #f "bindings"))) (n (jolt-count binds)) (body (jolt-get node (keyword #f "body")))) (let* ((i 0)) (let loop7137 ((i i)) (if (< i n) (let* ((b (jolt-nth binds i)) (nm (jolt-nth b 0)) (init (jolt-nth b 1)) (ismap (let* ((and__25__auto (jolt= (keyword #f "map") (jolt-get init (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-invoke (var-deref "jolt.passes.inline" "const-key-map?") init))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.passes.inline" "all-vals-pure?") init) and__25__auto)) and__25__auto))) (rs (if (jolt-not ismap) (jolt-invoke (var-deref "jolt.passes.inline" "ctor-shape") init) jolt-nil)) (isrec (let* ((and__25__auto rs)) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.passes.inline" "ctor-all-args-pure?") init) and__25__auto)))) (if (jolt-truthy? (let* ((and__25__auto (let* ((or__26__auto ismap)) (if (jolt-truthy? or__26__auto) or__26__auto isrec)))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-not (jolt-invoke (var-deref "jolt.passes.inline" "any-binding-named?") (jolt-invoke (var-deref "clojure.core" "subvec") binds (jolt-inc i) n) nm)))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-not (let* ((j (jolt-inc i))) (let loop7138 ((j j)) (if (< j n) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.inline" "local-escapes?") (jolt-nth (jolt-nth binds j) 1) nm)) #t (loop7138 (jolt-inc j))) #f)))))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-not (jolt-invoke (var-deref "jolt.passes.inline" "local-escapes?") body nm)))) (if (jolt-truthy? and__25__auto) (let* ((or__26__auto ismap)) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((_a$7143 (var-deref "jolt.passes.inline" "lookups-all-fields?")) (_a$7144 (jolt-conj (let* ((_a$7140 (var-deref "clojure.core" "mapv")) (_a$7141 (lambda (bb) (let fnrec7139 ((bb bb)) (jolt-nth bb 1)))) (_a$7142 (jolt-invoke (var-deref "clojure.core" "subvec") binds (jolt-inc i) n))) (jolt-invoke _a$7140 _a$7141 _a$7142)) body)) (_a$7145 nm) (_a$7146 (jolt-get rs (keyword #f "fields")))) (jolt-invoke _a$7143 _a$7144 _a$7145 _a$7146)))) and__25__auto)) and__25__auto)) and__25__auto)) and__25__auto))) (let* ((head (jolt-invoke (var-deref "clojure.core" "subvec") binds 0 i)) (tail (let* ((_a$7150 (var-deref "clojure.core" "mapv")) (_a$7151 (lambda (bb) (let fnrec7147 ((bb bb)) (let* ((_o$7148 (jolt-nth bb 0)) (_o$7149 (jolt-invoke (var-deref "jolt.passes.inline" "subst-lookup") (jolt-nth bb 1) nm init))) (jolt-vector _o$7148 _o$7149))))) (_a$7152 (jolt-invoke (var-deref "clojure.core" "subvec") binds (jolt-inc i) n))) (jolt-invoke _a$7150 _a$7151 _a$7152))) (newbinds (jolt-reduce jolt-conj head tail)) (newbody (jolt-invoke (var-deref "jolt.passes.inline" "subst-lookup") body nm init))) (begin (jolt-invoke (var-deref "jolt.passes.inline" "mark!")) (if (jolt= 0 (jolt-count newbinds)) newbody (jolt-assoc node (keyword #f "bindings") newbinds (keyword #f "body") newbody)))) (loop7137 (jolt-inc i)))) node)))))))) elim-let-structs) (let* ((_o$7153 (keyword #f "private")) (_o$7154 #t) (_o$7155 (keyword #f "doc")) (_o$7156 "(b) Drop the first non-escaping let binding whose init is a foldable struct\n  source \x2014; a pure const-key map literal or a pure record ctor \x2014; substituting its\n  field reads into the remaining bindings and body. Fixpoint re-runs us for the\n  rest, so one elimination per call keeps it simple. For a record every lookup\n  of the binding must hit a declared field, else we keep the allocation.")) (jolt-hash-map _o$7153 _o$7154 _o$7155 _o$7156))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.inline" "scalar-replace" (letrec ((scalar-replace (lambda (node) (let fnrec7157 ((node node)) (let* ((op (jolt-get node (keyword #f "op")))) (if (jolt= op (keyword #f "invoke")) (jolt-invoke (var-deref "jolt.passes.inline" "fold-kw-literal") (jolt-invoke (var-deref "jolt.ir" "map-ir-children") scalar-replace node)) (if (jolt= op (keyword #f "let")) (jolt-invoke (var-deref "jolt.passes.inline" "elim-let-structs") (jolt-invoke (var-deref "jolt.ir" "map-ir-children") scalar-replace node)) (if (jolt-truthy? (keyword #f "else")) (jolt-invoke (var-deref "jolt.ir" "map-ir-children") scalar-replace node) jolt-nil)))))))) scalar-replace) (let* ((_o$7158 (keyword #f "doc")) (_o$7159 "Bottom-up: scalar-replace children, then apply (a) at invokes / (b) at lets.")) (jolt-hash-map _o$7158 _o$7159))))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "velem" (letrec ((velem (lambda (t) (let fnrec6388 ((t t)) (jolt-get t (keyword #f "vec")))))) velem)))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "selem" (letrec ((selem (lambda (t) (let fnrec6389 ((t t)) (jolt-get t (keyword #f "set")))))) selem)))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "sfields" (letrec ((sfields (lambda (t) (let fnrec6390 ((t t)) (jolt-get t (keyword #f "struct")))))) sfields)))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "vec-type?" (letrec ((vec-type? (lambda (t) (let fnrec6391 ((t t)) (jolt-some? (jolt-invoke (var-deref "jolt.passes.types.lattice" "velem") t)))))) vec-type?)))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "set-type?" (letrec ((set-type? (lambda (t) (let fnrec6392 ((t t)) (jolt-some? (jolt-invoke (var-deref "jolt.passes.types.lattice" "selem") t)))))) set-type?)))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "struct-type?" (letrec ((struct-type? (lambda (t) (let fnrec6393 ((t t)) (jolt-some? (jolt-invoke (var-deref "jolt.passes.types.lattice" "sfields") t)))))) struct-type?)))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "mk-vec" (letrec ((mk-vec (lambda (t) (let fnrec6394 ((t t)) (let* ((_o$6395 (keyword #f "vec")) (_o$6396 (if (jolt-truthy? t) t (keyword #f "any")))) (jolt-hash-map _o$6395 _o$6396)))))) mk-vec)))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "mk-set" (letrec ((mk-set (lambda (t) (let fnrec6397 ((t t)) (let* ((_o$6398 (keyword #f "set")) (_o$6399 (if (jolt-truthy? t) t (keyword #f "any")))) (jolt-hash-map _o$6398 _o$6399)))))) mk-set)))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "mk-struct" (letrec ((mk-struct (lambda (fs) (let fnrec6400 ((fs fs)) (let* ((_o$6401 (keyword #f "struct")) (_o$6402 fs)) (jolt-hash-map _o$6401 _o$6402)))))) mk-struct)))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "union-cap" 4))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "scalar-t?" (letrec ((scalar-t? (lambda (t) (let fnrec6403 ((t t)) (let* ((or__26__auto (jolt= t (keyword #f "num")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt= t (keyword #f "str")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt= t (keyword #f "kw")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt= t (keyword #f "truthy")))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt= t (keyword #f "phm")))))))))))))) scalar-t?)))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "union-type?" (letrec ((union-type? (lambda (t) (let fnrec6404 ((t t)) (jolt-some? (jolt-get t (keyword #f "union"))))))) union-type?)))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "umembers" (letrec ((umembers (lambda (t) (let fnrec6405 ((t t)) (jolt-get t (keyword #f "union")))))) umembers)))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types.lattice" "union-of" (letrec ((union-of (lambda (ts) (let fnrec6406 ((ts ts)) (let* ((flat (let* ((_a$6408 (lambda (acc t) (let fnrec6407 ((acc acc) (t t)) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "union-type?") t)) (jolt-reduce jolt-conj acc (jolt-invoke (var-deref "jolt.passes.types.lattice" "umembers") t)) (jolt-conj acc t))))) (_a$6409 (jolt-hash-set)) (_a$6410 ts)) (jolt-reduce _a$6408 _a$6409 _a$6410)))) (if (jolt-not (jolt-invoke (var-deref "clojure.core" "every?") (var-deref "jolt.passes.types.lattice" "scalar-t?") flat)) (keyword #f "any") (if (jolt= 0 (jolt-count flat)) (keyword #f "any") (if (jolt= 1 (jolt-count flat)) (jolt-first flat) (if (> (jolt-count flat) (var-deref "jolt.passes.types.lattice" "union-cap")) (keyword #f "any") (if (jolt-truthy? (keyword #f "else")) (let* ((_o$6411 (keyword #f "union")) (_o$6412 flat)) (jolt-hash-map _o$6411 _o$6412)) jolt-nil)))))))))) union-of) (let* ((_o$6413 (keyword #f "doc")) (_o$6414 "Normalize a seq of member types into a lattice value: flatten nested unions,\n  keep only scalars (any non-scalar member collapses the whole thing to :any,\n  the conservative top), then return the lone member if one, {:union #{...}}\n  for 2..cap distinct scalars, or :any past the cap.")) (jolt-hash-map _o$6413 _o$6414))))
(guard (e (#t #f))
  (declare-var! "jolt.passes.types.lattice" "join-t"))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types.lattice" "merge-fields" (letrec ((merge-fields (lambda (fa fb) (let fnrec6415 ((fa fa) (fb fb)) (let* ((m1 (let* ((_a$6420 (lambda (m k) (let fnrec6416 ((m m) (k k)) (jolt-assoc m k (let* ((_a$6417 (var-deref "jolt.passes.types.lattice" "join-t")) (_a$6418 (jolt-get fa k (keyword #f "any"))) (_a$6419 (jolt-get fb k (keyword #f "any")))) (jolt-invoke _a$6417 _a$6418 _a$6419)))))) (_a$6421 (jolt-hash-map)) (_a$6422 (jolt-keys fa))) (jolt-reduce _a$6420 _a$6421 _a$6422)))) (let* ((_a$6427 (lambda (m k) (let fnrec6423 ((m m) (k k)) (if (jolt-truthy? (jolt-get m k)) m (jolt-assoc m k (let* ((_a$6424 (var-deref "jolt.passes.types.lattice" "join-t")) (_a$6425 (jolt-get fa k (keyword #f "any"))) (_a$6426 (jolt-get fb k (keyword #f "any")))) (jolt-invoke _a$6424 _a$6425 _a$6426))))))) (_a$6428 m1) (_a$6429 (jolt-keys fb))) (jolt-reduce _a$6427 _a$6428 _a$6429))))))) merge-fields) (let* ((_o$6430 (keyword #f "doc")) (_o$6431 "Per-field join of two field maps (a key in only one side joins with :any).")) (jolt-hash-map _o$6430 _o$6431))))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "join-t" (letrec ((join-t (lambda (a b) (let fnrec6432 ((a a) (b b)) (if (jolt= a b) a (if (jolt-nil? a) b (if (jolt-nil? b) a (if (let* ((or__26__auto (jolt= a (keyword #f "nil")))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt= b (keyword #f "nil")))) (let* ((o (if (jolt= a (keyword #f "nil")) b a))) (if (jolt= o (keyword #f "nil")) (keyword #f "nil") (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "struct-type?") o)) (jolt-assoc o (keyword #f "nilable") #t) (if (jolt-truthy? (keyword #f "else")) (keyword #f "any") jolt-nil)))) (if (let* ((or__26__auto (jolt= a (keyword #f "double")))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt= b (keyword #f "double")))) (let* ((_a$6433 (if (jolt= a (keyword #f "double")) (keyword #f "num") a)) (_a$6434 (if (jolt= b (keyword #f "double")) (keyword #f "num") b))) (join-t _a$6433 _a$6434)) (if (jolt-truthy? (let* ((and__25__auto (jolt-invoke (var-deref "jolt.passes.types.lattice" "struct-type?") a))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.passes.types.lattice" "struct-type?") b) and__25__auto))) (let* ((merged (jolt-invoke (var-deref "jolt.passes.types.lattice" "mk-struct") (let* ((_a$6435 (var-deref "jolt.passes.types.lattice" "merge-fields")) (_a$6436 (jolt-invoke (var-deref "jolt.passes.types.lattice" "sfields") a)) (_a$6437 (jolt-invoke (var-deref "jolt.passes.types.lattice" "sfields") b))) (jolt-invoke _a$6435 _a$6436 _a$6437)))) (merged (if (jolt-truthy? (let* ((and__25__auto (jolt-get a (keyword #f "shape")))) (if (jolt-truthy? and__25__auto) (let* ((_a$6438 (jolt-get a (keyword #f "shape"))) (_a$6439 (jolt-get b (keyword #f "shape")))) (jolt= _a$6438 _a$6439)) and__25__auto))) (jolt-assoc merged (keyword #f "shape") (jolt-get a (keyword #f "shape"))) merged)) (merged (if (jolt-truthy? (let* ((and__25__auto (jolt-get a (keyword #f "type")))) (if (jolt-truthy? and__25__auto) (let* ((_a$6440 (jolt-get a (keyword #f "type"))) (_a$6441 (jolt-get b (keyword #f "type")))) (jolt= _a$6440 _a$6441)) and__25__auto))) (jolt-assoc merged (keyword #f "type") (jolt-get a (keyword #f "type"))) merged)) (merged (if (jolt-truthy? (let* ((or__26__auto (jolt-get a (keyword #f "nilable")))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt-get b (keyword #f "nilable"))))) (jolt-assoc merged (keyword #f "nilable") #t) merged))) merged) (if (jolt-truthy? (let* ((and__25__auto (jolt-invoke (var-deref "jolt.passes.types.lattice" "vec-type?") a))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.passes.types.lattice" "vec-type?") b) and__25__auto))) (jolt-invoke (var-deref "jolt.passes.types.lattice" "mk-vec") (let* ((_a$6442 (jolt-invoke (var-deref "jolt.passes.types.lattice" "velem") a)) (_a$6443 (jolt-invoke (var-deref "jolt.passes.types.lattice" "velem") b))) (join-t _a$6442 _a$6443))) (if (jolt-truthy? (let* ((and__25__auto (jolt-invoke (var-deref "jolt.passes.types.lattice" "set-type?") a))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.passes.types.lattice" "set-type?") b) and__25__auto))) (jolt-invoke (var-deref "jolt.passes.types.lattice" "mk-set") (let* ((_a$6444 (jolt-invoke (var-deref "jolt.passes.types.lattice" "selem") a)) (_a$6445 (jolt-invoke (var-deref "jolt.passes.types.lattice" "selem") b))) (join-t _a$6444 _a$6445))) (if (jolt-truthy? (keyword #f "else")) (let* ((ma (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "union-type?") a)) (jolt-invoke (var-deref "jolt.passes.types.lattice" "umembers") a) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "scalar-t?") a)) (jolt-hash-set a) (if (jolt-truthy? (keyword #f "else")) jolt-nil jolt-nil)))) (mb (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "union-type?") b)) (jolt-invoke (var-deref "jolt.passes.types.lattice" "umembers") b) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "scalar-t?") b)) (jolt-hash-set b) (if (jolt-truthy? (keyword #f "else")) jolt-nil jolt-nil))))) (if (jolt-truthy? (let* ((and__25__auto ma)) (if (jolt-truthy? and__25__auto) mb and__25__auto))) (jolt-invoke (var-deref "jolt.passes.types.lattice" "union-of") (jolt-reduce jolt-conj ma mb)) (keyword #f "any"))) jolt-nil))))))))))))) join-t)))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "join" (letrec ((join (lambda (a b) (let fnrec6446 ((a a) (b b)) (jolt-invoke (var-deref "jolt.passes.types.lattice" "join-t") a b))))) join)))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "type-depth" 4))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "cap" (letrec ((cap (lambda (t d) (let fnrec6447 ((t t) (d d)) (if (<= d 0) (if (jolt-truthy? (let* ((or__26__auto (jolt-invoke (var-deref "jolt.passes.types.lattice" "struct-type?") t))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt-invoke (var-deref "jolt.passes.types.lattice" "vec-type?") t))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt-invoke (var-deref "jolt.passes.types.lattice" "set-type?") t)))))) (keyword #f "any") t) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "struct-type?") t)) (let* ((capped (jolt-invoke (var-deref "jolt.passes.types.lattice" "mk-struct") (let* ((_a$6451 (lambda (m k) (let fnrec6448 ((m m) (k k)) (jolt-assoc m k (let* ((_a$6449 (jolt-get (jolt-invoke (var-deref "jolt.passes.types.lattice" "sfields") t) k)) (_a$6450 (jolt-dec d))) (cap _a$6449 _a$6450)))))) (_a$6452 (jolt-hash-map)) (_a$6453 (jolt-keys (jolt-invoke (var-deref "jolt.passes.types.lattice" "sfields") t)))) (jolt-reduce _a$6451 _a$6452 _a$6453)))) (capped (if (jolt-truthy? (jolt-get t (keyword #f "shape"))) (jolt-assoc capped (keyword #f "shape") (jolt-get t (keyword #f "shape"))) capped)) (capped (if (jolt-truthy? (jolt-get t (keyword #f "type"))) (jolt-assoc capped (keyword #f "type") (jolt-get t (keyword #f "type"))) capped))) capped) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "vec-type?") t)) (jolt-invoke (var-deref "jolt.passes.types.lattice" "mk-vec") (let* ((_a$6454 (jolt-invoke (var-deref "jolt.passes.types.lattice" "velem") t)) (_a$6455 (jolt-dec d))) (cap _a$6454 _a$6455))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "set-type?") t)) (jolt-invoke (var-deref "jolt.passes.types.lattice" "mk-set") (let* ((_a$6456 (jolt-invoke (var-deref "jolt.passes.types.lattice" "selem") t)) (_a$6457 (jolt-dec d))) (cap _a$6456 _a$6457))) (if (jolt-truthy? (keyword #f "else")) t jolt-nil))))))))) cap)))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "struct-safe?" (letrec ((struct-safe? (lambda (t) (let fnrec6458 ((t t)) (jolt-invoke (var-deref "jolt.passes.types.lattice" "struct-type?") t))))) struct-safe?)))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "field-type" (letrec ((field-type (lambda (t k) (let fnrec6459 ((t t) (k k)) (if (jolt-truthy? (let* ((and__25__auto (jolt-invoke (var-deref "jolt.passes.types.lattice" "struct-type?") t))) (if (jolt-truthy? and__25__auto) (jolt-not (jolt-get t (keyword #f "nilable"))) and__25__auto))) (jolt-get (jolt-invoke (var-deref "jolt.passes.types.lattice" "sfields") t) k (keyword #f "any")) (keyword #f "any")))))) field-type)))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "nilable?" (letrec ((nilable? (lambda (t) (let fnrec6460 ((t t)) (let* ((and__25__auto (jolt-invoke (var-deref "clojure.core" "map?") t))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-get t (keyword #f "nilable")))) (if (jolt-truthy? and__25__auto) #t and__25__auto)) and__25__auto)))))) nilable?)))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "strip-nilable" (letrec ((strip-nilable (lambda (t) (let fnrec6461 ((t t)) (if (jolt-truthy? (let* ((and__25__auto (jolt-invoke (var-deref "clojure.core" "map?") t))) (if (jolt-truthy? and__25__auto) (jolt-get t (keyword #f "nilable")) and__25__auto))) (jolt-dissoc t (keyword #f "nilable")) t))))) strip-nilable)))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types.lattice" "shape-order" (letrec ((shape-order (lambda (ks) (let fnrec6462 ((ks ks)) (jolt-invoke (var-deref "clojure.core" "vec") (jolt-invoke (var-deref "clojure.core" "sort") (lambda (a b) (let fnrec6463 ((a a) (b b)) (let* ((_a$6464 (var-deref "clojure.core" "compare")) (_a$6465 (jolt-invoke (var-deref "clojure.core" "str") a)) (_a$6466 (jolt-invoke (var-deref "clojure.core" "str") b))) (jolt-invoke _a$6464 _a$6465 _a$6466)))) ks)))))) shape-order) (let* ((_o$6467 (keyword #f "doc")) (_o$6468 "Canonical key order for a shape: keys sorted by their string form, so two\n  literals with the same keys in any order intern to the same shape.")) (jolt-hash-map _o$6467 _o$6468))))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "type-shape" (letrec ((type-shape (lambda (t) (let fnrec6469 ((t t)) (jolt-get t (keyword #f "shape")))))) type-shape)))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "mark-struct" (letrec ((mark-struct (lambda (node t) (let fnrec6470 ((node node) (t t)) (let* ((n (jolt-assoc node (keyword #f "hint") (keyword #f "struct")))) (if (jolt-truthy? (jolt-get t (keyword #f "shape"))) (jolt-assoc n (keyword #f "shape") (jolt-get t (keyword #f "shape"))) n)))))) mark-struct)))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "truthy-type?" (letrec ((truthy-type? (lambda (t) (let fnrec6471 ((t t)) (let* ((or__26__auto (jolt= t (keyword #f "num")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt= t (keyword #f "double")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt= t (keyword #f "str")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt= t (keyword #f "kw")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt= t (keyword #f "truthy")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt= t (keyword #f "phm")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (let* ((and__25__auto (jolt-invoke (var-deref "jolt.passes.types.lattice" "struct-type?") t))) (if (jolt-truthy? and__25__auto) (jolt-not (jolt-get t (keyword #f "nilable"))) and__25__auto)))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt-invoke (var-deref "jolt.passes.types.lattice" "vec-type?") t))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt-invoke (var-deref "jolt.passes.types.lattice" "set-type?") t))))))))))))))))))))) truthy-type?)))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "num-ret-fns" (let* ((_o$6472 "+") (_o$6473 "-") (_o$6474 "*") (_o$6475 "/") (_o$6476 "inc") (_o$6477 "dec") (_o$6478 "mod") (_o$6479 "rem") (_o$6480 "quot") (_o$6481 "min") (_o$6482 "max") (_o$6483 "abs") (_o$6484 "bit-and") (_o$6485 "bit-or") (_o$6486 "bit-xor") (_o$6487 "count")) (jolt-hash-set _o$6472 _o$6473 _o$6474 _o$6475 _o$6476 _o$6477 _o$6478 _o$6479 _o$6480 _o$6481 _o$6482 _o$6483 _o$6484 _o$6485 _o$6486 _o$6487))))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.lattice" "vector-ret-fns" (let* ((_o$6488 "vec") (_o$6489 "vector") (_o$6490 "mapv") (_o$6491 "filterv") (_o$6492 "subvec")) (jolt-hash-set _o$6488 _o$6489 _o$6490 _o$6491 _o$6492))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types.check" "not-number?" (letrec ((not-number? (lambda (t) (let fnrec6493 ((t t)) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "union-type?") t)) (jolt-invoke (var-deref "clojure.core" "every?") not-number? (jolt-invoke (var-deref "jolt.passes.types.lattice" "umembers") t)) (let* ((or__26__auto (jolt= t (keyword #f "str")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt= t (keyword #f "kw")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt= t (keyword #f "phm")))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt-invoke (var-deref "jolt.passes.types.lattice" "struct-type?") t))) (if (jolt-truthy? or__26__auto) or__26__auto (let* ((or__26__auto (jolt-invoke (var-deref "jolt.passes.types.lattice" "vec-type?") t))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt-invoke (var-deref "jolt.passes.types.lattice" "set-type?") t)))))))))))))))) not-number?) (let* ((_o$6494 (keyword #f "private")) (_o$6495 #t)) (jolt-hash-map _o$6494 _o$6495))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types.check" "not-seqable?" (letrec ((not-seqable? (lambda (t) (let fnrec6496 ((t t)) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "union-type?") t)) (jolt-invoke (var-deref "clojure.core" "every?") not-seqable? (jolt-invoke (var-deref "jolt.passes.types.lattice" "umembers") t)) (let* ((or__26__auto (jolt= t (keyword #f "num")))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt= t (keyword #f "kw"))))))))) not-seqable?) (let* ((_o$6497 (keyword #f "private")) (_o$6498 #t)) (jolt-hash-map _o$6497 _o$6498))))
(guard (e (#t #f))
  (def-var! "jolt.passes.types.check" "not-callable?" (letrec ((not-callable? (lambda (t) (let fnrec6499 ((t t)) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "union-type?") t)) (jolt-invoke (var-deref "clojure.core" "every?") not-callable? (jolt-invoke (var-deref "jolt.passes.types.lattice" "umembers") t)) (let* ((or__26__auto (jolt= t (keyword #f "num")))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt= t (keyword #f "str"))))))))) not-callable?)))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types.check" "num-ops" (let* ((_o$6500 "+") (_o$6501 "-") (_o$6502 "*") (_o$6503 "/") (_o$6504 "inc") (_o$6505 "dec") (_o$6506 "mod") (_o$6507 "rem") (_o$6508 "quot") (_o$6509 "min") (_o$6510 "max") (_o$6511 "abs") (_o$6512 "bit-and") (_o$6513 "bit-or") (_o$6514 "bit-xor") (_o$6515 "bit-not") (_o$6516 "bit-shift-left") (_o$6517 "bit-shift-right")) (jolt-hash-set _o$6500 _o$6501 _o$6502 _o$6503 _o$6504 _o$6505 _o$6506 _o$6507 _o$6508 _o$6509 _o$6510 _o$6511 _o$6512 _o$6513 _o$6514 _o$6515 _o$6516 _o$6517)) (let* ((_o$6518 (keyword #f "private")) (_o$6519 #t)) (jolt-hash-map _o$6518 _o$6519))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types.check" "seq-ops" (let* ((_o$6520 "count") (_o$6521 "first") (_o$6522 "rest") (_o$6523 "next") (_o$6524 "seq") (_o$6525 "nth")) (jolt-hash-set _o$6520 _o$6521 _o$6522 _o$6523 _o$6524 _o$6525)) (let* ((_o$6526 (keyword #f "private")) (_o$6527 #t)) (jolt-hash-map _o$6526 _o$6527))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types.check" "type-name" (letrec ((type-name (lambda (t) (let fnrec6528 ((t t)) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "union-type?") t)) (let* ((_a$6530 (lambda (s m) (let fnrec6529 ((s s) (m m)) (if (jolt= s "") (type-name m) (jolt-invoke (var-deref "clojure.core" "str") s " or " (type-name m)))))) (_a$6531 "") (_a$6532 (jolt-invoke (var-deref "jolt.passes.types.lattice" "umembers") t))) (jolt-reduce _a$6530 _a$6531 _a$6532)) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "struct-type?") t)) "a map" (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "vec-type?") t)) "a vector" (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "set-type?") t)) "a set" (if (jolt= t (keyword #f "str")) "a string" (if (jolt= t (keyword #f "kw")) "a keyword" (if (jolt= t (keyword #f "num")) "a number" (if (jolt= t (keyword #f "phm")) "a map" (if (jolt-truthy? (keyword #f "else")) (jolt-invoke (var-deref "clojure.core" "str") t) jolt-nil))))))))))))) type-name) (let* ((_o$6533 (keyword #f "doc")) (_o$6534 "Render an inferred type for an error message.")) (jolt-hash-map _o$6533 _o$6534))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types.check" "check-invoke" (letrec ((check-invoke (lambda (cn args arg-types pos env) (let fnrec6535 ((cn cn) (args args) (arg-types arg-types) (pos pos) (env env)) (if (jolt-contains? (var-deref "jolt.passes.types.check" "num-ops") cn) (let* ((_a$6558 (lambda (_ i) (let fnrec6536 ((_ _) (i i)) (begin (let* ((t (jolt-nth arg-types i))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.check" "not-number?") t)) (let* ((_a$6554 (var-deref "clojure.core" "swap!")) (_a$6555 (jolt-get env (keyword #f "diags"))) (_a$6556 jolt-conj) (_a$6557 (let* ((_o$6544 (keyword #f "op")) (_o$6545 cn) (_o$6546 (keyword #f "argpos")) (_o$6547 i) (_o$6548 (keyword #f "type")) (_o$6549 (jolt-invoke (var-deref "jolt.passes.types.check" "type-name") t)) (_o$6550 (keyword #f "pos")) (_o$6551 pos) (_o$6552 (keyword #f "msg")) (_o$6553 (let* ((_a$6537 (var-deref "clojure.core" "str")) (_a$6538 "`") (_a$6539 cn) (_a$6540 "` requires a number, but argument ") (_a$6541 (jolt-inc i)) (_a$6542 " is ") (_a$6543 (jolt-invoke (var-deref "jolt.passes.types.check" "type-name") t))) (jolt-invoke _a$6537 _a$6538 _a$6539 _a$6540 _a$6541 _a$6542 _a$6543)))) (jolt-hash-map _o$6544 _o$6545 _o$6546 _o$6547 _o$6548 _o$6549 _o$6550 _o$6551 _o$6552 _o$6553)))) (jolt-invoke _a$6554 _a$6555 _a$6556 _a$6557)) jolt-nil)) jolt-nil)))) (_a$6559 jolt-nil) (_a$6560 (jolt-range (jolt-count args)))) (jolt-reduce _a$6558 _a$6559 _a$6560)) (if (let* ((and__25__auto (jolt-contains? (var-deref "jolt.passes.types.check" "seq-ops") cn))) (if (jolt-truthy? and__25__auto) (> (jolt-count args) 0) and__25__auto)) (let* ((t (jolt-nth arg-types 0))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.check" "not-seqable?") t)) (let* ((_a$6578 (var-deref "clojure.core" "swap!")) (_a$6579 (jolt-get env (keyword #f "diags"))) (_a$6580 jolt-conj) (_a$6581 (let* ((_o$6568 (keyword #f "op")) (_o$6569 cn) (_o$6570 (keyword #f "argpos")) (_o$6571 0) (_o$6572 (keyword #f "type")) (_o$6573 (jolt-invoke (var-deref "jolt.passes.types.check" "type-name") t)) (_o$6574 (keyword #f "pos")) (_o$6575 pos) (_o$6576 (keyword #f "msg")) (_o$6577 (let* ((_a$6561 (var-deref "clojure.core" "str")) (_a$6562 "`") (_a$6563 cn) (_a$6564 "` requires ") (_a$6565 (if (jolt= cn "count") "a countable collection" "a seqable")) (_a$6566 ", but argument 1 is ") (_a$6567 (jolt-invoke (var-deref "jolt.passes.types.check" "type-name") t))) (jolt-invoke _a$6561 _a$6562 _a$6563 _a$6564 _a$6565 _a$6566 _a$6567)))) (jolt-hash-map _o$6568 _o$6569 _o$6570 _o$6571 _o$6572 _o$6573 _o$6574 _o$6575 _o$6576 _o$6577)))) (jolt-invoke _a$6578 _a$6579 _a$6580 _a$6581)) jolt-nil)) (if (jolt-truthy? (keyword #f "else")) jolt-nil jolt-nil))))))) check-invoke) (let* ((_o$6582 (keyword #f "doc")) (_o$6583 "If node is a core-op call whose argument type is provably in the error domain,\n  conj a diagnostic into env's diags cell. arg-types is the vector of inferred\n  argument types; pos is the call form's source offset, carried into each\n  diagnostic.")) (jolt-hash-map _o$6582 _o$6583))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types.check" "register-user-fn!" (letrec ((register-user-fn! (lambda (node env) (let fnrec6584 ((node node) (env env)) (let* ((init (jolt-get node (keyword #f "init"))) (m (jolt-get node (keyword #f "meta"))) (redefable (let* ((and__25__auto m)) (if (jolt-truthy? and__25__auto) (let* ((or__26__auto (jolt-get m (keyword #f "redef")))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt-get m (keyword #f "dynamic")))) and__25__auto)))) (if (let* ((and__25__auto (jolt-not redefable))) (if (jolt-truthy? and__25__auto) (jolt= (keyword #f "fn") (jolt-get init (keyword #f "op"))) and__25__auto)) (let* ((arities (jolt-get init (keyword #f "arities")))) (if (jolt= 1 (jolt-count arities)) (let* ((ar (jolt-first arities))) (if (jolt-not (jolt-get ar (keyword #f "rest"))) (let* ((_a$6595 (var-deref "clojure.core" "swap!")) (_a$6596 (jolt-get env (keyword #f "user-sigs"))) (_a$6597 jolt-assoc) (_a$6598 (let* ((_a$6585 (var-deref "clojure.core" "str")) (_a$6586 (jolt-get node (keyword #f "ns"))) (_a$6587 "/") (_a$6588 (jolt-get node (keyword #f "name")))) (jolt-invoke _a$6585 _a$6586 _a$6587 _a$6588))) (_a$6599 (let* ((_o$6589 (keyword #f "name")) (_o$6590 (jolt-get node (keyword #f "name"))) (_o$6591 (keyword #f "params")) (_o$6592 (jolt-get ar (keyword #f "params"))) (_o$6593 (keyword #f "body")) (_o$6594 (jolt-get ar (keyword #f "body")))) (jolt-hash-map _o$6589 _o$6590 _o$6591 _o$6592 _o$6593 _o$6594)))) (jolt-invoke _a$6595 _a$6596 _a$6597 _a$6598 _a$6599)) jolt-nil)) jolt-nil)) jolt-nil)))))) register-user-fn!) (let* ((_o$6600 (keyword #f "doc")) (_o$6601 "Record a (def name (fn [params] body)) \x2014; single fixed arity, not redefinable \x2014;\n  for later user-fn call checking. Redefinable/dynamic and multi/variadic fns are\n  skipped (their body is not a stable requirement).")) (jolt-hash-map _o$6600 _o$6601))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "config-box" (jolt-invoke (var-deref "clojure.core" "atom") (let* ((_o$5544 (keyword #f "rtenv")) (_o$5545 (jolt-hash-map)) (_o$5546 (keyword #f "vtypes")) (_o$5547 (jolt-hash-map)) (_o$5548 (keyword #f "record-shapes")) (_o$5549 (jolt-hash-map)) (_o$5550 (keyword #f "protocol-methods")) (_o$5551 (jolt-hash-map)) (_o$5552 (keyword #f "map-shapes?")) (_o$5553 #f)) (jolt-hash-map _o$5544 _o$5545 _o$5546 _o$5547 _o$5548 _o$5549 _o$5550 _o$5551 _o$5552 _o$5553))) (let* ((_o$5554 (keyword #f "private")) (_o$5555 #t)) (jolt-hash-map _o$5554 _o$5555))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "escapes-box" (jolt-invoke (var-deref "clojure.core" "atom") (jolt-hash-set)) (let* ((_o$5556 (keyword #f "private")) (_o$5557 #t)) (jolt-hash-map _o$5556 _o$5557))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "user-sig-box" (jolt-invoke (var-deref "clojure.core" "atom") (jolt-hash-map)) (let* ((_o$5558 (keyword #f "private")) (_o$5559 #t)) (jolt-hash-map _o$5558 _o$5559))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "last-diags-box" (jolt-invoke (var-deref "clojure.core" "atom") (jolt-vector)) (let* ((_o$5560 (keyword #f "private")) (_o$5561 #t)) (jolt-hash-map _o$5560 _o$5561))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "check-mode-box" (jolt-invoke (var-deref "clojure.core" "atom") (let* ((_o$5562 (keyword #f "on")) (_o$5563 #f) (_o$5564 (keyword #f "strict")) (_o$5565 #f)) (jolt-hash-map _o$5562 _o$5563 _o$5564 _o$5565))) (let* ((_o$5566 (keyword #f "private")) (_o$5567 #t)) (jolt-hash-map _o$5566 _o$5567))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "pm-rets-box" (jolt-invoke (var-deref "clojure.core" "atom") (jolt-hash-map)) (let* ((_o$5568 (keyword #f "private")) (_o$5569 #t)) (jolt-hash-map _o$5568 _o$5569))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "mk-env" (letrec ((mk-env (lambda (checking? strict?) (let fnrec5570 ((checking? checking?) (strict? strict?)) (let* ((c (jolt-invoke (var-deref "clojure.core" "deref") (var-deref "jolt.passes.types" "config-box")))) (let* ((_o$5571 (keyword #f "rtenv")) (_o$5572 (jolt-get c (keyword #f "rtenv"))) (_o$5573 (keyword #f "vtypes")) (_o$5574 (jolt-get c (keyword #f "vtypes"))) (_o$5575 (keyword #f "record-shapes")) (_o$5576 (jolt-get c (keyword #f "record-shapes"))) (_o$5577 (keyword #f "protocol-methods")) (_o$5578 (jolt-get c (keyword #f "protocol-methods"))) (_o$5579 (keyword #f "map-shapes?")) (_o$5580 (jolt-get c (keyword #f "map-shapes?"))) (_o$5581 (keyword #f "checking?")) (_o$5582 checking?) (_o$5583 (keyword #f "strict?")) (_o$5584 strict?) (_o$5585 (keyword #f "diags")) (_o$5586 (jolt-invoke (var-deref "clojure.core" "atom") (jolt-vector))) (_o$5587 (keyword #f "calls")) (_o$5588 (jolt-invoke (var-deref "clojure.core" "atom") (jolt-vector))) (_o$5589 (keyword #f "checking-set")) (_o$5590 (jolt-invoke (var-deref "clojure.core" "atom") (jolt-hash-set))) (_o$5591 (keyword #f "diag-memo")) (_o$5592 (jolt-invoke (var-deref "clojure.core" "atom") (jolt-hash-map))) (_o$5593 (keyword #f "escapes")) (_o$5594 (var-deref "jolt.passes.types" "escapes-box")) (_o$5595 (keyword #f "user-sigs")) (_o$5596 (var-deref "jolt.passes.types" "user-sig-box"))) (jolt-hash-map _o$5571 _o$5572 _o$5573 _o$5574 _o$5575 _o$5576 _o$5577 _o$5578 _o$5579 _o$5580 _o$5581 _o$5582 _o$5583 _o$5584 _o$5585 _o$5586 _o$5587 _o$5588 _o$5589 _o$5590 _o$5591 _o$5592 _o$5593 _o$5594 _o$5595 _o$5596))))))) mk-env) (let* ((_o$5597 (keyword #f "private")) (_o$5598 #t)) (jolt-hash-map _o$5597 _o$5598))))
(guard (e (#t #f))
  (declare-var! "jolt.passes.types" "record-type-from-entry"))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "field-type-from-tag" (letrec ((field-type-from-tag (lambda (tag depth shapes) (let fnrec5599 ((tag tag) (depth depth) (shapes shapes)) (if (let* ((or__26__auto (jolt-nil? tag))) (if (jolt-truthy? or__26__auto) or__26__auto (<= depth 0))) (keyword #f "any") (if (jolt= tag "num") (keyword #f "num") (if (jolt= tag "double") (keyword #f "double") (if (jolt-truthy? (keyword #f "else")) (let* ((e (jolt-get shapes tag))) (if (jolt-truthy? e) (jolt-invoke (var-deref "jolt.passes.types" "record-type-from-entry") e depth shapes) (keyword #f "any"))) jolt-nil)))))))) field-type-from-tag) (let* ((_o$5600 (keyword #f "private")) (_o$5601 #t)) (jolt-hash-map _o$5600 _o$5601))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "record-type-from-entry" (letrec ((record-type-from-entry (lambda (rs depth shapes) (let fnrec5602 ((rs rs) (depth depth) (shapes shapes)) (let* ((fields (jolt-get rs (keyword #f "fields"))) (tags (jolt-get rs (keyword #f "tags"))) (fmap (let* ((_a$5611 (lambda (m i) (let fnrec5603 ((m m) (i i)) (let* ((_a$5608 m) (_a$5609 (jolt-nth fields i)) (_a$5610 (let* ((_a$5604 (var-deref "jolt.passes.types" "field-type-from-tag")) (_a$5605 (if (jolt-truthy? tags) (jolt-nth tags i) jolt-nil)) (_a$5606 (jolt-dec depth)) (_a$5607 shapes)) (jolt-invoke _a$5604 _a$5605 _a$5606 _a$5607)))) (jolt-assoc _a$5608 _a$5609 _a$5610))))) (_a$5612 (jolt-hash-map)) (_a$5613 (jolt-range (jolt-count fields)))) (jolt-reduce _a$5611 _a$5612 _a$5613)))) (let* ((_a$5614 (jolt-invoke (var-deref "jolt.passes.types.lattice" "mk-struct") fmap)) (_a$5615 (keyword #f "shape")) (_a$5616 (jolt-invoke (var-deref "clojure.core" "vec") fields)) (_a$5617 (keyword #f "type")) (_a$5618 (jolt-get rs (keyword #f "type")))) (jolt-assoc _a$5614 _a$5615 _a$5616 _a$5617 _a$5618))))))) record-type-from-entry) (let* ((_o$5619 (keyword #f "private")) (_o$5620 #t)) (jolt-hash-map _o$5619 _o$5620))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "elem-fns" (let* ((_o$5621 "rand-nth") (_o$5622 "first") (_o$5623 "peek") (_o$5624 "last") (_o$5625 "nth") (_o$5626 "fnext") (_o$5627 "second")) (jolt-hash-set _o$5621 _o$5622 _o$5623 _o$5624 _o$5625 _o$5626 _o$5627)) (let* ((_o$5628 (keyword #f "private")) (_o$5629 #t)) (jolt-hash-map _o$5628 _o$5629))))
(guard (e (#t #f))
  (declare-var! "jolt.passes.types" "check-user-call"))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "var-key" (letrec ((var-key (lambda (fnode) (let fnrec5630 ((fnode fnode)) (let* ((_a$5631 (var-deref "clojure.core" "str")) (_a$5632 (jolt-get fnode (keyword #f "ns"))) (_a$5633 "/") (_a$5634 (jolt-get fnode (keyword #f "name")))) (jolt-invoke _a$5631 _a$5632 _a$5633 _a$5634)))))) var-key) (let* ((_o$5635 (keyword #f "private")) (_o$5636 #t)) (jolt-hash-map _o$5635 _o$5636))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "call-ret-type" (letrec ((call-ret-type (lambda (fnode env) (let fnrec5637 ((fnode fnode) (env env)) (let* ((op (jolt-get fnode (keyword #f "op"))) (shapes (jolt-get env (keyword #f "record-shapes")))) (if (jolt= op (keyword #f "var")) (let* ((rs (jolt-get shapes (jolt-invoke (var-deref "jolt.passes.types" "var-key") fnode)))) (if (jolt-truthy? rs) (jolt-invoke (var-deref "jolt.passes.types" "record-type-from-entry") rs (var-deref "jolt.passes.types.lattice" "type-depth") shapes) (let* ((r (let* ((_a$5638 (jolt-get env (keyword #f "rtenv"))) (_a$5639 (jolt-invoke (var-deref "jolt.passes.types" "var-key") fnode))) (jolt-get _a$5638 _a$5639)))) (if (jolt-truthy? r) r (let* ((pm (let* ((_a$5640 (jolt-get env (keyword #f "protocol-methods"))) (_a$5641 (jolt-invoke (var-deref "jolt.passes.types" "var-key") fnode))) (jolt-get _a$5640 _a$5641))) (pmr (if (jolt-truthy? pm) (let* ((_a$5646 (jolt-invoke (var-deref "clojure.core" "deref") (var-deref "jolt.passes.types" "pm-rets-box"))) (_a$5647 (let* ((_a$5642 (var-deref "clojure.core" "str")) (_a$5643 (jolt-nth pm 0)) (_a$5644 "/") (_a$5645 (jolt-nth pm 1))) (jolt-invoke _a$5642 _a$5643 _a$5644 _a$5645)))) (jolt-get _a$5646 _a$5647)) jolt-nil))) (if (jolt-truthy? (let* ((and__25__auto pmr)) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "clojure.core" "not=") pmr (keyword #f "any")) and__25__auto))) pmr (let* ((nm (let* ((and__25__auto (jolt= "clojure.core" (jolt-get fnode (keyword #f "ns"))))) (if (jolt-truthy? and__25__auto) (jolt-get fnode (keyword #f "name")) and__25__auto)))) (if (jolt-nil? nm) (keyword #f "any") (if (jolt-contains? (var-deref "jolt.passes.types.lattice" "num-ret-fns") nm) (keyword #f "num") (if (jolt-contains? (var-deref "jolt.passes.types.lattice" "vector-ret-fns") nm) (jolt-invoke (var-deref "jolt.passes.types.lattice" "mk-vec") (keyword #f "any")) (if (jolt-truthy? (keyword #f "else")) (keyword #f "any") jolt-nil))))))))))) (if (jolt= op (keyword #f "host")) (let* ((nm (jolt-get fnode (keyword #f "name")))) (if (jolt-contains? (var-deref "jolt.passes.types.lattice" "num-ret-fns") nm) (keyword #f "num") (if (jolt-contains? (var-deref "jolt.passes.types.lattice" "vector-ret-fns") nm) (jolt-invoke (var-deref "jolt.passes.types.lattice" "mk-vec") (keyword #f "any")) (if (jolt-truthy? (keyword #f "else")) (keyword #f "any") jolt-nil)))) (if (jolt-truthy? (keyword #f "else")) (keyword #f "any") jolt-nil)))))))) call-ret-type) (let* ((_o$5648 (keyword #f "private")) (_o$5649 #t)) (jolt-hash-map _o$5648 _o$5649))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "fold-preds" (let* ((_o$5650 "number?") (_o$5651 "string?") (_o$5652 "keyword?") (_o$5653 "record?") (_o$5654 "nil?") (_o$5655 "some?")) (jolt-hash-set _o$5650 _o$5651 _o$5652 _o$5653 _o$5654 _o$5655)) (let* ((_o$5656 (keyword #f "private")) (_o$5657 #t)) (jolt-hash-map _o$5656 _o$5657))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "record-t?" (letrec ((record-t? (lambda (t) (let fnrec5658 ((t t)) (let* ((and__25__auto (jolt-invoke (var-deref "jolt.passes.types.lattice" "struct-type?") t))) (if (jolt-truthy? and__25__auto) (jolt-some? (jolt-get t (keyword #f "type"))) and__25__auto)))))) record-t?) (let* ((_o$5659 (keyword #f "private")) (_o$5660 #t)) (jolt-hash-map _o$5659 _o$5660))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "pred-on" (letrec ((pred-on (lambda (pname t) (let fnrec5661 ((pname pname) (t t)) (if (let* ((or__26__auto (jolt= t (keyword #f "any")))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt= t (keyword #f "truthy")))) jolt-nil (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "nilable?") t)) jolt-nil (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "union-type?") t)) (let* ((vs (let* ((_a$5663 (lambda (m) (let fnrec5662 ((m m)) (pred-on pname m)))) (_a$5664 (jolt-invoke (var-deref "jolt.passes.types.lattice" "umembers") t))) (jolt-map _a$5663 _a$5664)))) (if (jolt-truthy? (let* ((and__25__auto (jolt-seq vs))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-not (jolt-nil? (jolt-first vs))))) (if (jolt-truthy? and__25__auto) (jolt-apply jolt= vs) and__25__auto)) and__25__auto))) (jolt-first vs) jolt-nil)) (if (jolt-truthy? (keyword #f "else")) (let* ((G__135 pname)) (if (jolt= G__135 "number?") (let* ((or__26__auto (jolt= t (keyword #f "num")))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt= t (keyword #f "double")))) (if (jolt= G__135 "string?") (jolt= t (keyword #f "str")) (if (jolt= G__135 "keyword?") (jolt= t (keyword #f "kw")) (if (jolt= G__135 "record?") (jolt-invoke (var-deref "jolt.passes.types" "record-t?") t) (if (jolt= G__135 "nil?") #f (if (jolt= G__135 "some?") #t jolt-nil))))))) jolt-nil)))))))) pred-on) (let* ((_o$5665 (keyword #f "private")) (_o$5666 #t)) (jolt-hash-map _o$5665 _o$5666))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "pure-node?" (letrec ((pure-node? (lambda (n) (let fnrec5667 ((n n)) (let* ((op (jolt-get n (keyword #f "op")))) (let* ((or__26__auto (jolt= op (keyword #f "const")))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt= op (keyword #f "local"))))))))) pure-node?) (let* ((_o$5668 (keyword #f "private")) (_o$5669 #t)) (jolt-hash-map _o$5668 _o$5669))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "test-local" (letrec ((test-local (lambda (test pred-name) (let fnrec5670 ((test test) (pred-name pred-name)) (if (jolt= (keyword #f "invoke") (jolt-get test (keyword #f "op"))) (let* ((f (jolt-get test (keyword #f "fn"))) (args (jolt-get test (keyword #f "args")))) (if (let* ((and__25__auto (jolt= (keyword #f "var") (jolt-get f (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= "clojure.core" (jolt-get f (keyword #f "ns"))))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= pred-name (jolt-get f (keyword #f "name"))))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= 1 (jolt-count args)))) (if (jolt-truthy? and__25__auto) (jolt= (keyword #f "local") (jolt-get (jolt-nth args 0) (keyword #f "op"))) and__25__auto)) and__25__auto)) and__25__auto)) and__25__auto)) (jolt-get (jolt-nth args 0) (keyword #f "name")) jolt-nil)) jolt-nil))))) test-local) (let* ((_o$5671 (keyword #f "private")) (_o$5672 #t)) (jolt-hash-map _o$5671 _o$5672))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "narrow-nonnil" (letrec ((narrow-nonnil (lambda (tenv nm) (let fnrec5673 ((tenv tenv) (nm nm)) (let* ((t (jolt-get tenv nm))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "nilable?") t)) (jolt-assoc tenv nm (jolt-invoke (var-deref "jolt.passes.types.lattice" "strip-nilable") t)) tenv)))))) narrow-nonnil) (let* ((_o$5674 (keyword #f "private")) (_o$5675 #t)) (jolt-hash-map _o$5674 _o$5675))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "if-narrow" (letrec ((if-narrow (lambda (test tenv) (let fnrec5676 ((test test) (tenv tenv)) (let* ((somev (jolt-invoke (var-deref "jolt.passes.types" "test-local") test "some?")) (nilv (jolt-invoke (var-deref "jolt.passes.types" "test-local") test "nil?"))) (if (jolt= (keyword #f "local") (jolt-get test (keyword #f "op"))) (let* ((_o$5677 (jolt-invoke (var-deref "jolt.passes.types" "narrow-nonnil") tenv (jolt-get test (keyword #f "name")))) (_o$5678 tenv)) (jolt-vector _o$5677 _o$5678)) (if (jolt-truthy? somev) (let* ((_o$5679 (jolt-invoke (var-deref "jolt.passes.types" "narrow-nonnil") tenv somev)) (_o$5680 tenv)) (jolt-vector _o$5679 _o$5680)) (if (jolt-truthy? nilv) (let* ((_o$5681 tenv) (_o$5682 (jolt-invoke (var-deref "jolt.passes.types" "narrow-nonnil") tenv nilv))) (jolt-vector _o$5681 _o$5682)) (if (jolt-truthy? (keyword #f "else")) (let* ((_o$5683 tenv) (_o$5684 tenv)) (jolt-vector _o$5683 _o$5684)) jolt-nil))))))))) if-narrow) (let* ((_o$5685 (keyword #f "private")) (_o$5686 #t)) (jolt-hash-map _o$5685 _o$5686))))
(guard (e (#t #f))
  (declare-var! "jolt.passes.types" "infer"))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "ty" (letrec ((ty (lambda (r) (let fnrec5687 ((r r)) (jolt-nth r 0))))) ty) (let* ((_o$5688 (keyword #f "private")) (_o$5689 #t)) (jolt-hash-map _o$5688 _o$5689))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "nd" (letrec ((nd (lambda (r) (let fnrec5690 ((r r)) (jolt-nth r 1))))) nd) (let* ((_o$5691 (keyword #f "private")) (_o$5692 #t)) (jolt-hash-map _o$5691 _o$5692))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "self-rec-argtys" (letrec ((self-rec-argtys (lambda (args ares self-params) (let fnrec5693 ((args args) (ares ares) (self-params self-params)) (let* ((_a$5697 (var-deref "clojure.core" "mapv")) (_a$5698 (lambda (i) (let fnrec5694 ((i i)) (let* ((a (jolt-nth args i))) (if (jolt-truthy? (let* ((and__25__auto self-params)) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (< i (jolt-count self-params)))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= (keyword #f "local") (jolt-get a (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (let* ((_a$5695 (jolt-get a (keyword #f "name"))) (_a$5696 (jolt-nth self-params i))) (jolt= _a$5695 _a$5696)) and__25__auto)) and__25__auto)) and__25__auto))) jolt-nil (jolt-invoke (var-deref "jolt.passes.types" "ty") (jolt-nth ares i))))))) (_a$5699 (jolt-range (jolt-count ares)))) (jolt-invoke _a$5697 _a$5698 _a$5699)))))) self-rec-argtys) (let* ((_o$5700 (keyword #f "private")) (_o$5701 #t)) (jolt-hash-map _o$5700 _o$5701))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "dbl-arith-ops" (let* ((_o$5702 "+") (_o$5703 "-") (_o$5704 "*") (_o$5705 "/") (_o$5706 "min") (_o$5707 "max") (_o$5708 "inc") (_o$5709 "dec")) (jolt-hash-set _o$5702 _o$5703 _o$5704 _o$5705 _o$5706 _o$5707 _o$5708 _o$5709)) (let* ((_o$5710 (keyword #f "private")) (_o$5711 #t)) (jolt-hash-map _o$5710 _o$5711))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "int-lit-node?" (letrec ((int-lit-node? (lambda (n) (let fnrec5712 ((n n)) (let* ((and__25__auto (jolt= (keyword #f "const") (jolt-get n (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (let* ((v (jolt-get n (keyword #f "val")))) (let* ((and__25__auto (jolt-invoke (var-deref "clojure.core" "number?") v))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "clojure.core" "integer?") v) and__25__auto))) and__25__auto)))))) int-lit-node?) (let* ((_o$5713 (keyword #f "private")) (_o$5714 #t)) (jolt-hash-map _o$5713 _o$5714))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "dbl-arith?" (letrec ((dbl-arith? (lambda (ares argnodes) (let fnrec5715 ((ares ares) (argnodes argnodes)) (let* ((and__25__auto (jolt-pos? (jolt-count ares)))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (let* ((_a$5717 (var-deref "clojure.core" "every?")) (_a$5718 (lambda (i) (let fnrec5716 ((i i)) (let* ((or__26__auto (jolt= (keyword #f "double") (jolt-invoke (var-deref "jolt.passes.types" "ty") (jolt-nth ares i))))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt-invoke (var-deref "jolt.passes.types" "int-lit-node?") (jolt-nth argnodes i))))))) (_a$5719 (jolt-range (jolt-count ares)))) (jolt-invoke _a$5717 _a$5718 _a$5719)))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "clojure.core" "some") (lambda (r) (let fnrec5720 ((r r)) (jolt= (keyword #f "double") (jolt-invoke (var-deref "jolt.passes.types" "ty") r)))) ares) and__25__auto)) and__25__auto)))))) dbl-arith?) (let* ((_o$5721 (keyword #f "private")) (_o$5722 #t)) (jolt-hash-map _o$5721 _o$5722))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "hof-table" (let* ((_o$5739 "map") (_o$5740 (let* ((_o$5723 (keyword #f "epos")) (_o$5724 0)) (jolt-hash-map _o$5723 _o$5724))) (_o$5741 "mapv") (_o$5742 (let* ((_o$5725 (keyword #f "epos")) (_o$5726 0)) (jolt-hash-map _o$5725 _o$5726))) (_o$5743 "filter") (_o$5744 (let* ((_o$5727 (keyword #f "epos")) (_o$5728 0)) (jolt-hash-map _o$5727 _o$5728))) (_o$5745 "filterv") (_o$5746 (let* ((_o$5729 (keyword #f "epos")) (_o$5730 0)) (jolt-hash-map _o$5729 _o$5730))) (_o$5747 "keep") (_o$5748 (let* ((_o$5731 (keyword #f "epos")) (_o$5732 0)) (jolt-hash-map _o$5731 _o$5732))) (_o$5749 "remove") (_o$5750 (let* ((_o$5733 (keyword #f "epos")) (_o$5734 0)) (jolt-hash-map _o$5733 _o$5734))) (_o$5751 "run!") (_o$5752 (let* ((_o$5735 (keyword #f "epos")) (_o$5736 0)) (jolt-hash-map _o$5735 _o$5736))) (_o$5753 "mapcat") (_o$5754 (let* ((_o$5737 (keyword #f "epos")) (_o$5738 0)) (jolt-hash-map _o$5737 _o$5738)))) (jolt-hash-map _o$5739 _o$5740 _o$5741 _o$5742 _o$5743 _o$5744 _o$5745 _o$5746 _o$5747 _o$5748 _o$5749 _o$5750 _o$5751 _o$5752 _o$5753 _o$5754)) (let* ((_o$5755 (keyword #f "private")) (_o$5756 #t)) (jolt-hash-map _o$5755 _o$5756))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "infer-fn-seeded" (letrec ((infer-fn-seeded (lambda (node seeds tenv env) (let fnrec5757 ((node node) (seeds seeds) (tenv tenv) (env env)) (let* ((res (let* ((_a$5768 (var-deref "clojure.core" "mapv")) (_a$5769 (lambda (a) (let fnrec5758 ((a a)) (let* ((params (jolt-get a (keyword #f "params"))) (pe (let* ((_a$5763 (lambda (e i) (let fnrec5759 ((e e) (i i)) (let* ((_a$5760 e) (_a$5761 (jolt-nth params i)) (_a$5762 (let* ((s (jolt-get seeds i))) (if (jolt-truthy? s) s (keyword #f "any"))))) (jolt-assoc _a$5760 _a$5761 _a$5762))))) (_a$5764 tenv) (_a$5765 (jolt-range (jolt-count params)))) (jolt-reduce _a$5763 _a$5764 _a$5765))) (pe (if (jolt-truthy? (jolt-get a (keyword #f "rest"))) (jolt-assoc pe (jolt-get a (keyword #f "rest")) (keyword #f "any")) pe)) (br (jolt-invoke (var-deref "jolt.passes.types" "infer") (jolt-get a (keyword #f "body")) pe env))) (let* ((_o$5766 (jolt-invoke (var-deref "jolt.passes.types" "ty") br)) (_o$5767 (jolt-assoc a (keyword #f "body") (jolt-invoke (var-deref "jolt.passes.types" "nd") br)))) (jolt-vector _o$5766 _o$5767)))))) (_a$5770 (jolt-get node (keyword #f "arities")))) (jolt-invoke _a$5768 _a$5769 _a$5770))) (rets (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (r) (let fnrec5771 ((r r)) (jolt-invoke (var-deref "jolt.passes.types" "ty") r))) res)) (ret (if (jolt-empty? rets) (keyword #f "any") (let* ((_a$5772 (var-deref "jolt.passes.types.lattice" "join")) (_a$5773 (jolt-first rets)) (_a$5774 (jolt-rest rets))) (jolt-reduce _a$5772 _a$5773 _a$5774))))) (let* ((_o$5776 ret) (_o$5777 (jolt-assoc node (keyword #f "arities") (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (r) (let fnrec5775 ((r r)) (jolt-invoke (var-deref "jolt.passes.types" "nd") r))) res)))) (jolt-vector _o$5776 _o$5777))))))) infer-fn-seeded) (let* ((_o$5778 (keyword #f "private")) (_o$5779 #t) (_o$5780 (keyword #f "doc")) (_o$5781 "Infer a fn-literal passed to a HOF, seeding the given params to element/accum\n  types (seeds: param-index -> type), other params :any, captured locals from\n  tenv. Returns [ret-type node'] \x2014; ret is the lub of arity tail types, used to\n  type the HOF result (e.g. reduce's accumulator, mapv's element).")) (jolt-hash-map _o$5778 _o$5779 _o$5780 _o$5781))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "infer-pred-fold" (letrec ((infer-pred-fold (lambda (node fnode cn args tenv env) (let fnrec5782 ((node node) (fnode fnode) (cn cn) (args args) (tenv tenv) (env env)) (let* ((ar (jolt-invoke (var-deref "jolt.passes.types" "infer") (jolt-nth args 0) tenv env)) (v (jolt-invoke (var-deref "jolt.passes.types" "pred-on") cn (jolt-invoke (var-deref "jolt.passes.types" "ty") ar)))) (if (jolt-truthy? (let* ((and__25__auto (jolt-not (jolt-nil? v)))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.passes.types" "pure-node?") (jolt-invoke (var-deref "jolt.passes.types" "nd") ar)) and__25__auto))) (let* ((_o$5787 (keyword #f "any")) (_o$5788 (let* ((_o$5783 (keyword #f "op")) (_o$5784 (keyword #f "const")) (_o$5785 (keyword #f "val")) (_o$5786 v)) (jolt-hash-map _o$5783 _o$5784 _o$5785 _o$5786)))) (jolt-vector _o$5787 _o$5788)) (let* ((_o$5789 (jolt-invoke (var-deref "jolt.passes.types" "call-ret-type") fnode env)) (_o$5790 (jolt-assoc node (keyword #f "args") (jolt-vector (jolt-invoke (var-deref "jolt.passes.types" "nd") ar))))) (jolt-vector _o$5789 _o$5790)))))))) infer-pred-fold) (let* ((_o$5791 (keyword #f "private")) (_o$5792 #t) (_o$5793 (keyword #f "doc")) (_o$5794 "A type predicate over a single side-effect-free arg whose type PROVES the answer\n  folds to a boolean constant \x2014; eliminating the call, and (once const-fold runs\n  after inference) collapsing any `if` it gates. Falls back to the normal call path\n  when the answer isn't provable or the arg is impure.")) (jolt-hash-map _o$5791 _o$5792 _o$5793 _o$5794))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "infer-kw-lookup" (letrec ((infer-kw-lookup (lambda (node fnode args n tenv env) (let fnrec5795 ((node node) (fnode fnode) (args args) (n n) (tenv tenv) (env env)) (let* ((mr (jolt-invoke (var-deref "jolt.passes.types" "infer") (jolt-nth args 0) tenv env)) (mt (jolt-invoke (var-deref "jolt.passes.types" "ty") mr)) (msub (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "struct-safe?") mt)) (jolt-invoke (var-deref "jolt.passes.types.lattice" "mark-struct") (jolt-invoke (var-deref "jolt.passes.types" "nd") mr) mt) (jolt-invoke (var-deref "jolt.passes.types" "nd") mr))) (ft (jolt-invoke (var-deref "jolt.passes.types.lattice" "field-type") mt (jolt-get fnode (keyword #f "val")))) (dr (if (jolt= n 2) (jolt-invoke (var-deref "jolt.passes.types" "infer") (jolt-nth args 1) tenv env) jolt-nil)) (rt (if (jolt-truthy? dr) (jolt-invoke (var-deref "jolt.passes.types.lattice" "join") ft (jolt-invoke (var-deref "jolt.passes.types" "ty") dr)) ft)) (node_PRIME_ (jolt-assoc node (keyword #f "args") (if (jolt-truthy? dr) (let* ((_o$5796 msub) (_o$5797 (jolt-invoke (var-deref "jolt.passes.types" "nd") dr))) (jolt-vector _o$5796 _o$5797)) (jolt-vector msub))))) (let* ((_o$5798 rt) (_o$5799 (if (jolt= rt (keyword #f "double")) (jolt-assoc node_PRIME_ (keyword #f "num-read") (keyword #f "double")) node_PRIME_))) (jolt-vector _o$5798 _o$5799))))))) infer-kw-lookup) (let* ((_o$5800 (keyword #f "private")) (_o$5801 #t) (_o$5802 (keyword #f "doc")) (_o$5803 "(:k m) / (:k m default): the result is m's field type, and if m is a struct the\n  subject is tagged so the back end drops the guard \x2014; this types nested access end\n  to end (RFC 0005).")) (jolt-hash-map _o$5800 _o$5801 _o$5802 _o$5803))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "infer-get-lookup" (letrec ((infer-get-lookup (lambda (node args n tenv env) (let fnrec5804 ((node node) (args args) (n n) (tenv tenv) (env env)) (let* ((mr (jolt-invoke (var-deref "jolt.passes.types" "infer") (jolt-nth args 0) tenv env)) (mt (jolt-invoke (var-deref "jolt.passes.types" "ty") mr)) (msub (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "struct-safe?") mt)) (jolt-invoke (var-deref "jolt.passes.types.lattice" "mark-struct") (jolt-invoke (var-deref "jolt.passes.types" "nd") mr) mt) (jolt-invoke (var-deref "jolt.passes.types" "nd") mr))) (kr (jolt-invoke (var-deref "jolt.passes.types" "infer") (jolt-nth args 1) tenv env)) (ft (jolt-invoke (var-deref "jolt.passes.types.lattice" "field-type") mt (jolt-get (jolt-nth args 1) (keyword #f "val")))) (dr (if (jolt= n 3) (jolt-invoke (var-deref "jolt.passes.types" "infer") (jolt-nth args 2) tenv env) jolt-nil)) (rt (if (jolt-truthy? dr) (jolt-invoke (var-deref "jolt.passes.types.lattice" "join") ft (jolt-invoke (var-deref "jolt.passes.types" "ty") dr)) ft)) (node_PRIME_ (jolt-assoc node (keyword #f "args") (if (jolt-truthy? dr) (let* ((_o$5805 msub) (_o$5806 (jolt-invoke (var-deref "jolt.passes.types" "nd") kr)) (_o$5807 (jolt-invoke (var-deref "jolt.passes.types" "nd") dr))) (jolt-vector _o$5805 _o$5806 _o$5807)) (let* ((_o$5808 msub) (_o$5809 (jolt-invoke (var-deref "jolt.passes.types" "nd") kr))) (jolt-vector _o$5808 _o$5809)))))) (let* ((_o$5810 rt) (_o$5811 (if (jolt= rt (keyword #f "double")) (jolt-assoc node_PRIME_ (keyword #f "num-read") (keyword #f "double")) node_PRIME_))) (jolt-vector _o$5810 _o$5811))))))) infer-get-lookup) (let* ((_o$5812 (keyword #f "private")) (_o$5813 #t) (_o$5814 (keyword #f "doc")) (_o$5815 "(get m :k [default]): the keyword-lookup result type, when the key is a constant\n  keyword.")) (jolt-hash-map _o$5812 _o$5813 _o$5814 _o$5815))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "infer-reduce-hof" (letrec ((infer-reduce-hof (lambda (node args n tenv env) (let fnrec5816 ((node node) (args args) (n n) (tenv tenv) (env env)) (let* ((three (>= n 3)) (coll-r (jolt-invoke (var-deref "jolt.passes.types" "infer") (jolt-nth args (if (jolt-truthy? three) 2 1)) tenv env)) (init-r (if (jolt-truthy? three) (jolt-invoke (var-deref "jolt.passes.types" "infer") (jolt-nth args 1) tenv env) jolt-nil)) (et (let* ((ct (jolt-invoke (var-deref "jolt.passes.types" "ty") coll-r))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "vec-type?") ct)) (jolt-invoke (var-deref "jolt.passes.types.lattice" "velem") ct) (keyword #f "any")))) (init-t (if (jolt-truthy? init-r) (jolt-invoke (var-deref "jolt.passes.types" "ty") init-r) (keyword #f "any"))) (fn-r (let* ((_a$5821 (var-deref "jolt.passes.types" "infer-fn-seeded")) (_a$5822 (jolt-nth args 0)) (_a$5823 (let* ((_o$5817 0) (_o$5818 init-t) (_o$5819 1) (_o$5820 et)) (jolt-hash-map _o$5817 _o$5818 _o$5819 _o$5820))) (_a$5824 tenv) (_a$5825 env)) (jolt-invoke _a$5821 _a$5822 _a$5823 _a$5824 _a$5825)))) (let* ((_o$5831 (jolt-invoke (var-deref "jolt.passes.types.lattice" "join") init-t (jolt-invoke (var-deref "jolt.passes.types" "ty") fn-r))) (_o$5832 (jolt-assoc node (keyword #f "args") (if (jolt-truthy? three) (let* ((_o$5826 (jolt-invoke (var-deref "jolt.passes.types" "nd") fn-r)) (_o$5827 (jolt-invoke (var-deref "jolt.passes.types" "nd") init-r)) (_o$5828 (jolt-invoke (var-deref "jolt.passes.types" "nd") coll-r))) (jolt-vector _o$5826 _o$5827 _o$5828)) (let* ((_o$5829 (jolt-invoke (var-deref "jolt.passes.types" "nd") fn-r)) (_o$5830 (jolt-invoke (var-deref "jolt.passes.types" "nd") coll-r))) (jolt-vector _o$5829 _o$5830)))))) (jolt-vector _o$5831 _o$5832))))))) infer-reduce-hof) (let* ((_o$5833 (keyword #f "private")) (_o$5834 #t) (_o$5835 (keyword #f "doc")) (_o$5836 "reduce over a typed vector with a fn-literal: seed the closure's accumulator\n  (param 0) to the init type and its element (param 1) to the vector's element\n  type, so its body \x2014; and any calls it makes \x2014; see those types.")) (jolt-hash-map _o$5833 _o$5834 _o$5835 _o$5836))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "infer-seq-hof" (letrec ((infer-seq-hof (lambda (node cn args tenv env) (let fnrec5837 ((node node) (cn cn) (args args) (tenv tenv) (env env)) (let* ((coll-r (jolt-invoke (var-deref "jolt.passes.types" "infer") (jolt-nth args 1) tenv env)) (et (let* ((ct (jolt-invoke (var-deref "jolt.passes.types" "ty") coll-r))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "vec-type?") ct)) (jolt-invoke (var-deref "jolt.passes.types.lattice" "velem") ct) (keyword #f "any")))) (fn-r (let* ((_a$5840 (var-deref "jolt.passes.types" "infer-fn-seeded")) (_a$5841 (jolt-nth args 0)) (_a$5842 (let* ((_o$5838 (jolt-get (jolt-get (var-deref "jolt.passes.types" "hof-table") cn) (keyword #f "epos"))) (_o$5839 et)) (jolt-hash-map _o$5838 _o$5839))) (_a$5843 tenv) (_a$5844 env)) (jolt-invoke _a$5840 _a$5841 _a$5842 _a$5843 _a$5844))) (rt (if (jolt= cn "mapv") (jolt-invoke (var-deref "jolt.passes.types.lattice" "mk-vec") (jolt-invoke (var-deref "jolt.passes.types" "ty") fn-r)) (if (jolt= cn "filterv") (jolt-invoke (var-deref "jolt.passes.types.lattice" "mk-vec") et) (if (jolt-truthy? (keyword #f "else")) (keyword #f "any") jolt-nil))))) (let* ((_o$5847 rt) (_o$5848 (jolt-assoc node (keyword #f "args") (let* ((_o$5845 (jolt-invoke (var-deref "jolt.passes.types" "nd") fn-r)) (_o$5846 (jolt-invoke (var-deref "jolt.passes.types" "nd") coll-r))) (jolt-vector _o$5845 _o$5846))))) (jolt-vector _o$5847 _o$5848))))))) infer-seq-hof) (let* ((_o$5849 (keyword #f "private")) (_o$5850 #t) (_o$5851 (keyword #f "doc")) (_o$5852 "map/mapv/filter/... over a typed vector with a fn-literal: seed the fn's element\n  param; mapv/filterv produce a typed vector.")) (jolt-hash-map _o$5849 _o$5850 _o$5851 _o$5852))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "infer-conj-into" (letrec ((infer-conj-into (lambda (node fnode cn args n tenv env) (let fnrec5853 ((node node) (fnode fnode) (cn cn) (args args) (n n) (tenv tenv) (env env)) (let* ((ares (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (a) (let fnrec5854 ((a a)) (jolt-invoke (var-deref "jolt.passes.types" "infer") a tenv env))) args)) (base (jolt-invoke (var-deref "jolt.passes.types" "ty") (jolt-nth ares 0))) (rest-ts (let* ((_a$5856 (var-deref "clojure.core" "mapv")) (_a$5857 (lambda (r) (let fnrec5855 ((r r)) (jolt-invoke (var-deref "jolt.passes.types" "ty") r)))) (_a$5858 (jolt-rest ares))) (jolt-invoke _a$5856 _a$5857 _a$5858))) (rt (if (jolt-truthy? (let* ((and__25__auto (jolt= cn "conj"))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.passes.types.lattice" "vec-type?") base) and__25__auto))) (jolt-invoke (var-deref "jolt.passes.types.lattice" "mk-vec") (jolt-reduce (var-deref "jolt.passes.types.lattice" "join") (jolt-invoke (var-deref "jolt.passes.types.lattice" "velem") base) rest-ts)) (if (jolt-truthy? (let* ((and__25__auto (jolt= cn "into"))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-invoke (var-deref "jolt.passes.types.lattice" "vec-type?") base))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= 2 n))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.passes.types.lattice" "vec-type?") (jolt-nth rest-ts 0)) and__25__auto)) and__25__auto)) and__25__auto))) (jolt-invoke (var-deref "jolt.passes.types.lattice" "mk-vec") (let* ((_a$5859 (var-deref "jolt.passes.types.lattice" "join")) (_a$5860 (jolt-invoke (var-deref "jolt.passes.types.lattice" "velem") base)) (_a$5861 (jolt-invoke (var-deref "jolt.passes.types.lattice" "velem") (jolt-nth rest-ts 0)))) (jolt-invoke _a$5859 _a$5860 _a$5861))) (if (jolt-truthy? (keyword #f "else")) (jolt-invoke (var-deref "jolt.passes.types" "call-ret-type") fnode env) jolt-nil))))) (let* ((_o$5863 rt) (_o$5864 (jolt-assoc node (keyword #f "args") (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (r) (let fnrec5862 ((r r)) (jolt-invoke (var-deref "jolt.passes.types" "nd") r))) ares)))) (jolt-vector _o$5863 _o$5864))))))) infer-conj-into) (let* ((_o$5865 (keyword #f "private")) (_o$5866 #t) (_o$5867 (keyword #f "doc")) (_o$5868 "conj/into: track the element type of a vector being grown.")) (jolt-hash-map _o$5865 _o$5866 _o$5867 _o$5868))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "infer-call" (letrec ((infer-call (lambda (node fnode iscall-var cn args n tenv env) (let fnrec5869 ((node node) (fnode fnode) (iscall-var iscall-var) (cn cn) (args args) (n n) (tenv tenv) (env env)) (let* ((fr (if (jolt-not iscall-var) (jolt-invoke (var-deref "jolt.passes.types" "infer") fnode tenv env) jolt-nil)) (fnode_PRIME_ (if (jolt-truthy? iscall-var) fnode (jolt-invoke (var-deref "jolt.passes.types" "nd") fr))) (callee-t (if (jolt-truthy? iscall-var) (let* ((_a$5870 (jolt-get env (keyword #f "vtypes"))) (_a$5871 (jolt-invoke (var-deref "jolt.passes.types" "var-key") fnode))) (jolt-get _a$5870 _a$5871)) (jolt-invoke (var-deref "jolt.passes.types" "ty") fr))) (ares (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (a) (let fnrec5872 ((a a)) (jolt-invoke (var-deref "jolt.passes.types" "infer") a tenv env))) args))) (begin (if (jolt-truthy? iscall-var) (let* ((_a$5878 (var-deref "clojure.core" "swap!")) (_a$5879 (jolt-get env (keyword #f "calls"))) (_a$5880 jolt-conj) (_a$5881 (let* ((_o$5876 (jolt-invoke (var-deref "jolt.passes.types" "var-key") fnode)) (_o$5877 (if (let* ((_a$5873 (jolt-invoke (var-deref "jolt.passes.types" "var-key") fnode)) (_a$5874 (jolt-get env (keyword #f "self-key")))) (jolt= _a$5873 _a$5874)) (jolt-invoke (var-deref "jolt.passes.types" "self-rec-argtys") args ares (jolt-get env (keyword #f "self-params"))) (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (r) (let fnrec5875 ((r r)) (jolt-invoke (var-deref "jolt.passes.types" "ty") r))) ares)))) (jolt-vector _o$5876 _o$5877)))) (jolt-invoke _a$5878 _a$5879 _a$5880 _a$5881)) jolt-nil) (if (jolt-truthy? (let* ((and__25__auto (jolt= (keyword #f "local") (jolt-get fnode (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-get env (keyword #f "self-key")))) (if (jolt-truthy? and__25__auto) (let* ((_a$5882 (jolt-get fnode (keyword #f "name"))) (_a$5883 (jolt-get env (keyword #f "self-name")))) (jolt= _a$5882 _a$5883)) and__25__auto)) and__25__auto))) (let* ((_a$5886 (var-deref "clojure.core" "swap!")) (_a$5887 (jolt-get env (keyword #f "calls"))) (_a$5888 jolt-conj) (_a$5889 (let* ((_o$5884 (jolt-get env (keyword #f "self-key"))) (_o$5885 (jolt-invoke (var-deref "jolt.passes.types" "self-rec-argtys") args ares (jolt-get env (keyword #f "self-params"))))) (jolt-vector _o$5884 _o$5885)))) (jolt-invoke _a$5886 _a$5887 _a$5888 _a$5889)) jolt-nil) (if (jolt-truthy? (jolt-get env (keyword #f "checking?"))) (let* ((ats (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (r) (let fnrec5890 ((r r)) (jolt-invoke (var-deref "jolt.passes.types" "ty") r))) ares)) (pos (jolt-get node (keyword #f "pos")))) (begin (if (jolt-truthy? cn) (jolt-invoke (var-deref "jolt.passes.types.check" "check-invoke") cn args ats pos env) jolt-nil) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.check" "not-callable?") callee-t)) (let* ((_a$5899 (var-deref "clojure.core" "swap!")) (_a$5900 (jolt-get env (keyword #f "diags"))) (_a$5901 jolt-conj) (_a$5902 (let* ((_o$5891 (keyword #f "op")) (_o$5892 (keyword #f "call")) (_o$5893 (keyword #f "type")) (_o$5894 (jolt-invoke (var-deref "jolt.passes.types.check" "type-name") callee-t)) (_o$5895 (keyword #f "pos")) (_o$5896 pos) (_o$5897 (keyword #f "msg")) (_o$5898 (jolt-invoke (var-deref "clojure.core" "str") "cannot call " (jolt-invoke (var-deref "jolt.passes.types.check" "type-name") callee-t) " as a function"))) (jolt-hash-map _o$5891 _o$5892 _o$5893 _o$5894 _o$5895 _o$5896 _o$5897 _o$5898)))) (jolt-invoke _a$5899 _a$5900 _a$5901 _a$5902)) jolt-nil) (if (jolt-truthy? (let* ((and__25__auto (jolt-get env (keyword #f "strict?")))) (if (jolt-truthy? and__25__auto) iscall-var and__25__auto))) (let* ((k (jolt-invoke (var-deref "jolt.passes.types" "var-key") fnode)) (usig (jolt-get (jolt-invoke (var-deref "clojure.core" "deref") (jolt-get env (keyword #f "user-sigs"))) k))) (if (jolt-truthy? usig) (jolt-invoke (var-deref "jolt.passes.types" "check-user-call") k usig ats pos env) jolt-nil)) jolt-nil))) jolt-nil) (let* ((pm (let* ((and__25__auto iscall-var)) (if (jolt-truthy? and__25__auto) (let* ((_a$5903 (jolt-get env (keyword #f "protocol-methods"))) (_a$5904 (jolt-invoke (var-deref "jolt.passes.types" "var-key") fnode))) (jolt-get _a$5903 _a$5904)) and__25__auto))) (rtype (if (jolt-truthy? (let* ((and__25__auto pm)) (if (jolt-truthy? and__25__auto) (jolt-pos? n) and__25__auto))) (jolt-get (jolt-invoke (var-deref "jolt.passes.types" "ty") (jolt-nth ares 0)) (keyword #f "type")) jolt-nil)) (base (jolt-assoc node (keyword #f "fn") fnode_PRIME_ (keyword #f "args") (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (r) (let fnrec5905 ((r r)) (jolt-invoke (var-deref "jolt.passes.types" "nd") r))) ares)))) (let* ((_o$5913 (if (jolt= cn "range") (jolt-invoke (var-deref "jolt.passes.types.lattice" "mk-vec") (keyword #f "num")) (if (jolt-truthy? (let* ((and__25__auto cn)) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-contains? (var-deref "jolt.passes.types" "elem-fns") cn))) (if (jolt-truthy? and__25__auto) (> n 0) and__25__auto)) and__25__auto))) (let* ((a0 (jolt-invoke (var-deref "jolt.passes.types" "ty") (jolt-nth ares 0)))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "vec-type?") a0)) (jolt-invoke (var-deref "jolt.passes.types.lattice" "velem") a0) (keyword #f "any"))) (if (jolt-truthy? (let* ((and__25__auto cn)) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-contains? (var-deref "jolt.passes.types" "dbl-arith-ops") cn))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.passes.types" "dbl-arith?") ares args) and__25__auto)) and__25__auto))) (keyword #f "double") (if (jolt-truthy? (keyword #f "else")) (jolt-invoke (var-deref "jolt.passes.types" "call-ret-type") fnode env) jolt-nil))))) (_o$5914 (if (jolt-truthy? rtype) (let* ((_a$5906 base) (_a$5907 (keyword #f "devirt-type")) (_a$5908 rtype) (_a$5909 (keyword #f "devirt-proto")) (_a$5910 (jolt-nth pm 0)) (_a$5911 (keyword #f "devirt-method")) (_a$5912 (jolt-nth pm 1))) (jolt-assoc _a$5906 _a$5907 _a$5908 _a$5909 _a$5910 _a$5911 _a$5912)) base))) (jolt-vector _o$5913 _o$5914))))))))) infer-call) (let* ((_o$5915 (keyword #f "private")) (_o$5916 #t) (_o$5917 (keyword #f "doc")) (_o$5918 "Everything else: type the args, collect the call (var callee) for whole-program\n  inference, run the success-type check, and use the declared/estimated return type.\n  range produces a numeric vector; an element-returning fn over a typed vector\n  yields the element type. A protocol-method call whose receiver (arg 0) is a known\n  record type is annotated [type-tag proto method] for devirtualization \x2014; the back\n  end looks up the impl at emit time and calls it directly, skipping the registry\n  dispatch (~19x cheaper).")) (jolt-hash-map _o$5915 _o$5916 _o$5917 _o$5918))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "infer-invoke" (letrec ((infer-invoke (lambda (node tenv env) (let fnrec5919 ((node node) (tenv tenv) (env env)) (let* ((fnode (jolt-get node (keyword #f "fn"))) (iscall-var (jolt= (keyword #f "var") (jolt-get fnode (keyword #f "op")))) (cn (if (jolt-truthy? (let* ((and__25__auto iscall-var)) (if (jolt-truthy? and__25__auto) (jolt= "clojure.core" (jolt-get fnode (keyword #f "ns"))) and__25__auto))) (jolt-get fnode (keyword #f "name")) jolt-nil)) (args (jolt-get node (keyword #f "args"))) (n (jolt-count args))) (if (jolt-truthy? (let* ((and__25__auto iscall-var)) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-contains? (var-deref "jolt.passes.types" "fold-preds") cn))) (if (jolt-truthy? and__25__auto) (jolt= n 1) and__25__auto)) and__25__auto))) (jolt-invoke (var-deref "jolt.passes.types" "infer-pred-fold") node fnode cn args tenv env) (if (jolt-truthy? (let* ((and__25__auto (jolt-invoke (var-deref "jolt.passes.fold" "kw-callee?") fnode))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (>= n 1))) (if (jolt-truthy? and__25__auto) (<= n 2) and__25__auto)) and__25__auto))) (jolt-invoke (var-deref "jolt.passes.types" "infer-kw-lookup") node fnode args n tenv env) (if (jolt-truthy? (let* ((and__25__auto (jolt-invoke (var-deref "jolt.passes.fold" "get-callee?") fnode))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (>= n 2))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= (keyword #f "const") (jolt-get (jolt-nth args 1) (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "clojure.core" "keyword?") (jolt-get (jolt-nth args 1) (keyword #f "val"))) and__25__auto)) and__25__auto)) and__25__auto))) (jolt-invoke (var-deref "jolt.passes.types" "infer-get-lookup") node args n tenv env) (if (let* ((and__25__auto (jolt= cn "reduce"))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (>= n 2))) (if (jolt-truthy? and__25__auto) (jolt= (keyword #f "fn") (jolt-get (jolt-nth args 0) (keyword #f "op"))) and__25__auto)) and__25__auto)) (jolt-invoke (var-deref "jolt.passes.types" "infer-reduce-hof") node args n tenv env) (if (jolt-truthy? (let* ((and__25__auto cn)) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-get (var-deref "jolt.passes.types" "hof-table") cn))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (>= n 2))) (if (jolt-truthy? and__25__auto) (jolt= (keyword #f "fn") (jolt-get (jolt-nth args 0) (keyword #f "op"))) and__25__auto)) and__25__auto)) and__25__auto))) (jolt-invoke (var-deref "jolt.passes.types" "infer-seq-hof") node cn args tenv env) (if (let* ((and__25__auto (let* ((or__26__auto (jolt= cn "conj"))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt= cn "into"))))) (if (jolt-truthy? and__25__auto) (>= n 1) and__25__auto)) (jolt-invoke (var-deref "jolt.passes.types" "infer-conj-into") node fnode cn args n tenv env) (if (jolt-truthy? (keyword #f "else")) (jolt-invoke (var-deref "jolt.passes.types" "infer-call") node fnode iscall-var cn args n tenv env) jolt-nil)))))))))))) infer-invoke) (let* ((_o$5920 (keyword #f "private")) (_o$5921 #t) (_o$5922 (keyword #f "doc")) (_o$5923 "Split the callee/args once and dispatch by callee shape to a pattern helper.")) (jolt-hash-map _o$5920 _o$5921 _o$5922 _o$5923))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "infer" (letrec ((infer (lambda (node tenv env) (let fnrec5924 ((node node) (tenv tenv) (env env)) (let* ((op (jolt-get node (keyword #f "op")))) (if (jolt= op (keyword #f "const")) (let* ((_o$5925 (let* ((v (jolt-get node (keyword #f "val")))) (if (jolt-truthy? (let* ((and__25__auto (jolt-invoke (var-deref "clojure.core" "number?") v))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "clojure.core" "float?") v) and__25__auto))) (keyword #f "double") (if (jolt-truthy? (jolt-invoke (var-deref "clojure.core" "number?") v)) (keyword #f "num") (if (jolt-truthy? (jolt-invoke (var-deref "clojure.core" "string?") v)) (keyword #f "str") (if (jolt-truthy? (jolt-invoke (var-deref "clojure.core" "keyword?") v)) (keyword #f "kw") (if (jolt-nil? v) (keyword #f "nil") (if (jolt= #f v) (keyword #f "any") (if (jolt-truthy? (keyword #f "else")) (keyword #f "truthy") jolt-nil))))))))) (_o$5926 node)) (jolt-vector _o$5925 _o$5926)) (if (jolt= op (keyword #f "local")) (let* ((t (jolt-get tenv (jolt-get node (keyword #f "name"))))) (let* ((_o$5927 (if (jolt-truthy? t) t (keyword #f "any"))) (_o$5928 (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "struct-safe?") t)) (let* ((n (jolt-assoc node (keyword #f "hint") (keyword #f "struct")))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "type-shape") t)) (jolt-assoc n (keyword #f "shape") (jolt-invoke (var-deref "jolt.passes.types.lattice" "type-shape") t)) n)) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.passes.types.lattice" "vec-type?") t)) (jolt-assoc node (keyword #f "hint") (keyword #f "vector")) (if (jolt-truthy? (keyword #f "else")) node jolt-nil))))) (jolt-vector _o$5927 _o$5928))) (if (jolt= op (keyword #f "map")) (let* ((pairs (jolt-get node (keyword #f "pairs"))) (res (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (pr) (let fnrec5929 ((pr pr)) (let* ((kr (infer (jolt-nth pr 0) tenv env)) (vr (infer (jolt-nth pr 1) tenv env))) (let* ((_o$5930 (jolt-nth kr 1)) (_o$5931 (jolt-nth vr 1)) (_o$5932 (jolt-nth vr 0)) (_o$5933 (jolt-get (jolt-nth pr 0) (keyword #f "val")))) (jolt-vector _o$5930 _o$5931 _o$5932 _o$5933))))) pairs)) (struct? (let* ((and__25__auto (> (jolt-count res) 0))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-invoke (var-deref "clojure.core" "every?") (lambda (pr) (let fnrec5934 ((pr pr)) (jolt-invoke (var-deref "jolt.passes.fold" "scalar-const?") (jolt-nth pr 0)))) pairs))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "clojure.core" "every?") (lambda (r) (let fnrec5935 ((r r)) (jolt-invoke (var-deref "jolt.passes.types.lattice" "truthy-type?") (jolt-nth r 2)))) res) and__25__auto)) and__25__auto))) (base (if (jolt-truthy? struct?) (jolt-invoke (var-deref "jolt.passes.types.lattice" "cap") (jolt-invoke (var-deref "jolt.passes.types.lattice" "mk-struct") (let* ((_a$5940 (lambda (m r) (let fnrec5936 ((m m) (r r)) (let* ((_a$5937 m) (_a$5938 (jolt-nth r 3)) (_a$5939 (jolt-nth r 2))) (jolt-assoc _a$5937 _a$5938 _a$5939))))) (_a$5941 (jolt-hash-map)) (_a$5942 res)) (jolt-reduce _a$5940 _a$5941 _a$5942))) (var-deref "jolt.passes.types.lattice" "type-depth")) jolt-nil)) (shp (if (jolt-truthy? (let* ((and__25__auto (jolt-get env (keyword #f "map-shapes?")))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto base)) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.passes.types.lattice" "struct-type?") base) and__25__auto)) and__25__auto))) (jolt-invoke (var-deref "jolt.passes.types.lattice" "shape-order") (jolt-keys (jolt-invoke (var-deref "jolt.passes.types.lattice" "sfields") base))) jolt-nil)) (t (if (jolt-truthy? base) (if (jolt-truthy? shp) (jolt-assoc base (keyword #f "shape") shp) base) (keyword #f "any"))) (node_PRIME_ (jolt-assoc node (keyword #f "pairs") (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (r) (let fnrec5943 ((r r)) (let* ((_o$5944 (jolt-nth r 0)) (_o$5945 (jolt-nth r 1))) (jolt-vector _o$5944 _o$5945)))) res)))) (let* ((_o$5946 t) (_o$5947 (if (jolt-truthy? shp) (jolt-assoc node_PRIME_ (keyword #f "shape") shp) node_PRIME_))) (jolt-vector _o$5946 _o$5947))) (if (jolt= op (keyword #f "vector")) (let* ((irs (let* ((_a$5949 (var-deref "clojure.core" "mapv")) (_a$5950 (lambda (x) (let fnrec5948 ((x x)) (infer x tenv env)))) (_a$5951 (jolt-get node (keyword #f "items")))) (jolt-invoke _a$5949 _a$5950 _a$5951))) (ets (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (r) (let fnrec5952 ((r r)) (jolt-nth r 0))) irs)) (el (if (jolt-empty? ets) (keyword #f "any") (let* ((_a$5953 (var-deref "jolt.passes.types.lattice" "join")) (_a$5954 (jolt-first ets)) (_a$5955 (jolt-rest ets))) (jolt-reduce _a$5953 _a$5954 _a$5955))))) (let* ((_o$5957 (jolt-invoke (var-deref "jolt.passes.types.lattice" "cap") (jolt-invoke (var-deref "jolt.passes.types.lattice" "mk-vec") el) (var-deref "jolt.passes.types.lattice" "type-depth"))) (_o$5958 (jolt-assoc node (keyword #f "items") (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (r) (let fnrec5956 ((r r)) (jolt-nth r 1))) irs)))) (jolt-vector _o$5957 _o$5958))) (if (jolt= op (keyword #f "set")) (let* ((irs (let* ((_a$5960 (var-deref "clojure.core" "mapv")) (_a$5961 (lambda (x) (let fnrec5959 ((x x)) (infer x tenv env)))) (_a$5962 (jolt-get node (keyword #f "items")))) (jolt-invoke _a$5960 _a$5961 _a$5962))) (ets (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (r) (let fnrec5963 ((r r)) (jolt-nth r 0))) irs)) (el (if (jolt-empty? ets) (keyword #f "any") (let* ((_a$5964 (var-deref "jolt.passes.types.lattice" "join")) (_a$5965 (jolt-first ets)) (_a$5966 (jolt-rest ets))) (jolt-reduce _a$5964 _a$5965 _a$5966))))) (let* ((_o$5968 (jolt-invoke (var-deref "jolt.passes.types.lattice" "cap") (jolt-invoke (var-deref "jolt.passes.types.lattice" "mk-set") el) (var-deref "jolt.passes.types.lattice" "type-depth"))) (_o$5969 (jolt-assoc node (keyword #f "items") (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (r) (let fnrec5967 ((r r)) (jolt-nth r 1))) irs)))) (jolt-vector _o$5968 _o$5969))) (if (jolt= op (keyword #f "if")) (let* ((test (jolt-get node (keyword #f "test"))) (tr (infer test tenv env)) (nr (jolt-invoke (var-deref "jolt.passes.types" "if-narrow") test tenv)) (thn (let* ((_a$5970 (jolt-get node (keyword #f "then"))) (_a$5971 (jolt-nth nr 0)) (_a$5972 env)) (infer _a$5970 _a$5971 _a$5972))) (els (let* ((_a$5973 (jolt-get node (keyword #f "else"))) (_a$5974 (jolt-nth nr 1)) (_a$5975 env)) (infer _a$5973 _a$5974 _a$5975)))) (let* ((_o$5986 (let* ((_a$5976 (var-deref "jolt.passes.types.lattice" "join")) (_a$5977 (jolt-nth thn 0)) (_a$5978 (jolt-nth els 0))) (jolt-invoke _a$5976 _a$5977 _a$5978))) (_o$5987 (let* ((_a$5979 node) (_a$5980 (keyword #f "test")) (_a$5981 (jolt-nth tr 1)) (_a$5982 (keyword #f "then")) (_a$5983 (jolt-nth thn 1)) (_a$5984 (keyword #f "else")) (_a$5985 (jolt-nth els 1))) (jolt-assoc _a$5979 _a$5980 _a$5981 _a$5982 _a$5983 _a$5984 _a$5985)))) (jolt-vector _o$5986 _o$5987))) (if (jolt= op (keyword #f "do")) (let* ((stmts (let* ((_a$5989 (var-deref "clojure.core" "mapv")) (_a$5990 (lambda (s) (let fnrec5988 ((s s)) (jolt-nth (infer s tenv env) 1)))) (_a$5991 (jolt-get node (keyword #f "statements")))) (jolt-invoke _a$5989 _a$5990 _a$5991))) (r (infer (jolt-get node (keyword #f "ret")) tenv env))) (let* ((_o$5992 (jolt-nth r 0)) (_o$5993 (jolt-assoc node (keyword #f "statements") stmts (keyword #f "ret") (jolt-nth r 1)))) (jolt-vector _o$5992 _o$5993))) (if (jolt= op (keyword #f "throw")) (let* ((_o$5994 (keyword #f "any")) (_o$5995 (jolt-assoc node (keyword #f "expr") (jolt-nth (infer (jolt-get node (keyword #f "expr")) tenv env) 1)))) (jolt-vector _o$5994 _o$5995)) (if (jolt= op (keyword #f "var")) (begin (let* ((_a$5996 (var-deref "clojure.core" "swap!")) (_a$5997 (jolt-get env (keyword #f "escapes"))) (_a$5998 jolt-conj) (_a$5999 (jolt-invoke (var-deref "jolt.passes.types" "var-key") node))) (jolt-invoke _a$5996 _a$5997 _a$5998 _a$5999)) (let* ((_o$6002 (let* ((vt (let* ((_a$6000 (jolt-get env (keyword #f "vtypes"))) (_a$6001 (jolt-invoke (var-deref "jolt.passes.types" "var-key") node))) (jolt-get _a$6000 _a$6001)))) (if (jolt-truthy? vt) vt (keyword #f "any")))) (_o$6003 node)) (jolt-vector _o$6002 _o$6003))) (if (jolt= op (keyword #f "invoke")) (jolt-invoke (var-deref "jolt.passes.types" "infer-invoke") node tenv env) (if (jolt= op (keyword #f "let")) (let* ((res (let* ((_a$6014 (lambda (acc b) (let fnrec6004 ((acc acc) (b b)) (let* ((te (jolt-nth acc 0)) (binds (jolt-nth acc 1)) (ir (infer (jolt-nth b 1) te env))) (let* ((_o$6010 (let* ((_a$6005 te) (_a$6006 (jolt-nth b 0)) (_a$6007 (jolt-nth ir 0))) (jolt-assoc _a$6005 _a$6006 _a$6007))) (_o$6011 (jolt-conj binds (let* ((_o$6008 (jolt-nth b 0)) (_o$6009 (jolt-nth ir 1))) (jolt-vector _o$6008 _o$6009))))) (jolt-vector _o$6010 _o$6011)))))) (_a$6015 (let* ((_o$6012 tenv) (_o$6013 (jolt-vector))) (jolt-vector _o$6012 _o$6013))) (_a$6016 (jolt-get node (keyword #f "bindings")))) (jolt-reduce _a$6014 _a$6015 _a$6016))) (br (let* ((_a$6017 (jolt-get node (keyword #f "body"))) (_a$6018 (jolt-nth res 0)) (_a$6019 env)) (infer _a$6017 _a$6018 _a$6019)))) (let* ((_o$6025 (jolt-nth br 0)) (_o$6026 (let* ((_a$6020 node) (_a$6021 (keyword #f "bindings")) (_a$6022 (jolt-nth res 1)) (_a$6023 (keyword #f "body")) (_a$6024 (jolt-nth br 1))) (jolt-assoc _a$6020 _a$6021 _a$6022 _a$6023 _a$6024)))) (jolt-vector _o$6025 _o$6026))) (if (jolt= op (keyword #f "loop")) (let* ((lenv (jolt-assoc env (keyword #f "in-loop?") #t))) (let* ((_o$6038 (keyword #f "any")) (_o$6039 (let* ((_a$6033 node) (_a$6034 (keyword #f "bindings")) (_a$6035 (let* ((_a$6030 (var-deref "clojure.core" "mapv")) (_a$6031 (lambda (b) (let fnrec6027 ((b b)) (let* ((_o$6028 (jolt-nth b 0)) (_o$6029 (jolt-nth (infer (jolt-nth b 1) tenv env) 1))) (jolt-vector _o$6028 _o$6029))))) (_a$6032 (jolt-get node (keyword #f "bindings")))) (jolt-invoke _a$6030 _a$6031 _a$6032))) (_a$6036 (keyword #f "body")) (_a$6037 (jolt-nth (infer (jolt-get node (keyword #f "body")) tenv lenv) 1))) (jolt-assoc _a$6033 _a$6034 _a$6035 _a$6036 _a$6037)))) (jolt-vector _o$6038 _o$6039))) (if (jolt= op (keyword #f "recur")) (let* ((ares (let* ((_a$6041 (var-deref "clojure.core" "mapv")) (_a$6042 (lambda (a) (let fnrec6040 ((a a)) (infer a tenv env)))) (_a$6043 (jolt-get node (keyword #f "args")))) (jolt-invoke _a$6041 _a$6042 _a$6043)))) (begin (if (jolt-truthy? (let* ((and__25__auto (jolt-not (jolt-get env (keyword #f "in-loop?"))))) (if (jolt-truthy? and__25__auto) (jolt-get env (keyword #f "self-key")) and__25__auto))) (let* ((_a$6050 (var-deref "clojure.core" "swap!")) (_a$6051 (jolt-get env (keyword #f "calls"))) (_a$6052 jolt-conj) (_a$6053 (let* ((_o$6048 (jolt-get env (keyword #f "self-key"))) (_o$6049 (let* ((_a$6044 (var-deref "jolt.passes.types" "self-rec-argtys")) (_a$6045 (jolt-get node (keyword #f "args"))) (_a$6046 ares) (_a$6047 (jolt-get env (keyword #f "self-params")))) (jolt-invoke _a$6044 _a$6045 _a$6046 _a$6047)))) (jolt-vector _o$6048 _o$6049)))) (jolt-invoke _a$6050 _a$6051 _a$6052 _a$6053)) jolt-nil) (let* ((_o$6055 (keyword #f "any")) (_o$6056 (jolt-assoc node (keyword #f "args") (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (r) (let fnrec6054 ((r r)) (jolt-invoke (var-deref "jolt.passes.types" "nd") r))) ares)))) (jolt-vector _o$6055 _o$6056)))) (if (jolt= op (keyword #f "fn")) (let* ((fenv (jolt-assoc env (keyword #f "self-name") jolt-nil (keyword #f "self-key") jolt-nil (keyword #f "self-params") jolt-nil (keyword #f "in-loop?") #f))) (let* ((_o$6072 (keyword #f "any")) (_o$6073 (jolt-assoc node (keyword #f "arities") (let* ((_a$6069 (var-deref "clojure.core" "mapv")) (_a$6070 (lambda (a) (let fnrec6057 ((a a)) (let* ((shapes (jolt-get env (keyword #f "record-shapes"))) (phm (let* ((_a$6062 (lambda (m pr) (let fnrec6058 ((m m) (pr pr)) (let* ((_a$6059 m) (_a$6060 (jolt-nth pr 0)) (_a$6061 (jolt-nth pr 1))) (jolt-assoc _a$6059 _a$6060 _a$6061))))) (_a$6063 (jolt-hash-map)) (_a$6064 (jolt-get a (keyword #f "phints")))) (jolt-reduce _a$6062 _a$6063 _a$6064))) (pe (let* ((_a$6066 (lambda (e p) (let fnrec6065 ((e e) (p p)) (jolt-assoc e p (let* ((ent (jolt-get shapes (jolt-get phm p)))) (if (jolt-truthy? ent) (jolt-invoke (var-deref "jolt.passes.types" "record-type-from-entry") ent (var-deref "jolt.passes.types.lattice" "type-depth") shapes) (keyword #f "any"))))))) (_a$6067 tenv) (_a$6068 (jolt-get a (keyword #f "params")))) (jolt-reduce _a$6066 _a$6067 _a$6068))) (pe (if (jolt-truthy? (jolt-get a (keyword #f "rest"))) (jolt-assoc pe (jolt-get a (keyword #f "rest")) (keyword #f "any")) pe))) (jolt-assoc a (keyword #f "body") (jolt-nth (infer (jolt-get a (keyword #f "body")) pe fenv) 1)))))) (_a$6071 (jolt-get node (keyword #f "arities")))) (jolt-invoke _a$6069 _a$6070 _a$6071))))) (jolt-vector _o$6072 _o$6073))) (if (jolt= op (keyword #f "def")) (begin (if (jolt-truthy? (jolt-get env (keyword #f "checking?"))) (jolt-invoke (var-deref "jolt.passes.types.check" "register-user-fn!") node env) jolt-nil) (let* ((_o$6074 (keyword #f "any")) (_o$6075 (jolt-assoc node (keyword #f "init") (jolt-nth (infer (jolt-get node (keyword #f "init")) tenv env) 1)))) (jolt-vector _o$6074 _o$6075))) (if (jolt= op (keyword #f "try")) (let* ((_o$6083 (keyword #f "any")) (_o$6084 (let* ((_a$6076 node) (_a$6077 (keyword #f "body")) (_a$6078 (jolt-nth (infer (jolt-get node (keyword #f "body")) tenv env) 1)) (_a$6079 (keyword #f "catch-body")) (_a$6080 (if (jolt-truthy? (jolt-get node (keyword #f "catch-body"))) (jolt-nth (infer (jolt-get node (keyword #f "catch-body")) tenv env) 1) jolt-nil)) (_a$6081 (keyword #f "finally")) (_a$6082 (if (jolt-truthy? (jolt-get node (keyword #f "finally"))) (jolt-nth (infer (jolt-get node (keyword #f "finally")) tenv env) 1) jolt-nil))) (jolt-assoc _a$6076 _a$6077 _a$6078 _a$6079 _a$6080 _a$6081 _a$6082)))) (jolt-vector _o$6083 _o$6084)) (if (jolt-truthy? (keyword #f "else")) (let* ((_o$6085 (keyword #f "any")) (_o$6086 node)) (jolt-vector _o$6085 _o$6086)) jolt-nil)))))))))))))))))))))) infer) (let* ((_o$6087 (keyword #f "private")) (_o$6088 #t) (_o$6089 (keyword #f "doc")) (_o$6090 "Returns [type node'] \x2014; the inferred type of node and node with struct-safe\n  :local references annotated :hint :struct. tenv maps in-scope local names to\n  inferred types; env carries the inference config and this run's accumulators.")) (jolt-hash-map _o$6087 _o$6088 _o$6089 _o$6090))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "infer-top" (letrec ((infer-top (lambda (node env) (let fnrec6091 ((node node) (env env)) (jolt-nth (jolt-invoke (var-deref "jolt.passes.types" "infer") node (jolt-hash-map) env) 1))))) infer-top) (let* ((_o$6092 (keyword #f "private")) (_o$6093 #t)) (jolt-hash-map _o$6092 _o$6093))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "all-any-env" (letrec ((all-any-env (lambda (params) (let fnrec6094 ((params params)) (let* ((_a$6096 (lambda (e p) (let fnrec6095 ((e e) (p p)) (jolt-assoc e p (keyword #f "any"))))) (_a$6097 (jolt-hash-map)) (_a$6098 params)) (jolt-reduce _a$6096 _a$6097 _a$6098)))))) all-any-env) (let* ((_o$6099 (keyword #f "private")) (_o$6100 #t) (_o$6101 (keyword #f "doc")) (_o$6102 "tenv binding every param name to :any (the all-ambiguous baseline).")) (jolt-hash-map _o$6099 _o$6100 _o$6101 _o$6102))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "isolated-diag-count" (letrec ((isolated-diag-count (lambda (body tenv env) (let fnrec6103 ((body body) (tenv tenv) (env env)) (let* ((sub (jolt-assoc env (keyword #f "diags") (jolt-invoke (var-deref "clojure.core" "atom") (jolt-vector))))) (begin (jolt-invoke (var-deref "jolt.passes.types" "infer") body tenv sub) (jolt-count (jolt-invoke (var-deref "clojure.core" "deref") (jolt-get sub (keyword #f "diags")))))))))) isolated-diag-count) (let* ((_o$6104 (keyword #f "private")) (_o$6105 #t) (_o$6106 (keyword #f "doc")) (_o$6107 "Count of diagnostics typing body under tenv produces. Runs under a SUB-ENV\n  with its own diags cell, so this probe never leaks into the real report (the\n  shared calls/escapes/guard cells are intentionally still threaded \x2014; they are\n  not read here). Runs the same checking inference as check-form.")) (jolt-hash-map _o$6104 _o$6105 _o$6106 _o$6107))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "check-user-call" (letrec ((check-user-call (lambda (key sig arg-types pos env) (let fnrec6108 ((key key) (sig sig) (arg-types arg-types) (pos pos) (env env)) (let* ((cset (jolt-get env (keyword #f "checking-set")))) (if (jolt-not (jolt-contains? (jolt-invoke (var-deref "clojure.core" "deref") cset) key)) (let* ((prev (jolt-invoke (var-deref "clojure.core" "deref") cset))) (begin (jolt-invoke (var-deref "clojure.core" "reset!") cset (jolt-conj prev key)) (let* ((params (jolt-get sig (keyword #f "params"))) (body (jolt-get sig (keyword #f "body"))) (npar (jolt-count params)) (nargs (jolt-count arg-types)) (memo (jolt-get env (keyword #f "diag-memo")))) (if (jolt-truthy? (jolt-invoke (var-deref "clojure.core" "not=") npar nargs)) (let* ((_a$6117 (var-deref "clojure.core" "swap!")) (_a$6118 (jolt-get env (keyword #f "diags"))) (_a$6119 jolt-conj) (_a$6120 (let* ((_o$6109 (keyword #f "op")) (_o$6110 (keyword #f "user-call")) (_o$6111 (keyword #f "type")) (_o$6112 (keyword #f "arity")) (_o$6113 (keyword #f "pos")) (_o$6114 pos) (_o$6115 (keyword #f "msg")) (_o$6116 (jolt-invoke (var-deref "clojure.core" "str") "wrong number of args (" nargs ") passed to `" (jolt-get sig (keyword #f "name")) "` (expected " npar ")"))) (jolt-hash-map _o$6109 _o$6110 _o$6111 _o$6112 _o$6113 _o$6114 _o$6115 _o$6116)))) (jolt-invoke _a$6117 _a$6118 _a$6119 _a$6120)) (let* ((base-env (jolt-invoke (var-deref "jolt.passes.types" "all-any-env") params)) (base (let* ((bk (let* ((_o$6121 (keyword #f "base")) (_o$6122 key)) (jolt-vector _o$6121 _o$6122)))) (if (jolt-contains? (jolt-invoke (var-deref "clojure.core" "deref") memo) bk) (jolt-get (jolt-invoke (var-deref "clojure.core" "deref") memo) bk) (let* ((b (jolt-invoke (var-deref "jolt.passes.types" "isolated-diag-count") body base-env env))) (begin (jolt-invoke (var-deref "clojure.core" "swap!") memo jolt-assoc bk b) b)))))) (let* ((_a$6150 (lambda (_ i) (let fnrec6123 ((_ _) (i i)) (begin (let* ((at (jolt-nth arg-types i))) (if (jolt-truthy? (let* ((and__25__auto (jolt-invoke (var-deref "clojure.core" "not=") at (keyword #f "any")))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "clojure.core" "not=") at (keyword #f "truthy")) and__25__auto))) (let* ((mk (let* ((_o$6124 (keyword #f "arg")) (_o$6125 key) (_o$6126 i) (_o$6127 at)) (jolt-vector _o$6124 _o$6125 _o$6126 _o$6127))) (rejects (if (jolt-contains? (jolt-invoke (var-deref "clojure.core" "deref") memo) mk) (jolt-get (jolt-invoke (var-deref "clojure.core" "deref") memo) mk) (let* ((r (> (jolt-invoke (var-deref "jolt.passes.types" "isolated-diag-count") body (jolt-assoc base-env (jolt-nth params i) at) env) base))) (begin (jolt-invoke (var-deref "clojure.core" "swap!") memo jolt-assoc mk r) r))))) (if (jolt-truthy? rejects) (let* ((_a$6146 (var-deref "clojure.core" "swap!")) (_a$6147 (jolt-get env (keyword #f "diags"))) (_a$6148 jolt-conj) (_a$6149 (let* ((_o$6136 (keyword #f "op")) (_o$6137 (keyword #f "user-call")) (_o$6138 (keyword #f "argpos")) (_o$6139 i) (_o$6140 (keyword #f "type")) (_o$6141 (jolt-invoke (var-deref "jolt.passes.types.check" "type-name") at)) (_o$6142 (keyword #f "pos")) (_o$6143 pos) (_o$6144 (keyword #f "msg")) (_o$6145 (let* ((_a$6128 (var-deref "clojure.core" "str")) (_a$6129 "argument ") (_a$6130 (jolt-inc i)) (_a$6131 " to `") (_a$6132 (jolt-get sig (keyword #f "name"))) (_a$6133 "` is ") (_a$6134 (jolt-invoke (var-deref "jolt.passes.types.check" "type-name") at)) (_a$6135 ", which its body provably rejects")) (jolt-invoke _a$6128 _a$6129 _a$6130 _a$6131 _a$6132 _a$6133 _a$6134 _a$6135)))) (jolt-hash-map _o$6136 _o$6137 _o$6138 _o$6139 _o$6140 _o$6141 _o$6142 _o$6143 _o$6144 _o$6145)))) (jolt-invoke _a$6146 _a$6147 _a$6148 _a$6149)) jolt-nil)) jolt-nil)) jolt-nil)))) (_a$6151 jolt-nil) (_a$6152 (jolt-range npar))) (jolt-reduce _a$6150 _a$6151 _a$6152))))) (jolt-invoke (var-deref "clojure.core" "reset!") cset prev))) jolt-nil)))))) check-user-call) (let* ((_o$6153 (keyword #f "private")) (_o$6154 #t) (_o$6155 (keyword #f "doc")) (_o$6156 "Strict mode: report a call to a registered user fn that provably throws \x2014;\n  either a WRONG ARITY (the registered fn has one fixed arity, so a different\n  arg count always throws) or an argument whose concrete type the body\n  rejects. For the latter, re-check the body with ONLY that parameter bound to\n  its arg type (others :any); a diagnostic the all-:any body did not already\n  have means the argument alone is provably wrong. Monotonic \x2014; binding a\n  concrete type can only ADD error-domain hits \x2014; so no false positive.\n  Cycle-guarded (env's checking-set) so mutually recursive fns terminate.")) (jolt-hash-map _o$6153 _o$6154 _o$6155 _o$6156))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "set-rtenv!" (letrec ((set-rtenv! (lambda (m) (let fnrec6157 ((m m)) (jolt-invoke (var-deref "clojure.core" "swap!") (var-deref "jolt.passes.types" "config-box") jolt-assoc (keyword #f "rtenv") (let* ((or__26__auto m)) (if (jolt-truthy? or__26__auto) or__26__auto (jolt-hash-map)))))))) set-rtenv!) (let* ((_o$6158 (keyword #f "doc")) (_o$6159 "Install the current return-type estimates (a map \"ns/name\" -> type) used to\n  type call results during the fixpoint.")) (jolt-hash-map _o$6158 _o$6159))))
(guard (e (#t #f))
  (def-var! "jolt.passes.types" "set-record-shapes!" (letrec ((set-record-shapes! (lambda (m) (let fnrec6160 ((m m)) (jolt-invoke (var-deref "clojure.core" "swap!") (var-deref "jolt.passes.types" "config-box") jolt-assoc (keyword #f "record-shapes") (let* ((or__26__auto m)) (if (jolt-truthy? or__26__auto) or__26__auto (jolt-hash-map)))))))) set-record-shapes!)))
(guard (e (#t #f))
  (def-var! "jolt.passes.types" "set-protocol-methods!" (letrec ((set-protocol-methods! (lambda (m) (let fnrec6161 ((m m)) (jolt-invoke (var-deref "clojure.core" "swap!") (var-deref "jolt.passes.types" "config-box") jolt-assoc (keyword #f "protocol-methods") (let* ((or__26__auto m)) (if (jolt-truthy? or__26__auto) or__26__auto (jolt-hash-map)))))))) set-protocol-methods!)))
(guard (e (#t #f))
  (def-var! "jolt.passes.types" "set-map-shapes!" (letrec ((set-map-shapes! (lambda (b) (let fnrec6162 ((b b)) (jolt-invoke (var-deref "clojure.core" "swap!") (var-deref "jolt.passes.types" "config-box") jolt-assoc (keyword #f "map-shapes?") (jolt-invoke (var-deref "clojure.core" "boolean") b)))))) set-map-shapes!)))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "set-vtypes!" (letrec ((set-vtypes! (lambda (m) (let fnrec6163 ((m m)) (jolt-invoke (var-deref "clojure.core" "swap!") (var-deref "jolt.passes.types" "config-box") jolt-assoc (keyword #f "vtypes") (let* ((or__26__auto m)) (if (jolt-truthy? or__26__auto) or__26__auto (jolt-hash-map)))))))) set-vtypes!) (let* ((_o$6164 (keyword #f "doc")) (_o$6165 "Install var VALUE types (a map \"ns/name\" -> type): fn vars are :truthy\n  (non-nil), def vars carry their inferred init type.")) (jolt-hash-map _o$6164 _o$6165))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "join-types" (letrec ((join-types (lambda (a b) (let fnrec6166 ((a a) (b b)) (jolt-invoke (var-deref "jolt.passes.types.lattice" "join-t") a b))))) join-types) (let* ((_o$6167 (keyword #f "doc")) (_o$6168 "Public structural join (lub), used by the orchestrator's fixpoint so param/\n  return types join field-wise/element-wise instead of collapsing to :any.")) (jolt-hash-map _o$6167 _o$6168))))
(guard (e (#t #f))
  (def-var! "jolt.passes.types" "reset-escapes!" (letrec ((reset-escapes! (lambda () (let fnrec6169 () (jolt-invoke (var-deref "clojure.core" "reset!") (var-deref "jolt.passes.types" "escapes-box") (jolt-hash-set)))))) reset-escapes!)))
(guard (e (#t #f))
  (def-var! "jolt.passes.types" "collected-escapes" (letrec ((collected-escapes (lambda () (let fnrec6170 () (jolt-invoke (var-deref "clojure.core" "vec") (jolt-invoke (var-deref "clojure.core" "deref") (var-deref "jolt.passes.types" "escapes-box"))))))) collected-escapes)))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "check-form" (letrec ((check-form (case-lambda ((node) (let fnrec6171 ((node node)) (check-form node #f))) ((node strict?) (let fnrec6172 ((node node) (strict? strict?)) (let* ((env (jolt-invoke (var-deref "jolt.passes.types" "mk-env") #t strict?))) (begin (jolt-invoke (var-deref "jolt.passes.types" "infer") node (jolt-hash-map) env) (jolt-invoke (var-deref "clojure.core" "vec") (jolt-invoke (var-deref "clojure.core" "deref") (jolt-get env (keyword #f "diags"))))))))))) check-form) (let* ((_o$6173 (keyword #f "doc")) (_o$6174 "Success-type check a single analyzed form (RFC 0006). Returns a vector of\n  diagnostics [{:op :argpos :type :msg} ...] for provably-wrong calls; empty\n  when nothing is provably wrong. Runs independently of specialization so it is\n  usable in normal builds (the decoupled checking path).\n\n  With strict? true, also reports calls to registered user functions whose\n  concrete argument types provably make the body throw (opt-in,\n  closed-world). user-sig-box accumulates registered defs across forms, so a\n  def must precede its call \x2014; the same ordering RFC 0005 already assumes.")) (jolt-hash-map _o$6173 _o$6174))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "infer-body" (letrec ((infer-body (case-lambda ((body tenv) (let fnrec6175 ((body body) (tenv tenv)) (infer-body body tenv jolt-nil jolt-nil jolt-nil))) ((body tenv self-name self-key) (let fnrec6176 ((body body) (tenv tenv) (self-name self-name) (self-key self-key)) (infer-body body tenv self-name self-key jolt-nil))) ((body tenv self-name self-key self-params) (let fnrec6177 ((body body) (tenv tenv) (self-name self-name) (self-key self-key) (self-params self-params)) (let* ((env (jolt-assoc (jolt-invoke (var-deref "jolt.passes.types" "mk-env") #f #f) (keyword #f "self-name") self-name (keyword #f "self-key") self-key (keyword #f "self-params") self-params)) (r (jolt-invoke (var-deref "jolt.passes.types" "infer") body tenv env))) (let* ((_o$6178 (jolt-nth r 0)) (_o$6179 (jolt-nth r 1)) (_o$6180 (jolt-invoke (var-deref "clojure.core" "deref") (jolt-get env (keyword #f "calls"))))) (jolt-vector _o$6178 _o$6179 _o$6180)))))))) infer-body) (let* ((_o$6181 (keyword #f "doc")) (_o$6182 "Type `body` under tenv (local-name -> type). Returns [ret-type node' calls],\n  where calls is the [[\"ns/name\" [arg-types...]] ...] this body invokes (for\n  propagating into callee param types). Also accumulates escapes (read with\n  collected-escapes after a full sweep). With self-name/self-key, a recursive\n  self-call or fn-level recur in `body` is collected under self-key too, so a\n  self-recursive fn's params are constrained by its recursion, not just callers.")) (jolt-hash-map _o$6181 _o$6182))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "impl-reg-ret" (letrec ((impl-reg-ret (lambda (node) (let fnrec6183 ((node node)) (if (jolt= (keyword #f "invoke") (jolt-get node (keyword #f "op"))) (let* ((f (jolt-get node (keyword #f "fn"))) (args (jolt-get node (keyword #f "args")))) (if (let* ((and__25__auto (jolt= (keyword #f "var") (jolt-get f (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (let* ((or__26__auto (jolt= "register-inline-method" (jolt-get f (keyword #f "name"))))) (if (jolt-truthy? or__26__auto) or__26__auto (jolt= "register-method" (jolt-get f (keyword #f "name"))))))) (if (jolt-truthy? and__25__auto) (jolt= 4 (jolt-count args)) and__25__auto)) and__25__auto)) (let* ((proto (jolt-get (jolt-nth args 1) (keyword #f "val"))) (method (jolt-get (jolt-nth args 2) (keyword #f "val"))) (fnn (jolt-nth args 3))) (if (jolt-truthy? (let* ((and__25__auto (jolt-invoke (var-deref "clojure.core" "string?") proto))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-invoke (var-deref "clojure.core" "string?") method))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= (keyword #f "fn") (jolt-get fnn (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (jolt-seq (jolt-get fnn (keyword #f "arities"))) and__25__auto)) and__25__auto)) and__25__auto))) (let* ((_o$6187 (jolt-invoke (var-deref "clojure.core" "str") proto "/" method)) (_o$6188 (jolt-nth (let* ((_a$6184 (var-deref "jolt.passes.types" "infer-body")) (_a$6185 (jolt-get (jolt-first (jolt-get fnn (keyword #f "arities"))) (keyword #f "body"))) (_a$6186 (jolt-hash-map))) (jolt-invoke _a$6184 _a$6185 _a$6186)) 0))) (jolt-vector _o$6187 _o$6188)) jolt-nil)) jolt-nil)) jolt-nil))))) impl-reg-ret) (let* ((_o$6189 (keyword #f "private")) (_o$6190 #t)) (jolt-hash-map _o$6189 _o$6190))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "walk-pm-rets" (letrec ((walk-pm-rets (lambda (node acc) (let fnrec6191 ((node node) (acc acc)) (let* ((kr (jolt-invoke (var-deref "jolt.passes.types" "impl-reg-ret") node)) (acc (if (jolt-truthy? kr) (let* ((_a$6193 (var-deref "clojure.core" "update")) (_a$6194 acc) (_a$6195 (jolt-nth kr 0)) (_a$6196 (lambda (t) (let fnrec6192 ((t t)) (if (jolt-truthy? t) (jolt-invoke (var-deref "jolt.passes.types.lattice" "join") t (jolt-nth kr 1)) (jolt-nth kr 1)))))) (jolt-invoke _a$6193 _a$6194 _a$6195 _a$6196)) acc))) (jolt-invoke (var-deref "jolt.ir" "reduce-ir-children") (lambda (a c) (let fnrec6197 ((a a) (c c)) (walk-pm-rets c a))) acc node)))))) walk-pm-rets) (let* ((_o$6198 (keyword #f "private")) (_o$6199 #t)) (jolt-hash-map _o$6198 _o$6199))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "collect-pm-rets!" (letrec ((collect-pm-rets! (lambda (nodes) (let fnrec6200 ((nodes nodes)) (jolt-invoke (var-deref "clojure.core" "reset!") (var-deref "jolt.passes.types" "pm-rets-box") (let* ((_a$6202 (lambda (acc n) (let fnrec6201 ((acc acc) (n n)) (jolt-invoke (var-deref "jolt.passes.types" "walk-pm-rets") n acc)))) (_a$6203 (jolt-hash-map)) (_a$6204 nodes)) (jolt-reduce _a$6202 _a$6203 _a$6204))))))) collect-pm-rets!) (let* ((_o$6205 (keyword #f "doc")) (_o$6206 "Scan the unit's nodes for protocol-method impl registrations and stash each\n  method's joined impl-return type (record-shapes must already be installed).")) (jolt-hash-map _o$6205 _o$6206))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "reinfer-def" (letrec ((reinfer-def (lambda (def-node ptmap) (let fnrec6207 ((def-node def-node) (ptmap ptmap)) (let* ((fnode (jolt-get def-node (keyword #f "init"))) (env (jolt-invoke (var-deref "jolt.passes.types" "mk-env") #f #f)) (shapes (jolt-get env (keyword #f "record-shapes")))) (if (jolt= (keyword #f "fn") (jolt-get fnode (keyword #f "op"))) (jolt-assoc def-node (keyword #f "init") (jolt-assoc fnode (keyword #f "arities") (let* ((_a$6213 (var-deref "clojure.core" "mapv")) (_a$6214 (lambda (a) (let fnrec6208 ((a a)) (let* ((pt (let* ((_a$6210 (lambda (m pr) (let fnrec6209 ((m m) (pr pr)) (let* ((nm (jolt-nth pr 0)) (e (jolt-get shapes (jolt-nth pr 1)))) (if (jolt-truthy? (let* ((and__25__auto e)) (if (jolt-truthy? and__25__auto) (jolt-not (jolt-contains? m nm)) and__25__auto))) (jolt-assoc m nm (jolt-invoke (var-deref "jolt.passes.types" "record-type-from-entry") e (var-deref "jolt.passes.types.lattice" "type-depth") shapes)) m))))) (_a$6211 ptmap) (_a$6212 (jolt-get a (keyword #f "phints")))) (jolt-reduce _a$6210 _a$6211 _a$6212)))) (jolt-assoc a (keyword #f "body") (jolt-nth (jolt-invoke (var-deref "jolt.passes.types" "infer") (jolt-get a (keyword #f "body")) pt env) 1)))))) (_a$6215 (jolt-get fnode (keyword #f "arities")))) (jolt-invoke _a$6213 _a$6214 _a$6215)))) def-node)))))) reinfer-def) (let* ((_o$6216 (keyword #f "doc")) (_o$6217 "Re-run inference on a stashed :def's fn arity bodies with param types seeded\n  (ptmap: param-name -> type), returning the def with annotated bodies. The back\n  end emits the result directly (no further passes), so the param-typed lookups\n  keep their specialization. Used by the inter-procedural recompile.")) (jolt-hash-map _o$6216 _o$6217))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "phint-seed" (letrec ((phint-seed (lambda (params phints) (let fnrec6218 ((params params) (phints phints)) (let* ((shapes (jolt-get (jolt-invoke (var-deref "clojure.core" "deref") (var-deref "jolt.passes.types" "config-box")) (keyword #f "record-shapes"))) (m (let* ((_a$6223 (lambda (acc pr) (let fnrec6219 ((acc acc) (pr pr)) (let* ((_a$6220 acc) (_a$6221 (jolt-nth pr 0)) (_a$6222 (jolt-nth pr 1))) (jolt-assoc _a$6220 _a$6221 _a$6222))))) (_a$6224 (jolt-hash-map)) (_a$6225 phints)) (jolt-reduce _a$6223 _a$6224 _a$6225)))) (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (nm) (let fnrec6226 ((nm nm)) (let* ((ck (jolt-get m nm)) (e (let* ((and__25__auto ck)) (if (jolt-truthy? and__25__auto) (jolt-get shapes ck) and__25__auto)))) (if (jolt-truthy? e) (jolt-invoke (var-deref "jolt.passes.types" "record-type-from-entry") e (var-deref "jolt.passes.types.lattice" "type-depth") shapes) jolt-nil)))) params)))))) phint-seed) (let* ((_o$6227 (keyword #f "doc")) (_o$6228 "Positional declared-hint type seeds for a fn arity. Given the param-name\n  vector and the arity's :phints (a seq of [name ctor-key] pairs), return a\n  vector parallel to params whose slot i is the resolved record TYPE of that\n  param's ^Record hint (via the record-shapes registry), or nil. The\n  whole-program fixpoint seeds these as a param-type FLOOR so a declared hint\n  propagates to a fn's callees DURING inference \x2014; not only at the final re-emit\n  (reinfer-def). Without it a hinted param with no callers stays :any through the\n  fixpoint, so a field read off it (e.g. (:origin ^Ray r)) never tells a shared\n  callee its arg is a Vec3.")) (jolt-hash-map _o$6227 _o$6228))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "wp-seeds-box" (jolt-invoke (var-deref "clojure.core" "atom") (jolt-hash-map)) (let* ((_o$6229 (keyword #f "private")) (_o$6230 #t)) (jolt-hash-map _o$6229 _o$6230))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "param-seeds-for" (letrec ((param-seeds-for (lambda (k) (let fnrec6231 ((k k)) (jolt-get (jolt-invoke (var-deref "clojure.core" "deref") (var-deref "jolt.passes.types" "wp-seeds-box")) k))))) param-seeds-for) (let* ((_o$6232 (keyword #f "doc")) (_o$6233 "The param-name -> type seed map a top-level def should be reinferred with, or\n  nil. Set by wp-infer!, read by run-passes during the final per-def emit.")) (jolt-hash-map _o$6232 _o$6233))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "wp-num-seeds-box" (jolt-invoke (var-deref "clojure.core" "atom") (jolt-hash-map)) (let* ((_o$6234 (keyword #f "private")) (_o$6235 #t)) (jolt-hash-map _o$6234 _o$6235))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "param-num-seeds-for" (letrec ((param-num-seeds-for (lambda (k) (let fnrec6236 ((k k)) (jolt-get (jolt-invoke (var-deref "clojure.core" "deref") (var-deref "jolt.passes.types" "wp-num-seeds-box")) k))))) param-num-seeds-for) (let* ((_o$6237 (keyword #f "doc")) (_o$6238 "The param-name -> :double seed map for a def's hintless flonum params, or nil.")) (jolt-hash-map _o$6237 _o$6238))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "wp-specializable" (letrec ((wp-specializable (lambda (nodes) (let fnrec6239 ((nodes nodes)) (let* ((_a$6254 (lambda (m d) (let fnrec6240 ((m m) (d d)) (let* ((f (jolt-get d (keyword #f "init")))) (if (let* ((and__25__auto (jolt= (keyword #f "def") (jolt-get d (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= (keyword #f "fn") (jolt-get f (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= 1 (jolt-count (jolt-get f (keyword #f "arities")))))) (if (jolt-truthy? and__25__auto) (jolt-not (jolt-get (jolt-first (jolt-get f (keyword #f "arities"))) (keyword #f "rest"))) and__25__auto)) and__25__auto)) and__25__auto)) (let* ((a (jolt-first (jolt-get f (keyword #f "arities"))))) (let* ((_a$6251 m) (_a$6252 (let* ((_a$6241 (var-deref "clojure.core" "str")) (_a$6242 (jolt-get d (keyword #f "ns"))) (_a$6243 "/") (_a$6244 (jolt-get d (keyword #f "name")))) (jolt-invoke _a$6241 _a$6242 _a$6243 _a$6244))) (_a$6253 (let* ((_o$6245 (keyword #f "name")) (_o$6246 (jolt-get d (keyword #f "name"))) (_o$6247 (keyword #f "params")) (_o$6248 (jolt-get a (keyword #f "params"))) (_o$6249 (keyword #f "body")) (_o$6250 (jolt-get a (keyword #f "body")))) (jolt-hash-map _o$6245 _o$6246 _o$6247 _o$6248 _o$6249 _o$6250)))) (jolt-assoc _a$6251 _a$6252 _a$6253))) m))))) (_a$6255 (jolt-hash-map)) (_a$6256 nodes)) (jolt-reduce _a$6254 _a$6255 _a$6256)))))) wp-specializable) (let* ((_o$6257 (keyword #f "private")) (_o$6258 #t)) (jolt-hash-map _o$6257 _o$6258))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "wp-empty-ptypes" (letrec ((wp-empty-ptypes (lambda (spec ks) (let fnrec6259 ((spec spec) (ks ks)) (let* ((_a$6261 (lambda (m k) (let fnrec6260 ((m m) (k k)) (jolt-assoc m k (jolt-invoke (var-deref "clojure.core" "vec") (jolt-invoke (var-deref "clojure.core" "repeat") (jolt-count (jolt-get (jolt-get spec k) (keyword #f "params"))) jolt-nil)))))) (_a$6262 (jolt-hash-map)) (_a$6263 ks)) (jolt-reduce _a$6261 _a$6262 _a$6263)))))) wp-empty-ptypes) (let* ((_o$6264 (keyword #f "private")) (_o$6265 #t)) (jolt-hash-map _o$6264 _o$6265))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "wp-accum" (letrec ((wp-accum (lambda (pt spec calls) (let fnrec6266 ((pt pt) (spec spec) (calls calls)) (jolt-reduce (lambda (pt2 c) (let fnrec6267 ((pt2 pt2) (c c)) (let* ((callee (jolt-nth c 0)) (args (jolt-nth c 1))) (if (jolt-contains? spec callee) (let* ((cur (jolt-get pt2 callee))) (jolt-assoc pt2 callee (jolt-invoke (var-deref "clojure.core" "vec") (jolt-invoke (var-deref "clojure.core" "map-indexed") (lambda (i t) (let fnrec6268 ((i i) (t t)) (if (< i (jolt-count args)) (jolt-invoke (var-deref "jolt.passes.types.lattice" "join") t (jolt-nth args i)) t))) cur)))) pt2)))) pt calls))))) wp-accum) (let* ((_o$6269 (keyword #f "private")) (_o$6270 #t)) (jolt-hash-map _o$6269 _o$6270))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "wp-pass" (letrec ((wp-pass (lambda (nodes spec ks ptypes) (let fnrec6271 ((nodes nodes) (spec spec) (ks ks) (ptypes ptypes)) (let* ((_a$6302 (lambda (acc node) (let fnrec6272 ((acc acc) (node node)) (let* ((k (if (jolt= (keyword #f "def") (jolt-get node (keyword #f "op"))) (let* ((_a$6273 (var-deref "clojure.core" "str")) (_a$6274 (jolt-get node (keyword #f "ns"))) (_a$6275 "/") (_a$6276 (jolt-get node (keyword #f "name")))) (jolt-invoke _a$6273 _a$6274 _a$6275 _a$6276)) jolt-nil)) (s (let* ((and__25__auto k)) (if (jolt-truthy? and__25__auto) (jolt-get spec k) and__25__auto)))) (if (jolt-truthy? s) (let* ((r (let* ((_a$6280 (var-deref "jolt.passes.types" "infer-body")) (_a$6281 (jolt-get s (keyword #f "body"))) (_a$6282 (let* ((_a$6277 (var-deref "clojure.core" "zipmap")) (_a$6278 (jolt-get s (keyword #f "params"))) (_a$6279 (jolt-get ptypes k))) (jolt-invoke _a$6277 _a$6278 _a$6279))) (_a$6283 (jolt-get s (keyword #f "name"))) (_a$6284 k) (_a$6285 (jolt-get s (keyword #f "params")))) (jolt-invoke _a$6280 _a$6281 _a$6282 _a$6283 _a$6284 _a$6285)))) (let* ((_a$6292 (var-deref "clojure.core" "update")) (_a$6293 (let* ((_a$6288 (var-deref "clojure.core" "assoc-in")) (_a$6289 acc) (_a$6290 (let* ((_o$6286 (keyword #f "rets")) (_o$6287 k)) (jolt-vector _o$6286 _o$6287))) (_a$6291 (jolt-nth r 0))) (jolt-invoke _a$6288 _a$6289 _a$6290 _a$6291))) (_a$6294 (keyword #f "ptypes")) (_a$6295 (var-deref "jolt.passes.types" "wp-accum")) (_a$6296 spec) (_a$6297 (jolt-nth r 2))) (jolt-invoke _a$6292 _a$6293 _a$6294 _a$6295 _a$6296 _a$6297))) (jolt-invoke (var-deref "clojure.core" "update") acc (keyword #f "ptypes") (var-deref "jolt.passes.types" "wp-accum") spec (jolt-nth (jolt-invoke (var-deref "jolt.passes.types" "infer-body") node (jolt-hash-map)) 2))))))) (_a$6303 (let* ((_o$6298 (keyword #f "rets")) (_o$6299 (jolt-hash-map)) (_o$6300 (keyword #f "ptypes")) (_o$6301 (jolt-invoke (var-deref "jolt.passes.types" "wp-empty-ptypes") spec ks))) (jolt-hash-map _o$6298 _o$6299 _o$6300 _o$6301))) (_a$6304 nodes)) (jolt-reduce _a$6302 _a$6303 _a$6304)))))) wp-pass) (let* ((_o$6305 (keyword #f "private")) (_o$6306 #t)) (jolt-hash-map _o$6305 _o$6306))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "wp-infer!" (letrec ((wp-infer! (lambda (nodes) (let fnrec6307 ((nodes nodes)) (begin (jolt-invoke (var-deref "jolt.passes.types" "collect-pm-rets!") nodes) (let* ((spec (jolt-invoke (var-deref "jolt.passes.types" "wp-specializable") nodes)) (ks (jolt-keys spec))) (let* ((iter 0) (ptypes (jolt-invoke (var-deref "jolt.passes.types" "wp-empty-ptypes") spec ks)) (rets (jolt-hash-map))) (let loop6308 ((iter iter) (ptypes ptypes) (rets rets)) (begin (jolt-invoke (var-deref "jolt.passes.types" "set-rtenv!") (let* ((_a$6310 (lambda (m k) (let fnrec6309 ((m m) (k k)) (let* ((v (jolt-get rets k))) (if (jolt-some? v) (jolt-assoc m k v) m))))) (_a$6311 (jolt-hash-map)) (_a$6312 ks)) (jolt-reduce _a$6310 _a$6311 _a$6312))) (jolt-invoke (var-deref "jolt.passes.types" "reset-escapes!")) (let* ((pass (jolt-invoke (var-deref "jolt.passes.types" "wp-pass") nodes spec ks ptypes)) (escaped (jolt-invoke (var-deref "clojure.core" "set") (jolt-invoke (var-deref "jolt.passes.types" "collected-escapes")))) (new-ptypes (let* ((_a$6314 (lambda (m k) (let fnrec6313 ((m m) (k k)) (if (jolt-contains? escaped k) (jolt-assoc m k (jolt-invoke (var-deref "clojure.core" "vec") (jolt-invoke (var-deref "clojure.core" "repeat") (jolt-count (jolt-get m k)) (keyword #f "any")))) m)))) (_a$6315 (jolt-get pass (keyword #f "ptypes"))) (_a$6316 ks)) (jolt-reduce _a$6314 _a$6315 _a$6316))) (new-rets (jolt-get pass (keyword #f "rets"))) (converged? (let* ((and__25__auto (jolt= new-ptypes ptypes))) (if (jolt-truthy? and__25__auto) (jolt= new-rets rets) and__25__auto)))) (if (jolt-truthy? (let* ((or__26__auto converged?)) (if (jolt-truthy? or__26__auto) or__26__auto (>= iter 16)))) (let* ((seed-ptypes (if (jolt-truthy? converged?) new-ptypes (jolt-reduce (lambda (m k) (let fnrec6317 ((m m) (k k)) (jolt-assoc m k (jolt-invoke (var-deref "clojure.core" "vec") (jolt-invoke (var-deref "clojure.core" "repeat") (jolt-count (jolt-get m k)) (keyword #f "any")))))) new-ptypes ks))) (pick (lambda (keep?) (let fnrec6318 ((keep? keep?)) (let* ((_a$6327 (lambda (m k) (let fnrec6319 ((m m) (k k)) (let* ((s (jolt-get spec k)) (pm (let* ((_a$6324 (lambda (pm pr) (let fnrec6320 ((pm pm) (pr pr)) (let* ((nm (jolt-nth pr 0)) (t (jolt-nth pr 1))) (if (jolt-truthy? (let* ((and__25__auto t)) (if (jolt-truthy? and__25__auto) (jolt-invoke keep? t) and__25__auto))) (jolt-assoc pm nm t) pm))))) (_a$6325 (jolt-hash-map)) (_a$6326 (let* ((_a$6321 jolt-vector) (_a$6322 (jolt-get s (keyword #f "params"))) (_a$6323 (jolt-get seed-ptypes k))) (jolt-map _a$6321 _a$6322 _a$6323)))) (jolt-reduce _a$6324 _a$6325 _a$6326)))) (if (jolt-truthy? (jolt-seq pm)) (jolt-assoc m k pm) m))))) (_a$6328 (jolt-hash-map)) (_a$6329 ks)) (jolt-reduce _a$6327 _a$6328 _a$6329)))))) (begin (jolt-invoke (var-deref "clojure.core" "reset!") (var-deref "jolt.passes.types" "wp-seeds-box") (jolt-invoke pick (lambda (t) (let fnrec6330 ((t t)) (let* ((and__25__auto (jolt-invoke (var-deref "clojure.core" "not=") t (keyword #f "any")))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "clojure.core" "not=") t (keyword #f "double")) and__25__auto)))))) (jolt-invoke (var-deref "clojure.core" "reset!") (var-deref "jolt.passes.types" "wp-num-seeds-box") (jolt-invoke pick (lambda (t) (let fnrec6331 ((t t)) (jolt= t (keyword #f "double")))))))) (loop6308 (jolt-inc iter) new-ptypes new-rets)))))))))))) wp-infer!) (let* ((_o$6332 (keyword #f "doc")) (_o$6333 "Run the closed-world param-type fixpoint over the unit's analyzed top-level\n  nodes and stash the resulting per-def seed maps (read via param-seeds-for).\n  record-shapes / protocol-methods must already be installed. Idempotent \x2014; resets\n  the seed box; called once per build before per-form emit.")) (jolt-hash-map _o$6332 _o$6333))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "set-check-mode!" (letrec ((set-check-mode! (lambda (on strict?) (let fnrec6334 ((on on) (strict? strict?)) (jolt-invoke (var-deref "clojure.core" "reset!") (var-deref "jolt.passes.types" "check-mode-box") (let* ((_o$6335 (keyword #f "on")) (_o$6336 (if (jolt-truthy? on) #t #f)) (_o$6337 (keyword #f "strict")) (_o$6338 (if (jolt-truthy? strict?) #t #f))) (jolt-hash-map _o$6335 _o$6336 _o$6337 _o$6338))))))) set-check-mode!) (let* ((_o$6339 (keyword #f "doc")) (_o$6340 "Enable/disable checking during the next run-passes inference (direct-link).")) (jolt-hash-map _o$6339 _o$6340))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "take-diags!" (letrec ((take-diags! (lambda () (let fnrec6341 () (let* ((d (jolt-invoke (var-deref "clojure.core" "deref") (var-deref "jolt.passes.types" "last-diags-box")))) (begin (jolt-invoke (var-deref "clojure.core" "reset!") (var-deref "jolt.passes.types" "last-diags-box") (jolt-vector)) d)))))) take-diags!) (let* ((_o$6342 (keyword #f "doc")) (_o$6343 "Diagnostics accumulated by the last checking run-passes; clears the buffer.")) (jolt-hash-map _o$6342 _o$6343))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes.types" "run-inference" (letrec ((run-inference (lambda (opt) (let fnrec6344 ((opt opt)) (if (jolt-truthy? (jolt-get (jolt-invoke (var-deref "clojure.core" "deref") (var-deref "jolt.passes.types" "check-mode-box")) (keyword #f "on"))) (let* ((env (jolt-invoke (var-deref "jolt.passes.types" "mk-env") #t (jolt-get (jolt-invoke (var-deref "clojure.core" "deref") (var-deref "jolt.passes.types" "check-mode-box")) (keyword #f "strict")))) (r (jolt-invoke (var-deref "jolt.passes.types" "infer-top") opt env))) (begin (jolt-invoke (var-deref "clojure.core" "reset!") (var-deref "jolt.passes.types" "last-diags-box") (jolt-invoke (var-deref "clojure.core" "deref") (jolt-get env (keyword #f "diags")))) r)) (jolt-invoke (var-deref "jolt.passes.types" "infer-top") opt (jolt-invoke (var-deref "jolt.passes.types" "mk-env") #f #f))))))) run-inference) (let* ((_o$6345 (keyword #f "doc")) (_o$6346 "Type-infer the optimized node (the inference walk specializes struct-safe\n  lookups). When check mode is on (set-check-mode!), the same walk also emits\n  success-type diagnostics, stashed for take-diags! to drain afterward. Pulled\n  out of run-passes so the checking state stays private to this namespace.")) (jolt-hash-map _o$6345 _o$6346))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes" "inline-fixpoint-cap" 8 (let* ((_o$6347 (keyword #f "private")) (_o$6348 #t)) (jolt-hash-map _o$6347 _o$6348))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes" "inline-eligible?" (letrec ((inline-eligible? (lambda (node) (let fnrec6349 ((node node)) (let* ((and__25__auto (jolt= (keyword #f "def") (jolt-get node (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt-get node (keyword #f "init")))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= (keyword #f "fn") (jolt-get (jolt-get node (keyword #f "init")) (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= 1 (jolt-count (jolt-get (jolt-get node (keyword #f "init")) (keyword #f "arities")))))) (if (jolt-truthy? and__25__auto) (jolt-not (jolt-get (jolt-first (jolt-get (jolt-get node (keyword #f "init")) (keyword #f "arities"))) (keyword #f "rest"))) and__25__auto)) and__25__auto)) and__25__auto)) and__25__auto)))))) inline-eligible?) (let* ((_o$6350 (keyword #f "private")) (_o$6351 #t)) (jolt-hash-map _o$6350 _o$6351))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes" "stash-of" (letrec ((stash-of (lambda (node) (let fnrec6352 ((node node)) (let* ((a (jolt-first (jolt-get (jolt-get node (keyword #f "init")) (keyword #f "arities"))))) (let* ((_o$6353 (keyword #f "params")) (_o$6354 (jolt-get a (keyword #f "params"))) (_o$6355 (keyword #f "body")) (_o$6356 (jolt-get a (keyword #f "body"))) (_o$6357 (keyword #f "nhints")) (_o$6358 (jolt-get a (keyword #f "nhints"))) (_o$6359 (keyword #f "ret")) (_o$6360 (jolt-get a (keyword #f "ret-nhint")))) (jolt-hash-map _o$6353 _o$6354 _o$6355 _o$6356 _o$6357 _o$6358 _o$6359 _o$6360))))))) stash-of) (let* ((_o$6361 (keyword #f "private")) (_o$6362 #t)) (jolt-hash-map _o$6361 _o$6362))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes" "inject-wp-nhints" (letrec ((inject-wp-nhints (lambda (node) (let fnrec6363 ((node node)) (let* ((seeds (if (jolt= (keyword #f "def") (jolt-get node (keyword #f "op"))) (jolt-invoke (var-deref "jolt.passes.types" "param-num-seeds-for") (let* ((_a$6364 (var-deref "clojure.core" "str")) (_a$6365 (jolt-get node (keyword #f "ns"))) (_a$6366 "/") (_a$6367 (jolt-get node (keyword #f "name")))) (jolt-invoke _a$6364 _a$6365 _a$6366 _a$6367))) jolt-nil)) (f (jolt-get node (keyword #f "init")))) (if (jolt-truthy? (let* ((and__25__auto seeds)) (if (jolt-truthy? and__25__auto) (let* ((and__25__auto (jolt= (keyword #f "fn") (jolt-get f (keyword #f "op"))))) (if (jolt-truthy? and__25__auto) (jolt= 1 (jolt-count (jolt-get f (keyword #f "arities")))) and__25__auto)) and__25__auto))) (let* ((a (jolt-first (jolt-get f (keyword #f "arities")))) (have (let* ((_a$6368 (jolt-hash-set)) (_a$6369 (jolt-map jolt-first (jolt-get a (keyword #f "nhints"))))) (jolt-into _a$6368 _a$6369))) (add (jolt-invoke (var-deref "clojure.core" "mapcat") (lambda (G__136) (let fnrec6370 ((G__136 G__136)) (let* ((G__137 G__136) (p (jolt-nth G__137 0 jolt-nil)) (k (jolt-nth G__137 1 jolt-nil))) (if (jolt-not (jolt-invoke have p)) (jolt-list (let* ((_o$6371 p) (_o$6372 k)) (jolt-vector _o$6371 _o$6372))) (jolt-vector))))) seeds))) (jolt-assoc node (keyword #f "init") (jolt-assoc f (keyword #f "arities") (jolt-vector (jolt-assoc a (keyword #f "nhints") (jolt-invoke (var-deref "clojure.core" "vec") (jolt-concat (jolt-get a (keyword #f "nhints")) add))))))) node)))))) inject-wp-nhints) (let* ((_o$6373 (keyword #f "doc")) (_o$6374 "Merge the whole-program :double param seeds into a def's arity :nhints as\n  synthetic ^double hints, so the numeric pass unboxes a hintless fn whose callers\n  all pass flonums (the entry coercion exact->inexact is a no-op on a proven\n  flonum). Only un-hinted params are added \x2014; an explicit hint wins. A no-op unless\n  the closed-world fixpoint typed a param :double (param-num-seeds-for).")) (jolt-hash-map _o$6373 _o$6374))))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.passes" "run-passes" (letrec ((run-passes (lambda (node ctx) (let fnrec6375 ((node node) (ctx ctx)) (begin (if (jolt-truthy? (let* ((and__25__auto (jolt-invoke (var-deref "jolt.host" "inline-enabled?") ctx))) (if (jolt-truthy? and__25__auto) (jolt-invoke (var-deref "jolt.passes" "inline-eligible?") node) and__25__auto))) (let* ((_a$6376 (var-deref "jolt.host" "stash-inline!")) (_a$6377 ctx) (_a$6378 (jolt-get node (keyword #f "ns"))) (_a$6379 (jolt-get node (keyword #f "name"))) (_a$6380 (jolt-invoke (var-deref "jolt.passes" "stash-of") node))) (jolt-invoke _a$6376 _a$6377 _a$6378 _a$6379 _a$6380)) jolt-nil) (jolt-invoke (var-deref "jolt.passes.numeric" "annotate") (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "inline-enabled?") ctx)) (let* ((_ (jolt-invoke (var-deref "jolt.passes.inline" "set-rec-shapes!") (jolt-invoke (var-deref "jolt.host" "record-shapes") ctx))) (_ (jolt-invoke (var-deref "jolt.passes.types" "set-record-shapes!") (jolt-invoke (var-deref "jolt.host" "record-shapes") ctx))) (_ (jolt-invoke (var-deref "jolt.passes.types" "set-protocol-methods!") (jolt-invoke (var-deref "jolt.host" "protocol-methods") ctx))) (opt (let* ((i 0) (n (jolt-invoke (var-deref "jolt.passes.fold" "const-fold") node))) (let loop6381 ((i i) (n n)) (begin (jolt-invoke (var-deref "clojure.core" "reset!") (var-deref "jolt.passes.inline" "dirty") #f) (let* ((n2 (jolt-invoke (var-deref "jolt.passes.fold" "const-fold") (jolt-invoke (var-deref "jolt.passes.inline" "scalar-replace") (jolt-invoke (var-deref "jolt.passes.inline" "flatten-lets") (jolt-invoke (var-deref "jolt.passes.inline" "inline-node") n ctx)))))) (if (jolt-truthy? (let* ((and__25__auto (jolt-invoke (var-deref "clojure.core" "deref") (var-deref "jolt.passes.inline" "dirty")))) (if (jolt-truthy? and__25__auto) (< i (var-deref "jolt.passes" "inline-fixpoint-cap")) and__25__auto))) (loop6381 (jolt-inc i) n2) n2)))))) (seeds (if (jolt= (keyword #f "def") (jolt-get opt (keyword #f "op"))) (jolt-invoke (var-deref "jolt.passes.types" "param-seeds-for") (let* ((_a$6382 (var-deref "clojure.core" "str")) (_a$6383 (jolt-get opt (keyword #f "ns"))) (_a$6384 "/") (_a$6385 (jolt-get opt (keyword #f "name")))) (jolt-invoke _a$6382 _a$6383 _a$6384 _a$6385))) jolt-nil))) (jolt-invoke (var-deref "jolt.passes" "inject-wp-nhints") (jolt-invoke (var-deref "jolt.passes.fold" "const-fold") (if (jolt-truthy? seeds) (jolt-invoke (var-deref "jolt.passes.types" "reinfer-def") opt seeds) (jolt-invoke (var-deref "jolt.passes.types" "run-inference") opt))))) (jolt-invoke (var-deref "jolt.passes.fold" "const-fold") node)))))))) run-passes) (let* ((_o$6386 (keyword #f "doc")) (_o$6387 "All passes, in order. The back end applies this to every analyzed form. When\n  inlining is enabled for the unit (user code under direct-linking),\n  run inline + flatten + scalar-replace + const-fold to a capped fixpoint \x2014;\n  inlining exposes map literals to lookups, scalar-replace collapses them, which\n  may expose more \x2014; then a collection-type inference pass (optionally\n  also emitting success diagnostics) that auto-drops the lookup guard where the\n  type is proven. Otherwise (core + bootstrap) just const-fold, as before.\n\n  numeric/annotate runs last in both branches (hint-directed fl*/fx* arithmetic);\n  it benefits open builds too, so it is not gated on inlining.")) (jolt-hash-map _o$6386 _o$6387))))