(guard (e (#t #f))
  (def-var! "jolt.ir" "const" (letrec ((const (lambda (v) (let fnrec1355 ((v v)) (let* ((_o$1356 (keyword #f "op")) (_o$1357 (keyword #f "const")) (_o$1358 (keyword #f "val")) (_o$1359 v)) (jolt-hash-map _o$1356 _o$1357 _o$1358 _o$1359)))))) const)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "local" (letrec ((local (lambda (name) (let fnrec1360 ((name name)) (let* ((_o$1361 (keyword #f "op")) (_o$1362 (keyword #f "local")) (_o$1363 (keyword #f "name")) (_o$1364 name)) (jolt-hash-map _o$1361 _o$1362 _o$1363 _o$1364)))))) local)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "var-ref" (letrec ((var-ref (lambda (ns name) (let fnrec1365 ((ns ns) (name name)) (let* ((_o$1366 (keyword #f "op")) (_o$1367 (keyword #f "var")) (_o$1368 (keyword #f "ns")) (_o$1369 ns) (_o$1370 (keyword #f "name")) (_o$1371 name)) (jolt-hash-map _o$1366 _o$1367 _o$1368 _o$1369 _o$1370 _o$1371)))))) var-ref)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "the-var" (letrec ((the-var (lambda (ns name) (let fnrec1372 ((ns ns) (name name)) (let* ((_o$1373 (keyword #f "op")) (_o$1374 (keyword #f "the-var")) (_o$1375 (keyword #f "ns")) (_o$1376 ns) (_o$1377 (keyword #f "name")) (_o$1378 name)) (jolt-hash-map _o$1373 _o$1374 _o$1375 _o$1376 _o$1377 _o$1378)))))) the-var)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "rt" (letrec ((rt (lambda (name) (let fnrec1379 ((name name)) (let* ((_o$1380 (keyword #f "op")) (_o$1381 (keyword #f "rt")) (_o$1382 (keyword #f "name")) (_o$1383 name)) (jolt-hash-map _o$1380 _o$1381 _o$1382 _o$1383)))))) rt)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "host-ref" (letrec ((host-ref (lambda (name) (let fnrec1384 ((name name)) (let* ((_o$1385 (keyword #f "op")) (_o$1386 (keyword #f "host")) (_o$1387 (keyword #f "name")) (_o$1388 name)) (jolt-hash-map _o$1385 _o$1386 _o$1387 _o$1388)))))) host-ref)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "host-static" (letrec ((host-static (lambda (class member) (let fnrec1389 ((class class) (member member)) (let* ((_o$1390 (keyword #f "op")) (_o$1391 (keyword #f "host-static")) (_o$1392 (keyword #f "class")) (_o$1393 class) (_o$1394 (keyword #f "member")) (_o$1395 member)) (jolt-hash-map _o$1390 _o$1391 _o$1392 _o$1393 _o$1394 _o$1395)))))) host-static)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "host-new" (letrec ((host-new (lambda (class args) (let fnrec1396 ((class class) (args args)) (let* ((_o$1397 (keyword #f "op")) (_o$1398 (keyword #f "host-new")) (_o$1399 (keyword #f "class")) (_o$1400 class) (_o$1401 (keyword #f "args")) (_o$1402 args)) (jolt-hash-map _o$1397 _o$1398 _o$1399 _o$1400 _o$1401 _o$1402)))))) host-new)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "if-node" (letrec ((if-node (lambda (test then else) (let fnrec1403 ((test test) (then then) (else else)) (let* ((_o$1404 (keyword #f "op")) (_o$1405 (keyword #f "if")) (_o$1406 (keyword #f "test")) (_o$1407 test) (_o$1408 (keyword #f "then")) (_o$1409 then) (_o$1410 (keyword #f "else")) (_o$1411 else)) (jolt-hash-map _o$1404 _o$1405 _o$1406 _o$1407 _o$1408 _o$1409 _o$1410 _o$1411)))))) if-node)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "do-node" (letrec ((do-node (lambda (statements ret) (let fnrec1412 ((statements statements) (ret ret)) (let* ((_o$1413 (keyword #f "op")) (_o$1414 (keyword #f "do")) (_o$1415 (keyword #f "statements")) (_o$1416 statements) (_o$1417 (keyword #f "ret")) (_o$1418 ret)) (jolt-hash-map _o$1413 _o$1414 _o$1415 _o$1416 _o$1417 _o$1418)))))) do-node)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "invoke" (letrec ((invoke (lambda (f args) (let fnrec1419 ((f f) (args args)) (let* ((_o$1420 (keyword #f "op")) (_o$1421 (keyword #f "invoke")) (_o$1422 (keyword #f "fn")) (_o$1423 f) (_o$1424 (keyword #f "args")) (_o$1425 args)) (jolt-hash-map _o$1420 _o$1421 _o$1422 _o$1423 _o$1424 _o$1425)))))) invoke)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "def-node" (letrec ((def-node (case-lambda ((ns name init) (let fnrec1426 ((ns ns) (name name) (init init)) (let* ((_o$1427 (keyword #f "op")) (_o$1428 (keyword #f "def")) (_o$1429 (keyword #f "ns")) (_o$1430 ns) (_o$1431 (keyword #f "name")) (_o$1432 name) (_o$1433 (keyword #f "init")) (_o$1434 init)) (jolt-hash-map _o$1427 _o$1428 _o$1429 _o$1430 _o$1431 _o$1432 _o$1433 _o$1434)))) ((ns name init meta) (let fnrec1435 ((ns ns) (name name) (init init) (meta meta)) (if (jolt-truthy? meta) (let* ((_o$1444 (keyword #f "op")) (_o$1445 (keyword #f "def")) (_o$1446 (keyword #f "ns")) (_o$1447 ns) (_o$1448 (keyword #f "name")) (_o$1449 name) (_o$1450 (keyword #f "init")) (_o$1451 init) (_o$1452 (keyword #f "meta")) (_o$1453 meta)) (jolt-hash-map _o$1444 _o$1445 _o$1446 _o$1447 _o$1448 _o$1449 _o$1450 _o$1451 _o$1452 _o$1453)) (let* ((_o$1436 (keyword #f "op")) (_o$1437 (keyword #f "def")) (_o$1438 (keyword #f "ns")) (_o$1439 ns) (_o$1440 (keyword #f "name")) (_o$1441 name) (_o$1442 (keyword #f "init")) (_o$1443 init)) (jolt-hash-map _o$1436 _o$1437 _o$1438 _o$1439 _o$1440 _o$1441 _o$1442 _o$1443)))))))) def-node)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "let-node" (letrec ((let-node (lambda (bindings body) (let fnrec1454 ((bindings bindings) (body body)) (let* ((_o$1455 (keyword #f "op")) (_o$1456 (keyword #f "let")) (_o$1457 (keyword #f "bindings")) (_o$1458 bindings) (_o$1459 (keyword #f "body")) (_o$1460 body)) (jolt-hash-map _o$1455 _o$1456 _o$1457 _o$1458 _o$1459 _o$1460)))))) let-node)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "fn-node" (letrec ((fn-node (lambda (name arities) (let fnrec1461 ((name name) (arities arities)) (if (jolt-truthy? name) (let* ((_o$1466 (keyword #f "op")) (_o$1467 (keyword #f "fn")) (_o$1468 (keyword #f "name")) (_o$1469 name) (_o$1470 (keyword #f "arities")) (_o$1471 arities)) (jolt-hash-map _o$1466 _o$1467 _o$1468 _o$1469 _o$1470 _o$1471)) (let* ((_o$1462 (keyword #f "op")) (_o$1463 (keyword #f "fn")) (_o$1464 (keyword #f "arities")) (_o$1465 arities)) (jolt-hash-map _o$1462 _o$1463 _o$1464 _o$1465))))))) fn-node)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "vector-node" (letrec ((vector-node (lambda (items) (let fnrec1472 ((items items)) (let* ((_o$1473 (keyword #f "op")) (_o$1474 (keyword #f "vector")) (_o$1475 (keyword #f "items")) (_o$1476 items)) (jolt-hash-map _o$1473 _o$1474 _o$1475 _o$1476)))))) vector-node)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "map-node" (letrec ((map-node (lambda (pairs) (let fnrec1477 ((pairs pairs)) (let* ((_o$1478 (keyword #f "op")) (_o$1479 (keyword #f "map")) (_o$1480 (keyword #f "pairs")) (_o$1481 pairs)) (jolt-hash-map _o$1478 _o$1479 _o$1480 _o$1481)))))) map-node)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "set-node" (letrec ((set-node (lambda (items) (let fnrec1482 ((items items)) (let* ((_o$1483 (keyword #f "op")) (_o$1484 (keyword #f "set")) (_o$1485 (keyword #f "items")) (_o$1486 items)) (jolt-hash-map _o$1483 _o$1484 _o$1485 _o$1486)))))) set-node)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "quote-node" (letrec ((quote-node (lambda (form) (let fnrec1487 ((form form)) (let* ((_o$1488 (keyword #f "op")) (_o$1489 (keyword #f "quote")) (_o$1490 (keyword #f "form")) (_o$1491 form)) (jolt-hash-map _o$1488 _o$1489 _o$1490 _o$1491)))))) quote-node)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "throw-node" (letrec ((throw-node (lambda (expr) (let fnrec1492 ((expr expr)) (let* ((_o$1493 (keyword #f "op")) (_o$1494 (keyword #f "throw")) (_o$1495 (keyword #f "expr")) (_o$1496 expr)) (jolt-hash-map _o$1493 _o$1494 _o$1495 _o$1496)))))) throw-node)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "op" (letrec ((op (lambda (node) (let fnrec1497 ((node node)) (jolt-get node (keyword #f "op")))))) op)))
(guard (e (#t #f))
  (def-var! "jolt.ir" "map-ir-children" (letrec ((map-ir-children (lambda (f node) (let fnrec1498 ((f f) (node node)) (let* ((op (jolt-get node (keyword #f "op")))) (if (jolt= op (keyword #f "if")) (jolt-assoc node (keyword #f "test") (jolt-invoke f (jolt-get node (keyword #f "test"))) (keyword #f "then") (jolt-invoke f (jolt-get node (keyword #f "then"))) (keyword #f "else") (jolt-invoke f (jolt-get node (keyword #f "else")))) (if (jolt= op (keyword #f "do")) (jolt-assoc node (keyword #f "statements") (jolt-invoke (var-deref "clojure.core" "mapv") f (jolt-get node (keyword #f "statements"))) (keyword #f "ret") (jolt-invoke f (jolt-get node (keyword #f "ret")))) (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 "invoke")) (jolt-assoc node (keyword #f "fn") (jolt-invoke f (jolt-get node (keyword #f "fn"))) (keyword #f "args") (jolt-invoke (var-deref "clojure.core" "mapv") f (jolt-get node (keyword #f "args")))) (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") (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (pr) (let fnrec1506 ((pr pr)) (let* ((_o$1507 (jolt-invoke f (jolt-nth pr 0))) (_o$1508 (jolt-invoke f (jolt-nth pr 1)))) (jolt-vector _o$1507 _o$1508)))) (jolt-get node (keyword #f "pairs")))) (if (jolt= op (keyword #f "let")) (jolt-assoc node (keyword #f "bindings") (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (b) (let fnrec1503 ((b b)) (let* ((_o$1504 (jolt-nth b 0)) (_o$1505 (jolt-invoke f (jolt-nth b 1)))) (jolt-vector _o$1504 _o$1505)))) (jolt-get node (keyword #f "bindings"))) (keyword #f "body") (jolt-invoke f (jolt-get node (keyword #f "body")))) (if (jolt= op (keyword #f "loop")) (jolt-assoc node (keyword #f "bindings") (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (b) (let fnrec1500 ((b b)) (let* ((_o$1501 (jolt-nth b 0)) (_o$1502 (jolt-invoke f (jolt-nth b 1)))) (jolt-vector _o$1501 _o$1502)))) (jolt-get node (keyword #f "bindings"))) (keyword #f "body") (jolt-invoke f (jolt-get node (keyword #f "body")))) (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") (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (a) (let fnrec1499 ((a a)) (jolt-assoc a (keyword #f "body") (jolt-invoke f (jolt-get a (keyword #f "body")))))) (jolt-get node (keyword #f "arities")))) (if (jolt= op (keyword #f "def")) (jolt-assoc node (keyword #f "init") (jolt-invoke f (jolt-get node (keyword #f "init")))) (if (jolt= op (keyword #f "host-call")) (jolt-assoc node (keyword #f "target") (jolt-invoke f (jolt-get node (keyword #f "target"))) (keyword #f "args") (jolt-invoke (var-deref "clojure.core" "mapv") f (jolt-get node (keyword #f "args")))) (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))
  (declare-var! "jolt.analyzer" "analyze"))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "handled" (let* ((_o$1509 "quote") (_o$1510 "if") (_o$1511 "do") (_o$1512 "def") (_o$1513 "fn*") (_o$1514 "let*") (_o$1515 "loop*") (_o$1516 "recur") (_o$1517 "throw") (_o$1518 "try") (_o$1519 "syntax-quote") (_o$1520 "var") (_o$1521 "letfn")) (jolt-hash-set _o$1509 _o$1510 _o$1511 _o$1512 _o$1513 _o$1514 _o$1515 _o$1516 _o$1517 _o$1518 _o$1519 _o$1520 _o$1521)) (jolt-hash-map (keyword #f "private") #t)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "uncompilable" (letrec ((uncompilable (lambda (why) (let fnrec1522 ((why why)) (jolt-throw (jolt-invoke (var-deref "clojure.core" "str") "jolt/uncompilable: " why)))))) uncompilable)))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.analyzer" "gensym-counter" (jolt-invoke (var-deref "clojure.core" "atom") 0) (jolt-hash-map (keyword #f "private") #t)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "gen-name" (letrec ((gen-name (lambda (prefix) (let fnrec1523 ((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)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "empty-env" (letrec ((empty-env (lambda () (let fnrec1524 () (let* ((_o$1525 (keyword #f "locals")) (_o$1526 (jolt-hash-set)) (_o$1527 (keyword #f "hints")) (_o$1528 (jolt-hash-map))) (jolt-hash-map _o$1525 _o$1526 _o$1527 _o$1528)))))) empty-env)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "local?" (letrec ((local? (lambda (env nm) (let fnrec1529 ((env env) (nm nm)) (jolt-contains? (jolt-get env (keyword #f "locals")) nm))))) local?)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "add-locals" (letrec ((add-locals (lambda (env names) (let fnrec1530 ((env env) (names names)) (jolt-invoke (var-deref "clojure.core" "update") env (keyword #f "locals") (lambda (p__47_) (let fnrec1531 ((p__47_ p__47_)) (jolt-reduce jolt-conj p__47_ names)))))))) add-locals)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "with-recur" (letrec ((with-recur (lambda (env name) (let fnrec1532 ((env env) (name name)) (jolt-assoc env (keyword #f "recur") name))))) with-recur)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "hint-of" (letrec ((hint-of (lambda (ctx sym) (let fnrec1533 ((ctx ctx) (sym sym)) (let* ((m (jolt-invoke (var-deref "jolt.host" "form-sym-meta") sym))) (if (jolt-truthy? (jolt-invoke (var-deref "clojure.core" "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__13__auto t)) (if (jolt-truthy? and__13__auto) (jolt-invoke (var-deref "jolt.host" "record-type?") ctx t) and__13__auto))) (keyword #f "struct") jolt-nil)) jolt-nil)))))))) hint-of)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "add-hint" (letrec ((add-hint (lambda (env nm h) (let fnrec1534 ((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)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "phint-of" (letrec ((phint-of (lambda (ctx sym) (let fnrec1535 ((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)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "analyze-seq" (letrec ((analyze-seq (lambda (ctx forms env) (let fnrec1536 ((ctx ctx) (forms forms) (env env)) (let* ((v (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (p__48_) (let fnrec1537 ((p__48_ p__48_)) (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx p__48_ 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")) (jolt-invoke (var-deref "jolt.ir" "do-node") (jolt-invoke (var-deref "clojure.core" "subvec") v 0 (jolt-dec n)) (jolt-peek v)) jolt-nil)))))))) analyze-seq)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "analyze-bindings" (letrec ((analyze-bindings (lambda (ctx bvec env) (let fnrec1538 ((ctx ctx) (bvec bvec) (env env)) (let* ((i 0) (env env) (pairs (jolt-vector))) (let loop1539 ((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))) (loop1539 (+ i 2) (jolt-invoke (var-deref "jolt.analyzer" "add-hint") (jolt-invoke (var-deref "jolt.analyzer" "add-locals") env (jolt-vector nm)) nm (jolt-invoke (var-deref "jolt.analyzer" "hint-of") ctx bsym)) (jolt-conj pairs (let* ((_o$1542 nm) (_o$1543 init)) (jolt-vector _o$1542 _o$1543))))))) (let* ((_o$1540 pairs) (_o$1541 env)) (jolt-vector _o$1540 _o$1541))))))))) analyze-bindings)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "parse-params" (letrec ((parse-params (lambda (ctx pvec) (let fnrec1544 ((ctx ctx) (pvec pvec)) (let* ((i 0) (fixed (jolt-vector)) (rest-name jolt-nil) (hints (jolt-vector)) (phints (jolt-vector))) (let loop1545 ((i i) (fixed fixed) (rest-name rest-name) (hints hints) (phints phints)) (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) (loop1545 (+ i 2) fixed (jolt-invoke (var-deref "jolt.host" "form-sym-name") r) hints phints))) (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))) (loop1545 (jolt-inc i) (jolt-conj fixed nm) rest-name (if (jolt-truthy? h) (jolt-conj hints (let* ((_o$1554 nm) (_o$1555 h)) (jolt-vector _o$1554 _o$1555))) hints) (if (jolt-truthy? ph) (jolt-conj phints (let* ((_o$1556 nm) (_o$1557 ph)) (jolt-vector _o$1556 _o$1557))) phints)))))) (let* ((_o$1546 (keyword #f "fixed")) (_o$1547 fixed) (_o$1548 (keyword #f "rest")) (_o$1549 rest-name) (_o$1550 (keyword #f "hints")) (_o$1551 hints) (_o$1552 (keyword #f "phints")) (_o$1553 phints)) (jolt-hash-map _o$1546 _o$1547 _o$1548 _o$1549 _o$1550 _o$1551 _o$1552 _o$1553))))))))) parse-params)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "analyze-arity" (letrec ((analyze-arity (lambda (ctx pvec body env fn-name) (let fnrec1558 ((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-get pp (keyword #f "fixed"))) (rst (jolt-get pp (keyword #f "rest"))) (rname (jolt-invoke (var-deref "jolt.analyzer" "gen-name") (jolt-invoke (var-deref "clojure.core" "str") (jolt-invoke (var-deref "jolt.host" "compile-ns") ctx) "/" (let* ((or__14__auto fn-name)) (if (jolt-truthy? or__14__auto) or__14__auto "fn")) "--"))) (names (let* ((G__35 (jolt-invoke (var-deref "clojure.core" "vec") fixed))) (let* ((G__36 (if (jolt-truthy? rst) (jolt-conj G__35 rst) G__35))) (let* ((G__37 (if (jolt-truthy? fn-name) (jolt-conj G__36 fn-name) G__36))) G__37)))) (env0 (jolt-invoke (var-deref "jolt.analyzer" "with-recur") (jolt-invoke (var-deref "jolt.analyzer" "add-locals") env names) rname)) (env* (jolt-reduce (lambda (e pr) (let fnrec1559 ((e e) (pr pr)) (jolt-invoke (var-deref "jolt.analyzer" "add-hint") e (jolt-nth pr 0) (jolt-nth pr 1)))) env0 (jolt-get pp (keyword #f "hints")))) (arity (let* ((_o$1560 (keyword #f "params")) (_o$1561 fixed) (_o$1562 (keyword #f "recur-name")) (_o$1563 rname) (_o$1564 (keyword #f "body")) (_o$1565 (jolt-invoke (var-deref "jolt.analyzer" "analyze-seq") ctx body env*))) (jolt-hash-map _o$1560 _o$1561 _o$1562 _o$1563 _o$1564 _o$1565))) (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))) (if (jolt-truthy? rst) (jolt-assoc arity (keyword #f "rest") rst) arity)))))) analyze-arity)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "strip-arglist-meta" (letrec ((strip-arglist-meta (lambda (form) (let fnrec1566 ((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__13__auto (jolt= 3 (jolt-count es)))) (if (jolt-truthy? and__13__auto) (let* ((and__13__auto (jolt-invoke (var-deref "jolt.host" "form-sym?") (jolt-first es)))) (if (jolt-truthy? and__13__auto) (let* ((and__13__auto (jolt= "with-meta" (jolt-invoke (var-deref "jolt.host" "form-sym-name") (jolt-first es))))) (if (jolt-truthy? and__13__auto) (jolt-invoke (var-deref "jolt.host" "form-vec?") (jolt-nth es 1)) and__13__auto)) and__13__auto)) and__13__auto))) (jolt-nth es 1) form)) form))))) strip-arglist-meta)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "analyze-fn" (letrec ((analyze-fn (lambda (ctx items env) (let fnrec1567 ((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 fnrec1568 ((clause clause)) (let* ((cl (jolt-invoke (var-deref "clojure.core" "vec") (jolt-invoke (var-deref "jolt.host" "form-elements") clause)))) (jolt-invoke (var-deref "jolt.analyzer" "analyze-arity") ctx (jolt-invoke (var-deref "jolt.analyzer" "strip-arglist-meta") (jolt-first cl)) (jolt-rest cl) env fn-name)))) rest-items)) (if (jolt-truthy? (keyword #f "else")) (jolt-invoke (var-deref "jolt.analyzer" "uncompilable") "fn: bad params") jolt-nil)))))))) analyze-fn)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "analyze-try" (letrec ((analyze-try (lambda (ctx items env) (let fnrec1569 ((ctx ctx) (items items) (env env)) (let* ((clauses (jolt-rest items)) (body (jolt-invoke (var-deref "clojure.core" "atom") (jolt-vector))) (catch-sym (jolt-invoke (var-deref "clojure.core" "atom") jolt-nil)) (catch-body (jolt-invoke (var-deref "clojure.core" "atom") jolt-nil)) (finally-body (jolt-invoke (var-deref "clojure.core" "atom") jolt-nil))) (begin (begin (jolt-count (jolt-map (lambda (c) (let fnrec1574 ((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__13__auto head)) (if (jolt-truthy? and__13__auto) (jolt-invoke (var-deref "jolt.host" "form-sym?") head) and__13__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 (jolt-truthy? (let* ((or__14__auto (< (jolt-count cl) 3))) (if (jolt-truthy? or__14__auto) or__14__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" "reset!") catch-sym (jolt-invoke (var-deref "jolt.host" "form-sym-name") (jolt-nth cl 2))) (jolt-invoke (var-deref "clojure.core" "reset!") catch-body (jolt-drop 3 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$1570 (keyword #f "op")) (_o$1571 (keyword #f "try")) (_o$1572 (keyword #f "body")) (_o$1573 (jolt-invoke (var-deref "jolt.analyzer" "analyze-seq") ctx (jolt-invoke (var-deref "clojure.core" "deref") body) env))) (jolt-hash-map _o$1570 _o$1571 _o$1572 _o$1573))) (n (if (jolt-truthy? (jolt-invoke (var-deref "clojure.core" "deref") catch-body)) (jolt-assoc n (keyword #f "catch-sym") (jolt-invoke (var-deref "clojure.core" "deref") catch-sym) (keyword #f "catch-body") (jolt-invoke (var-deref "jolt.analyzer" "analyze-seq") ctx (jolt-invoke (var-deref "clojure.core" "deref") catch-body) (jolt-invoke (var-deref "jolt.analyzer" "add-locals") env (jolt-vector (jolt-invoke (var-deref "clojure.core" "deref") catch-sym))))) 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)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "analyze-letfn" (letrec ((analyze-letfn (lambda (ctx items env) (let fnrec1575 ((ctx ctx) (items items) (env env)) (let* ((specs (jolt-invoke (var-deref "clojure.core" "vec") (jolt-invoke (var-deref "jolt.host" "form-vec-items") (jolt-nth items 1)))) (names (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (p__49_) (let fnrec1584 ((p__49_ p__49_)) (jolt-invoke (var-deref "jolt.host" "form-sym-name") (jolt-first (jolt-invoke (var-deref "clojure.core" "vec") (jolt-invoke (var-deref "jolt.host" "form-elements") p__49_)))))) specs)) (env* (jolt-invoke (var-deref "jolt.analyzer" "add-locals") env names)) (binds (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (spec) (let fnrec1585 ((spec spec)) (let* ((cl (jolt-invoke (var-deref "clojure.core" "vec") (jolt-invoke (var-deref "jolt.host" "form-elements") spec)))) (let* ((_o$1586 (jolt-invoke (var-deref "jolt.host" "form-sym-name") (jolt-first cl))) (_o$1587 (jolt-invoke (var-deref "jolt.analyzer" "analyze-fn") ctx (jolt-invoke (var-deref "clojure.core" "vec") (jolt-cons (jolt-first cl) cl)) env*))) (jolt-vector _o$1586 _o$1587))))) specs))) (let* ((_o$1576 (keyword #f "op")) (_o$1577 (keyword #f "let")) (_o$1578 (keyword #f "letrec")) (_o$1579 #t) (_o$1580 (keyword #f "bindings")) (_o$1581 binds) (_o$1582 (keyword #f "body")) (_o$1583 (jolt-invoke (var-deref "jolt.analyzer" "analyze-seq") ctx (jolt-drop 2 items) env*))) (jolt-hash-map _o$1576 _o$1577 _o$1578 _o$1579 _o$1580 _o$1581 _o$1582 _o$1583))))))) analyze-letfn)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "analyze-special" (letrec ((analyze-special (lambda (ctx op items env) (let fnrec1588 ((ctx ctx) (op op) (items items) (env env)) (let* ((G__38 op)) (if (jolt= G__38 "quote") (jolt-invoke (var-deref "jolt.ir" "quote-node") (jolt-invoke (var-deref "clojure.core" "second") items)) (if (jolt= G__38 "if") (begin (if (jolt-truthy? (let* ((or__14__auto (< (jolt-count items) 3))) (if (jolt-truthy? or__14__auto) or__14__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) (jolt-invoke (var-deref "jolt.ir" "if-node") (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx (jolt-nth items 1) env) (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx (jolt-nth items 2) env) (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)))) (if (jolt= G__38 "do") (jolt-invoke (var-deref "jolt.analyzer" "analyze-seq") ctx (jolt-rest items) env) (if (jolt= G__38 "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__38 "def") (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$1604 (keyword #f "op")) (_o$1605 (keyword #f "def")) (_o$1606 (keyword #f "ns")) (_o$1607 cur) (_o$1608 (keyword #f "name")) (_o$1609 nm) (_o$1610 (keyword #f "no-init")) (_o$1611 #t)) (jolt-hash-map _o$1604 _o$1605 _o$1606 _o$1607 _o$1608 _o$1609 _o$1610 _o$1611)))) (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__13__auto (> (jolt-count items) 3))) (if (jolt-truthy? and__13__auto) (jolt-invoke (var-deref "clojure.core" "string?") (jolt-nth items 2)) and__13__auto))) (val-form (jolt-nth items (if (jolt-truthy? has-doc) 3 2))) (base-meta (let* ((or__14__auto (jolt-invoke (var-deref "jolt.host" "form-sym-meta") name-sym))) (if (jolt-truthy? or__14__auto) or__14__auto (jolt-hash-map)))) (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) (jolt-invoke (var-deref "jolt.ir" "def-node") cur nm (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx val-form env) node-meta)))))) (if (jolt= G__38 "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))) (jolt-invoke (var-deref "jolt.ir" "let-node") (jolt-first r) (jolt-invoke (var-deref "jolt.analyzer" "analyze-seq") ctx (jolt-drop 2 items) (jolt-invoke (var-deref "clojure.core" "second") r)))) (if (jolt= G__38 "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$1596 (keyword #f "op")) (_o$1597 (keyword #f "loop")) (_o$1598 (keyword #f "recur-name")) (_o$1599 rname) (_o$1600 (keyword #f "bindings")) (_o$1601 (jolt-first r)) (_o$1602 (keyword #f "body")) (_o$1603 (jolt-invoke (var-deref "jolt.analyzer" "analyze-seq") ctx (jolt-drop 2 items) env**))) (jolt-hash-map _o$1596 _o$1597 _o$1598 _o$1599 _o$1600 _o$1601 _o$1602 _o$1603))) (if (jolt= G__38 "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$1590 (keyword #f "op")) (_o$1591 (keyword #f "recur")) (_o$1592 (keyword #f "recur-name")) (_o$1593 rt) (_o$1594 (keyword #f "args")) (_o$1595 (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (p__50_) (let fnrec1589 ((p__50_ p__50_)) (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx p__50_ env))) (jolt-rest items)))) (jolt-hash-map _o$1590 _o$1591 _o$1592 _o$1593 _o$1594 _o$1595)))) (if (jolt= G__38 "try") (jolt-invoke (var-deref "jolt.analyzer" "analyze-try") ctx items env) (if (jolt= G__38 "letfn") (jolt-invoke (var-deref "jolt.analyzer" "analyze-letfn") ctx items env) (if (jolt= G__38 "fn*") (jolt-invoke (var-deref "jolt.analyzer" "analyze-fn") ctx items env) (if (jolt= G__38 "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__38 "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"))) (jolt-invoke (var-deref "jolt.ir" "the-var") (jolt-get r (keyword #f "ns")) (jolt-get r (keyword #f "name"))) (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))))) (jolt-invoke (var-deref "jolt.analyzer" "uncompilable") (jolt-invoke (var-deref "clojure.core" "str") "special form " op)))))))))))))))))))) analyze-special)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "method-head?" (letrec ((method-head? (lambda (nm) (let fnrec1612 ((nm nm)) (let* ((and__13__auto (> (jolt-count nm) 1))) (if (jolt-truthy? and__13__auto) (let* ((and__13__auto (jolt= "." (jolt-invoke (var-deref "clojure.core" "subs") nm 0 1)))) (if (jolt-truthy? and__13__auto) (jolt-not (jolt= "-" (jolt-invoke (var-deref "clojure.core" "subs") nm 1 2))) and__13__auto)) and__13__auto)))))) method-head?)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "analyze-host-call" (letrec ((analyze-host-call (lambda (ctx hname items env) (let fnrec1613 ((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$1615 (keyword #f "op")) (_o$1616 (keyword #f "host-call")) (_o$1617 (keyword #f "method")) (_o$1618 (jolt-invoke (var-deref "clojure.core" "subs") hname 1)) (_o$1619 (keyword #f "target")) (_o$1620 (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx (jolt-nth items 1) env)) (_o$1621 (keyword #f "args")) (_o$1622 (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (p__51_) (let fnrec1614 ((p__51_ p__51_)) (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx p__51_ env))) (jolt-drop 2 items)))) (jolt-hash-map _o$1615 _o$1616 _o$1617 _o$1618 _o$1619 _o$1620 _o$1621 _o$1622))))))) analyze-host-call)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "ctor-head?" (letrec ((ctor-head? (lambda (nm) (let fnrec1623 ((nm nm)) (let* ((and__13__auto (> (jolt-count nm) 1))) (if (jolt-truthy? and__13__auto) (let* ((and__13__auto (jolt= "." (jolt-invoke (var-deref "clojure.core" "subs") nm (jolt-dec (jolt-count nm)) (jolt-count nm))))) (if (jolt-truthy? and__13__auto) (jolt-not (jolt= "." (jolt-invoke (var-deref "clojure.core" "subs") nm 0 1))) and__13__auto)) and__13__auto)))))) ctor-head?)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "analyze-ctor" (letrec ((analyze-ctor (lambda (ctx class args env) (let fnrec1624 ((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__52_) (let fnrec1625 ((p__52_ p__52_)) (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx p__52_ env))) args)))))) analyze-ctor)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "analyze-dot" (letrec ((analyze-dot (lambda (ctx items env) (let fnrec1626 ((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* ((member (jolt-nth items 2))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-sym?") member)) (let* ((_o$1628 (keyword #f "op")) (_o$1629 (keyword #f "host-call")) (_o$1630 (keyword #f "method")) (_o$1631 (jolt-invoke (var-deref "jolt.host" "form-sym-name") member)) (_o$1632 (keyword #f "target")) (_o$1633 (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx (jolt-nth items 1) env)) (_o$1634 (keyword #f "args")) (_o$1635 (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (p__53_) (let fnrec1627 ((p__53_ p__53_)) (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx p__53_ env))) (jolt-drop 3 items)))) (jolt-hash-map _o$1628 _o$1629 _o$1630 _o$1631 _o$1632 _o$1633 _o$1634 _o$1635)) (jolt-invoke (var-deref "jolt.analyzer" "uncompilable") "special form . (non-symbol member)")))))))) analyze-dot)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "field-head?" (letrec ((field-head? (lambda (nm) (let fnrec1636 ((nm nm)) (let* ((and__13__auto (> (jolt-count nm) 2))) (if (jolt-truthy? and__13__auto) (jolt= ".-" (jolt-invoke (var-deref "clojure.core" "subs") nm 0 2)) and__13__auto)))))) field-head?)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "analyze-field" (letrec ((analyze-field (lambda (ctx hname items env) (let fnrec1637 ((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$1638 (keyword #f "op")) (_o$1639 (keyword #f "host-call")) (_o$1640 (keyword #f "method")) (_o$1641 (jolt-invoke (var-deref "clojure.core" "subs") hname 1)) (_o$1642 (keyword #f "target")) (_o$1643 (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx (jolt-nth items 1) env)) (_o$1644 (keyword #f "args")) (_o$1645 (jolt-vector))) (jolt-hash-map _o$1638 _o$1639 _o$1640 _o$1641 _o$1642 _o$1643 _o$1644 _o$1645))))))) analyze-field)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "analyze-symbol" (letrec ((analyze-symbol (lambda (ctx form env) (let fnrec1646 ((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__13__auto (jolt-invoke (var-deref "clojure.core" "nil?") ns))) (if (jolt-truthy? and__13__auto) (jolt-invoke (var-deref "jolt.analyzer" "local?") env nm) and__13__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"))) (jolt-invoke (var-deref "jolt.ir" "var-ref") (jolt-get r (keyword #f "ns")) (jolt-get r (keyword #f "name"))) (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__39 (jolt-get r (keyword #f "kind")))) (if (jolt= G__39 (keyword #f "var")) (jolt-invoke (var-deref "jolt.ir" "var-ref") (jolt-get r (keyword #f "ns")) (jolt-get r (keyword #f "name"))) (if (jolt= G__39 (keyword #f "host")) (jolt-invoke (var-deref "jolt.ir" "host-ref") (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)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "analyze-list" (letrec ((analyze-list (lambda (ctx form env) (let fnrec1647 ((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__13__auto (jolt-invoke (var-deref "jolt.host" "form-sym?") head))) (if (jolt-truthy? and__13__auto) (jolt-invoke (var-deref "clojure.core" "nil?") (jolt-invoke (var-deref "jolt.host" "form-sym-ns") head)) and__13__auto))) (jolt-invoke (var-deref "jolt.host" "form-sym-name") head) jolt-nil)) (shadowed (let* ((and__13__auto hname)) (if (jolt-truthy? and__13__auto) (jolt-invoke (var-deref "jolt.analyzer" "local?") env hname) and__13__auto)))) (if (jolt-truthy? (let* ((and__13__auto hname)) (if (jolt-truthy? and__13__auto) (let* ((and__13__auto (jolt-not shadowed))) (if (jolt-truthy? and__13__auto) (jolt-contains? (var-deref "jolt.analyzer" "handled") hname) and__13__auto)) and__13__auto))) (jolt-invoke (var-deref "jolt.analyzer" "analyze-special") ctx hname items env) (if (jolt-truthy? (let* ((and__13__auto hname)) (if (jolt-truthy? and__13__auto) (let* ((and__13__auto (jolt-not shadowed))) (if (jolt-truthy? and__13__auto) (jolt-invoke (var-deref "jolt.analyzer" "method-head?") hname) and__13__auto)) and__13__auto))) (jolt-invoke (var-deref "jolt.analyzer" "analyze-host-call") ctx hname items env) (if (jolt-truthy? (let* ((and__13__auto hname)) (if (jolt-truthy? and__13__auto) (let* ((and__13__auto (jolt-not shadowed))) (if (jolt-truthy? and__13__auto) (jolt-invoke (var-deref "jolt.analyzer" "ctor-head?") hname) and__13__auto)) and__13__auto))) (jolt-invoke (var-deref "jolt.analyzer" "analyze-ctor") ctx (jolt-invoke (var-deref "clojure.core" "subs") hname 0 (jolt-dec (jolt-count hname))) (jolt-rest items) env) (if (jolt-truthy? (let* ((and__13__auto (jolt= hname "new"))) (if (jolt-truthy? and__13__auto) (let* ((and__13__auto (jolt-not shadowed))) (if (jolt-truthy? and__13__auto) (let* ((and__13__auto (>= (jolt-count items) 2))) (if (jolt-truthy? and__13__auto) (jolt-invoke (var-deref "jolt.host" "form-sym?") (jolt-nth items 1)) and__13__auto)) and__13__auto)) and__13__auto))) (jolt-invoke (var-deref "jolt.analyzer" "analyze-ctor") ctx (jolt-invoke (var-deref "jolt.host" "form-sym-name") (jolt-nth items 1)) (jolt-drop 2 items) env) (if (jolt-truthy? (let* ((and__13__auto (jolt= hname "."))) (if (jolt-truthy? and__13__auto) (jolt-not shadowed) and__13__auto))) (jolt-invoke (var-deref "jolt.analyzer" "analyze-dot") ctx items env) (if (jolt-truthy? (let* ((and__13__auto hname)) (if (jolt-truthy? and__13__auto) (let* ((and__13__auto (jolt-not shadowed))) (if (jolt-truthy? and__13__auto) (jolt-invoke (var-deref "jolt.analyzer" "field-head?") hname) and__13__auto)) and__13__auto))) (jolt-invoke (var-deref "jolt.analyzer" "analyze-field") ctx hname items env) (if (jolt-truthy? (let* ((and__13__auto hname)) (if (jolt-truthy? and__13__auto) (let* ((and__13__auto (jolt-not shadowed))) (if (jolt-truthy? and__13__auto) (jolt-invoke (var-deref "jolt.host" "form-special?") hname) and__13__auto)) and__13__auto))) (jolt-invoke (var-deref "jolt.analyzer" "uncompilable") (jolt-invoke (var-deref "clojure.core" "str") "special form " hname)) (if (jolt-truthy? (let* ((and__13__auto (jolt-invoke (var-deref "jolt.host" "form-sym?") head))) (if (jolt-truthy? and__13__auto) (let* ((and__13__auto (jolt-not shadowed))) (if (jolt-truthy? and__13__auto) (jolt-invoke (var-deref "jolt.host" "form-macro?") ctx head) and__13__auto)) and__13__auto))) (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx (jolt-invoke (var-deref "jolt.host" "form-expand-1") ctx form) env) (if (jolt-truthy? (keyword #f "else")) (let* ((n (jolt-invoke (var-deref "jolt.ir" "invoke") (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx head env) (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (p__54_) (let fnrec1648 ((p__54_ p__54_)) (jolt-invoke (var-deref "jolt.analyzer" "analyze") ctx p__54_ env))) (jolt-rest items)))) (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)))
(guard (e (#t #f))
  (def-var! "jolt.analyzer" "analyze" (letrec ((analyze (case-lambda ((ctx form) (let fnrec1649 ((ctx ctx) (form form)) (jolt-invoke analyze ctx form (jolt-invoke (var-deref "jolt.analyzer" "empty-env") )))) ((ctx form env) (let fnrec1650 ((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.ir" "vector-node") (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (p__55_) (let fnrec1667 ((p__55_ p__55_)) (jolt-invoke analyze ctx p__55_ env))) (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.ir" "map-node") (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (p) (let fnrec1664 ((p p)) (let* ((_o$1665 (jolt-invoke analyze ctx (jolt-first p) env)) (_o$1666 (jolt-invoke analyze ctx (jolt-invoke (var-deref "clojure.core" "second") p) env))) (jolt-vector _o$1665 _o$1666)))) (jolt-invoke (var-deref "jolt.host" "form-map-pairs") form))) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-set?") form)) (jolt-invoke (var-deref "jolt.ir" "set-node") (jolt-invoke (var-deref "clojure.core" "mapv") (lambda (p__56_) (let fnrec1663 ((p__56_ p__56_)) (jolt-invoke analyze ctx p__56_ env))) (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 "jolt.analyzer" "analyze-list") ctx form env) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-regex?") form)) (let* ((_o$1659 (keyword #f "op")) (_o$1660 (keyword #f "regex")) (_o$1661 (keyword #f "source")) (_o$1662 (jolt-invoke (var-deref "jolt.host" "form-regex-source") form))) (jolt-hash-map _o$1659 _o$1660 _o$1661 _o$1662)) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-inst?") form)) (let* ((_o$1655 (keyword #f "op")) (_o$1656 (keyword #f "inst")) (_o$1657 (keyword #f "source")) (_o$1658 (jolt-invoke (var-deref "jolt.host" "form-inst-source") form))) (jolt-hash-map _o$1655 _o$1656 _o$1657 _o$1658)) (if (jolt-truthy? (jolt-invoke (var-deref "jolt.host" "form-uuid?") form)) (let* ((_o$1651 (keyword #f "op")) (_o$1652 (keyword #f "uuid")) (_o$1653 (keyword #f "source")) (_o$1654 (jolt-invoke (var-deref "jolt.host" "form-uuid-source") form))) (jolt-hash-map _o$1651 _o$1652 _o$1653 _o$1654)) (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$1046 "+") (_o$1047 "+") (_o$1048 "-") (_o$1049 "-") (_o$1050 "*") (_o$1051 "*") (_o$1052 "/") (_o$1053 "/") (_o$1054 "<") (_o$1055 "<") (_o$1056 ">") (_o$1057 ">") (_o$1058 "<=") (_o$1059 "<=") (_o$1060 ">=") (_o$1061 ">=") (_o$1062 "=") (_o$1063 "jolt=") (_o$1064 "inc") (_o$1065 "jolt-inc") (_o$1066 "dec") (_o$1067 "jolt-dec") (_o$1068 "not") (_o$1069 "jolt-not") (_o$1070 "min") (_o$1071 "min") (_o$1072 "max") (_o$1073 "max") (_o$1074 "mod") (_o$1075 "modulo") (_o$1076 "rem") (_o$1077 "remainder") (_o$1078 "quot") (_o$1079 "quotient") (_o$1080 "vector") (_o$1081 "jolt-vector") (_o$1082 "hash-map") (_o$1083 "jolt-hash-map") (_o$1084 "hash-set") (_o$1085 "jolt-hash-set") (_o$1086 "conj") (_o$1087 "jolt-conj") (_o$1088 "get") (_o$1089 "jolt-get") (_o$1090 "nth") (_o$1091 "jolt-nth") (_o$1092 "count") (_o$1093 "jolt-count") (_o$1094 "assoc") (_o$1095 "jolt-assoc") (_o$1096 "dissoc") (_o$1097 "jolt-dissoc") (_o$1098 "contains?") (_o$1099 "jolt-contains?") (_o$1100 "empty?") (_o$1101 "jolt-empty?") (_o$1102 "peek") (_o$1103 "jolt-peek") (_o$1104 "pop") (_o$1105 "jolt-pop") (_o$1106 "first") (_o$1107 "jolt-first") (_o$1108 "rest") (_o$1109 "jolt-rest") (_o$1110 "next") (_o$1111 "jolt-next") (_o$1112 "seq") (_o$1113 "jolt-seq") (_o$1114 "cons") (_o$1115 "jolt-cons") (_o$1116 "list") (_o$1117 "jolt-list") (_o$1118 "reverse") (_o$1119 "jolt-reverse") (_o$1120 "last") (_o$1121 "jolt-last") (_o$1122 "map") (_o$1123 "jolt-map") (_o$1124 "filter") (_o$1125 "jolt-filter") (_o$1126 "remove") (_o$1127 "jolt-remove") (_o$1128 "reduce") (_o$1129 "jolt-reduce") (_o$1130 "into") (_o$1131 "jolt-into") (_o$1132 "concat") (_o$1133 "jolt-concat") (_o$1134 "apply") (_o$1135 "jolt-apply") (_o$1136 "range") (_o$1137 "jolt-range") (_o$1138 "take") (_o$1139 "jolt-take") (_o$1140 "drop") (_o$1141 "jolt-drop") (_o$1142 "keys") (_o$1143 "jolt-keys") (_o$1144 "vals") (_o$1145 "jolt-vals") (_o$1146 "even?") (_o$1147 "jolt-even?") (_o$1148 "odd?") (_o$1149 "jolt-odd?") (_o$1150 "pos?") (_o$1151 "jolt-pos?") (_o$1152 "neg?") (_o$1153 "jolt-neg?") (_o$1154 "zero?") (_o$1155 "jolt-zero?") (_o$1156 "identity") (_o$1157 "jolt-identity") (_o$1158 "ex-info") (_o$1159 "jolt-ex-info")) (jolt-hash-map _o$1046 _o$1047 _o$1048 _o$1049 _o$1050 _o$1051 _o$1052 _o$1053 _o$1054 _o$1055 _o$1056 _o$1057 _o$1058 _o$1059 _o$1060 _o$1061 _o$1062 _o$1063 _o$1064 _o$1065 _o$1066 _o$1067 _o$1068 _o$1069 _o$1070 _o$1071 _o$1072 _o$1073 _o$1074 _o$1075 _o$1076 _o$1077 _o$1078 _o$1079 _o$1080 _o$1081 _o$1082 _o$1083 _o$1084 _o$1085 _o$1086 _o$1087 _o$1088 _o$1089 _o$1090 _o$1091 _o$1092 _o$1093 _o$1094 _o$1095 _o$1096 _o$1097 _o$1098 _o$1099 _o$1100 _o$1101 _o$1102 _o$1103 _o$1104 _o$1105 _o$1106 _o$1107 _o$1108 _o$1109 _o$1110 _o$1111 _o$1112 _o$1113 _o$1114 _o$1115 _o$1116 _o$1117 _o$1118 _o$1119 _o$1120 _o$1121 _o$1122 _o$1123 _o$1124 _o$1125 _o$1126 _o$1127 _o$1128 _o$1129 _o$1130 _o$1131 _o$1132 _o$1133 _o$1134 _o$1135 _o$1136 _o$1137 _o$1138 _o$1139 _o$1140 _o$1141 _o$1142 _o$1143 _o$1144 _o$1145 _o$1146 _o$1147 _o$1148 _o$1149 _o$1150 _o$1151 _o$1152 _o$1153 _o$1154 _o$1155 _o$1156 _o$1157 _o$1158 _o$1159)) (jolt-hash-map (keyword #f "private") #t)))
(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$1160 "+") (_o$1161 "jolt-add") (_o$1162 "-") (_o$1163 "jolt-sub") (_o$1164 "*") (_o$1165 "jolt-mul") (_o$1166 "/") (_o$1167 "jolt-div")) (jolt-hash-map _o$1160 _o$1161 _o$1162 _o$1163 _o$1164 _o$1165 _o$1166 _o$1167))) (jolt-hash-map (keyword #f "private") #t)))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "op-arity" (let* ((_o$1209 "inc") (_o$1210 (lambda (p__4_) (let fnrec1168 ((p__4_ p__4_)) (jolt= p__4_ 1)))) (_o$1211 "dec") (_o$1212 (lambda (p__5_) (let fnrec1169 ((p__5_ p__5_)) (jolt= p__5_ 1)))) (_o$1213 "not") (_o$1214 (lambda (p__6_) (let fnrec1170 ((p__6_ p__6_)) (jolt= p__6_ 1)))) (_o$1215 "count") (_o$1216 (lambda (p__7_) (let fnrec1171 ((p__7_ p__7_)) (jolt= p__7_ 1)))) (_o$1217 "empty?") (_o$1218 (lambda (p__8_) (let fnrec1172 ((p__8_ p__8_)) (jolt= p__8_ 1)))) (_o$1219 "peek") (_o$1220 (lambda (p__9_) (let fnrec1173 ((p__9_ p__9_)) (jolt= p__9_ 1)))) (_o$1221 "pop") (_o$1222 (lambda (p__10_) (let fnrec1174 ((p__10_ p__10_)) (jolt= p__10_ 1)))) (_o$1223 "mod") (_o$1224 (lambda (p__11_) (let fnrec1175 ((p__11_ p__11_)) (jolt= p__11_ 2)))) (_o$1225 "rem") (_o$1226 (lambda (p__12_) (let fnrec1176 ((p__12_ p__12_)) (jolt= p__12_ 2)))) (_o$1227 "quot") (_o$1228 (lambda (p__13_) (let fnrec1177 ((p__13_ p__13_)) (jolt= p__13_ 2)))) (_o$1229 "contains?") (_o$1230 (lambda (p__14_) (let fnrec1178 ((p__14_ p__14_)) (jolt= p__14_ 2)))) (_o$1231 "get") (_o$1232 (lambda (p__15_) (let fnrec1179 ((p__15_ p__15_)) (let* ((or__14__auto (jolt= p__15_ 2))) (if (jolt-truthy? or__14__auto) or__14__auto (jolt= p__15_ 3)))))) (_o$1233 "nth") (_o$1234 (lambda (p__16_) (let fnrec1180 ((p__16_ p__16_)) (let* ((or__14__auto (jolt= p__16_ 2))) (if (jolt-truthy? or__14__auto) or__14__auto (jolt= p__16_ 3)))))) (_o$1235 "assoc") (_o$1236 (lambda (p__17_) (let fnrec1181 ((p__17_ p__17_)) (let* ((and__13__auto (>= p__17_ 3))) (if (jolt-truthy? and__13__auto) (jolt-odd? p__17_) and__13__auto))))) (_o$1237 "dissoc") (_o$1238 (lambda (p__18_) (let fnrec1182 ((p__18_ p__18_)) (>= p__18_ 1)))) (_o$1239 "conj") (_o$1240 (lambda (p__19_) (let fnrec1183 ((p__19_ p__19_)) (>= p__19_ 1)))) (_o$1241 "first") (_o$1242 (lambda (p__20_) (let fnrec1184 ((p__20_ p__20_)) (jolt= p__20_ 1)))) (_o$1243 "rest") (_o$1244 (lambda (p__21_) (let fnrec1185 ((p__21_ p__21_)) (jolt= p__21_ 1)))) (_o$1245 "next") (_o$1246 (lambda (p__22_) (let fnrec1186 ((p__22_ p__22_)) (jolt= p__22_ 1)))) (_o$1247 "seq") (_o$1248 (lambda (p__23_) (let fnrec1187 ((p__23_ p__23_)) (jolt= p__23_ 1)))) (_o$1249 "reverse") (_o$1250 (lambda (p__24_) (let fnrec1188 ((p__24_ p__24_)) (jolt= p__24_ 1)))) (_o$1251 "last") (_o$1252 (lambda (p__25_) (let fnrec1189 ((p__25_ p__25_)) (jolt= p__25_ 1)))) (_o$1253 "keys") (_o$1254 (lambda (p__26_) (let fnrec1190 ((p__26_ p__26_)) (jolt= p__26_ 1)))) (_o$1255 "vals") (_o$1256 (lambda (p__27_) (let fnrec1191 ((p__27_ p__27_)) (jolt= p__27_ 1)))) (_o$1257 "even?") (_o$1258 (lambda (p__28_) (let fnrec1192 ((p__28_ p__28_)) (jolt= p__28_ 1)))) (_o$1259 "odd?") (_o$1260 (lambda (p__29_) (let fnrec1193 ((p__29_ p__29_)) (jolt= p__29_ 1)))) (_o$1261 "pos?") (_o$1262 (lambda (p__30_) (let fnrec1194 ((p__30_ p__30_)) (jolt= p__30_ 1)))) (_o$1263 "neg?") (_o$1264 (lambda (p__31_) (let fnrec1195 ((p__31_ p__31_)) (jolt= p__31_ 1)))) (_o$1265 "zero?") (_o$1266 (lambda (p__32_) (let fnrec1196 ((p__32_ p__32_)) (jolt= p__32_ 1)))) (_o$1267 "identity") (_o$1268 (lambda (p__33_) (let fnrec1197 ((p__33_ p__33_)) (jolt= p__33_ 1)))) (_o$1269 "cons") (_o$1270 (lambda (p__34_) (let fnrec1198 ((p__34_ p__34_)) (jolt= p__34_ 2)))) (_o$1271 "filter") (_o$1272 (lambda (p__35_) (let fnrec1199 ((p__35_ p__35_)) (jolt= p__35_ 2)))) (_o$1273 "remove") (_o$1274 (lambda (p__36_) (let fnrec1200 ((p__36_ p__36_)) (jolt= p__36_ 2)))) (_o$1275 "into") (_o$1276 (lambda (p__37_) (let fnrec1201 ((p__37_ p__37_)) (jolt= p__37_ 2)))) (_o$1277 "take") (_o$1278 (lambda (p__38_) (let fnrec1202 ((p__38_ p__38_)) (jolt= p__38_ 2)))) (_o$1279 "drop") (_o$1280 (lambda (p__39_) (let fnrec1203 ((p__39_ p__39_)) (jolt= p__39_ 2)))) (_o$1281 "map") (_o$1282 (lambda (p__40_) (let fnrec1204 ((p__40_ p__40_)) (>= p__40_ 2)))) (_o$1283 "apply") (_o$1284 (lambda (p__41_) (let fnrec1205 ((p__41_ p__41_)) (>= p__41_ 2)))) (_o$1285 "reduce") (_o$1286 (lambda (p__42_) (let fnrec1206 ((p__42_ p__42_)) (let* ((or__14__auto (jolt= p__42_ 2))) (if (jolt-truthy? or__14__auto) or__14__auto (jolt= p__42_ 3)))))) (_o$1287 "range") (_o$1288 (lambda (p__43_) (let fnrec1207 ((p__43_ p__43_)) (let* ((and__13__auto (>= p__43_ 0))) (if (jolt-truthy? and__13__auto) (<= p__43_ 3) and__13__auto))))) (_o$1289 "ex-info") (_o$1290 (lambda (p__44_) (let fnrec1208 ((p__44_ p__44_)) (let* ((or__14__auto (jolt= p__44_ 2))) (if (jolt-truthy? or__14__auto) or__14__auto (jolt= p__44_ 3))))))) (jolt-hash-map _o$1209 _o$1210 _o$1211 _o$1212 _o$1213 _o$1214 _o$1215 _o$1216 _o$1217 _o$1218 _o$1219 _o$1220 _o$1221 _o$1222 _o$1223 _o$1224 _o$1225 _o$1226 _o$1227 _o$1228 _o$1229 _o$1230 _o$1231 _o$1232 _o$1233 _o$1234 _o$1235 _o$1236 _o$1237 _o$1238 _o$1239 _o$1240 _o$1241 _o$1242 _o$1243 _o$1244 _o$1245 _o$1246 _o$1247 _o$1248 _o$1249 _o$1250 _o$1251 _o$1252 _o$1253 _o$1254 _o$1255 _o$1256 _o$1257 _o$1258 _o$1259 _o$1260 _o$1261 _o$1262 _o$1263 _o$1264 _o$1265 _o$1266 _o$1267 _o$1268 _o$1269 _o$1270 _o$1271 _o$1272 _o$1273 _o$1274 _o$1275 _o$1276 _o$1277 _o$1278 _o$1279 _o$1280 _o$1281 _o$1282 _o$1283 _o$1284 _o$1285 _o$1286 _o$1287 _o$1288 _o$1289 _o$1290)) (jolt-hash-map (keyword #f "private") #t)))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "cmp1-ops" (let* ((_o$1291 "<") (_o$1292 ">") (_o$1293 "<=") (_o$1294 ">=")) (jolt-hash-set _o$1291 _o$1292 _o$1293 _o$1294)) (jolt-hash-map (keyword #f "private") #t)))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "supported-host-methods" (let* ((_o$1295 "isDirectory") (_o$1296 "listFiles")) (jolt-hash-set _o$1295 _o$1296)) (jolt-hash-map (keyword #f "private") #t)))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "bool-returning-ops" (let* ((_o$1297 "<") (_o$1298 "<=") (_o$1299 ">") (_o$1300 ">=") (_o$1301 "jolt=") (_o$1302 "jolt-not") (_o$1303 "jolt-even?") (_o$1304 "jolt-odd?") (_o$1305 "jolt-pos?") (_o$1306 "jolt-neg?") (_o$1307 "jolt-zero?") (_o$1308 "jolt-empty?") (_o$1309 "jolt-contains?")) (jolt-hash-set _o$1297 _o$1298 _o$1299 _o$1300 _o$1301 _o$1302 _o$1303 _o$1304 _o$1305 _o$1306 _o$1307 _o$1308 _o$1309)) (jolt-hash-map (keyword #f "private") #t)))
(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 fnrec1310 ((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-with-meta! "jolt.backend-scheme" "*recur-target*" jolt-nil (jolt-hash-map (keyword #f "dynamic") #t)))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "*known-procs*" (jolt-hash-set) (jolt-hash-map (keyword #f "dynamic") #t)))
(guard (e (#t #f))
  (def-var-with-meta! "jolt.backend-scheme" "gensym-counter" (jolt-invoke (var-deref "clojure.core" "atom") 0) (jolt-hash-map (keyword #f "private") #t)))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "fresh-label" (letrec ((fresh-label (lambda (prefix) (let fnrec1311 ((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)))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "munge-name" (letrec ((munge-name (lambda (s) (let fnrec1312 ((s s)) (jolt-invoke (var-deref "clojure.string" "replace") s "#" "_"))))) munge-name)))
(guard (e (#t #f))
  (declare-var! "jolt.backend-scheme" "emit"))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "char-escape" (letrec ((char-escape (lambda (cp) (let fnrec1313 ((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 (jolt-truthy? (let* ((and__13__auto (>= cp 32))) (if (jolt-truthy? and__13__auto) (< cp 127) and__13__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)))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "chez-str-lit" (letrec ((chez-str-lit (lambda (s) (let fnrec1314 ((s s)) (jolt-invoke (var-deref "clojure.core" "str") "\"" (jolt-apply (var-deref "clojure.core" "str") (jolt-map (lambda (c) (let fnrec1315 ((c c)) (jolt-invoke (var-deref "jolt.backend-scheme" "char-escape") (jolt-invoke (var-deref "clojure.core" "int") c)))) s)) "\""))))) chez-str-lit)))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "emit-const" (letrec ((emit-const (lambda (v) (let fnrec1316 ((v v)) (if (jolt-truthy? (jolt-invoke (var-deref "clojure.core" "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__14__auto (jolt-invoke (var-deref "clojure.string" "includes?") s "."))) (if (jolt-truthy? or__14__auto) or__14__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__4__auto (jolt-invoke (var-deref "clojure.core" "namespace") v))) (if (jolt-truthy? temp__4__auto) (let* ((kns temp__4__auto)) (jolt-invoke (var-deref "clojure.core" "str") "(keyword " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") kns) " " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-invoke (var-deref "clojure.core" "name") v)) ")")) (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 (jolt-ex-info (jolt-invoke (var-deref "clojure.core" "str") "emit-const: unsupported literal " (jolt-invoke (var-deref "clojure.core" "pr-str") v)) (jolt-hash-map))) jolt-nil))))))))))) emit-const)))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "emit-ordered" (letrec ((emit-ordered (lambda (ctor arg-strs) (let fnrec1317 ((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 fnrec1318 ((_ _)) (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 fnrec1319 ((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)))
(guard (e (#t #f))
  (declare-var! "jolt.backend-scheme" "emit-quoted"))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "emit-quoted-map" (letrec ((emit-quoted-map (lambda (pairs) (let fnrec1320 ((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 fnrec1321 ((p p)) (let* ((_o$1322 (jolt-invoke (var-deref "jolt.backend-scheme" "emit-quoted") (jolt-nth p 0))) (_o$1323 (jolt-invoke (var-deref "jolt.backend-scheme" "emit-quoted") (jolt-nth p 1)))) (jolt-vector _o$1322 _o$1323)))) pairs)) ")"))))) emit-quoted-map)))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "emit-quoted-map-value" (letrec ((emit-quoted-map-value (lambda (m) (let fnrec1324 ((m m)) (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 (k) (let fnrec1325 ((k k)) (let* ((_o$1326 (jolt-invoke (var-deref "jolt.backend-scheme" "emit-quoted") k)) (_o$1327 (jolt-invoke (var-deref "jolt.backend-scheme" "emit-quoted") (jolt-get m k)))) (jolt-vector _o$1326 _o$1327)))) (jolt-keys m))) ")"))))) emit-quoted-map-value)))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "emit-quoted" (letrec ((emit-quoted (lambda (form) (let fnrec1328 ((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__13__auto m)) (if (jolt-truthy? and__13__auto) (jolt-pos? (jolt-count m)) and__13__auto))) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-symbol/meta " (if (jolt-truthy? sns) (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") sns) "#f") " " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") nm) " " (jolt-invoke emit-quoted m) ")") (jolt-invoke (var-deref "clojure.core" "str") "(jolt-symbol " (if (jolt-truthy? sns) (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") sns) "#f") " " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") nm) ")"))) (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-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 "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-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 (jolt-ex-info (jolt-invoke (var-deref "clojure.core" "str") "emit-quoted: unsupported quoted form " (jolt-invoke (var-deref "clojure.core" "pr-str") form)) (jolt-hash-map))) jolt-nil)))))))))))))))) emit-quoted)))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "jmeta-nonempty?" (letrec ((jmeta-nonempty? (lambda (m) (let fnrec1329 ((m m)) (let* ((and__13__auto (jolt-invoke (var-deref "clojure.core" "map?") m))) (if (jolt-truthy? and__13__auto) (jolt-pos? (jolt-count m)) and__13__auto)))))) jmeta-nonempty?)))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "emit-binding" (letrec ((emit-binding (lambda (b) (let fnrec1330 ((b b)) (jolt-invoke (var-deref "clojure.core" "str") "(" (jolt-invoke (var-deref "jolt.backend-scheme" "munge-name") (jolt-nth b 0)) " " (jolt-invoke (var-deref "jolt.backend-scheme" "emit") (jolt-nth b 1)) ")"))))) emit-binding)))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "emit-let" (letrec ((emit-let (lambda (node) (let fnrec1331 ((node node)) (let* ((kw (if (jolt-truthy? (jolt-get node (keyword #f "letrec"))) "letrec*" "let*"))) (jolt-invoke (var-deref "clojure.core" "str") "(" kw " (" (jolt-invoke (var-deref "clojure.string" "join") " " (jolt-map (var-deref "jolt.backend-scheme" "emit-binding") (jolt-get node (keyword #f "bindings")))) ") " (jolt-invoke (var-deref "jolt.backend-scheme" "emit") (jolt-get node (keyword #f "body"))) ")")))))) emit-let)))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "emit-loop" (letrec ((emit-loop (lambda (node) (let fnrec1332 ((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__45_) (let fnrec1333 ((p__45_ p__45_)) (jolt-invoke (var-deref "jolt.backend-scheme" "munge-name") (jolt-nth p__45_ 0)))) pairs)) (inits (jolt-map (lambda (p__46_) (let fnrec1334 ((p__46_ p__46_)) (jolt-invoke (var-deref "jolt.backend-scheme" "emit") (jolt-nth p__46_ 1)))) pairs)) (seq-bs (jolt-invoke (var-deref "clojure.string" "join") " " (jolt-map (lambda (n i) (let fnrec1335 ((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 fnrec1336 ((n n)) (jolt-invoke (var-deref "clojure.core" "str") "(" n " " n ")"))) names))) (body (let* ((frame__8__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__8__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)))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "emit-recur" (letrec ((emit-recur (lambda (node) (let fnrec1337 ((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) (jolt-invoke (var-deref "clojure.core" "str") "(" (var-deref "jolt.backend-scheme" "*recur-target*") " " (jolt-invoke (var-deref "clojure.string" "join") " " (jolt-map (var-deref "jolt.backend-scheme" "emit") (jolt-get node (keyword #f "args")))) ")")))))) emit-recur)))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "emit-arity-clause" (letrec ((emit-arity-clause (lambda (a) (let fnrec1338 ((a a)) (let* ((params (jolt-map (var-deref "jolt.backend-scheme" "munge-name") (jolt-get a (keyword #f "params")))) (restp (let* ((temp__15__auto (jolt-get a (keyword #f "rest")))) (if (jolt-truthy? temp__15__auto) (let* ((r temp__15__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__8__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__8__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__13__auto restp)) (if (jolt-truthy? and__13__auto) (jolt-empty? params) and__13__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)))) (binds (if (jolt-truthy? restp) (jolt-concat (jolt-map (lambda (p) (let fnrec1342 ((p p)) (jolt-invoke (var-deref "clojure.core" "str") "(" p " " p ")"))) params) (jolt-vector (jolt-invoke (var-deref "clojure.core" "str") "(" restp " (list->cseq " restp "))"))) (jolt-map (lambda (p) (let fnrec1341 ((p p)) (jolt-invoke (var-deref "clojure.core" "str") "(" p " " p ")"))) params)))) (let* ((_o$1339 paramlist) (_o$1340 (jolt-invoke (var-deref "clojure.core" "str") "(let " label " (" (jolt-invoke (var-deref "clojure.string" "join") " " binds) ") " body ")"))) (jolt-vector _o$1339 _o$1340))))))) emit-arity-clause)))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "emit-fn" (letrec ((emit-fn (lambda (node) (let fnrec1343 ((node node)) (let* ((arities (jolt-get node (keyword #f "arities"))) (self (let* ((temp__15__auto (jolt-get node (keyword #f "name")))) (if (jolt-truthy? temp__15__auto) (let* ((nm temp__15__auto)) (jolt-invoke (var-deref "jolt.backend-scheme" "munge-name") nm)) jolt-nil))) (clauses (let* ((frame__8__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__8__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))) (jolt-invoke (var-deref "clojure.core" "str") "(lambda " (jolt-nth c 0) " " (jolt-nth c 1) ")")) (jolt-invoke (var-deref "clojure.core" "str") "(case-lambda " (jolt-invoke (var-deref "clojure.string" "join") " " (jolt-map (lambda (c) (let fnrec1344 ((c c)) (jolt-invoke (var-deref "clojure.core" "str") "(" (jolt-nth c 0) " " (jolt-nth c 1) ")"))) clauses)) ")")))) (let* ((temp__4__auto (jolt-get node (keyword #f "name")))) (if (jolt-truthy? temp__4__auto) (let* ((nm temp__4__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)))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "native-op" (letrec ((native-op (lambda (fnode nargs) (let fnrec1345 ((fnode fnode) (nargs nargs)) (let* ((nm (let* ((G__32 (jolt-get fnode (keyword #f "op")))) (if (jolt= G__32 (keyword #f "var")) (if (jolt= "clojure.core" (jolt-get fnode (keyword #f "ns"))) (jolt-get fnode (keyword #f "name")) jolt-nil) (if (jolt= G__32 (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-truthy? (jolt-invoke (var-deref "clojure.core" "nil?") op)) jolt-nil (if (jolt-truthy? (let* ((and__13__auto arity-ok)) (if (jolt-truthy? and__13__auto) (jolt-not (jolt-invoke arity-ok nargs)) and__13__auto))) jolt-nil (if (jolt-truthy? (keyword #f "else")) op jolt-nil)))))))) native-op)))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "ifn-kind" (letrec ((ifn-kind (lambda (fnode) (let fnrec1346 ((fnode fnode)) (let* ((G__33 (jolt-get fnode (keyword #f "op")))) (if (jolt= G__33 (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 (jolt-truthy? (let* ((or__14__auto (jolt= G__33 (keyword #f "map")))) (if (jolt-truthy? or__14__auto) or__14__auto (let* ((or__14__auto (jolt= G__33 (keyword #f "set")))) (if (jolt-truthy? or__14__auto) or__14__auto (jolt= G__33 (keyword #f "vector"))))))) (keyword #f "coll") jolt-nil))))))) ifn-kind)))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "stdlib-var?" (letrec ((stdlib-var? (lambda (n) (let fnrec1347 ((n n)) (let* ((and__13__auto (jolt= (keyword #f "var") (jolt-get n (keyword #f "op"))))) (if (jolt-truthy? and__13__auto) (jolt-invoke (var-deref "clojure.string" "starts-with?") (let* ((or__14__auto (jolt-get n (keyword #f "ns")))) (if (jolt-truthy? or__14__auto) or__14__auto "")) "clojure.") and__13__auto)))))) stdlib-var?)))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "emit-invoke" (letrec ((emit-invoke (lambda (node) (let fnrec1348 ((node node)) (let* ((fnode (jolt-get node (keyword #f "fn"))) (args (jolt-invoke (var-deref "clojure.core" "mapv") (var-deref "jolt.backend-scheme" "emit") (jolt-get node (keyword #f "args")))) (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)) (default (if (> (jolt-count args) 1) (jolt-invoke (var-deref "clojure.core" "str") " " (jolt-nth args 1)) ""))) (if (jolt-truthy? (let* ((and__13__auto nop)) (if (jolt-truthy? and__13__auto) (let* ((and__13__auto (jolt-empty? args))) (if (jolt-truthy? and__13__auto) (jolt= nop "+") and__13__auto)) and__13__auto))) "0" (if (jolt-truthy? (let* ((and__13__auto nop)) (if (jolt-truthy? and__13__auto) (let* ((and__13__auto (jolt-empty? args))) (if (jolt-truthy? and__13__auto) (jolt= nop "*") and__13__auto)) and__13__auto))) "1" (if (jolt-truthy? (let* ((and__13__auto nop)) (if (jolt-truthy? and__13__auto) (let* ((and__13__auto (jolt= 1 (jolt-count args)))) (if (jolt-truthy? and__13__auto) (jolt-invoke (var-deref "jolt.backend-scheme" "cmp1-ops") nop) and__13__auto)) and__13__auto))) (jolt-invoke (var-deref "clojure.core" "str") "(begin " (jolt-first args) " #t)") (if (jolt-truthy? nop) (jolt-invoke (var-deref "clojure.core" "str") "(" nop " " (jolt-invoke (var-deref "clojure.string" "join") " " args) ")") (if (jolt= kind (keyword #f "keyword")) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-get " (jolt-first args) " " (jolt-invoke (var-deref "jolt.backend-scheme" "emit") fnode) default ")") (if (jolt= kind (keyword #f "coll")) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-get " (jolt-invoke (var-deref "jolt.backend-scheme" "emit") fnode) " " (jolt-first args) default ")") (if (jolt-truthy? (let* ((and__13__auto (jolt-invoke (var-deref "jolt.backend-scheme" "stdlib-var?") fnode))) (if (jolt-truthy? and__13__auto) (jolt-not (jolt-invoke (var-deref "clojure.core" "deref") (var-deref "jolt.backend-scheme" "prelude-mode?"))) and__13__auto))) (jolt-throw (jolt-ex-info (jolt-invoke (var-deref "clojure.core" "str") "emit: unsupported stdlib fn `" (jolt-get fnode (keyword #f "ns")) "/" (jolt-get fnode (keyword #f "name")) "` (no core on Chez yet)") (jolt-hash-map))) (if (jolt= (keyword #f "host-static") (jolt-get fnode (keyword #f "op"))) (jolt-invoke (var-deref "clojure.core" "str") "(host-static-call " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get fnode (keyword #f "class"))) " " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get fnode (keyword #f "member"))) (if (jolt-empty? args) "" (jolt-invoke (var-deref "clojure.core" "str") " " (jolt-invoke (var-deref "clojure.string" "join") " " args))) ")") (if (jolt= (keyword #f "host") (jolt-get fnode (keyword #f "op"))) (jolt-throw (jolt-ex-info (jolt-invoke (var-deref "clojure.core" "str") "emit: unsupported host call `" (jolt-get fnode (keyword #f "name")) "`") (jolt-hash-map))) (if (jolt-truthy? (let* ((and__13__auto (jolt= (keyword #f "local") (jolt-get fnode (keyword #f "op"))))) (if (jolt-truthy? and__13__auto) (jolt-not (jolt-invoke (var-deref "jolt.backend-scheme" "*known-procs*") (jolt-invoke (var-deref "jolt.backend-scheme" "munge-name") (jolt-get fnode (keyword #f "name"))))) and__13__auto))) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-invoke " (jolt-invoke (var-deref "jolt.backend-scheme" "emit") fnode) " " (jolt-invoke (var-deref "clojure.string" "join") " " args) ")") (if (jolt= (keyword #f "var") (jolt-get fnode (keyword #f "op"))) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-invoke " (jolt-invoke (var-deref "jolt.backend-scheme" "emit") fnode) " " (jolt-invoke (var-deref "clojure.string" "join") " " args) ")") (if (jolt-truthy? (keyword #f "else")) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-invoke " (jolt-invoke (var-deref "jolt.backend-scheme" "emit") fnode) " " (jolt-invoke (var-deref "clojure.string" "join") " " args) ")") jolt-nil))))))))))))))))) emit-invoke)))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "emit-try" (letrec ((emit-try (lambda (node) (let fnrec1349 ((node node)) (let* ((core (let* ((temp__4__auto (jolt-get node (keyword #f "catch-sym")))) (if (jolt-truthy? temp__4__auto) (let* ((cs temp__4__auto)) (jolt-invoke (var-deref "clojure.core" "str") "(guard (" (jolt-invoke (var-deref "jolt.backend-scheme" "munge-name") cs) " (else " (jolt-invoke (var-deref "jolt.backend-scheme" "emit") (jolt-get node (keyword #f "catch-body"))) ")) " (jolt-invoke (var-deref "jolt.backend-scheme" "emit") (jolt-get node (keyword #f "body"))) ")")) (jolt-invoke (var-deref "jolt.backend-scheme" "emit") (jolt-get node (keyword #f "body"))))))) (let* ((temp__4__auto (jolt-get node (keyword #f "finally")))) (if (jolt-truthy? temp__4__auto) (let* ((fin temp__4__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)))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "returns-scheme-bool?" (letrec ((returns-scheme-bool? (lambda (node) (let fnrec1350 ((node node)) (if (jolt-truthy? (let* ((and__13__auto (jolt= (keyword #f "const") (jolt-get node (keyword #f "op"))))) (if (jolt-truthy? and__13__auto) (jolt-invoke (var-deref "clojure.core" "boolean?") (jolt-get node (keyword #f "val"))) and__13__auto))) #t (if (jolt= (keyword #f "invoke") (jolt-get node (keyword #f "op"))) (let* ((nop (jolt-invoke (var-deref "jolt.backend-scheme" "native-op") (jolt-get node (keyword #f "fn")) (jolt-count (jolt-get node (keyword #f "args")))))) (if (jolt-truthy? (let* ((and__13__auto nop)) (if (jolt-truthy? and__13__auto) (jolt-invoke (var-deref "jolt.backend-scheme" "bool-returning-ops") nop) and__13__auto))) #t #f)) (if (jolt-truthy? (keyword #f "else")) #f jolt-nil))))))) returns-scheme-bool?)))
(guard (e (#t #f))
  (def-var! "jolt.backend-scheme" "emit" (letrec ((emit (lambda (node) (let fnrec1351 ((node node)) (let* ((G__34 (jolt-get node (keyword #f "op")))) (if (jolt= G__34 (keyword #f "const")) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-const") (jolt-get node (keyword #f "val"))) (if (jolt= G__34 (keyword #f "local")) (jolt-invoke (var-deref "jolt.backend-scheme" "munge-name") (jolt-get node (keyword #f "name"))) (if (jolt= G__34 (keyword #f "var")) (let* ((core-proc (let* ((and__13__auto (jolt= "clojure.core" (jolt-get node (keyword #f "ns"))))) (if (jolt-truthy? and__13__auto) (jolt-invoke (var-deref "jolt.backend-scheme" "core-value-procs") (jolt-get node (keyword #f "name"))) and__13__auto)))) (if (jolt-truthy? core-proc) core-proc (if (jolt-truthy? (let* ((and__13__auto (jolt-invoke (var-deref "jolt.backend-scheme" "stdlib-var?") node))) (if (jolt-truthy? and__13__auto) (jolt-not (jolt-invoke (var-deref "clojure.core" "deref") (var-deref "jolt.backend-scheme" "prelude-mode?"))) and__13__auto))) (jolt-throw (jolt-ex-info (jolt-invoke (var-deref "clojure.core" "str") "emit: unsupported stdlib ref `" (jolt-get node (keyword #f "ns")) "/" (jolt-get node (keyword #f "name")) "` (no core on Chez yet)") (jolt-hash-map))) (if (jolt-truthy? (keyword #f "else")) (jolt-invoke (var-deref "clojure.core" "str") "(var-deref " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "ns"))) " " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "name"))) ")") jolt-nil)))) (if (jolt= G__34 (keyword #f "the-var")) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-var " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "ns"))) " " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "name"))) ")") (if (jolt= G__34 (keyword #f "host")) (jolt-throw (jolt-ex-info (jolt-invoke (var-deref "clojure.core" "str") "emit: unsupported host ref `" (jolt-get node (keyword #f "name")) "`") (jolt-hash-map))) (if (jolt= G__34 (keyword #f "host-static")) (jolt-invoke (var-deref "clojure.core" "str") "(host-static-ref " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "class"))) " " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "member"))) ")") (if (jolt= G__34 (keyword #f "host-new")) (jolt-invoke (var-deref "clojure.core" "str") "(host-new " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "class"))) (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)))) ")") (if (jolt= G__34 (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)) (jolt-invoke emit test) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-truthy? " (jolt-invoke emit test) ")")))) (jolt-invoke (var-deref "clojure.core" "str") "(if " t " " (jolt-invoke emit (jolt-get node (keyword #f "then"))) " " (jolt-invoke emit (jolt-get node (keyword #f "else"))) ")")) (if (jolt= G__34 (keyword #f "do")) (jolt-invoke (var-deref "clojure.core" "str") "(begin " (jolt-invoke (var-deref "clojure.string" "join") " " (jolt-map emit (jolt-get node (keyword #f "statements")))) (if (jolt-empty? (jolt-get node (keyword #f "statements"))) "" " ") (jolt-invoke emit (jolt-get node (keyword #f "ret"))) ")") (if (jolt= G__34 (keyword #f "invoke")) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-invoke") node) (if (jolt= G__34 (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__34 (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__34 (keyword #f "map")) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-ordered") "jolt-hash-map" (jolt-invoke (var-deref "clojure.core" "mapcat") (lambda (p) (let fnrec1352 ((p p)) (let* ((_o$1353 (jolt-invoke emit (jolt-nth p 0))) (_o$1354 (jolt-invoke emit (jolt-nth p 1)))) (jolt-vector _o$1353 _o$1354)))) (jolt-get node (keyword #f "pairs")))) (if (jolt= G__34 (keyword #f "quote")) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-quoted") (jolt-get node (keyword #f "form"))) (if (jolt= G__34 (keyword #f "throw")) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-throw " (jolt-invoke emit (jolt-get node (keyword #f "expr"))) ")") (if (jolt= G__34 (keyword #f "try")) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-try") node) (if (jolt= G__34 (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__34 (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__34 (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__34 (keyword #f "host-call")) (let* ((m (jolt-get node (keyword #f "method"))) (target (jolt-invoke 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)) (jolt-invoke (var-deref "clojure.core" "str") "(jolt-host-call " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") m) " " target (if (jolt-empty? args) "" (jolt-invoke (var-deref "clojure.core" "str") " " (jolt-invoke (var-deref "clojure.string" "join") " " args))) ")") (jolt-invoke (var-deref "clojure.core" "str") "(record-method-dispatch " target " " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") m) " (jolt-vector" (if (jolt-empty? args) "" (jolt-invoke (var-deref "clojure.core" "str") " " (jolt-invoke (var-deref "clojure.string" "join") " " args))) "))"))) (if (jolt= G__34 (keyword #f "let")) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-let") node) (if (jolt= G__34 (keyword #f "loop")) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-loop") node) (if (jolt= G__34 (keyword #f "recur")) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-recur") node) (if (jolt= G__34 (keyword #f "fn")) (jolt-invoke (var-deref "jolt.backend-scheme" "emit-fn") node) (if (jolt= G__34 (keyword #f "def")) (if (jolt-truthy? (jolt-get node (keyword #f "no-init"))) (jolt-invoke (var-deref "clojure.core" "str") "(declare-var! " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "ns"))) " " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "name"))) ")") (if (jolt-truthy? (jolt-invoke (var-deref "jolt.backend-scheme" "jmeta-nonempty?") (jolt-get node (keyword #f "meta")))) (jolt-invoke (var-deref "clojure.core" "str") "(def-var-with-meta! " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "ns"))) " " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "name"))) " " (jolt-invoke emit (jolt-get node (keyword #f "init"))) " " (jolt-invoke (var-deref "jolt.backend-scheme" "emit-quoted") (jolt-get node (keyword #f "meta"))) ")") (if (jolt-truthy? (keyword #f "else")) (jolt-invoke (var-deref "clojure.core" "str") "(def-var! " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "ns"))) " " (jolt-invoke (var-deref "jolt.backend-scheme" "chez-str-lit") (jolt-get node (keyword #f "name"))) " " (jolt-invoke emit (jolt-get node (keyword #f "init"))) ")") jolt-nil))) (jolt-throw (jolt-ex-info (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")))) (jolt-hash-map))))))))))))))))))))))))))))))))) emit)))