diff --git a/pkgs/base/info.rkt b/pkgs/base/info.rkt index 344b621809..472755c2aa 100644 --- a/pkgs/base/info.rkt +++ b/pkgs/base/info.rkt @@ -14,7 +14,7 @@ ;; In the Racket source repo, this version should change only when ;; "racket_version.h" changes: -(define version "7.9.0.20") +(define version "7.9.0.21") (define deps `("racket-lib" ["racket" #:version ,version])) diff --git a/pkgs/racket-test-core/tests/racket/optimize.rktl b/pkgs/racket-test-core/tests/racket/optimize.rktl index 587bd02693..8020e1351b 100644 --- a/pkgs/racket-test-core/tests/racket/optimize.rktl +++ b/pkgs/racket-test-core/tests/racket/optimize.rktl @@ -50,10 +50,12 @@ (parameterize ([current-compile-target-machine #f]) (write (compile e) o)) (define lnkl (zo-parse (open-input-bytes (get-output-bytes o)))) - (unless (linkl-directory? lnkl) - (error 'compile/optimize "expected a linklet directory")) - (define ht (linkl-directory-table lnkl)) - (define bundle (hash-ref ht '() #f)) + (unless (or (linkl-directory? lnkl) + (linkl-bundle? lnkl)) + (error 'compile/optimize "expected a linklet directory or bundle")) + (define bundle (if (linkl-directory? lnkl) + (hash-ref (linkl-directory-table lnkl) '() #f) + lnkl)) (unless bundle (error 'compile/optimize (string-append "didn't find main linklet bundle in directory;" " maybe a top-level `begin` sequence?"))) @@ -69,7 +71,7 @@ (error 'compile/optimize "compiled content does not have expected shape: ~s" s-exp)) - ;; Support cross-module inling, at least through one layer of `require` + ;; Support cross-module inlining, at least through one layer of `require` (define-values (mpi-vector requires provides phase-to-link-modules) (deserialize-requires-and-provides bundle)) (define link-modules (hash-ref phase-to-link-modules 0 '())) @@ -82,7 +84,18 @@ (define mu (hash-ref mod-uses key #f)) (cond [mu - (define mp (module-path-index-resolve (module-use-module mu) #f)) + (define (replace-self mpi) + (define-values (name base) (module-path-index-split mpi)) + (cond + [(and (not name) (not base)) + (make-resolved-module-path 'top-level-module)] + [(module-path-index? base) + (define new-base (replace-self base)) + (if (eq? base new-base) + mpi + (module-path-index-join name new-base))] + [else mpi])) + (define mp (module-path-index-resolve (replace-self (module-use-module mu)) #f)) (define path (resolved-module-path-name mp)) (cond [(path? path) @@ -114,28 +127,37 @@ [else (new (cdr formals) (new (car formals) env))])) (let loop ([s s] [env #hasheq()]) + (define (body-loop bodys new-env) + ;; ad hoc normlization for a pattern that is no different in back end + (match bodys + [`((let ,bindings . ,body) ,simple) + (loop `((let ,bindings ,@body ,simple)) new-env)] + [_ (loop bodys new-env)])) (match s [`(lambda ,formals . ,bodys) (define new-env (new formals env)) - `(lambda ,(loop formals new-env) . ,(loop bodys new-env))] + `(lambda ,(loop formals new-env) . ,(body-loop bodys new-env))] [`(case-lambda [,formalss . ,bodyss] ...) `(case-lambda ,@(for/list ([formals (in-list formalss)] [bodys (in-list bodyss)]) (define new-env (new formals env)) - `[,(loop formals new-env) . ,(loop bodys new-env)]))] + `[,(loop formals new-env) . ,(body-loop bodys new-env)]))] [`(let ([,ids ,rhss] ...) . ,bodys) (define new-env (new ids env)) `(let ,(for/list ([id (in-list ids)] [rhs (in-list rhss)]) `[,(loop id new-env) ,(loop rhs env)]) - . ,(loop bodys new-env))] + . ,(body-loop bodys new-env))] [`(letrec ([,ids ,rhss] ...) . ,bodys) (define new-env (new ids env)) `(letrec ,(for/list ([id (in-list ids)] [rhs (in-list rhss)]) `[,(loop id new-env) ,(loop rhs new-env)]) - . ,(loop bodys new-env))] + . ,(body-loop bodys new-env))] + [`(quote ,_) s] + [`(check-not-unsafe-undefined ,id (quote ,name)) + `(check-not-unsafe-undefined ,(loop id env) (quote name-dropped-for-normalize))] [`(,es ...) (for/list ([e (in-list es)]) (loop e env))] @@ -387,10 +409,10 @@ [y (random)]) (list x x y y)) #f) - (test-comp #:except 'chez-scheme + (test-comp #:except 'chez-scheme ; cptypes could improve here `(lambda (x y) (when (and (pair? x) (box? y)) (,e? x y))) `(lambda (x y) (when (and (pair? x) (box? y)) #f))) - (test-comp #:except 'chez-scheme + (test-comp #:except 'chez-scheme ; cptypes could improve here `(lambda (x y) (car x) (unbox y) (,e? x y)) `(lambda (x y) (car x) (unbox y) #f)) (test-comp #:except (and (eq? e? 'equal?) 'chez-scheme) @@ -588,7 +610,7 @@ (let ([x (list* w z)]) (car x))) '(lambda (w z) w)) -(test-comp #:except 'chez-scheme +(test-comp #:except 'chez-scheme ; cadr not specialized '(lambda (w z) (let ([x (list w z)]) (cadr x))) @@ -657,13 +679,13 @@ (test-comp '(lambda (u v) (cdr (unsafe-cons-list u v))) '(lambda (u v) v)) -(test-comp #:except 'chez-scheme +(test-comp #:except 'chez-scheme ; cp0 needs unbox specialization '(lambda (v) (unbox (box v))) '(lambda (v) v)) -(test-comp #:except 'chez-scheme +(test-comp #:except 'chez-scheme ; cp0 needs unbox specialization '(lambda (v) (unsafe-unbox (box v))) '(lambda (v) v)) -(test-comp #:except 'chez-scheme +(test-comp #:except 'chez-scheme ; cp0 needs unbox specialization '(lambda (v) (unsafe-unbox* (box v))) '(lambda (v) v)) @@ -704,7 +726,7 @@ '(lambda (w z) (values (with-continuation-mark 'k 'v (read))) (random) #t)) (test-comp '(lambda (w z) (vector? (vector w z))) '(lambda (w z) #t)) -(test-comp #:except 'chez-scheme +(test-comp #:except 'chez-scheme ; vector-immutable is not primitive '(lambda (w z) (vector? (vector-immutable w z))) '(lambda (w z) #t)) (test-comp '(lambda (w z) (vector? (list 1))) @@ -746,10 +768,10 @@ '(lambda (x) (cdr x) (pair? x))) (test-comp '(lambda (x) (cadr x) #t) '(lambda (x) (cadr x) (pair? x))) -(test-comp #:except 'chez-scheme +(test-comp #:except 'chez-scheme ; procedure-arity-includes? is not primitive '(lambda (f) (procedure-arity-includes? f 5) #t) '(lambda (f) (procedure-arity-includes? f 5) (procedure? f))) -(test-comp #:except 'chez-scheme +(test-comp #:except 'chez-scheme ; procedureness is not primitive '(lambda (f l) (f l) #t) '(lambda (f l) (f l) (procedure? f))) @@ -774,7 +796,7 @@ (test-comp '(lambda (z) (let ([f (lambda (i) (car i))]) (f z)) #t) '(lambda (z) (let ([f (lambda (i) (car i))]) (f z)) (pair? z))) -(test-comp #:except 'chez-scheme +(test-comp #:except 'chez-scheme ; real->double-flonum is not primitive '(lambda (z) (fl+ z z)) '(lambda (z) (real->double-flonum (fl+ z z)))) (test-comp #:except 'chez-scheme @@ -965,7 +987,7 @@ #f v v v2 v2)))) -(test-comp #:except 'chez-scheme +(test-comp #:except 'chez-scheme ; unsafe car does not assume immutable '(lambda (w z) (if (list w z (random 7)) (let ([l (list (random))]) @@ -1538,33 +1560,35 @@ (if r #t (something-else)))) '(lambda (x) (if (something) #t (something-else)))) -(let ([test-if-if-reduction - (lambda (dup) - (test-comp `(lambda (x y z) (if (if x y #f) z ,dup)) - `(lambda (x y z) (if x (if y z ,dup) ,dup))) - (test-comp `(lambda (x y z) (if (if x #f y) z ,dup)) - `(lambda (x y z) (if x ,dup (if y z ,dup)))) - (test-comp `(lambda (x y z) (if (if x y #t) ,dup z)) - `(lambda (x y z) (if x (if y ,dup z) ,dup))) - (test-comp `(lambda (x y z) (if (if x #t y) ,dup z)) - `(lambda (x y z) (if x ,dup (if y ,dup z)))))]) - (test-if-if-reduction 1) - (test-if-if-reduction ''x) - (test-if-if-reduction "x") - (test-if-if-reduction #"x") - (test-if-if-reduction #t) - (test-if-if-reduction #f) - (test-if-if-reduction 'car) - (test-if-if-reduction 'map)) +(unless (eq? 'chez-scheme (system-type 'vm)) + (let ([test-if-if-reduction + (lambda (dup) + (test-comp `(lambda (x y z) (if (if x y #f) z ,dup)) + `(lambda (x y z) (if x (if y z ,dup) ,dup))) + (test-comp `(lambda (x y z) (if (if x #f y) z ,dup)) + `(lambda (x y z) (if x ,dup (if y z ,dup)))) + (test-comp `(lambda (x y z) (if (if x y #t) ,dup z)) + `(lambda (x y z) (if x (if y ,dup z) ,dup))) + (test-comp `(lambda (x y z) (if (if x #t y) ,dup z)) + `(lambda (x y z) (if x ,dup (if y ,dup z)))))]) + (test-if-if-reduction 1) + (test-if-if-reduction ''x) + (test-if-if-reduction "x") + (test-if-if-reduction #"x") + (test-if-if-reduction #t) + (test-if-if-reduction #f) + (test-if-if-reduction 'car) + (test-if-if-reduction 'map))) (let ([test-pred-implies-val (lambda (pred? val) (test-comp `(lambda (x) (if (,pred? x) ,val 0)) `(lambda (x) (if (,pred? x) x 0))) - (test-comp `(lambda (x) (eq? x ,val)) - `(lambda (x) (,pred? x))) - (test-comp `(lambda (x) (eq? ,val x)) - `(lambda (x) (,pred? x))))]) + (unless (eq? 'chez-scheme (system-type 'vm)) + (test-comp `(lambda (x) (eq? x ,val)) + `(lambda (x) (,pred? x))) + (test-comp `(lambda (x) (eq? ,val x)) + `(lambda (x) (,pred? x)))))]) (test-pred-implies-val 'null? 'null) (test-pred-implies-val 'void? '(void)) (test-pred-implies-val 'eof-object? 'eof) @@ -1580,13 +1604,15 @@ '(lambda (x) (if x 1 (list x)))) -(test-comp '(lambda (x) (let ([r (something)]) +(test-comp #:except 'chez-scheme + '(lambda (x) (let ([r (something)]) (r))) '(lambda (x) ((something)))) (test-comp '(lambda (x) (let ([r (something)]) (r (something-else)))) '(lambda (x) ((something) (something-else)))) -(test-comp '(lambda (x z) (let ([r (something)]) +(test-comp #:except 'chez-scheme + '(lambda (x z) (let ([r (something)]) (z r))) '(lambda (x z) (z (something)))) (test-comp '(lambda (x) (let ([r (something)]) @@ -1601,7 +1627,8 @@ (test-comp '(lambda (x z) (let ([r (something)]) (set! z r))) '(lambda (x z) (set! z (something)))) -(test-comp '(lambda (x z) (let ([r (something)]) +(test-comp #:except 'chez-scheme + '(lambda (x z) (let ([r (something)]) (call-with-values (lambda () (z)) r))) '(lambda (x z) (call-with-values (lambda () (z)) (something)))) @@ -1685,7 +1712,8 @@ '(lambda (x) (let ([n (random 9)]) (random n) (random n) (car x) (cons x 2)))) -(test-comp '(lambda (x) +(test-comp #:except 'chez-scheme + '(lambda (x) (if (begin (random) (not (begin (random) x))) 1 2)) '(lambda (x) (if (begin (random) (random) x) 2 1))) @@ -1722,21 +1750,24 @@ (+ y 1)))) -(test-comp '(let () +(test-comp #:except 'chez-scheme ; procedure-specialize doesn't inline enough + '(let () (define (f x) (procedure-specialize (lambda (y) (+ x y)))) ((f 10) 12)) '22) -(test-comp '(let () +(test-comp #:except 'chez-scheme ; procedure-specialize doesn't inline enough + '(let () (define (f x) (procedure-specialize (lambda (y) (+ x y)))) (procedure? (f 10))) '#t) -(test-comp '(let ([f (procedure-specialize +(test-comp #:except 'chez-scheme ; procedure-specialize doesn't inline enough + '(let ([f (procedure-specialize (lambda (y) (+ 1 y)))]) (list f (procedure-arity-includes? f 1))) '(let ([f (procedure-specialize @@ -1827,7 +1858,8 @@ [y (cons 3 4)]) (list x x y))) -(test-comp '(let ([g (lambda (f) +(test-comp #:except 'chez-scheme ; schemify sequences references to `x` in second + '(let ([g (lambda (f) (letrec-values ([(x y) (f (cons 1 2) (cons 3 4))]) (let ([z x]) @@ -1872,7 +1904,8 @@ '(lambda (p) (values (unsafe-cdr p) (car p))) #f) -(test-comp '(lambda (p) +(test-comp #:except 'chez-scheme ; schemify imposes order on car and cdr + '(lambda (p) (define-values (x y) (values (car p) (cdr p))) (values y x)) '(lambda (p) @@ -1887,7 +1920,8 @@ '(lambda (z) (list (list (z 2)) (list z))) #f) -(test-comp '(lambda (z) +(test-comp #:except 'chez-scheme ; schemify imposes order: `(z 2)` before `(list z)` + '(lambda (z) (let-values ([(a b) (values (list (z 2)) (list z))]) (list a a b))) '(lambda (z) @@ -1945,7 +1979,8 @@ (set! z 5))) #f) -(test-comp '(lambda (z) +(test-comp #:except 'chez-scheme + '(lambda (z) ;; It's ok to reorder unsafe operations relative ;; to each other: (let ([x (unsafe-fx+ z z)] @@ -1963,7 +1998,8 @@ (+ (unsafe-car z) (car z))) #f) -(test-comp '(lambda (z v) +(test-comp #:except 'chez-scheme + '(lambda (z v) ;; It's ok to move an unsafe operation past a ;; safe one: (let ([x (unsafe-car v)]) @@ -1972,7 +2008,8 @@ (+ (car z) (unsafe-car v)))) ;; Ok to reorder arithmetic that will not raise an error: -(test-comp '(lambda (x y) +(test-comp #:except 'chez-scheme + '(lambda (x y) (if (and (real? x) (real? y)) (let ([w (+ x y)] [z (- y x)]) @@ -1988,7 +2025,8 @@ #t]) ;; Inference of loop variable as number should allow ;; additions to be reordered: - (test-comp '(lambda () + (test-comp #:except 'chez-scheme + '(lambda () (let loop ([n 0] [m 9]) (let ([a (+ n 9)] [b (+ m 10)]) @@ -2006,7 +2044,8 @@ (+ (values 2 2) (unbox b))) #f) -(test-comp '(lambda (z) +(test-comp #:except 'chez-scheme + '(lambda (z) (let-values ([(x y) (if z (values z (list z)) @@ -2015,7 +2054,8 @@ '(lambda (z) (list z (if z (list z) (box z))))) -(test-comp '(lambda (z) +(test-comp #:except 'chez-scheme + '(lambda (z) (let-values ([(x y) (if z (values 1 1) @@ -2130,7 +2170,8 @@ 0) 0) -(test-comp '(letrec ([foo (lambda () 12)] +(test-comp #:except 'chez-scheme ; same back-end result, anyway + '(letrec ([foo (lambda () 12)] [goo (lambda () foo)]) goo) '(let* ([foo (lambda () 12)] @@ -2161,7 +2202,8 @@ (parameterize ([compile-context-preservation-enabled ;; Avoid different amounts of unrolling #t]) - (test-comp '(letrec ((even + (test-comp #:except 'chez-scheme ;; !! schemify is not good enough here? + '(letrec ((even (let ([unused 6]) (let ([even (lambda (x) (if (zero? x) #t (even (sub1 x))))]) (values even))))) @@ -2208,11 +2250,16 @@ (define h (+ a a)) (define (y) (x)) (list (x) (y) h)) - '(lambda (a) - (define h (+ a a)) - (letrec ([x (lambda () (y))] - [y (lambda () (x))]) - (list (x) (y) h))))) + (if (eq? 'chez-scheme (system-type 'vm)) + '(lambda (a) + (letrec ([x (lambda () (x))]) + (define h (+ a a)) + (list (x) (x) h))) + '(lambda (a) + (define h (+ a a)) + (letrec ([x (lambda () (y))] + [y (lambda () (x))]) + (list (x) (y) h)))))) (test-comp '(lambda (f a) (define x (f y)) @@ -2249,7 +2296,8 @@ [(p) (q)]) (list x y z)))) -(test-comp '(lambda (f a) +(test-comp #:except 'chez-scheme ;; !! schemify is not good enough here + '(lambda (f a) (letrec ([y (if (zero? a) (error "no") 8)] @@ -2266,9 +2314,11 @@ '(procedure? add1)) (test-comp '(lambda () #t) '(lambda () (procedure? add1))) -(test-comp #t +(test-comp #:except 'chez-scheme + #t '(procedure? (lambda (x) x))) -(test-comp '(lambda () #t) +(test-comp #:except 'chez-scheme + '(lambda () #t) '(lambda () (procedure? (lambda (x) x)))) (test-comp #f '(pair? (lambda (x) x))) @@ -2280,7 +2330,8 @@ 88)) '(let ([f (lambda (x) x)]) (list f))) -(test-comp '(let ([f (lambda (x) x)]) +(test-comp #:except 'chez-scheme + '(let ([f (lambda (x) x)]) (list f f @@ -2303,11 +2354,13 @@ (test-comp '(lambda (x) #f) '(lambda (x) (pair? (if x car cdr)))) -(test-comp '(lambda (x) #t) +(test-comp #:except 'chez-scheme + '(lambda (x) #t) '(lambda (x) (procedure? (if x car cdr)))) (test-comp '(lambda (x) #t) '(lambda (x) (fixnum? (if x 2 3)))) -(test-comp '(lambda (x) #f) +(test-comp #:except 'chez-scheme + '(lambda (x) #f) '(lambda (x) (procedure? (if x 2 3)))) (test-comp '(lambda () @@ -2377,7 +2430,8 @@ '(module m racket/base (printf "pre\n"))) -(test-comp '(module out racket/base +(test-comp #:except 'chez-scheme ; test harness `get-module-info` is not smart enough + '(module out racket/base (module in racket/base (provide inlinable-function) (define inlinable-function (lambda (x) (list 1 x 3)))) @@ -2390,7 +2444,8 @@ (require 'in) (lambda () (display (inlinable-function 2)) (inlinable-function 2)))) -(test-comp '(module out racket/base +(test-comp #:except 'chez-scheme ; test harness `get-module-info` is not smart enough + '(module out racket/base (module in racket/base (provide inlinable-function) (define inlinable-function (lambda (x) (list 1 x 3)))) @@ -2406,7 +2461,8 @@ (let ([try-equiv (lambda (extras) (lambda (a b) - (test-comp `(module m racket/base + (test-comp #:except 'chez-scheme ; apply is not primitive + `(module m racket/base (define (f x) (apply x ,@extras ,a))) `(module m racket/base @@ -2447,68 +2503,69 @@ (define (q x) (+ 1 (+ 1 (+ 1 (+ 1 (+ 1 (+ 1 (+ 1 (+ 1 (+ 1 (+ 1 (+ x 10)))))))))))))) -(let ([check (lambda (proc arities non-arities) - (test-comp `(procedure? ,proc) +(unless (eq? 'chez-scheme (system-type 'vm)) ; procedures are not primitivee + (let ([check (lambda (proc arities non-arities) + (test-comp `(procedure? ,proc) #t) - (test-comp `(module m racket/base - (define f ,proc) - (print (procedure? f))) - `(module m racket/base - (define f ,proc) - (print #t))) - (test-comp `(procedure-arity-includes? ,proc -1) - #t - #f) - (test-comp `(procedure-arity-includes? ,proc -1) - #f - #f) - (for-each - (lambda (a) - (test-comp `(procedure-arity-includes? ,proc ,a) - #t) - (test-comp `(module m racket/base - (define f ,proc) - (print (procedure-arity-includes? f ,a))) - `(module m racket/base - (define f ,proc) - (print #t)))) - arities) - (for-each - (lambda (a) - (test-comp `(procedure-arity-includes? ,proc ,a) - #f) - (test-comp `(module m racket/base - (define f ,proc) - (print (procedure-arity-includes? f ,a))) - `(module m racket/base - (define f ,proc) - (print #f)))) - non-arities))]) - (check '(lambda (x) x) '(1) '(0 2 3)) - (check '(lambda (x y) x) '(2) '(0 1 3)) - (check '(lambda (x . y) x) '(1 2 3) '(0)) - (check '(case-lambda [() 1] [(x y) x]) '(0 2) '(1 3)) - (check '(lambda (x [y #f]) y) '(1 2) '(0 3)) - (check 'integer? '(1) '(0 2 3)) - (check 'cons '(2) '(0 1 3)) - (check 'list '(0 1 2 3) '())) + (test-comp `(module m racket/base + (define f ,proc) + (print (procedure? f))) + `(module m racket/base + (define f ,proc) + (print #t))) + (test-comp `(procedure-arity-includes? ,proc -1) + #t + #f) + (test-comp `(procedure-arity-includes? ,proc -1) + #f + #f) + (for-each + (lambda (a) + (test-comp `(procedure-arity-includes? ,proc ,a) + #t) + (test-comp `(module m racket/base + (define f ,proc) + (print (procedure-arity-includes? f ,a))) + `(module m racket/base + (define f ,proc) + (print #t)))) + arities) + (for-each + (lambda (a) + (test-comp `(procedure-arity-includes? ,proc ,a) + #f) + (test-comp `(module m racket/base + (define f ,proc) + (print (procedure-arity-includes? f ,a))) + `(module m racket/base + (define f ,proc) + (print #f)))) + non-arities))]) + (check '(lambda (x) x) '(1) '(0 2 3)) + (check '(lambda (x y) x) '(2) '(0 1 3)) + (check '(lambda (x . y) x) '(1 2 3) '(0)) + (check '(case-lambda [() 1] [(x y) x]) '(0 2) '(1 3)) + (check '(lambda (x [y #f]) y) '(1 2) '(0 3)) + (check 'integer? '(1) '(0 2 3)) + (check 'cons '(2) '(0 1 3)) + (check 'list '(0 1 2 3) '())) -(test-comp '(lambda () (primitive? car)) - '(lambda () #t)) -(test-comp '(lambda () (procedure-arity-includes? car 1)) - '(lambda () #t)) -(test-comp '(lambda () (procedure-arity-includes? car 2)) - '(lambda () #f)) -(test-comp '(lambda () (procedure-arity-includes? (begin (random) car) 1)) - '(lambda () (random) #t)) -(test-comp '(lambda () (procedure-arity-includes? (begin (random) car) 2)) - '(lambda () (random) #f)) -(test-comp '(lambda () (procedure-arity-includes? (begin (random) car) 1)) - '(lambda () #t) - #f) -(test-comp '(lambda () (procedure-arity-includes? (begin (random) car) 2)) - '(lambda () #f) - #f) + (test-comp '(lambda () (primitive? car)) + '(lambda () #t)) + (test-comp '(lambda () (procedure-arity-includes? car 1)) + '(lambda () #t)) + (test-comp '(lambda () (procedure-arity-includes? car 2)) + '(lambda () #f)) + (test-comp '(lambda () (procedure-arity-includes? (begin (random) car) 1)) + '(lambda () (random) #t)) + (test-comp '(lambda () (procedure-arity-includes? (begin (random) car) 2)) + '(lambda () (random) #f)) + (test-comp '(lambda () (procedure-arity-includes? (begin (random) car) 1)) + '(lambda () #t) + #f) + (test-comp '(lambda () (procedure-arity-includes? (begin (random) car) 2)) + '(lambda () #f) + #f)) (test-comp '(lambda () (let ([l '(1 2)]) @@ -2534,7 +2591,8 @@ (test-multi 'list) (test-multi 'list*) (test-multi 'vector) - (test-multi 'vector-immutable))) + (unless (eq? 'chez-scheme (system-type 'vm)) ; !! vector-immutable is not primitive + (test-multi 'vector-immutable)))) (test-comp `(let ([x 5]) (let ([y (list*)]) x)) @@ -2575,15 +2633,18 @@ (test-pred 'keyword?) (test-pred 'string?) (test-pred 'bytes?) - (test-pred 'path?) + (unless (eq? 'chez-scheme (system-type 'vm)) + (test-pred 'path?)) (test-pred 'char?) (test-pred 'k:interned-char?) (test-pred 'boolean?) (test-pred 'chaperone?) (test-pred 'impersonator?) - (test-pred 'procedure?) + (unless (eq? 'chez-scheme (system-type 'vm)) + (test-pred 'procedure?)) (test-pred 'eof-object?) - (test-pred 'immutable?) + (unless (eq? 'chez-scheme (system-type 'vm)) + (test-pred 'immutable?)) (test-pred 'not) (test-pred 'k:true-object?)) @@ -2623,15 +2684,17 @@ (test-implies 'null? 'k:list-pair? '!=) (test-implies 'null? 'pair? '!=) (test-implies 'null? 'list?) - (test-implies 'k:list-pair? 'pair?) - (test-implies 'k:list-pair? 'list?) + (unless (eq? 'chez-scheme (system-type 'vm)) + (test-implies 'k:list-pair? 'pair?) + (test-implies 'k:list-pair? 'list?)) (test-implies 'list? 'pair? '?) (test-implies 'k:interned-char? 'char?) (test-implies 'not 'boolean?) (test-implies 'k:true-object? 'boolean?) ) -(test-comp '(lambda (z) +(test-comp #:except 'chez-scheme + '(lambda (z) (when (and (list? z) (pair? z)) (k:list-pair? z))) @@ -2639,7 +2702,8 @@ (when (and (list? z) (pair? z)) #t))) -(test-comp '(lambda (z) +(test-comp #:except 'chez-scheme + '(lambda (z) (when (and (list? z) (not (null? z))) (k:list-pair? z))) @@ -2647,7 +2711,8 @@ (when (and (list? z) (not (null? z))) #t))) -(test-comp '(lambda (z) +(test-comp #:except 'chez-scheme + '(lambda (z) (when (and (list? z) (not (pair? z))) (null? z))) @@ -2655,7 +2720,8 @@ (when (and (list? z) (not (pair? z))) #t))) -(test-comp '(lambda (z) +(test-comp #:except 'chez-scheme + '(lambda (z) (when (and (list? z) (not (k:list-pair? z))) (null? z))) @@ -2663,7 +2729,8 @@ (when (and (list? z) (not (k:list-pair? z))) #t))) -(test-comp '(lambda (z) +(test-comp #:except 'chez-scheme + '(lambda (z) (when (and (boolean? z) (not (k:true-object? z))) (not z))) @@ -2671,7 +2738,8 @@ (when (and (boolean? z) (not (k:true-object? z))) #t))) -(test-comp '(lambda (z) +(test-comp #:except 'chez-scheme + '(lambda (z) (when (and (boolean? z) (not (not z))) (k:true-object? z))) @@ -2731,19 +2799,20 @@ (test-reduce 'pair? '(cdr (list 1 2))) (test-reduce 'pair? '(cdr (list 1)) #f) - (test-reduce 'k:list-pair? 0 #f) - (test-reduce 'k:list-pair? ''() #f) - (test-reduce 'k:list-pair? ''(1)) - (test-reduce 'k:list-pair? ''(1 2)) - #;(test-reduce 'k:list-pair? ''(1 . 2) #f) - (test-reduce 'k:list-pair? '(list) #f) - (test-reduce 'k:list-pair? '(list 1)) - (test-reduce 'k:list-pair? '(list 1 2)) - #;(test-reduce 'k:list-pair? '(cons 1 2) #f) - (test-reduce 'k:list-pair? '(cons 1 null)) - (test-reduce 'k:list-pair? '(cons 1 (list 2 3))) - (test-reduce 'k:list-pair? '(cdr (list 1 2))) - (test-reduce 'k:list-pair? '(cdr (list 1)) #f) + (unless (eq? 'chez-scheme (system-type 'vm)) + (test-reduce 'k:list-pair? 0 #f) + (test-reduce 'k:list-pair? ''() #f) + (test-reduce 'k:list-pair? ''(1)) + (test-reduce 'k:list-pair? ''(1 2)) + #;(test-reduce 'k:list-pair? ''(1 . 2) #f) + (test-reduce 'k:list-pair? '(list) #f) + (test-reduce 'k:list-pair? '(list 1)) + (test-reduce 'k:list-pair? '(list 1 2)) + #;(test-reduce 'k:list-pair? '(cons 1 2) #f) + (test-reduce 'k:list-pair? '(cons 1 null)) + (test-reduce 'k:list-pair? '(cons 1 (list 2 3))) + (test-reduce 'k:list-pair? '(cdr (list 1 2))) + (test-reduce 'k:list-pair? '(cdr (list 1)) #f)) ) (test-comp '(lambda (z) @@ -5434,7 +5503,9 @@ (if (zero? v) (let ([vec (make-vector 6)]) (vector-set-performance-stats! vec (current-thread)) - (vector-ref vec 3)) + (if (eq? 'chez-scheme (system-type 'vm)) + 0 + (vector-ref vec 3))) (s? (sub1 v))))) (void (f 5)) ; JIT decides that `s?' is a struct predicate @@ -5444,7 +5515,9 @@ (define init-size (let ([vec (make-vector 6)]) (vector-set-performance-stats! vec (current-thread)) - (vector-ref vec 3))) + (if (eq? 'chez-scheme (system-type 'vm)) + 0 + (vector-ref vec 3)))) (define size (f 500000)) ; make sure that this still leads to a tail loop ((- size init-size) . < . 20000))) @@ -5454,7 +5527,7 @@ ;; make sure sfs pass doesn't add a nested begin0 ;; to clear the variables used in the first expression -(let () +(unless (eq? 'chez-scheme (system-type 'vm)) (define c '(module c racket/base (define z (let ([result (random)]) @@ -5674,7 +5747,7 @@ ;; Make sure the compiler unboxes the `v' ;; argument in the loop below: -(let () +(unless (eq? 'chez-scheme (system-type 'vm)) (define l '(module m racket/base (require racket/flonum) (define (f) @@ -5701,7 +5774,7 @@ ;; Make sure the compiler doesn't add a check for whether ;; `later` is defined in the body of `kw-proc`: -(let () +(unless (eq? 'chez-scheme (system-type 'vm)) (define l '(module m racket/base (define (kw-proc x #:optional [optional 0]) (later)) @@ -5719,7 +5792,7 @@ [v (application-rator (lam-body b))]) (test #t toplevel-const? v))) -(let () +(unless (eq? 'chez-scheme (system-type 'vm)) (define l '(module m racket/base (struct s (x)) (define (kw-proc x #:optional [optional 0]) @@ -5743,7 +5816,7 @@ ;; Originally: The validator should understand that a structure ;; constructor always succeeds: -(let () +(unless (eq? 'chez-scheme (system-type 'vm)) (define (go sub) (let ([e `(module m racket/base (provide bar) diff --git a/racket/src/cs/schemified/expander.scm b/racket/src/cs/schemified/expander.scm index 6549ae1ccd..d9782acb1a 100644 --- a/racket/src/cs/schemified/expander.scm +++ b/racket/src/cs/schemified/expander.scm @@ -5491,11 +5491,10 @@ (cons app_0 (hash-ref ht_0 code_0 null)))))) - (let ((app_1 (add1 (table-count pruned-t_0)))) - (table2.1 - app_0 - app_1 - (table-prune-at pruned-t_0)))))) + (table2.1 + app_0 + (add1 (table-count pruned-t_0)) + (table-prune-at pruned-t_0))))) (let ((or-part_1 (if (unsafe-box*-cas! b_0 t_0 new-t_0) v_0 #f))) (if or-part_1 @@ -5973,15 +5972,14 @@ (let ((app_0 (|#%app| 1/current-module-name-resolver))) - (let ((app_1 (module-path-index-path mpi4_0))) - (|#%app| - app_0 - app_1 - (module-path-index-resolve/maybe - (module-path-index-base mpi4_0) - load?3_0) - #f - load?3_0))) + (|#%app| + app_0 + (module-path-index-path mpi4_0) + (module-path-index-resolve/maybe + (module-path-index-base mpi4_0) + load?3_0) + #f + load?3_0)) (if log-performance? (end-performance-region) (void)))))) @@ -6283,9 +6281,8 @@ (if (1/module-path-index? mpi_0) (if (1/module-path-index? inside-mpi_0) (if (module-path-index-resolved mpi_0) - (eq? - (module-path-index-resolved mpi_0) - (module-path-index-resolved inside-mpi_0)) + (let ((app_0 (module-path-index-resolved mpi_0))) + (eq? app_0 (module-path-index-resolved inside-mpi_0))) #f) #f) #f))))) @@ -7383,7 +7380,7 @@ modified-content-scope-propagations+tamper (record-accessor struct:modified-content 1))) (define struct:syntax (make-record-type-descriptor* 'syntax #f #f #f #f 7 1)) -(define effect_2343 +(define effect_2357 (struct-type-install-properties! struct:syntax 'syntax @@ -7566,16 +7563,13 @@ 'share 'none))) (begin - (let ((app_0 - (serialize-state-sharing-syntaxes - state_0))) - (hash-set! - app_0 - s_0 - (if (datum-has-elements? - content_0) - new-sharing-mode_0 - 'none))) + (hash-set! + (serialize-state-sharing-syntaxes + state_0) + s_0 + (if (datum-has-elements? content_0) + new-sharing-mode_0 + 'none)) (if (if stx-state_0 (eq? new-sharing-mode_0 'none) #f) @@ -11043,11 +11037,10 @@ empty-binding-table ms_0 phase_0))) - (if (let ((app_0 (multi-scope-scopes ms_0))) - (unsafe-box*-cas! - app_0 - scopes_0 - (hash-set scopes_0 phase_0 s_0))) + (if (unsafe-box*-cas! + (multi-scope-scopes ms_0) + scopes_0 + (hash-set scopes_0 phase_0 s_0)) s_0 (multi-scope-to-scope-at-phase ms_0 phase_0)))))))) (define scope>? (lambda (sc1_0 sc2_0) (> (scope-id sc1_0) (scope-id sc2_0)))) @@ -11061,9 +11054,8 @@ (let ((p2_0 (shifted-multi-scope-phase sms2_0))) (if (shifted-to-label-phase? p1_0) (if (shifted-to-label-phase? p2_0) - (phasedefinitions ns10_0 phase-level11_0))) - (let ((app_0 (definitions-variables d_0))) - (instance-set-variable-value! - app_0 - name12_0 - val13_0 - (if as-constant?9_0 'constant #f))))))))) + (instance-set-variable-value! + (definitions-variables d_0) + name12_0 + val13_0 + (if as-constant?9_0 'constant #f)))))))) (case-lambda ((ns_0 phase-level_0 name_0 val_0) (namespace-set-variable!_0 ns_0 phase-level_0 name_0 val_0 #f)) @@ -16336,7 +16289,7 @@ (lambda (proc_0) (set! current-previously-unbound proc_0))) (define struct:module-use (make-record-type-descriptor* 'module-use #f #f #f #f 2 0)) -(define effect_2381 +(define effect_2861 (struct-type-install-properties! struct:module-use 'module-use @@ -16351,10 +16304,8 @@ (let ((a-mod_0 (module-use-module a_0))) (let ((b-mod_0 (module-use-module b_0))) (if (|#%app| eql?_0 a-mod_0 b-mod_0) - (if (|#%app| - eql?_0 - (module-use-phase a_0) - (module-use-phase b_0)) + (if (let ((app_0 (module-use-phase a_0))) + (|#%app| eql?_0 app_0 (module-use-phase b_0))) (call-with-values (lambda () (1/module-path-index-split a-mod_0)) (case-lambda @@ -16368,9 +16319,10 @@ a-path_1 (if b-path_0 b-path_0 - (eq? - (module-path-index-resolved a-mod_0) - (module-path-index-resolved b-mod_0)))))) + (let ((app_0 (module-path-index-resolved a-mod_0))) + (eq? + app_0 + (module-path-index-resolved b-mod_0))))))) (args (raise-binding-result-arity-error 2 args))))) (args (raise-binding-result-arity-error 2 args)))) #f) @@ -16771,10 +16723,13 @@ (let ((self_0 (module-self m52_0))) (let ((provides_0 (module-provides m52_0))) (begin-unsafe - (hash-set! - (bulk-binding-registry-table bulk-binding-registry_0) - mod-name53_0 - (bulk-provide13.1 self_0 provides_0)))))) + (let ((app_0 + (bulk-binding-registry-table + bulk-binding-registry_0))) + (hash-set! + app_0 + mod-name53_0 + (bulk-provide13.1 self_0 provides_0))))))) (|#%app| (|#%app| 1/current-module-name-resolver) mod-name53_0 @@ -17120,9 +17075,10 @@ (lambda (mi_0 check-available-at-phase-level_0 unavailable-callback_0) (let ((m_0 (module-instance-module mi_0))) (if (if m_0 - (if (let ((app_0 (module-min-phase-level m_0))) - (let ((app_1 (add1 check-available-at-phase-level_0))) - (<= app_0 app_1 (module-max-phase-level m_0)))) + (if (<= + (module-min-phase-level m_0) + (add1 check-available-at-phase-level_0) + (module-max-phase-level m_0)) (not (let ((small-ht_0 (module-instance-phase-level-to-state mi_0))) (let ((key_0 (add1 check-available-at-phase-level_0))) @@ -17714,9 +17670,11 @@ (namespace-run-available-modules!_0 ns_0 run-phase116_0))))) (define namespace-primitive-module-visit! (lambda (ns_0 name_0) - (let ((app_0 (namespace-module-instances ns_0))) - (let ((mi_0 (hash-ref app_0 (1/make-resolved-module-path name_0)))) - (run-module-instance!.1 #t 1 hash2610 null #f mi_0 ns_0))))) + (let ((mi_0 + (hash-ref + (namespace-module-instances ns_0) + (1/make-resolved-module-path name_0)))) + (run-module-instance!.1 #t 1 hash2610 null #f mi_0 ns_0)))) (define namespace-module-use->module+linklet-instances.1 (|#%name| namespace-module-use->module+linklet-instances @@ -17743,8 +17701,9 @@ (let ((small-ht_0 (namespace-phase-level-to-definitions m-ns_0))) (let ((d_0 (let ((key_0 (module-use-phase mu125_0))) - (begin-unsafe - (hash-ref (unbox small-ht_0) key_0 #f))))) + (let ((small-ht_1 small-ht_0)) + (begin-unsafe + (hash-ref (unbox small-ht_1) key_0 #f)))))) (if d_0 (values mi_0 (definitions-variables d_0)) (let ((app_0 @@ -17995,63 +17954,63 @@ (lambda (b_0 mi_0 id_0 in-s_0 what_0) (let ((m_0 (module-instance-module mi_0))) (if (if m_0 (not (module-no-protected? m_0)) #f) - (let ((or-part_0 (module-access m_0))) - (let ((access_0 - (if or-part_0 or-part_0 (module-compute-access! m_0)))) - (let ((a_0 - (let ((app_0 - (hash-ref - access_0 - (module-binding-phase b_0) - hash2610))) - (hash-ref app_0 (module-binding-sym b_0) 'unexported)))) - (if (let ((or-part_1 (eq? a_0 'unexported))) - (if or-part_1 or-part_1 (eq? a_0 'protected))) - (begin - (if (let ((or-part_1 - (let ((app_0 - (let ((or-part_1 (syntax-inspector id_0))) - (if or-part_1 - or-part_1 - (current-code-inspector))))) - (inspector-superior? - app_0 - (namespace-inspector - (module-instance-namespace mi_0)))))) - (if or-part_1 - or-part_1 - (if (module-binding-extra-inspector b_0) - (let ((app_0 (module-binding-extra-inspector b_0))) - (inspector-superior? - app_0 - (namespace-inspector - (module-instance-namespace mi_0)))) - #f))) - (void) - (let ((complain-id_0 - (let ((c-id_0 - (if in-s_0 in-s_0 (module-binding-sym b_0)))) - (if (not - (let ((app_0 - (if (syntax?$1 c-id_0) - (syntax-content c-id_0) - c-id_0))) - (eq? app_0 (syntax-content id_0)))) - c-id_0 - #f)))) - (raise-syntax-error$1 - #f - (format - "access disallowed by code inspector to ~a ~a\n from module: ~a" - a_0 - what_0 - (1/module-path-index-resolve - (namespace-mpi (module-instance-namespace mi_0)))) - complain-id_0 - id_0 - null))) - #t) - #f)))) + (let ((access_0 + (let ((or-part_0 (module-access m_0))) + (if or-part_0 or-part_0 (module-compute-access! m_0))))) + (let ((a_0 + (let ((app_0 + (hash-ref + access_0 + (module-binding-phase b_0) + hash2610))) + (hash-ref app_0 (module-binding-sym b_0) 'unexported)))) + (if (let ((or-part_0 (eq? a_0 'unexported))) + (if or-part_0 or-part_0 (eq? a_0 'protected))) + (begin + (if (let ((or-part_0 + (let ((app_0 + (let ((or-part_0 (syntax-inspector id_0))) + (if or-part_0 + or-part_0 + (current-code-inspector))))) + (inspector-superior? + app_0 + (namespace-inspector + (module-instance-namespace mi_0)))))) + (if or-part_0 + or-part_0 + (if (module-binding-extra-inspector b_0) + (let ((app_0 (module-binding-extra-inspector b_0))) + (inspector-superior? + app_0 + (namespace-inspector + (module-instance-namespace mi_0)))) + #f))) + (void) + (let ((complain-id_0 + (let ((c-id_0 + (if in-s_0 in-s_0 (module-binding-sym b_0)))) + (if (not + (let ((app_0 + (if (syntax?$1 c-id_0) + (syntax-content c-id_0) + c-id_0))) + (eq? app_0 (syntax-content id_0)))) + c-id_0 + #f)))) + (raise-syntax-error$1 + #f + (format + "access disallowed by code inspector to ~a ~a\n from module: ~a" + a_0 + what_0 + (1/module-path-index-resolve + (namespace-mpi (module-instance-namespace mi_0)))) + complain-id_0 + id_0 + null))) + #t) + #f))) #f)))) (define resolve+shift/extra-inspector (lambda (id_0 phase_0 ns_0) @@ -18154,7 +18113,7 @@ (define 1/make-set!-transformer (let ((struct:set!-transformer_0 (make-record-type-descriptor* 'set!-transformer #f #f #f #f 1 0))) - (let ((effect720 + (let ((effect699 (struct-type-install-properties! struct:set!-transformer_0 'set!-transformer @@ -20147,16 +20106,14 @@ sym_0 hash2725) null) - (let ((app_0 - (hash-ref - (table-with-bulk-bindings-syms - table_0) - sym_0 - hash2725))) - (values - app_0 - (table-with-bulk-bindings-bulk-bindings - table_0)))))) + (values + (hash-ref + (table-with-bulk-bindings-syms + table_0) + sym_0 + hash2725) + (table-with-bulk-bindings-bulk-bindings + table_0))))) (case-lambda ((ht_0 bulk-bindings_0) @@ -20370,131 +20327,131 @@ (unsafe-immutable-hash-iterate-key s-scs_0 i_0))) - (let ((table_0 - (scope-binding-table - sc_0))) - (let ((fold-var_2 - (let ((sym-ht_0 + (let ((fold-var_2 + (let ((sym-ht_0 + (let ((table_0 + (scope-binding-table + sc_0))) (if (hash? table_0) table_0 (table-with-bulk-bindings-syms - table_0)))) - (begin - #t - (letrec* - ((for-loop_2 - (|#%name| - for-loop - (lambda (fold-var_2 - state_0) - (begin - (if (car - state_0) - (let ((o-sym_0 - (vector-ref - (car - state_0) - 1))) - (let ((scs_0 + table_0))))) + (begin + #t + (letrec* + ((for-loop_2 + (|#%name| + for-loop + (lambda (fold-var_2 + state_0) + (begin + (if (car + state_0) + (let ((o-sym_0 + (vector-ref + (car + state_0) + 1))) + (let ((scs_0 + (let ((app_1 + (vector-ref + (car + state_0) + 2))) + (hash-iterate-key + app_1 + (cdr + state_0))))) + (let ((b_0 (let ((app_1 (vector-ref (car state_0) 2))) - (hash-iterate-key + (hash-iterate-value app_1 (cdr state_0))))) - (let ((b_0 - (let ((app_1 - (vector-ref - (car - state_0) - 2))) - (hash-iterate-value - app_1 - (cdr - state_0))))) - (let ((scs_1 - scs_0) - (o-sym_1 - o-sym_0)) - (let ((fold-var_3 - (if (eq? - o-sym_1 - sym_0) - fold-var_2 - (let ((fold-var_3 - (cons - (let ((app_1 - (scope-set->context - scs_1))) - (let ((app_2 - (classify-binding_0 - b_0))) - (hasheq - 'name - o-sym_1 - 'context - app_1 - 'match? - #f - app_2 - (extract-binding_0 - b_0)))) - fold-var_2))) - (values - fold-var_3))))) - (for-loop_2 - fold-var_3 - (let ((ht_0 - (vector-ref - (car - state_0) - 2))) - (let ((i_1 - (hash-iterate-next - ht_0 - (cdr - state_0)))) - (if i_1 - (cons + (let ((scs_1 + scs_0) + (o-sym_1 + o-sym_0)) + (let ((fold-var_3 + (if (eq? + o-sym_1 + sym_0) + fold-var_2 + (let ((fold-var_3 + (cons + (let ((app_1 + (scope-set->context + scs_1))) + (let ((app_2 + (classify-binding_0 + b_0))) + (hasheq + 'name + o-sym_1 + 'context + app_1 + 'match? + #f + app_2 + (extract-binding_0 + b_0)))) + fold-var_2))) + (values + fold-var_3))))) + (for-loop_2 + fold-var_3 + (let ((ht_0 + (vector-ref + (car + state_0) + 2))) + (let ((i_1 + (hash-iterate-next + ht_0 + (cdr + state_0)))) + (if i_1 + (cons + (car + state_0) + i_1) + (next-state-in-full-binding-table + sym-ht_0 + (hash-iterate-next + sym-ht_0 + (vector-ref (car state_0) - i_1) - (next-state-in-full-binding-table - sym-ht_0 - (hash-iterate-next - sym-ht_0 - (vector-ref - (car - state_0) - 0)))))))))))) - fold-var_2)))))) - (for-loop_2 - fold-var_1 - (letrec* - ((loop_0 - (|#%name| - loop - (lambda (sym-i_0) - (begin - (if sym-i_0 - (next-state-in-full-binding-table - sym-ht_0 - sym-i_0) - '(#f - . - #f))))))) - (loop_0 - (hash-iterate-first - sym-ht_0))))))))) - (for-loop_1 - fold-var_2 - (unsafe-immutable-hash-iterate-next - s-scs_0 - i_0))))) + 0)))))))))))) + fold-var_2)))))) + (for-loop_2 + fold-var_1 + (letrec* + ((loop_0 + (|#%name| + loop + (lambda (sym-i_0) + (begin + (if sym-i_0 + (next-state-in-full-binding-table + sym-ht_0 + sym-i_0) + '(#f + . + #f))))))) + (loop_0 + (hash-iterate-first + sym-ht_0))))))))) + (for-loop_1 + fold-var_2 + (unsafe-immutable-hash-iterate-next + s-scs_0 + i_0)))) fold-var_1)))))) (for-loop_1 null @@ -23712,11 +23669,15 @@ (if (eq? base_0 interned-base_0) mpi_0 (if (1/module-path-index? mpi_0) - (module-path-index2.1 - (module-path-index-path mpi_0) - interned-base_0 - (module-path-index-resolved mpi_0) - (module-path-index-shift-cache mpi_0)) + (let ((app_0 + (module-path-index-resolved + mpi_0))) + (module-path-index2.1 + (module-path-index-path mpi_0) + interned-base_0 + app_0 + (module-path-index-shift-cache + mpi_0))) (raise-argument-error 'struct-copy "module-path-index?" @@ -28847,30 +28808,27 @@ id27_0 phase28_0) (begin - (let ((app_0 (requires+provides-requires r+p26_0))) - (let ((at-mod_0 - (hash-ref! - app_0 - (begin-unsafe - (intern-module-path-index! - (requires+provides-require-mpis r+p26_0) - nominal-module18_0)) - make-hasheqv))) - (let ((sym-to-reqds_0 - (hash-ref! at-mod_0 nominal-require-phase19_0 make-hasheq))) - (let ((sym_0 (syntax-e$1 id27_0))) - (hash-set! - sym-to-reqds_0 - sym_0 - (let ((app_1 - (required2.1 - id27_0 - phase28_0 - can-be-shadowed?20_0 - as-transformer?21_0))) - (cons-ish - app_1 - (hash-ref sym-to-reqds_0 sym_0 null)))))))))))) + (let ((at-mod_0 + (hash-ref! + (requires+provides-requires r+p26_0) + (begin-unsafe + (intern-module-path-index! + (requires+provides-require-mpis r+p26_0) + nominal-module18_0)) + make-hasheqv))) + (let ((sym-to-reqds_0 + (hash-ref! at-mod_0 nominal-require-phase19_0 make-hasheq))) + (let ((sym_0 (syntax-e$1 id27_0))) + (hash-set! + sym-to-reqds_0 + sym_0 + (let ((app_0 + (required2.1 + id27_0 + phase28_0 + can-be-shadowed?20_0 + as-transformer?21_0))) + (cons-ish app_0 (hash-ref sym-to-reqds_0 sym_0 null))))))))))) (define add-bulk-required-ids!.1 (|#%name| add-bulk-required-ids! @@ -29042,12 +29000,11 @@ (let ((app_0 (datum->syntax$1 (bulk-required-s br_0) sym_0))) (let ((app_1 (phase+ phase_0 (bulk-required-provide-phase-level br_0)))) - (let ((app_2 (bulk-required-can-be-shadowed? br_0))) - (required2.1 - app_0 - app_1 - app_2 - (provided-as-transformer? binding/p_0)))))))))) + (required2.1 + app_0 + app_1 + (bulk-required-can-be-shadowed? br_0) + (provided-as-transformer? binding/p_0))))))))) (define normalize-required (lambda (r_0 mod-name_0 phase_0 sym_0) (if (bulk-required? r_0) @@ -29358,8 +29315,9 @@ (raise-syntax-error$1 #f "identifier out of context" id81_0) (let ((defined?_0 (if b_0 - (let ((app_0 (requires+provides-self r+p80_0))) - (eq? app_0 (module-binding-module b_0))) + (eq? + (requires+provides-self r+p80_0) + (module-binding-module b_0)) #f))) (if (if defined?_0 (not @@ -29570,13 +29528,11 @@ #f) (if only-can-can-shadow-require?_0 (void) - (let ((app_0 - (requires+provides-also-required - r+p80_0))) - (hash-set! - app_0 - (module-binding-sym b_0) - b_0)))) + (hash-set! + (requires+provides-also-required + r+p80_0) + (module-binding-sym b_0) + b_0))) (if (if remove-shadowed!?70_0 (not (null? reqds_0)) #f) @@ -29892,8 +29848,9 @@ (begin (if (if as-protected?90_0 (not - (let ((app_0 (module-binding-module immed-binding98_0))) - (eq? app_0 (requires+provides-self r+p94_0)))) + (eq? + (module-binding-module immed-binding98_0) + (requires+provides-self r+p94_0))) #f) (raise-syntax-error$1 #f @@ -30091,16 +30048,14 @@ (begin (if (provided? binding_1) - (let ((app_0 - (loop_0 - (provided-binding - binding_1)))) - (provided1.1 - app_0 - (provided-protected? - binding_1) - (provided-syntax? - binding_1))) + (provided1.1 + (loop_0 + (provided-binding + binding_1)) + (provided-protected? + binding_1) + (provided-syntax? + binding_1)) (binding-module-path-index-shift binding_1 from-mpi_0 @@ -33108,11 +33063,9 @@ (1/module-path-index-resolve (module-binding-module binding_0)))) (let ((temp327_0 - (let ((app_0 - (phase- - (module-binding-phase binding_0) - phase-level_0))) - (phase+ app_0 (namespace-phase m-ns_0))))) + (phase+ + (phase- (module-binding-phase binding_0) phase-level_0) + (namespace-phase m-ns_0)))) (let ((temp326_1 temp326_0)) (namespace->module-namespace.1 #f @@ -34058,12 +34011,16 @@ (let ((app_0 (faslable-> (faslable-correlated-e v_0)))) (datum->correlated app_0 - (vector - (faslable-correlated-source v_0) - (faslable-correlated-line v_0) - (faslable-correlated-column v_0) - (faslable-correlated-position v_0) - (faslable-correlated-span v_0)))))) + (let ((app_1 (faslable-correlated-source v_0))) + (let ((app_2 (faslable-correlated-line v_0))) + (let ((app_3 (faslable-correlated-column v_0))) + (let ((app_4 (faslable-correlated-position v_0))) + (vector + app_1 + app_2 + app_3 + app_4 + (faslable-correlated-span v_0)))))))))) (if props_0 (begin (letrec* @@ -34894,9 +34851,8 @@ (call-with-values (lambda () (if (namespace-scopes? original-scopes-s_0) - (values - (namespace-scopes-post original-scopes-s_0) - (namespace-scopes-other original-scopes-s_0)) + (let ((app_0 (namespace-scopes-post original-scopes-s_0))) + (values app_0 (namespace-scopes-other original-scopes-s_0))) (decode-namespace-scopes original-scopes-s_0))) (case-lambda ((old-scs-post_0 old-scs-other_0) @@ -34954,8 +34910,10 @@ (values app_0 (syntax-scope-set (vector-ref vec_0 1) 0)))))) (define namespace-scopes=? (lambda (nss1_0 nss2_0) - (if (set=? (namespace-scopes-post nss1_0) (namespace-scopes-post nss2_0)) - (set=? (namespace-scopes-other nss1_0) (namespace-scopes-other nss2_0)) + (if (let ((app_0 (namespace-scopes-post nss1_0))) + (set=? app_0 (namespace-scopes-post nss2_0))) + (let ((app_0 (namespace-scopes-other nss1_0))) + (set=? app_0 (namespace-scopes-other nss2_0))) #f))) (define struct:syntax-literals (make-record-type-descriptor* 'syntax-literals #f #f #f #f 2 3)) @@ -35392,100 +35350,101 @@ generate-lazy-syntax-literals! (lambda (skip-deserialize?4_0 sl6_0 mpis7_0 self8_0) (begin - (let ((app_0 + (let ((app_0 (list syntax-literals-id))) + (let ((app_1 + (list + 'define-values + app_0 + (list* 'make-vector (syntax-literals-count sl6_0) '(#f))))) + (list + app_1 + (let ((app_2 (list get-syntax-literal!-id))) (list 'define-values - (list syntax-literals-id) - (list* 'make-vector (syntax-literals-count sl6_0) '(#f))))) - (list - app_0 - (let ((app_1 (list get-syntax-literal!-id))) - (list - 'define-values - app_1 - (list - 'lambda - '(pos) - (let ((app_2 - (list - (list - '(ready-stx) - (list* - 'unsafe-vector*-ref - syntax-literals-id - '(pos)))))) - (list - 'let-values - app_2 - (list - 'if - 'ready-stx - 'ready-stx - (list* - 'begin - (let ((app_3 - (if skip-deserialize?4_0 - null - (list - (list - 'if - (list* - 'unsafe-vector*-ref - deserialized-syntax-vector-id - '(0)) - '(void) - (list - deserialize-syntax-id - bulk-binding-registry-id)))))) - (qq-append - app_3 - (list - (let ((app_4 + app_2 + (list + 'lambda + '(pos) + (let ((app_3 + (list + (list + '(ready-stx) + (list* + 'unsafe-vector*-ref + syntax-literals-id + '(pos)))))) + (list + 'let-values + app_3 + (list + 'if + 'ready-stx + 'ready-stx + (list* + 'begin + (let ((app_4 + (if skip-deserialize?4_0 + null (list (list - '(stx) - (let ((app_4 - (list - 'syntax-shift-phase-level - (list* - 'unsafe-vector*-ref - deserialized-syntax-vector-id - '(pos)) - phase-shift-id))) - (list - 'syntax-module-path-index-shift - app_4 - (add-module-path-index! mpis7_0 self8_0) - self-id - inspector-id)))))) - (list - 'let-values - app_4 - (list* - 'letrec-values - (list - (list - '(loop) - (list - 'lambda - '() - (list - 'begin - (list* - 'vector-cas! - syntax-literals-id - '(pos #f stx)) - (list* - 'let-values + 'if + (list* + 'unsafe-vector*-ref + deserialized-syntax-vector-id + '(0)) + '(void) + (list + deserialize-syntax-id + bulk-binding-registry-id)))))) + (qq-append + app_4 + (list + (let ((app_5 (list (list - '(new-stx) - (list* - 'unsafe-vector*-ref - syntax-literals-id - '(pos)))) - '((if new-stx new-stx (loop)))))))) - '((loop))))))))))))))))))))) + '(stx) + (let ((app_5 + (list + 'syntax-shift-phase-level + (list* + 'unsafe-vector*-ref + deserialized-syntax-vector-id + '(pos)) + phase-shift-id))) + (list + 'syntax-module-path-index-shift + app_5 + (add-module-path-index! mpis7_0 self8_0) + self-id + inspector-id)))))) + (list + 'let-values + app_5 + (list* + 'letrec-values + (list + (list + '(loop) + (list + 'lambda + '() + (list + 'begin + (list* + 'vector-cas! + syntax-literals-id + '(pos #f stx)) + (list* + 'let-values + (list + (list + '(new-stx) + (list* + 'unsafe-vector*-ref + syntax-literals-id + '(pos)))) + '((if new-stx new-stx (loop)))))))) + '((loop)))))))))))))))))))))) (define generate-lazy-syntax-literals-data! (lambda (sl_0 mpis_0) (if (begin-unsafe (null? (syntax-literals-stxes sl_0))) @@ -35791,10 +35750,10 @@ (let ((fold-var_1 (let ((fold-var_1 (cons - (let ((lst_1 - (header-require-vars-in-order - header_0))) - (let ((extra-inspectorss_0 + (let ((extra-inspectorss_0 + (let ((lst_1 + (header-require-vars-in-order + header_0))) (begin (letrec* ((for-loop_1 @@ -35881,11 +35840,11 @@ table_0)))))) (for-loop_1 hash2725 - lst_1))))) - (if (hash-count - extra-inspectorss_0) - extra-inspectorss_0 - #f))) + lst_1)))))) + (if (hash-count + extra-inspectorss_0) + extra-inspectorss_0 + #f)) fold-var_0))) (values fold-var_1)))) (for-loop_0 fold-var_1 rest_0)))) @@ -36967,15 +36926,18 @@ (let ((extra-inspectorss_0 (unsafe-car lst_1))) (let ((rest_1 (unsafe-cdr lst_1))) (let ((fold-var_1 - (cons - (module-use*1.1 - (module-use-module mu_0) - (module-use-phase mu_0) - extra-inspectorss_0 - #f) - fold-var_0))) - (let ((fold-var_2 (values fold-var_1))) - (for-loop_0 fold-var_2 rest_0 rest_1))))))) + (let ((fold-var_1 + (cons + (let ((app_0 + (module-use-module mu_0))) + (module-use*1.1 + app_0 + (module-use-phase mu_0) + extra-inspectorss_0 + #f)) + fold-var_0))) + (values fold-var_1)))) + (for-loop_0 fold-var_1 rest_0 rest_1)))))) fold-var_0)))))) (for-loop_0 null mus_0 extra-inspectorsss_0)))) (reverse$1 @@ -36990,15 +36952,17 @@ (let ((mu_0 (unsafe-car lst_0))) (let ((rest_0 (unsafe-cdr lst_0))) (let ((fold-var_1 - (cons - (module-use*1.1 - (module-use-module mu_0) - (module-use-phase mu_0) - #f - #f) - fold-var_0))) - (let ((fold-var_2 (values fold-var_1))) - (for-loop_0 fold-var_2 rest_0))))) + (let ((fold-var_1 + (cons + (let ((app_0 (module-use-module mu_0))) + (module-use*1.1 + app_0 + (module-use-phase mu_0) + #f + #f)) + fold-var_0))) + (values fold-var_1)))) + (for-loop_0 fold-var_1 rest_0)))) fold-var_0)))))) (for-loop_0 null mus_0))))))) (define module-uses-strip-extra-inspectorsss @@ -37015,13 +36979,15 @@ (let ((mu*_0 (unsafe-car lst_0))) (let ((rest_0 (unsafe-cdr lst_0))) (let ((fold-var_1 - (cons - (module-use1.1 - (module-use-module mu*_0) - (module-use-phase mu*_0)) - fold-var_0))) - (let ((fold-var_2 (values fold-var_1))) - (for-loop_0 fold-var_2 rest_0))))) + (let ((fold-var_1 + (cons + (let ((app_0 (module-use-module mu*_0))) + (module-use1.1 + app_0 + (module-use-phase mu*_0))) + fold-var_0))) + (values fold-var_1)))) + (for-loop_0 fold-var_1 rest_0)))) fold-var_0)))))) (for-loop_0 null mu*s_0)))))) (define module-uses-extract-extra-inspectorsss @@ -37039,11 +37005,12 @@ (let ((mu*_0 (unsafe-car lst_0))) (let ((rest_0 (unsafe-cdr lst_0))) (let ((fold-var_1 - (cons - (module-use*-extra-inspectorss mu*_0) - fold-var_0))) - (let ((fold-var_2 (values fold-var_1))) - (for-loop_0 fold-var_2 rest_0))))) + (let ((fold-var_1 + (cons + (module-use*-extra-inspectorss mu*_0) + fold-var_0))) + (values fold-var_1)))) + (for-loop_0 fold-var_1 rest_0)))) fold-var_0)))))) (for-loop_0 null mu*s_0)))) (reverse$1 @@ -37526,17 +37493,15 @@ (if (parsed-begin-for-syntax? body_0) (let ((app_0 - (parsed-begin-for-syntax-body - body_0))) - (let ((app_1 - (add1 - phase_1))) - (loop!_0 - app_0 - app_1 - (find-or-create-header!_0 - (add1 - phase_1))))) + (add1 + phase_1))) + (loop!_0 + (parsed-begin-for-syntax-body + body_0) + app_0 + (find-or-create-header!_0 + (add1 + phase_1)))) (void))) (for-loop_0 rest_0)))) @@ -37685,143 +37650,139 @@ (for-loop_1 null binding-syms_0))))))) - (let ((app_0 - (parsed-define-values-rhs - body_0))) - (let ((rhs_0 - (let ((app_1 - (if (compile-context? - cctx33_0) - (compile-context1.1 - (compile-context-namespace - cctx33_0) - phase_1 - (compile-context-self - cctx33_0) - (compile-context-module-self - cctx33_0) - (compile-context-full-module-name - cctx33_0) - (compile-context-lazy-syntax-literals? - cctx33_0) - header_0) - (raise-argument-error - 'struct-copy - "compile-context?" - cctx33_0)))) - (compile$2 - app_0 - app_1 - (if (= - (length - ids_0) - 1) - (car - ids_0) - #f))))) - (begin - (|#%app| - definition-callback9_0) - (let ((app_1 - (length - def-syms_0))) - (|#%app| - compiled-expression-callback8_0 - rhs_0 - app_1 - phase_1 - (as-required?_0 - header_0))) - (add-body!_0 - phase_1 - (let ((app_1 - (correlate* - (parsed-s - body_0) - (list - 'define-values - def-syms_0 - rhs_0)))) - (propagate-inline-property - app_1 - (parsed-s - body_0)))) - (if (let ((or-part_0 + (let ((rhs_0 + (let ((app_0 + (if (compile-context? + cctx33_0) + (compile-context1.1 + (compile-context-namespace + cctx33_0) + phase_1 + (compile-context-self + cctx33_0) (compile-context-module-self - cctx33_0))) - (if or-part_0 - or-part_0 - (null? - ids_0))) - (void) - (begin - (add-body!_0 - phase_1 - (list* - 'if - #f - (list* - 'begin - (reverse$1 - (begin - (letrec* - ((for-loop_1 - (|#%name| - for-loop - (lambda (fold-var_0 - lst_1) - (begin - (if (pair? - lst_1) - (let ((def-sym_0 - (unsafe-car - lst_1))) - (let ((rest_1 - (unsafe-cdr - lst_1))) - (let ((fold-var_1 - (cons - (list* - 'set! - def-sym_0 - '(#f)) - fold-var_0))) - (let ((fold-var_2 - (values - fold-var_1))) - (for-loop_1 - fold-var_2 - rest_1))))) - fold-var_0)))))) - (for-loop_1 - null - def-syms_0))))) - '((void)))) - (add-body!_0 - phase_1 - (compile-top-level-bind - ids_0 - binding-syms_0 - (if (compile-context? - cctx33_0) - (compile-context1.1 - (compile-context-namespace - cctx33_0) - phase_1 - (compile-context-self - cctx33_0) + cctx33_0) + (compile-context-full-module-name + cctx33_0) + (compile-context-lazy-syntax-literals? + cctx33_0) + header_0) + (raise-argument-error + 'struct-copy + "compile-context?" + cctx33_0)))) + (compile$2 + (parsed-define-values-rhs + body_0) + app_0 + (if (= + (length + ids_0) + 1) + (car + ids_0) + #f))))) + (begin + (|#%app| + definition-callback9_0) + (let ((app_0 + (length + def-syms_0))) + (|#%app| + compiled-expression-callback8_0 + rhs_0 + app_0 + phase_1 + (as-required?_0 + header_0))) + (add-body!_0 + phase_1 + (propagate-inline-property + (correlate* + (parsed-s + body_0) + (list + 'define-values + def-syms_0 + rhs_0)) + (parsed-s + body_0))) + (if (let ((or-part_0 (compile-context-module-self - cctx33_0) - (compile-context-full-module-name - cctx33_0) - (compile-context-lazy-syntax-literals? - cctx33_0) - header_0) - (raise-argument-error - 'struct-copy - "compile-context?" - cctx33_0)) - #f)))))))))) + cctx33_0))) + (if or-part_0 + or-part_0 + (null? + ids_0))) + (void) + (begin + (add-body!_0 + phase_1 + (list* + 'if + #f + (list* + 'begin + (reverse$1 + (begin + (letrec* + ((for-loop_1 + (|#%name| + for-loop + (lambda (fold-var_0 + lst_1) + (begin + (if (pair? + lst_1) + (let ((def-sym_0 + (unsafe-car + lst_1))) + (let ((rest_1 + (unsafe-cdr + lst_1))) + (let ((fold-var_1 + (cons + (list* + 'set! + def-sym_0 + '(#f)) + fold-var_0))) + (let ((fold-var_2 + (values + fold-var_1))) + (for-loop_1 + fold-var_2 + rest_1))))) + fold-var_0)))))) + (for-loop_1 + null + def-syms_0))))) + '((void)))) + (add-body!_0 + phase_1 + (compile-top-level-bind + ids_0 + binding-syms_0 + (if (compile-context? + cctx33_0) + (compile-context1.1 + (compile-context-namespace + cctx33_0) + phase_1 + (compile-context-self + cctx33_0) + (compile-context-module-self + cctx33_0) + (compile-context-full-module-name + cctx33_0) + (compile-context-lazy-syntax-literals? + cctx33_0) + header_0) + (raise-argument-error + 'struct-copy + "compile-context?" + cctx33_0)) + #f))))))))) (if (parsed-define-syntaxes? body_0) (let ((ids_0 @@ -37877,169 +37838,165 @@ (for-loop_1 null binding-syms_0)))))) - (let ((app_0 - (parsed-define-syntaxes-rhs - body_0))) - (let ((rhs_0 - (compile$2 - app_0 - (if (compile-context? - cctx33_0) - (let ((phase71_0 - (add1 - phase_1))) - (compile-context1.1 - (compile-context-namespace - cctx33_0) - phase71_0 - (compile-context-self - cctx33_0) - (compile-context-module-self - cctx33_0) - (compile-context-full-module-name - cctx33_0) - (compile-context-lazy-syntax-literals? - cctx33_0) - next-header_0)) - (raise-argument-error - 'struct-copy - "compile-context?" - cctx33_0))))) - (begin - (|#%app| - definition-callback9_0) - (begin - (let ((app_1 - (length - gen-syms_0))) - (let ((app_2 + (let ((rhs_0 + (compile$2 + (parsed-define-syntaxes-rhs + body_0) + (if (compile-context? + cctx33_0) + (let ((phase71_0 (add1 phase_1))) - (|#%app| - compiled-expression-callback8_0 - rhs_0 - app_1 - app_2 - (as-required?_0 - header_0)))) - (let ((transformer-set!s_0 - (reverse$1 - (begin - (letrec* - ((for-loop_1 - (|#%name| - for-loop - (lambda (fold-var_0 - lst_1 + (compile-context1.1 + (compile-context-namespace + cctx33_0) + phase71_0 + (compile-context-self + cctx33_0) + (compile-context-module-self + cctx33_0) + (compile-context-full-module-name + cctx33_0) + (compile-context-lazy-syntax-literals? + cctx33_0) + next-header_0)) + (raise-argument-error + 'struct-copy + "compile-context?" + cctx33_0))))) + (begin + (|#%app| + definition-callback9_0) + (begin + (let ((app_0 + (length + gen-syms_0))) + (let ((app_1 + (add1 + phase_1))) + (|#%app| + compiled-expression-callback8_0 + rhs_0 + app_0 + app_1 + (as-required?_0 + header_0)))) + (let ((transformer-set!s_0 + (reverse$1 + (begin + (letrec* + ((for-loop_1 + (|#%name| + for-loop + (lambda (fold-var_0 + lst_1 + lst_2) + (begin + (if (if (pair? + lst_1) + (pair? lst_2) - (begin - (if (if (pair? - lst_1) - (pair? - lst_2) - #f) - (let ((binding-sym_0 - (unsafe-car + #f) + (let ((binding-sym_0 + (unsafe-car + lst_1))) + (let ((rest_1 + (unsafe-cdr lst_1))) - (let ((rest_1 - (unsafe-cdr - lst_1))) - (let ((gen-sym_0 - (unsafe-car + (let ((gen-sym_0 + (unsafe-car + lst_2))) + (let ((rest_2 + (unsafe-cdr lst_2))) - (let ((rest_2 - (unsafe-cdr - lst_2))) - (let ((fold-var_1 - (cons - (list - set-transformer!-id - (list - 'quote - binding-sym_0) - gen-sym_0) - fold-var_0))) - (let ((fold-var_2 - (values - fold-var_1))) - (for-loop_1 - fold-var_2 - rest_1 - rest_2))))))) - fold-var_0)))))) - (for-loop_1 - null - binding-syms_0 - gen-syms_0)))))) - (begin - (if (compile-context-module-self - cctx33_0) - (let ((app_1 - (add1 - phase_1))) - (add-body!_0 - app_1 - (let ((app_2 - (list - (list - gen-syms_0 - rhs_0)))) - (list - 'let-values - app_2 - (list* - 'begin - (qq-append - transformer-set!s_0 - '((void)))))))) - (let ((app_1 - (add1 - phase_1))) - (add-body!_0 - app_1 - (generate-top-level-define-syntaxes - gen-syms_0 - rhs_0 - transformer-set!s_0 - (compile-top-level-bind - ids_0 - binding-syms_0 - (if (compile-context? - cctx33_0) - (compile-context1.1 - (compile-context-namespace - cctx33_0) - phase_1 - (compile-context-self - cctx33_0) - (compile-context-module-self - cctx33_0) - (compile-context-full-module-name - cctx33_0) - (compile-context-lazy-syntax-literals? - cctx33_0) - header_0) - (raise-argument-error - 'struct-copy - "compile-context?" - cctx33_0)) - gen-syms_0))))) - (set! saw-define-syntaxes?_0 - #t))))))))))) + (let ((fold-var_1 + (cons + (list + set-transformer!-id + (list + 'quote + binding-sym_0) + gen-sym_0) + fold-var_0))) + (let ((fold-var_2 + (values + fold-var_1))) + (for-loop_1 + fold-var_2 + rest_1 + rest_2))))))) + fold-var_0)))))) + (for-loop_1 + null + binding-syms_0 + gen-syms_0)))))) + (begin + (if (compile-context-module-self + cctx33_0) + (let ((app_0 + (add1 + phase_1))) + (add-body!_0 + app_0 + (let ((app_1 + (list + (list + gen-syms_0 + rhs_0)))) + (list + 'let-values + app_1 + (list* + 'begin + (qq-append + transformer-set!s_0 + '((void)))))))) + (let ((app_0 + (add1 + phase_1))) + (add-body!_0 + app_0 + (generate-top-level-define-syntaxes + gen-syms_0 + rhs_0 + transformer-set!s_0 + (compile-top-level-bind + ids_0 + binding-syms_0 + (if (compile-context? + cctx33_0) + (compile-context1.1 + (compile-context-namespace + cctx33_0) + phase_1 + (compile-context-self + cctx33_0) + (compile-context-module-self + cctx33_0) + (compile-context-full-module-name + cctx33_0) + (compile-context-lazy-syntax-literals? + cctx33_0) + header_0) + (raise-argument-error + 'struct-copy + "compile-context?" + cctx33_0)) + gen-syms_0))))) + (set! saw-define-syntaxes?_0 + #t)))))))))) (if (parsed-begin-for-syntax? body_0) (let ((app_0 - (parsed-begin-for-syntax-body - body_0))) - (let ((app_1 - (add1 - phase_1))) - (loop!_0 - app_0 - app_1 - (find-or-create-header!_0 - (add1 - phase_1))))) + (add1 + phase_1))) + (loop!_0 + (parsed-begin-for-syntax-body + body_0) + app_0 + (find-or-create-header!_0 + (add1 + phase_1)))) (if (let ((or-part_0 (|parsed-#%declare?| body_0))) @@ -38274,11 +38231,13 @@ phase-to-header_0 phase_1)))) (let ((module-use*s_0 - (module-uses-add-extra-inspectorsss - (link-info-link-module-uses - li_0) - (link-info-extra-inspectorsss - li_0)))) + (let ((app_0 + (link-info-link-module-uses + li_0))) + (module-uses-add-extra-inspectorsss + app_0 + (link-info-extra-inspectorsss + li_0))))) (let ((body-linklet_0 (let ((app_0 (qq-append @@ -38920,109 +38879,103 @@ insp_0))) (void)) (if mli_0 - (let ((app_0 - (module-linklet-info-linklet-or-instance - mli_0))) - (values - app_0 - (if (module-linklet-info-module-uses mli_0) - (list->vector - (append - '(#f #f) - (let ((mus_0 - (module-linklet-info-module-uses + (values + (module-linklet-info-linklet-or-instance mli_0) + (if (module-linklet-info-module-uses mli_0) + (list->vector + (append + '(#f #f) + (let ((mus_0 + (module-linklet-info-module-uses mli_0))) + (let ((extra-inspectorsss_0 + (module-linklet-info-extra-inspectorsss mli_0))) - (let ((extra-inspectorsss_0 - (module-linklet-info-extra-inspectorsss - mli_0))) - (reverse$1 - (let ((lst_0 - (linklet-import-variables - (module-linklet-info-linklet-or-instance - mli_0)))) - (let ((lst_1 - (if extra-inspectorsss_0 - extra-inspectorsss_0 - mus_0))) - (let ((lst_2 lst_0)) - (begin - (letrec* - ((for-loop_0 - (|#%name| - for-loop - (lambda (fold-var_0 - lst_3 - lst_4 - lst_5) - (begin - (if (if (pair? lst_3) - (if (pair? lst_4) - (pair? lst_5) - #f) + (reverse$1 + (let ((lst_0 + (linklet-import-variables + (module-linklet-info-linklet-or-instance + mli_0)))) + (let ((lst_1 + (if extra-inspectorsss_0 + extra-inspectorsss_0 + mus_0))) + (let ((lst_2 lst_0)) + (begin + (letrec* + ((for-loop_0 + (|#%name| + for-loop + (lambda (fold-var_0 + lst_3 + lst_4 + lst_5) + (begin + (if (if (pair? lst_3) + (if (pair? lst_4) + (pair? lst_5) #f) - (let ((sub-mu_0 - (unsafe-car + #f) + (let ((sub-mu_0 + (unsafe-car + lst_3))) + (let ((rest_0 + (unsafe-cdr lst_3))) - (let ((rest_0 - (unsafe-cdr - lst_3))) - (let ((imports_0 - (unsafe-car + (let ((imports_0 + (unsafe-car + lst_4))) + (let ((rest_1 + (unsafe-cdr lst_4))) - (let ((rest_1 - (unsafe-cdr - lst_4))) - (let ((extra-inspectorss_0 - (unsafe-car + (let ((extra-inspectorss_0 + (unsafe-car + lst_5))) + (let ((rest_2 + (unsafe-cdr lst_5))) - (let ((rest_2 - (unsafe-cdr - lst_5))) - (let ((fold-var_1 - (let ((fold-var_1 - (cons - (intern-module-use*_0 - (let ((app_1 + (let ((fold-var_1 + (let ((fold-var_1 + (cons + (intern-module-use*_0 + (let ((app_0 + (let ((app_0 + (module-use-module + sub-mu_0))) (module-path-index-shift - (module-use-module - sub-mu_0) + app_0 (module-linklet-info-self mli_0) (module-use-module - mu*-or-instance_0)))) - (let ((app_2 - (module-use-phase - sub-mu_0))) - (let ((app_3 - (module-linklet-info-inspector - mli_0))) - (let ((app_4 - (module-linklet-info-extra-inspector - mli_0))) - (module-use+extra-inspectors - app_1 - app_2 - imports_0 - app_3 - app_4 - (if extra-inspectorsss_0 - extra-inspectorss_0 - #f))))))) - fold-var_0))) - (values - fold-var_1)))) - (for-loop_0 - fold-var_1 - rest_0 - rest_1 - rest_2)))))))) - fold-var_0)))))) - (for-loop_0 - null - mus_0 - lst_2 - lst_1))))))))))) - #f))) + mu*-or-instance_0))))) + (let ((app_1 + (module-use-phase + sub-mu_0))) + (module-use+extra-inspectors + app_0 + app_1 + imports_0 + (module-linklet-info-inspector + mli_0) + (module-linklet-info-extra-inspector + mli_0) + (if extra-inspectorsss_0 + extra-inspectorss_0 + #f))))) + fold-var_0))) + (values + fold-var_1)))) + (for-loop_0 + fold-var_1 + rest_0 + rest_1 + rest_2)))))))) + fold-var_0)))))) + (for-loop_0 + null + mus_0 + lst_2 + lst_1))))))))))) + #f)) (values #f #f))))) (values #f #f)))))))))) (define build-shared-data-linklet.1 @@ -43602,98 +43555,99 @@ mi_0))) (if (module-no-protected? m_0) (void) - (let ((or-part_0 - (module-access m_0))) - (let ((access_0 + (let ((access_0 + (let ((or-part_0 + (module-access + m_0))) (if or-part_0 or-part_0 (module-compute-access! - m_0)))) + m_0))))) + (begin (begin - (begin - (letrec* - ((for-loop_1 - (|#%name| - for-loop - (lambda (lst_7) - (begin - (if (pair? - lst_7) - (let ((import-sym_0 - (unsafe-car + (letrec* + ((for-loop_1 + (|#%name| + for-loop + (lambda (lst_7) + (begin + (if (pair? + lst_7) + (let ((import-sym_0 + (unsafe-car + lst_7))) + (let ((rest_4 + (unsafe-cdr lst_7))) - (let ((rest_4 - (unsafe-cdr - lst_7))) - (begin - (let ((a_0 - (hash-ref - (hash-ref - access_0 - (module-use-phase - mu_0) - hash2610) - import-sym_0 - 'unexported))) - (if (let ((or-part_1 - (eq? - a_0 - 'unexported))) - (if or-part_1 - or-part_1 - (eq? - a_0 - 'protected))) - (let ((guard-insp_0 - (namespace-inspector - (module-instance-namespace - mi_0)))) - (if (let ((or-part_1 - (inspector-superior? - insp6_0 - guard-insp_0))) - (if or-part_1 - or-part_1 - (let ((or-part_2 - (if extra-inspector7_0 - (inspector-superior? - extra-inspector7_0 - guard-insp_0) - #f))) - (if or-part_2 - or-part_2 - (if extra-inspectorsss8_0 - (if extra-inspectorss_0 - (extra-inspectors-allow? - (hash-ref - extra-inspectorss_0 - import-sym_0 - #f) - guard-insp_0) + (begin + (let ((a_0 + (hash-ref + (hash-ref + access_0 + (module-use-phase + mu_0) + hash2610) + import-sym_0 + 'unexported))) + (if (let ((or-part_0 + (eq? + a_0 + 'unexported))) + (if or-part_0 + or-part_0 + (eq? + a_0 + 'protected))) + (let ((guard-insp_0 + (namespace-inspector + (module-instance-namespace + mi_0)))) + (if (let ((or-part_0 + (inspector-superior? + insp6_0 + guard-insp_0))) + (if or-part_0 + or-part_0 + (let ((or-part_1 + (if extra-inspector7_0 + (inspector-superior? + extra-inspector7_0 + guard-insp_0) + #f))) + (if or-part_1 + or-part_1 + (if extra-inspectorsss8_0 + (if extra-inspectorss_0 + (extra-inspectors-allow? + (hash-ref + extra-inspectorss_0 + import-sym_0 #f) - #f))))) - (void) - (let ((app_0 - (string-append - "access disallowed by code inspector to ~a variable\n" - " variable: ~s\n" - " from module: ~a"))) - (error - 'link - app_0 - a_0 - import-sym_0 - (1/module-path-index-resolve - (namespace-mpi - (module-instance-namespace - mi_0))))))) - (void))) - (for-loop_1 - rest_4)))) - (values))))))) - (for-loop_1 - import-syms_0))) - (void)))))) + guard-insp_0) + #f) + #f))))) + (void) + (let ((app_0 + (string-append + "access disallowed by code inspector to ~a variable\n" + " variable: ~s\n" + " from module: ~a"))) + (error + 'link + app_0 + a_0 + import-sym_0 + (1/module-path-index-resolve + (namespace-mpi + (module-instance-namespace + mi_0))))))) + (void))) + (for-loop_1 + rest_4)))) + (values))))))) + (for-loop_1 + import-syms_0))) + (void))))) (for-loop_0 rest_0 rest_1 @@ -43711,28 +43665,28 @@ (let ((m_0 (module-instance-module mi_0))) (if (module-no-protected? m_0) #t - (let ((or-part_0 (module-access m_0))) - (let ((access_0 - (if or-part_0 or-part_0 (module-compute-access! m_0)))) - (let ((a_0 - (hash-ref - (hash-ref access_0 phase_0 hash2610) - sym_0 - 'unexported))) - (if (let ((or-part_1 (eq? a_0 'unexported))) - (if or-part_1 or-part_1 (eq? a_0 'protected))) - (let ((guard-insp_0 - (namespace-inspector (module-instance-namespace mi_0)))) - (let ((or-part_1 - (if insp_0 - (inspector-superior? insp_0 guard-insp_0) - #f))) - (if or-part_1 - or-part_1 - (inspector-superior? - (current-code-inspector) - guard-insp_0)))) - #t)))))))) + (let ((access_0 + (let ((or-part_0 (module-access m_0))) + (if or-part_0 or-part_0 (module-compute-access! m_0))))) + (let ((a_0 + (hash-ref + (hash-ref access_0 phase_0 hash2610) + sym_0 + 'unexported))) + (if (let ((or-part_0 (eq? a_0 'unexported))) + (if or-part_0 or-part_0 (eq? a_0 'protected))) + (let ((guard-insp_0 + (namespace-inspector (module-instance-namespace mi_0)))) + (let ((or-part_0 + (if insp_0 + (inspector-superior? insp_0 guard-insp_0) + #f))) + (if or-part_0 + or-part_0 + (inspector-superior? + (current-code-inspector) + guard-insp_0)))) + #t))))))) (define cell.1$3 (unsafe-make-place-local (make-weak-hasheq))) (define module-cache-place-init! (lambda () (unsafe-place-local-set! cell.1$3 (make-weak-hasheq)))) @@ -44646,18 +44600,21 @@ (compiled-in-memory-mpis cim_0)))) (define make-declaration-instance-from-compiled-in-memory (lambda (cim_0) - (make-instance - 'decl - #f - 'constant - 'self-mpi - (compiled-in-memory-original-self cim_0) - 'requires - (compiled-in-memory-requires cim_0) - 'provides - (compiled-in-memory-provides cim_0) - 'phase-to-link-modules - (compiled-in-memory-phase-to-link-module-uses cim_0)))) + (let ((app_0 (compiled-in-memory-original-self cim_0))) + (let ((app_1 (compiled-in-memory-requires cim_0))) + (let ((app_2 (compiled-in-memory-provides cim_0))) + (make-instance + 'decl + #f + 'constant + 'self-mpi + app_0 + 'requires + app_1 + 'provides + app_2 + 'phase-to-link-modules + (compiled-in-memory-phase-to-link-module-uses cim_0))))))) (define make-syntax-literal-data-instance-from-compiled-in-memory (lambda (cim_0) (make-instance @@ -45046,20 +45003,43 @@ (let ((linklet-directory1_0 (normalize-to-linklet-directory (compiled-in-memory-linklet-directory c_0)))) - (compiled-in-memory1.1 - linklet-directory1_0 - (compiled-in-memory-original-self c_0) - (compiled-in-memory-requires c_0) - (compiled-in-memory-provides c_0) - (compiled-in-memory-phase-to-link-module-uses c_0) - (compiled-in-memory-compile-time-inspector c_0) - (compiled-in-memory-phase-to-link-extra-inspectorsss c_0) - (compiled-in-memory-mpis c_0) - (compiled-in-memory-syntax-literals c_0) - (compiled-in-memory-pre-compiled-in-memorys c_0) - (compiled-in-memory-post-compiled-in-memorys c_0) - (compiled-in-memory-namespace-scopes c_0) - (compiled-in-memory-purely-functional? c_0))) + (let ((app_0 (compiled-in-memory-original-self c_0))) + (let ((app_1 (compiled-in-memory-requires c_0))) + (let ((app_2 (compiled-in-memory-provides c_0))) + (let ((app_3 + (compiled-in-memory-phase-to-link-module-uses c_0))) + (let ((app_4 + (compiled-in-memory-compile-time-inspector c_0))) + (let ((app_5 + (compiled-in-memory-phase-to-link-extra-inspectorsss + c_0))) + (let ((app_6 (compiled-in-memory-mpis c_0))) + (let ((app_7 + (compiled-in-memory-syntax-literals c_0))) + (let ((app_8 + (compiled-in-memory-pre-compiled-in-memorys + c_0))) + (let ((app_9 + (compiled-in-memory-post-compiled-in-memorys + c_0))) + (let ((app_10 + (compiled-in-memory-namespace-scopes + c_0))) + (compiled-in-memory1.1 + linklet-directory1_0 + app_0 + app_1 + app_2 + app_3 + app_4 + app_5 + app_6 + app_7 + app_8 + app_9 + app_10 + (compiled-in-memory-purely-functional? + c_0)))))))))))))) (raise-argument-error 'struct-copy "compiled-in-memory?" c_0)))))) (define 1/module-compiled-name (|#%name| @@ -45171,21 +45151,40 @@ temp11_1 temp10_1 temp12_0))))))) - (compiled-in-memory1.1 - linklet-directory9_0 - (compiled-in-memory-original-self c_0) - (compiled-in-memory-requires c_0) - (compiled-in-memory-provides c_0) - (compiled-in-memory-phase-to-link-module-uses c_0) - (compiled-in-memory-compile-time-inspector c_0) - (compiled-in-memory-phase-to-link-extra-inspectorsss - c_0) - (compiled-in-memory-mpis c_0) - (compiled-in-memory-syntax-literals c_0) - pre-compiled-in-memorys_0 - post-compiled-in-memorys_0 - (compiled-in-memory-namespace-scopes c_0) - (compiled-in-memory-purely-functional? c_0))) + (let ((app_0 (compiled-in-memory-original-self c_0))) + (let ((app_1 (compiled-in-memory-requires c_0))) + (let ((app_2 (compiled-in-memory-provides c_0))) + (let ((app_3 + (compiled-in-memory-phase-to-link-module-uses + c_0))) + (let ((app_4 + (compiled-in-memory-compile-time-inspector + c_0))) + (let ((app_5 + (compiled-in-memory-phase-to-link-extra-inspectorsss + c_0))) + (let ((app_6 (compiled-in-memory-mpis c_0))) + (let ((app_7 + (compiled-in-memory-syntax-literals + c_0))) + (let ((app_8 + (compiled-in-memory-namespace-scopes + c_0))) + (compiled-in-memory1.1 + linklet-directory9_0 + app_0 + app_1 + app_2 + app_3 + app_4 + app_5 + app_6 + app_7 + pre-compiled-in-memorys_0 + post-compiled-in-memorys_0 + app_8 + (compiled-in-memory-purely-functional? + c_0)))))))))))) (raise-argument-error 'struct-copy "compiled-in-memory?" @@ -45389,21 +45388,41 @@ temp6_1 temp5_1 temp7_0))))))) - (compiled-in-memory1.1 - linklet-directory4_0 - (compiled-in-memory-original-self n-c_0) - (compiled-in-memory-requires n-c_0) - (compiled-in-memory-provides n-c_0) - (compiled-in-memory-phase-to-link-module-uses n-c_0) - (compiled-in-memory-compile-time-inspector n-c_0) - (compiled-in-memory-phase-to-link-extra-inspectorsss - n-c_0) - (compiled-in-memory-mpis n-c_0) - (compiled-in-memory-syntax-literals n-c_0) - pre-compiled-in-memorys_0 - post-compiled-in-memorys_0 - (compiled-in-memory-namespace-scopes n-c_0) - (compiled-in-memory-purely-functional? n-c_0))) + (let ((app_0 (compiled-in-memory-original-self n-c_0))) + (let ((app_1 (compiled-in-memory-requires n-c_0))) + (let ((app_2 (compiled-in-memory-provides n-c_0))) + (let ((app_3 + (compiled-in-memory-phase-to-link-module-uses + n-c_0))) + (let ((app_4 + (compiled-in-memory-compile-time-inspector + n-c_0))) + (let ((app_5 + (compiled-in-memory-phase-to-link-extra-inspectorsss + n-c_0))) + (let ((app_6 + (compiled-in-memory-mpis n-c_0))) + (let ((app_7 + (compiled-in-memory-syntax-literals + n-c_0))) + (let ((app_8 + (compiled-in-memory-namespace-scopes + n-c_0))) + (compiled-in-memory1.1 + linklet-directory4_0 + app_0 + app_1 + app_2 + app_3 + app_4 + app_5 + app_6 + app_7 + pre-compiled-in-memorys_0 + post-compiled-in-memorys_0 + app_8 + (compiled-in-memory-purely-functional? + n-c_0)))))))))))) (raise-argument-error 'struct-copy "compiled-in-memory?" @@ -46201,15 +46220,17 @@ deserialized-syntax-vector-id deserialize-syntax-id))) (let ((app_2 - (list - 'define-values - (list - deserialized-syntax-vector-id) - (list* - 'make-vector - (syntax-literals-count - syntax-literals_0) - '(#f))))) + (let ((app_2 + (list + deserialized-syntax-vector-id))) + (list + 'define-values + app_2 + (list* + 'make-vector + (syntax-literals-count + syntax-literals_0) + '(#f)))))) (list* 'linklet app_0 @@ -46982,16 +47003,14 @@ r_0) phase_0 #f))) - (let ((app_1 - (recompiled-self - r_0))) - (module-linklet-info2.1 - linklet_0 - app_0 - app_1 - #f - (current-code-inspector) - #f))))))) + (module-linklet-info2.1 + linklet_0 + app_0 + (recompiled-self + r_0) + #f + (current-code-inspector) + #f)))))) #f))))))))) (let ((body-linklets+module-use*s_0 (begin @@ -47937,13 +47956,19 @@ phase-shift_0) name_0 val_0)))) - (make-instance-instance.1 - temp31_0 - temp30_0 - phase-ns_0 - phase-shift_0 - temp29_0 - temp32_0)))))))) + (let ((temp31_1 + temp31_0) + (temp30_1 + temp30_0) + (temp29_1 + temp29_0)) + (make-instance-instance.1 + temp31_1 + temp30_1 + phase-ns_0 + phase-shift_0 + temp29_1 + temp32_0))))))))) (let ((linklet_0 (force-compile-linklet (hash-ref @@ -47984,14 +48009,12 @@ linklet_0 app_0 (let ((phase-shift_1 - (let ((app_1 - (phase+ - pos_0 - phase-shift_0))) - (phase- - app_1 - (namespace-0-phase - ns9_0))))) + (phase- + (phase+ + pos_0 + phase-shift_0) + (namespace-0-phase + ns9_0)))) (begin-unsafe (definitions-variables (namespace->definitions @@ -48244,8 +48267,9 @@ (1/module-path-index-resolve (module-binding-module b_0)))) (let ((temp3_0 - (let ((app_0 (namespace-phase ns_0))) - (phase- app_0 (module-binding-phase b_0))))) + (phase- + (namespace-phase ns_0) + (module-binding-phase b_0)))) (let ((temp2_1 temp2_0)) (namespace->module-instance.1 #f @@ -48263,13 +48287,12 @@ app_0 app_1 (module-binding-extra-inspector b_0)))) - (let ((app_0 (module-instance-namespace mi_0))) - (let ((app_1 (module-binding-phase b_0))) - (namespace-get-variable - app_0 - app_1 - (module-binding-sym b_0) - get-not-available))) + (let ((app_0 (module-binding-phase b_0))) + (namespace-get-variable + (module-instance-namespace mi_0) + app_0 + (module-binding-sym b_0) + get-not-available)) not-available)))))))) (define runtime-scope (new-multi-scope)) (define runtime-stx (add-scope empty-syntax runtime-scope)) @@ -48548,18 +48571,16 @@ lift_0) (datum->syntax$1 #f - (let ((app_1 - (datum->syntax$1 - (syntax-shift-phase-level$1 - core-stx - phase13_0) - 'define-values))) - (list - app_1 - (lifted-bind-ids - lift_0) - (lifted-bind-rhs - lift_0)))) + (list + (datum->syntax$1 + (syntax-shift-phase-level$1 + core-stx + phase13_0) + 'define-values) + (lifted-bind-ids + lift_0) + (lifted-bind-rhs + lift_0))) lift_0)) fold-var_0))) (values fold-var_1)))) @@ -48946,12 +48967,11 @@ (datum->syntax$1 #f (list - (let ((app_0 (datum->syntax$1 core-stx sym_0))) - (syntax-shift-phase-level$1 - app_0 - (begin-unsafe - (expand-context/inner-phase - (root-expand-context/outer-inner ctx_0))))) + (syntax-shift-phase-level$1 + (datum->syntax$1 core-stx sym_0) + (begin-unsafe + (expand-context/inner-phase + (root-expand-context/outer-inner ctx_0)))) s_0))))))) (let ((fail_0 (|#%name| @@ -49270,14 +49290,11 @@ (if (expanded+parsed? i_0) (expanded+parsed-parsed i_0) (if (semi-parsed-begin-for-syntax? i_0) - (let ((app_0 - (semi-parsed-begin-for-syntax-s - i_0))) - (parsed-begin-for-syntax21.1 - app_0 - (parsed-only - (semi-parsed-begin-for-syntax-body - i_0)))) + (parsed-begin-for-syntax21.1 + (semi-parsed-begin-for-syntax-s i_0) + (parsed-only + (semi-parsed-begin-for-syntax-body + i_0))) i_0)) fold-var_0))) (values fold-var_1)) @@ -50290,16 +50307,14 @@ (extend-parameterization app_0 1/current-namespace - (let ((app_1 - (begin-unsafe - (expand-context/inner-namespace - (root-expand-context/outer-inner ctx_0))))) - (namespace->namespace-at-phase - app_1 - (add1 - (begin-unsafe - (expand-context/inner-phase - (root-expand-context/outer-inner ctx_0)))))))) + (namespace->namespace-at-phase + (begin-unsafe + (expand-context/inner-namespace + (root-expand-context/outer-inner ctx_0))) + (add1 + (begin-unsafe + (expand-context/inner-phase + (root-expand-context/outer-inner ctx_0))))))) (with-continuation-mark* authentic current-expand-context @@ -50336,9 +50351,9 @@ (define maybe-add-use-site-scope (lambda (s_0 ctx_0 binding_0) (if (if (begin-unsafe (root-expand-context/outer-use-site-scopes ctx_0)) - (let ((app_0 - (begin-unsafe (root-expand-context/outer-frame-id ctx_0)))) - (matching-frame? app_0 (binding-frame-id binding_0))) + (matching-frame? + (begin-unsafe (root-expand-context/outer-frame-id ctx_0)) + (binding-frame-id binding_0)) #f) (let ((sc_0 (new-scope 'use-site))) (let ((b_0 @@ -50365,10 +50380,9 @@ ctx_0 (if (expand-context/outer? ctx_0) (let ((scopes183_0 - (let ((app_0 (unbox def-ctx-scopes_0))) - (append - app_0 - (begin-unsafe (expand-context/outer-scopes ctx_0)))))) + (append + (unbox def-ctx-scopes_0) + (begin-unsafe (expand-context/outer-scopes ctx_0))))) (let ((inner184_0 (root-expand-context/outer-inner ctx_0))) (let ((scopes183_1 scopes183_0)) (expand-context/outer1.1 @@ -50483,20 +50497,18 @@ (let ((lift-ctx_0 (let ((temp193_0 (if local?_0 - (let ((app_0 - (begin-unsafe - (root-expand-context/inner-counter - (root-expand-context/outer-inner - ctx_0))))) - (make-local-lift - lift-env_0 - app_0 - (if (begin-unsafe - (expand-context/inner-normalize-locals? - (root-expand-context/outer-inner - ctx_0))) - 'lift - #f))) + (make-local-lift + lift-env_0 + (begin-unsafe + (root-expand-context/inner-counter + (root-expand-context/outer-inner + ctx_0))) + (if (begin-unsafe + (expand-context/inner-normalize-locals? + (root-expand-context/outer-inner + ctx_0))) + 'lift + #f)) (make-top-level-lift ctx_0)))) (let ((temp194_0 (if (not local?_0) @@ -52006,11 +52018,12 @@ (let ((env-mixin_0 (unsafe-car lst_1))) (let ((rest_0 (unsafe-cdr lst_1))) (let ((fold-var_1 - (cons - (env-mixin-id env-mixin_0) - fold-var_0))) - (let ((fold-var_2 (values fold-var_1))) - (for-loop_0 fold-var_2 rest_0))))) + (let ((fold-var_1 + (cons + (env-mixin-id env-mixin_0) + fold-var_0))) + (values fold-var_1)))) + (for-loop_0 fold-var_1 rest_0)))) fold-var_0)))))) (for-loop_0 null lst_0)))))))))) (define 1/internal-definition-context-introduce @@ -52166,10 +52179,11 @@ (begin (if (pair? a_0) (let ((intdef_0 (car a_0))) - (let ((parent-ctx_0 - (internal-definition-context-parent-ctx intdef_0))) - (let ((env_2 - (let ((env_2 + (let ((env_2 + (let ((env_2 + (let ((parent-ctx_0 + (internal-definition-context-parent-ctx + intdef_0))) (let ((parent-env_0 (if parent-ctx_0 (add-intdef-bindings @@ -52228,9 +52242,9 @@ new-env_0))))))))))) (loop_0 parent-env_0 - env-mixins_0)))))) - (values env_2)))) - (for-loop_0 env_2 (cdr a_0))))) + env-mixins_0))))))) + (values env_2)))) + (for-loop_0 env_2 (cdr a_0)))) env_1)))))) (for-loop_0 env_0 x_0)))))) (define add-intdef-scopes.1 @@ -52347,11 +52361,11 @@ (begin (if (pair? a_0) (let ((intdef_0 (car a_0))) - (let ((i-frame-id_0 - (internal-definition-context-frame-id - intdef_0))) - (let ((frame-id_1 - (let ((frame-id_1 + (let ((frame-id_1 + (let ((frame-id_1 + (let ((i-frame-id_0 + (internal-definition-context-frame-id + intdef_0))) (if (if frame-id_0 (if i-frame-id_0 (not @@ -52363,11 +52377,11 @@ 'all (if frame-id_0 frame-id_0 - i-frame-id_0)))) - (values frame-id_1)))) - (for-loop_0 - frame-id_1 - (cdr a_0))))) + i-frame-id_0))))) + (values frame-id_1)))) + (for-loop_0 + frame-id_1 + (cdr a_0)))) frame-id_0)))))) (for-loop_0 (begin-unsafe @@ -52542,15 +52556,13 @@ (begin-unsafe (expand-context/outer-current-introduction-scopes ctx_0))))) (define flip-introduction-and-use-scopes (lambda (s_0 ctx_0) - (let ((app_0 - (begin-unsafe - (flip-scopes - s_0 - (begin-unsafe - (expand-context/outer-current-introduction-scopes ctx_0)))))) + (flip-scopes + (begin-unsafe (flip-scopes - app_0 - (begin-unsafe (expand-context/outer-current-use-scopes ctx_0)))))) + s_0 + (begin-unsafe + (expand-context/outer-current-introduction-scopes ctx_0)))) + (begin-unsafe (expand-context/outer-current-use-scopes ctx_0))))) (define 1/syntax-transforming? (|#%name| syntax-transforming? @@ -55473,13 +55485,10 @@ #f) #f))) (if (if maybe-module-id_0 - (let ((app_0 - (1/namespace-module-identifier - ns_0))) - (1/free-identifier=? - maybe-module-id_0 - app_0 - (namespace-phase ns_0))) + (1/free-identifier=? + maybe-module-id_0 + (1/namespace-module-identifier ns_0) + (namespace-phase ns_0)) #f) (1/datum->syntax s2_0 @@ -55750,14 +55759,10 @@ (if use-mapping?26_0 (let ((id_0 (1/datum->syntax #f sym29_0))) (let ((b_0 - (let ((app_0 - (1/namespace-syntax-introduce - id_0 - ns_0))) - (resolve+shift/extra-inspector - app_0 - (namespace-phase ns_0) - ns_0)))) + (resolve+shift/extra-inspector + (1/namespace-syntax-introduce id_0 ns_0) + (namespace-phase ns_0) + ns_0))) (begin (if b_0 (namespace-visit-available-modules! ns_0) @@ -56018,15 +56023,12 @@ ns_0)) (set->list (let ((app_0 - (let ((app_0 - (let ((v_0 - (namespace-get-root-expand-ctx ns_0))) - (begin-unsafe - (root-expand-context/inner-all-scopes-stx - (root-expand-context/outer-inner v_0)))))) - (syntax-mapped-names - app_0 - (namespace-phase ns_0))))) + (syntax-mapped-names + (let ((v_0 (namespace-get-root-expand-ctx ns_0))) + (begin-unsafe + (root-expand-context/inner-all-scopes-stx + (root-expand-context/outer-inner v_0)))) + (namespace-phase ns_0)))) (set-union app_0 (list->set @@ -56307,10 +56309,12 @@ (let ((temp90_0 (reverse$1 (let ((lst_0 - (append - (lifted-parsed-begin-seq exp-s_1) - (list - (lifted-parsed-begin-last exp-s_1))))) + (let ((app_0 + (lifted-parsed-begin-seq exp-s_1))) + (append + app_0 + (list + (lifted-parsed-begin-last exp-s_1)))))) (begin (letrec* ((for-loop_0 @@ -58063,14 +58067,11 @@ phase_0) (let ((ex-mod-name_0 (1/module-path-index-resolve - (let ((app_0 - (module-binding-module - binding_0))) - (module-path-index-shift - app_0 - (module-self - m_0) - mpi_0))))) + (module-path-index-shift + (module-binding-module + binding_0) + (module-self m_0) + mpi_0)))) (let ((m-ns_0 (let ((temp31_0 (phase- @@ -58087,121 +58088,121 @@ (namespace->module ns_0 ex-mod-name_0))) - (let ((or-part_0 - (module-access - ex-m_0))) - (let ((access_0 + (let ((access_0 + (let ((or-part_0 + (module-access + ex-m_0))) (if or-part_0 or-part_0 (module-compute-access! - ex-m_0)))) - (begin - (if (if (not - (eq? - 'provided - (hash-ref - (hash-ref - access_0 - ex-phase_0 - hash2610) - ex-sym_0 - #f))) - (if (not - (let ((app_0 - (current-code-inspector))) - (inspector-superior? - app_0 - (namespace-inspector - m-ns_0)))) - (not - (if (module-binding-extra-inspector - binding_0) - (let ((app_0 - (module-binding-extra-inspector - binding_0))) - (inspector-superior? - app_0 - (namespace-inspector - m-ns_0))) - #f)) - #f) + ex-m_0))))) + (begin + (if (if (not + (eq? + 'provided + (hash-ref + (hash-ref + access_0 + ex-phase_0 + hash2610) + ex-sym_0 + #f))) + (if (not + (let ((app_0 + (current-code-inspector))) + (inspector-superior? + app_0 + (namespace-inspector + m-ns_0)))) + (not + (if (module-binding-extra-inspector + binding_0) + (let ((app_0 + (module-binding-extra-inspector + binding_0))) + (inspector-superior? + app_0 + (namespace-inspector + m-ns_0))) + #f)) #f) - (raise-arguments-error - 'dynamic-require - "name is protected" - "name" - sym4_0 - "module" - mod-name_0) - (void)) - (let ((fail_0 - (|#%name| - fail - (lambda () - (begin - (if (eq? - fail-k_0 - default-dynamic-require-fail-thunk) - (raise-arguments-error - 'dynamic-require - "name's binding is missing" - "name" - sym4_0 - "module" - mod-name_0) - (|#%app| - fail-k_0))))))) - (if (not - (provided-as-transformer? - binding/p_0)) - (namespace-get-variable - m-ns_0 - ex-phase_0 - ex-sym_0 - fail_0) - (let ((missing_0 - (gensym - 'missing))) - (begin - (namespace-module-visit!.1 - phase_0 - ns_0 - mpi_0 - phase_0) - (let ((t_0 - (namespace-get-transformer - m-ns_0 - ex-phase_0 - ex-sym_0 - missing_0))) + #f) + (raise-arguments-error + 'dynamic-require + "name is protected" + "name" + sym4_0 + "module" + mod-name_0) + (void)) + (let ((fail_0 + (|#%name| + fail + (lambda () + (begin (if (eq? - t_0 - missing_0) - (fail_0) - (let ((tmp-ns_0 - (new-namespace.1 - #t - unsafe-undefined - ns_0))) - (let ((mod-path_0 - (resolved-module-path->module-path - mod-name_0))) - (begin - (1/namespace-require - mod-path_0 - tmp-ns_0) - (with-continuation-mark* - authentic - parameterization-key - (extend-parameterization - (continuation-mark-set-first - #f - parameterization-key) - 1/current-namespace - tmp-ns_0) - (1/eval - sym4_0 - tmp-ns_0))))))))))))))))))))))))))))))))))))))))) + fail-k_0 + default-dynamic-require-fail-thunk) + (raise-arguments-error + 'dynamic-require + "name's binding is missing" + "name" + sym4_0 + "module" + mod-name_0) + (|#%app| + fail-k_0))))))) + (if (not + (provided-as-transformer? + binding/p_0)) + (namespace-get-variable + m-ns_0 + ex-phase_0 + ex-sym_0 + fail_0) + (let ((missing_0 + (gensym + 'missing))) + (begin + (namespace-module-visit!.1 + phase_0 + ns_0 + mpi_0 + phase_0) + (let ((t_0 + (namespace-get-transformer + m-ns_0 + ex-phase_0 + ex-sym_0 + missing_0))) + (if (eq? + t_0 + missing_0) + (fail_0) + (let ((tmp-ns_0 + (new-namespace.1 + #t + unsafe-undefined + ns_0))) + (let ((mod-path_0 + (resolved-module-path->module-path + mod-name_0))) + (begin + (1/namespace-require + mod-path_0 + tmp-ns_0) + (with-continuation-mark* + authentic + parameterization-key + (extend-parameterization + (continuation-mark-set-first + #f + parameterization-key) + 1/current-namespace + tmp-ns_0) + (1/eval + sym4_0 + tmp-ns_0)))))))))))))))))))))))))))))))))))))))) (case-lambda ((who_0 mod-path_0 sym_0) (do-dynamic-require_0 who_0 mod-path_0 sym_0 unsafe-undefined)) @@ -59850,23 +59851,20 @@ or-part_0 (let ((or-part_1 (object-name in45_0))) (if or-part_1 or-part_1 "UNKNOWN")))))) - (let ((app_1 (begin-unsafe (read-config/outer-line config46_0)))) - (let ((app_2 (begin-unsafe (read-config/outer-col config46_0)))) - (let ((app_3 (begin-unsafe (read-config/outer-pos config46_0)))) - (unsafe-make-srcloc - app_0 - app_1 - app_2 - app_3 - (if (begin-unsafe (read-config/outer-pos config46_0)) - (if end-pos_0 - (max - 0 - (- - end-pos_0 - (begin-unsafe (read-config/outer-pos config46_0)))) - #f) - #f))))))))))) + (unsafe-make-srcloc + app_0 + (begin-unsafe (read-config/outer-line config46_0)) + (begin-unsafe (read-config/outer-col config46_0)) + (begin-unsafe (read-config/outer-pos config46_0)) + (if (begin-unsafe (read-config/outer-pos config46_0)) + (if end-pos_0 + (max + 0 + (- + end-pos_0 + (begin-unsafe (read-config/outer-pos config46_0)))) + #f) + #f)))))))) (define reading-at (lambda (config_0 line_0 col_0 pos_0) (if (read-config/outer? config_0) @@ -59971,14 +59969,12 @@ (begin-unsafe (read-config/inner-for-syntax? (read-config/outer-inner config_0))))) - (let ((app_0 - (begin-unsafe - (read-config/inner-coerce (read-config/outer-inner config_0))))) - (|#%app| - app_0 - for-syntax?_0 - val_0 - (if for-syntax?_0 (port+config->srcloc.1 #f in_0 config_0) #f)))))) + (|#%app| + (begin-unsafe + (read-config/inner-coerce (read-config/outer-inner config_0))) + for-syntax?_0 + val_0 + (if for-syntax?_0 (port+config->srcloc.1 #f in_0 config_0) #f))))) (define default-reader-guard$1 (|#%name| default-reader-guard (lambda (v_0) (begin v_0)))) (define 1/current-reader-guard @@ -60037,16 +60033,17 @@ (begin-unsafe (read-config/inner-parameter-cache (read-config/outer-inner config_0))))) - (let ((app_0 - (begin-unsafe - (read-config/inner-parameter-override - (read-config/outer-inner config_0))))) - (let ((v_0 - (hash-ref app_0 param_0 (hash-ref cache_0 param_0 unknown)))) - (if (eq? v_0 unknown) - (let ((v_1 (|#%app| param_0))) - (begin (hash-set! cache_0 param_0 v_1) v_1)) - v_0)))))) + (let ((v_0 + (hash-ref + (begin-unsafe + (read-config/inner-parameter-override + (read-config/outer-inner config_0))) + param_0 + (hash-ref cache_0 param_0 unknown)))) + (if (eq? v_0 unknown) + (let ((v_1 (|#%app| param_0))) + (begin (hash-set! cache_0 param_0 v_1) v_1)) + v_0))))) (define override-parameter (lambda (param_0 config_0 v_0) (if (read-config/outer? config_0) @@ -61141,10 +61138,8 @@ (lambda (start-pos2_0 a4_0 config5_0) (begin (let ((s_0 - (substring - (accum-string-str a4_0) - start-pos2_0 - (accum-string-pos a4_0)))) + (let ((app_0 (accum-string-str a4_0))) + (substring app_0 start-pos2_0 (accum-string-pos a4_0))))) (begin (begin-unsafe (set-read-config-state-accum-str! @@ -61158,11 +61153,12 @@ (lambda (start-pos7_0 a9_0 config10_0) (begin (let ((bstr_0 - (string->bytes/latin-1 - (accum-string-str a9_0) - #f - start-pos7_0 - (accum-string-pos a9_0)))) + (let ((app_0 (accum-string-str a9_0))) + (string->bytes/latin-1 + app_0 + #f + start-pos7_0 + (accum-string-pos a9_0))))) (begin (begin-unsafe (set-read-config-state-accum-str! @@ -62478,8 +62474,9 @@ (format "division by zero in `~.a`" s_0) #f) (if (lazy-expt? n_0) - (let ((app_0 (lazy-expt-n n_0))) - (* app_0 (expt (lazy-expt-radix n_0) (lazy-expt-exp n_0)))) + (* + (lazy-expt-n n_0) + (expt (lazy-expt-radix n_0) (lazy-expt-exp n_0))) n_0))))) (define force-lazy-inexact (let ((force-lazy-inexact_0 @@ -68077,15 +68074,13 @@ (begin (let ((mod-path-wrapped_0 (if (eq? mod-path-wrapped29_0 unsafe-undefined) - (let ((app_0 - (begin-unsafe - (read-config/inner-coerce - (read-config/outer-inner config39_0))))) - (|#%app| - app_0 - #t - mod-path-datum36_0 - (port+config->srcloc.1 #f in38_0 config39_0))) + (|#%app| + (begin-unsafe + (read-config/inner-coerce + (read-config/outer-inner config39_0))) + #t + mod-path-datum36_0 + (port+config->srcloc.1 #f in38_0 config39_0)) mod-path-wrapped29_0))) (begin (force-parameters! config39_0) @@ -69680,10 +69675,9 @@ temp45 (lambda (m_0) (begin - (let ((app_0 (module-provides m_0))) - (variables->api-nonprovides - app_0 - (|#%app| (module-get-all-variables m_0))))))))) + (variables->api-nonprovides + (module-provides m_0) + (|#%app| (module-get-all-variables m_0)))))))) (module->.1 void temp45_0 'module->indirect-exports mod_0 #f)))))) (define 1/module-provide-protected? (|#%name| @@ -71060,20 +71054,18 @@ (let ((s_0 (datum->syntax$1 #f - (let ((app_0 - (if (parsed? exp-s_0) - exp-s_0 - (begin-unsafe - (flip-scopes - exp-s_0 - (begin-unsafe - (expand-context/outer-current-introduction-scopes - ctx_0))))))) - (already-expanded1.1 - app_0 + (already-expanded1.1 + (if (parsed? exp-s_0) + exp-s_0 (begin-unsafe - (expand-context/outer-binding-layer - ctx_0))))))) + (flip-scopes + exp-s_0 + (begin-unsafe + (expand-context/outer-current-introduction-scopes + ctx_0))))) + (begin-unsafe + (expand-context/outer-binding-layer + ctx_0)))))) (begin-unsafe (flip-scopes s_0 @@ -76498,16 +76490,13 @@ (if (expand-context/outer? v_0) (let ((use-site-scopes138_0 (box null))) (let ((scopes139_0 - (let ((app_0 - (unbox - (begin-unsafe - (root-expand-context/outer-use-site-scopes - body-ctx22_0))))) - (append - app_0 - (begin-unsafe - (expand-context/outer-scopes - body-ctx22_0)))))) + (append + (unbox + (begin-unsafe + (root-expand-context/outer-use-site-scopes + body-ctx22_0))) + (begin-unsafe + (expand-context/outer-scopes body-ctx22_0))))) (let ((inner143_0 (root-expand-context/outer-inner v_0))) (let ((scopes139_1 scopes139_0) @@ -81493,7 +81482,7 @@ null))))) #t) #f))) -(define effect_2123 +(define effect_2283 (begin (void (add-core-form!* @@ -81583,14 +81572,12 @@ (raise-ambiguous-error id_0 ctx361_0) (if (if b_0 (if (module-binding? b_0) - (let ((app_0 - (module-binding-module b_0))) - (eq? - app_0 - (begin-unsafe - (root-expand-context/inner-self-mpi - (root-expand-context/outer-inner - ctx361_0))))) + (eq? + (module-binding-module b_0) + (begin-unsafe + (root-expand-context/inner-self-mpi + (root-expand-context/outer-inner + ctx361_0)))) #f) #f) (if (begin-unsafe @@ -81744,7 +81731,7 @@ ctx_0 implicit-omitted?359_0))))))) (void))) -(define effect_2003 +(define effect_2326 (begin (void (add-core-form!* @@ -81903,15 +81890,12 @@ (begin (if (if (module-binding? binding_0) (not - (let ((app_0 - (module-binding-module - binding_0))) - (inside-module-context? - app_0 - (begin-unsafe - (root-expand-context/inner-self-mpi - (root-expand-context/outer-inner - ctx_0)))))) + (inside-module-context? + (module-binding-module binding_0) + (begin-unsafe + (root-expand-context/inner-self-mpi + (root-expand-context/outer-inner + ctx_0))))) #f) (raise-syntax-error$1 #f @@ -82548,11 +82532,10 @@ (module-binding-nominal-module b_0))))) (let ((b/p_0 (let ((app_0 - (let ((app_0 (module-provides m_0))) - (hash-ref - app_0 - (module-binding-nominal-phase b_0) - hash2610)))) + (hash-ref + (module-provides m_0) + (module-binding-nominal-phase b_0) + hash2610))) (hash-ref app_0 (module-binding-nominal-sym b_0) #f)))) (provided-as-transformer? b/p_0))) (begin @@ -85269,12 +85252,10 @@ (expanded+parsed-parsed body_0) body_0))) (if (parsed-define-values? p_0) - (let ((app_0 - (parsed-define-values-rhs p_0))) - (check-expr_0 - app_0 - (length (parsed-define-values-syms p_0)) - p_0)) + (check-expr_0 + (parsed-define-values-rhs p_0) + (length (parsed-define-values-syms p_0)) + p_0) (if (let ((or-part_0 (|parsed-#%declare?| p_0))) (if or-part_0 @@ -85598,7 +85579,7 @@ "illegal use (not in a module top-level)" s_0))))) (void))) -(define effect_2481 +(define effect_2370 (begin (void (add-core-form!* @@ -85625,83 +85606,75 @@ #f "not currently transforming a module" s_0)) - (let ((app_0 - (begin-unsafe - (expand-context/inner-module-begin-k - (root-expand-context/outer-inner ctx_0))))) - (|#%app| - app_0 - s_0 - (if (expand-context/outer? ctx_0) - (let ((the-struct_0 (root-expand-context/outer-inner ctx_0))) - (let ((inner198_0 - (if (expand-context/inner? the-struct_0) - (expand-context/inner2.1 - (root-expand-context/inner-self-mpi the-struct_0) - (root-expand-context/inner-module-scopes - the-struct_0) - (root-expand-context/inner-top-level-bind-scope - the-struct_0) - (root-expand-context/inner-all-scopes-stx - the-struct_0) - (root-expand-context/inner-defined-syms - the-struct_0) - (root-expand-context/inner-counter the-struct_0) - (root-expand-context/inner-lift-key the-struct_0) - (expand-context/inner-to-parsed? the-struct_0) - (expand-context/inner-phase the-struct_0) - (expand-context/inner-namespace the-struct_0) - (expand-context/inner-just-once? the-struct_0) - #f - (expand-context/inner-allow-unbound? the-struct_0) - (expand-context/inner-in-local-expand? the-struct_0) - (|expand-context/inner-keep-#%expression?| - the-struct_0) - (expand-context/inner-stops the-struct_0) - (expand-context/inner-declared-submodule-names - the-struct_0) - (expand-context/inner-lifts the-struct_0) - (expand-context/inner-lift-envs the-struct_0) - (expand-context/inner-module-lifts the-struct_0) - (expand-context/inner-require-lifts the-struct_0) - (expand-context/inner-to-module-lifts the-struct_0) - (expand-context/inner-requires+provides - the-struct_0) - (expand-context/inner-observer the-struct_0) - (expand-context/inner-for-serializable? - the-struct_0) - (expand-context/inner-to-correlated-linklet? - the-struct_0) - (expand-context/inner-normalize-locals? - the-struct_0) - (expand-context/inner-parsing-expanded? - the-struct_0) - (expand-context/inner-skip-visit-available? - the-struct_0)) - (raise-argument-error - 'struct-copy - "expand-context/inner?" - the-struct_0)))) - (expand-context/outer1.1 - inner198_0 - (root-expand-context/outer-post-expansion ctx_0) - (root-expand-context/outer-use-site-scopes ctx_0) - (root-expand-context/outer-frame-id ctx_0) - (expand-context/outer-context ctx_0) - (expand-context/outer-env ctx_0) - (expand-context/outer-scopes ctx_0) - (expand-context/outer-def-ctx-scopes ctx_0) - (expand-context/outer-binding-layer ctx_0) - (expand-context/outer-reference-records ctx_0) - (expand-context/outer-only-immediate? ctx_0) - (expand-context/outer-need-eventually-defined ctx_0) - (expand-context/outer-current-introduction-scopes ctx_0) - (expand-context/outer-current-use-scopes ctx_0) - (expand-context/outer-name ctx_0)))) - (raise-argument-error - 'struct-copy - "expand-context/outer?" - ctx_0)))))))) + (|#%app| + (begin-unsafe + (expand-context/inner-module-begin-k + (root-expand-context/outer-inner ctx_0))) + s_0 + (if (expand-context/outer? ctx_0) + (let ((the-struct_0 (root-expand-context/outer-inner ctx_0))) + (let ((inner198_0 + (if (expand-context/inner? the-struct_0) + (expand-context/inner2.1 + (root-expand-context/inner-self-mpi the-struct_0) + (root-expand-context/inner-module-scopes the-struct_0) + (root-expand-context/inner-top-level-bind-scope + the-struct_0) + (root-expand-context/inner-all-scopes-stx + the-struct_0) + (root-expand-context/inner-defined-syms the-struct_0) + (root-expand-context/inner-counter the-struct_0) + (root-expand-context/inner-lift-key the-struct_0) + (expand-context/inner-to-parsed? the-struct_0) + (expand-context/inner-phase the-struct_0) + (expand-context/inner-namespace the-struct_0) + (expand-context/inner-just-once? the-struct_0) + #f + (expand-context/inner-allow-unbound? the-struct_0) + (expand-context/inner-in-local-expand? the-struct_0) + (|expand-context/inner-keep-#%expression?| + the-struct_0) + (expand-context/inner-stops the-struct_0) + (expand-context/inner-declared-submodule-names + the-struct_0) + (expand-context/inner-lifts the-struct_0) + (expand-context/inner-lift-envs the-struct_0) + (expand-context/inner-module-lifts the-struct_0) + (expand-context/inner-require-lifts the-struct_0) + (expand-context/inner-to-module-lifts the-struct_0) + (expand-context/inner-requires+provides the-struct_0) + (expand-context/inner-observer the-struct_0) + (expand-context/inner-for-serializable? the-struct_0) + (expand-context/inner-to-correlated-linklet? + the-struct_0) + (expand-context/inner-normalize-locals? the-struct_0) + (expand-context/inner-parsing-expanded? the-struct_0) + (expand-context/inner-skip-visit-available? + the-struct_0)) + (raise-argument-error + 'struct-copy + "expand-context/inner?" + the-struct_0)))) + (expand-context/outer1.1 + inner198_0 + (root-expand-context/outer-post-expansion ctx_0) + (root-expand-context/outer-use-site-scopes ctx_0) + (root-expand-context/outer-frame-id ctx_0) + (expand-context/outer-context ctx_0) + (expand-context/outer-env ctx_0) + (expand-context/outer-scopes ctx_0) + (expand-context/outer-def-ctx-scopes ctx_0) + (expand-context/outer-binding-layer ctx_0) + (expand-context/outer-reference-records ctx_0) + (expand-context/outer-only-immediate? ctx_0) + (expand-context/outer-need-eventually-defined ctx_0) + (expand-context/outer-current-introduction-scopes ctx_0) + (expand-context/outer-current-use-scopes ctx_0) + (expand-context/outer-name ctx_0)))) + (raise-argument-error + 'struct-copy + "expand-context/outer?" + ctx_0))))))) (void))) (define effect_2522 (begin @@ -90467,10 +90440,10 @@ self108_0)) (case-lambda ((requires_0 provides_0) - (let ((app_0 - (requires+provides-all-bindings-simple? - requires-and-provides106_0))) - (let ((parsed-mod_0 + (let ((parsed-mod_0 + (let ((app_0 + (requires+provides-all-bindings-simple? + requires-and-provides106_0))) (let ((app_1 (root-expand-context-encode-for-module root-ctx110_0 @@ -90490,65 +90463,64 @@ app_1 app_2 #f - (hasheq)))))) - (let ((module-name_0 - (1/module-path-index-resolve - (if enclosing109_0 enclosing109_0 self108_0)))) - (let ((compiled-module_0 - (let ((temp593_0 - (let ((temp600_0 - (if enclosing109_0 - (1/resolved-module-path-name - module-name_0) - #f))) - (make-compile-context.1 - temp600_0 - unsafe-undefined - enclosing109_0 - namespace107_0 - unsafe-undefined - unsafe-undefined)))) - (let ((temp594_0 + (hasheq))))))) + (let ((module-name_0 + (1/module-path-index-resolve + (if enclosing109_0 enclosing109_0 self108_0)))) + (let ((compiled-module_0 + (let ((temp593_0 + (let ((temp600_0 + (if enclosing109_0 + (1/resolved-module-path-name + module-name_0) + #f))) + (make-compile-context.1 + temp600_0 + unsafe-undefined + enclosing109_0 + namespace107_0 + unsafe-undefined + unsafe-undefined)))) + (let ((temp594_0 + (begin-unsafe + (expand-context/inner-for-serializable? + (root-expand-context/outer-inner ctx111_0))))) + (let ((temp595_0 (begin-unsafe - (expand-context/inner-for-serializable? + (expand-context/inner-to-correlated-linklet? (root-expand-context/outer-inner ctx111_0))))) - (let ((temp595_0 - (begin-unsafe - (expand-context/inner-to-correlated-linklet? - (root-expand-context/outer-inner - ctx111_0))))) - (let ((temp594_1 temp594_0) (temp593_1 temp593_0)) - (compile-module.1 - #f - modules-being-compiled112_0 - #f - temp594_1 - temp595_0 - parsed-mod_0 - temp593_1))))))) - (begin - (set-box! fill113_0 compiled-module_0) - (let ((root-module-name_0 - (resolved-module-path-root-name module-name_0))) - (with-continuation-mark* - authentic - parameterization-key - (let ((app_1 - (continuation-mark-set-first - #f - parameterization-key))) - (extend-parameterization - app_1 - 1/current-namespace - namespace107_0 - 1/current-module-declare-name - (1/make-resolved-module-path root-module-name_0))) - (eval-module.1 - unsafe-undefined - #f - #f - compiled-module_0))))))))) + (let ((temp594_1 temp594_0) (temp593_1 temp593_0)) + (compile-module.1 + #f + modules-being-compiled112_0 + #f + temp594_1 + temp595_0 + parsed-mod_0 + temp593_1))))))) + (begin + (set-box! fill113_0 compiled-module_0) + (let ((root-module-name_0 + (resolved-module-path-root-name module-name_0))) + (with-continuation-mark* + authentic + parameterization-key + (let ((app_0 + (continuation-mark-set-first + #f + parameterization-key))) + (extend-parameterization + app_0 + 1/current-namespace + namespace107_0 + 1/current-module-declare-name + (1/make-resolved-module-path root-module-name_0))) + (eval-module.1 + unsafe-undefined + #f + #f + compiled-module_0)))))))) (args (raise-binding-result-arity-error 2 args)))))))) (define attach-root-expand-context-properties (lambda (s_0 root-ctx_0 orig-self_0 new-self_0) @@ -90660,48 +90632,46 @@ #f ctx136_0 body-s_0))) - (let ((app_0 - (semi-parsed-begin-for-syntax-body - body_0))) - (let ((nested-bodys_0 - (loop_0 app_0 (add1 phase_0)))) - (let ((parsed-bfs_0 - (parsed-begin-for-syntax21.1 - rebuild-body-s_0 - (parsed-only nested-bodys_0)))) - (begin - (let ((obs_0 - (begin-unsafe - (expand-context/inner-observer - (root-expand-context/outer-inner - ctx136_0))))) - (if obs_0 - (call-expand-observe - obs_0 - 'exit-begin-for-syntax) - (void))) - (let ((app_1 - (if (begin-unsafe - (expand-context/inner-to-parsed? - (root-expand-context/outer-inner - ctx136_0))) - parsed-bfs_0 - (expanded+parsed1.1 - (let ((temp610_0 - (list* - begin-for-syntax603_0 - (syntax-only - nested-bodys_0)))) - (rebuild.1 - #t - rebuild-body-s_0 - temp610_0)) - parsed-bfs_0)))) - (cons - app_1 - (loop_0 - rest-bodys_0 - phase_0))))))))) + (let ((nested-bodys_0 + (loop_0 + (semi-parsed-begin-for-syntax-body + body_0) + (add1 phase_0)))) + (let ((parsed-bfs_0 + (parsed-begin-for-syntax21.1 + rebuild-body-s_0 + (parsed-only nested-bodys_0)))) + (begin + (let ((obs_0 + (begin-unsafe + (expand-context/inner-observer + (root-expand-context/outer-inner + ctx136_0))))) + (if obs_0 + (call-expand-observe + obs_0 + 'exit-begin-for-syntax) + (void))) + (let ((app_0 + (if (begin-unsafe + (expand-context/inner-to-parsed? + (root-expand-context/outer-inner + ctx136_0))) + parsed-bfs_0 + (expanded+parsed1.1 + (let ((temp610_0 + (list* + begin-for-syntax603_0 + (syntax-only + nested-bodys_0)))) + (rebuild.1 + #t + rebuild-body-s_0 + temp610_0)) + parsed-bfs_0)))) + (cons + app_0 + (loop_0 rest-bodys_0 phase_0)))))))) (args (raise-binding-result-arity-error 3 args)))))) (if (let ((or-part_0 (parsed? body_0))) @@ -90944,23 +90914,16 @@ phase127_0)))))) (define stop-at-module*? (lambda (ctx_0) - (let ((app_0 - (begin-unsafe - (expand-context/inner-stops - (root-expand-context/outer-inner ctx_0))))) - (let ((app_1 - (begin-unsafe - (expand-context/inner-phase - (root-expand-context/outer-inner ctx_0))))) - (free-id-set-member? - app_0 - app_1 - (let ((app_2 (datum->syntax$1 core-stx 'module*))) - (syntax-shift-phase-level$1 - app_2 - (begin-unsafe - (expand-context/inner-phase - (root-expand-context/outer-inner ctx_0)))))))))) + (free-id-set-member? + (begin-unsafe + (expand-context/inner-stops (root-expand-context/outer-inner ctx_0))) + (begin-unsafe + (expand-context/inner-phase (root-expand-context/outer-inner ctx_0))) + (syntax-shift-phase-level$1 + (datum->syntax$1 core-stx 'module*) + (begin-unsafe + (expand-context/inner-phase + (root-expand-context/outer-inner ctx_0))))))) (define check-ids-unbound.1 (|#%name| check-ids-unbound diff --git a/racket/src/cs/schemified/io.scm b/racket/src/cs/schemified/io.scm index f90108942f..c69fe805b8 100644 --- a/racket/src/cs/schemified/io.scm +++ b/racket/src/cs/schemified/io.scm @@ -3687,7 +3687,7 @@ (begin (unsafe-place-local-set! cell.1$10 sleep_0) (unsafe-place-local-set! cell.2$3 fd_0)))) -(define effect_2066 +(define effect_2807 (begin (void (|#%app| @@ -3790,10 +3790,8 @@ (if or-part_0 or-part_0 (null? fd-adders_0))) (void) (internal-error "cannot sleep on fds")) - (|#%app| - (sandman-do-add-thread! timeout-sandman_0) - t_0 - (exts-timeout-at exts_0))))) + (let ((app_0 (sandman-do-add-thread! timeout-sandman_0))) + (|#%app| app_0 t_0 (exts-timeout-at exts_0)))))) (lambda (t_0 timeout-handle_0) (|#%app| (sandman-do-remove-thread! timeout-sandman_0) @@ -3802,14 +3800,16 @@ (lambda (a-exts_0 b-exts_0) (if (if a-exts_0 b-exts_0 #f) (let ((app_0 - (|#%app| - (sandman-do-merge-external-event-sets timeout-sandman_0) - (exts-timeout-at a-exts_0) - (exts-timeout-at b-exts_0)))) + (let ((app_0 + (sandman-do-merge-external-event-sets + timeout-sandman_0))) + (let ((app_1 (exts-timeout-at a-exts_0))) + (|#%app| app_0 app_1 (exts-timeout-at b-exts_0)))))) (exts1.1 app_0 (if (if (exts-fd-adders a-exts_0) (exts-fd-adders b-exts_0) #f) - (cons (exts-fd-adders a-exts_0) (exts-fd-adders b-exts_0)) + (let ((app_1 (exts-fd-adders a-exts_0))) + (cons app_1 (exts-fd-adders b-exts_0))) (let ((or-part_0 (exts-fd-adders a-exts_0))) (if or-part_0 or-part_0 (exts-fd-adders b-exts_0)))))) (if a-exts_0 a-exts_0 b-exts_0))) @@ -4409,26 +4409,36 @@ 'core-input-port-methods 'commit)))))) (define core-input-port-vtable.1 - (core-input-port-methods6.1 - (core-port-methods-close.1 core-port-vtable.1) - (core-port-methods-count-lines!.1 core-port-vtable.1) - (core-port-methods-get-location.1 core-port-vtable.1) - (core-port-methods-file-position.1 core-port-vtable.1) - (core-port-methods-buffer-mode.1 core-port-vtable.1) - #f - (|#%name| - read-in - (lambda (this-id_0 bstr13_0 start14_0 end15_0 copy?16_0) (begin eof))) - (|#%name| - peek-in - (lambda (this-id_0 bstr30_0 start31_0 end32_0 progress-evt33_0 copy?34_0) - (begin eof))) - (|#%name| byte-ready (lambda (this-id_0 work-done!49_0) (begin #t))) - #f - (|#%name| - commit - (lambda (this-id_0 amt60_0 progress-evt61_0 ext-evt62_0 finish63_0) - (begin #f))))) + (let ((app_0 (core-port-methods-close.1 core-port-vtable.1))) + (let ((app_1 (core-port-methods-count-lines!.1 core-port-vtable.1))) + (let ((app_2 (core-port-methods-get-location.1 core-port-vtable.1))) + (let ((app_3 (core-port-methods-file-position.1 core-port-vtable.1))) + (core-input-port-methods6.1 + app_0 + app_1 + app_2 + app_3 + (core-port-methods-buffer-mode.1 core-port-vtable.1) + #f + (|#%name| + read-in + (lambda (this-id_0 bstr13_0 start14_0 end15_0 copy?16_0) + (begin eof))) + (|#%name| + peek-in + (lambda (this-id_0 + bstr30_0 + start31_0 + end32_0 + progress-evt33_0 + copy?34_0) + (begin eof))) + (|#%name| byte-ready (lambda (this-id_0 work-done!49_0) (begin #t))) + #f + (|#%name| + commit + (lambda (this-id_0 amt60_0 progress-evt61_0 ext-evt62_0 finish63_0) + (begin #f))))))))) (define empty-input-port (create-core-input-port core-input-port-vtable.1 @@ -4683,27 +4693,32 @@ 'core-output-port-methods 'get-write-special-evt)))))) (define core-output-port-vtable.1 - (core-output-port-methods6.1 - (core-port-methods-close.1 core-port-vtable.1) - (core-port-methods-count-lines!.1 core-port-vtable.1) - (core-port-methods-get-location.1 core-port-vtable.1) - (core-port-methods-file-position.1 core-port-vtable.1) - (core-port-methods-buffer-mode.1 core-port-vtable.1) - (|#%name| - write-out - (lambda (this-id_0 - bstr14_0 - start-k15_0 - end-k16_0 - no-block/buffer?17_0 - enable-break?18_0 - copy?19_0) - (begin (- end-k16_0 start-k15_0)))) - #f - (|#%name| - get-write-evt - (lambda (this-id_0 bstr37_0 start-k38_0 end-k39_0) (begin always-evt))) - #f)) + (let ((app_0 (core-port-methods-close.1 core-port-vtable.1))) + (let ((app_1 (core-port-methods-count-lines!.1 core-port-vtable.1))) + (let ((app_2 (core-port-methods-get-location.1 core-port-vtable.1))) + (let ((app_3 (core-port-methods-file-position.1 core-port-vtable.1))) + (core-output-port-methods6.1 + app_0 + app_1 + app_2 + app_3 + (core-port-methods-buffer-mode.1 core-port-vtable.1) + (|#%name| + write-out + (lambda (this-id_0 + bstr14_0 + start-k15_0 + end-k16_0 + no-block/buffer?17_0 + enable-break?18_0 + copy?19_0) + (begin (- end-k16_0 start-k15_0)))) + #f + (|#%name| + get-write-evt + (lambda (this-id_0 bstr37_0 start-k38_0 end-k39_0) + (begin always-evt))) + #f)))))) (define get-write-evt-via-write-out (lambda (count-write-evt-via-write-out_0) (lambda (out_0 src-bstr_0 src-start_0 src-end_0) @@ -6267,10 +6282,9 @@ (core-port-vtable p_1)))) (if get-location_0 (|#%app| get-location_0 p_1) - (values - (location-line loc_0) - (location-column loc_0) - (location-position loc_0))))) + (let ((app_0 (location-line loc_0))) + (let ((app_1 (location-column loc_0))) + (values app_0 app_1 (location-position loc_0))))))) (unsafe-end-atomic))) (if (core-port-methods-file-position.1 (core-port-vtable p_1)) (let ((offset_0 @@ -6527,14 +6541,18 @@ (if position_0 (add1 position_0) #f) state_0 #f))))))))))))))))) - (loop_0 - start_0 - 0 - (location-line loc_0) - (location-column loc_0) - (location-position loc_0) - (location-state loc_0) - (location-cr-state loc_0)))) + (let ((app_0 (location-line loc_0))) + (let ((app_1 (location-column loc_0))) + (let ((app_2 (location-position loc_0))) + (let ((app_3 (location-state loc_0))) + (loop_0 + start_0 + 0 + app_0 + app_1 + app_2 + app_3 + (location-cr-state loc_0)))))))) (void)))))) (define port-count-all! (lambda (in_0 extra-ins_0 amt_0 bstr_0 start_0) @@ -6579,13 +6597,14 @@ (port-count! in_0 1 (bytes b_0) 0) (let ((column_0 (location-column loc_0))) (let ((position_0 (location-position loc_0))) - (begin - (if position_0 - (set-location-position! loc_0 (add1 position_0)) - (void)) - (if column_0 - (set-location-column! loc_0 (add1 column_0)) - (void)))))) + (let ((column_1 column_0)) + (begin + (if position_0 + (set-location-position! loc_0 (add1 position_0)) + (void)) + (if column_1 + (set-location-column! loc_0 (add1 column_1)) + (void))))))) (void)))))) (define port-count-byte-all! (lambda (in_0 extra-ins_0 b_0) @@ -7216,18 +7235,42 @@ (commit-input-port-methods?.1_1864 (impersonator-val v)) #f)))))) (define commit-input-port-vtable.1 - (commit-input-port-methods5.1 - (core-port-methods-close.1 core-input-port-vtable.1) - (core-port-methods-count-lines!.1 core-input-port-vtable.1) - (core-port-methods-get-location.1 core-input-port-vtable.1) - (core-port-methods-file-position.1 core-input-port-vtable.1) - (core-port-methods-buffer-mode.1 core-input-port-vtable.1) - (core-input-port-methods-prepare-change.1 core-input-port-vtable.1) - (core-input-port-methods-read-in.1 core-input-port-vtable.1) - (core-input-port-methods-peek-in.1 core-input-port-vtable.1) - (core-input-port-methods-byte-ready.1 core-input-port-vtable.1) - (core-input-port-methods-get-progress-evt.1 core-input-port-vtable.1) - (core-input-port-methods-commit.1 core-input-port-vtable.1))) + (let ((app_0 (core-port-methods-close.1 core-input-port-vtable.1))) + (let ((app_1 (core-port-methods-count-lines!.1 core-input-port-vtable.1))) + (let ((app_2 + (core-port-methods-get-location.1 core-input-port-vtable.1))) + (let ((app_3 + (core-port-methods-file-position.1 core-input-port-vtable.1))) + (let ((app_4 + (core-port-methods-buffer-mode.1 core-input-port-vtable.1))) + (let ((app_5 + (core-input-port-methods-prepare-change.1 + core-input-port-vtable.1))) + (let ((app_6 + (core-input-port-methods-read-in.1 + core-input-port-vtable.1))) + (let ((app_7 + (core-input-port-methods-peek-in.1 + core-input-port-vtable.1))) + (let ((app_8 + (core-input-port-methods-byte-ready.1 + core-input-port-vtable.1))) + (let ((app_9 + (core-input-port-methods-get-progress-evt.1 + core-input-port-vtable.1))) + (commit-input-port-methods5.1 + app_0 + app_1 + app_2 + app_3 + app_4 + app_5 + app_6 + app_7 + app_8 + app_9 + (core-input-port-methods-commit.1 + core-input-port-vtable.1))))))))))))) (define temp1.1 (|#%name| progress! @@ -7493,7 +7536,9 @@ (|#%name| input-empty? (lambda (this-id_0) - (begin (fx= (pipe-data-start this-id_0) (pipe-data-end this-id_0)))))) + (begin + (let ((app_0 (pipe-data-start this-id_0))) + (fx= app_0 (pipe-data-end this-id_0))))))) (define temp6.1$2 (|#%name| output-full? @@ -7620,255 +7665,273 @@ (pipe-input-port-methods?.1_2609 (impersonator-val v)) #f)))))) (define pipe-input-port-vtable.1 - (pipe-input-port-methods15.1 - (|#%name| - close - (lambda (this-id_0) - (begin - (let ((o_0 (pipe-input-port-d this-id_0))) - (if (pipe-data-input-ref o_0) - (begin - (temp12.1 this-id_0) - (set-pipe-data-input-ref! o_0 #f) - (temp1.1 this-id_0) - (temp8.1$1 o_0) - (temp7.1$2 o_0)) - (void)))))) - (|#%name| count-lines! (lambda (this-id_0) (begin (temp12.1 this-id_0)))) - (core-port-methods-get-location.1 commit-input-port-vtable.1) - (core-port-methods-file-position.1 commit-input-port-vtable.1) - (core-port-methods-buffer-mode.1 commit-input-port-vtable.1) - (|#%name| - prepare-change - (lambda (this-id_0) - (begin (let ((o_0 (pipe-input-port-d this-id_0))) (temp2.1 this-id_0))))) - (|#%name| - read-in - (lambda (this-id_0 dest-bstr396_0 dest-start397_0 dest-end398_0 copy?399_0) - (begin - (begin - (begin-unsafe (void)) - (temp12.1 this-id_0) - (let ((o_0 (pipe-input-port-d this-id_0))) - (if (temp5.1$2 o_0) - (if (pipe-data-output-ref o_0) - (pipe-data-read-ready-evt o_0) - eof) - (begin - (temp7.1$2 o_0) - (let ((s_0 (pipe-data-start o_0))) - (let ((e_0 (pipe-data-end o_0))) - (let ((amt_0 - (if (fx< s_0 e_0) - (let ((amt_0 - (let ((app_0 - (fx- - dest-end398_0 - dest-start397_0))) - (fxmin app_0 (fx- e_0 s_0))))) - (begin - (let ((app_0 (pipe-data-bstr o_0))) - (unsafe-bytes-copy! - dest-bstr396_0 - dest-start397_0 - app_0 - s_0 - (fx+ s_0 amt_0))) - (set-pipe-data-start! o_0 (fx+ s_0 amt_0)) - (set-pipe-data-peeked-amt! - o_0 - (fxmax - 0 - (fx- (pipe-data-peeked-amt o_0) amt_0))) - amt_0)) - (let ((amt_0 - (let ((app_0 - (fx- - dest-end398_0 - dest-start397_0))) - (fxmin - app_0 - (fx- (pipe-data-len o_0) s_0))))) - (begin - (let ((app_0 (pipe-data-bstr o_0))) - (unsafe-bytes-copy! - dest-bstr396_0 - dest-start397_0 - app_0 - s_0 - (fx+ s_0 amt_0))) - (set-pipe-data-start! - o_0 - (let ((app_0 (fx+ s_0 amt_0))) - (modulo app_0 (pipe-data-len o_0)))) - (set-pipe-data-peeked-amt! - o_0 - (fxmax - 0 - (fx- (pipe-data-peeked-amt o_0) amt_0))) - amt_0))))) - (begin - (temp1.1 this-id_0) - (temp11.1 this-id_0 amt_0) - amt_0))))))))))) - (|#%name| - peek-in - (lambda (this-id_0 - dest-bstr448_0 - dest-start449_0 - dest-end450_0 - skip451_0 - progress-evt452_0 - copy?453_0) - (begin - (let ((o_0 (pipe-input-port-d this-id_0))) + (let ((app_0 (core-port-methods-get-location.1 commit-input-port-vtable.1))) + (let ((app_1 + (core-port-methods-file-position.1 commit-input-port-vtable.1))) + (pipe-input-port-methods15.1 + (|#%name| + close + (lambda (this-id_0) (begin - (temp3.1$3 o_0) - (let ((content-amt_0 (temp4.1$2 o_0))) - (if (if progress-evt452_0 (sync/timeout 0 progress-evt452_0) #f) - #f - (if (<= content-amt_0 skip451_0) - (if (not (pipe-data-output-ref o_0)) - eof - (begin - (if (let ((or-part_0 (zero? skip451_0))) - (if or-part_0 - or-part_0 - (pipe-data-more-read-ready-sema o_0))) - (void) - (begin - (set-pipe-data-more-read-ready-sema! - o_0 - (make-semaphore)) - (let ((r_0 (pipe-data-output-ref o_0))) - (let ((out_0 (begin-unsafe (weak-box-value r_0)))) - (if out_0 (temp19.1$1 out_0) (void)))))) - (let ((evt_0 - (if (zero? skip451_0) - (pipe-data-read-ready-evt o_0) - (wrap-evt - (semaphore-peek-evt - (pipe-data-more-read-ready-sema o_0)) - (lambda (v_0) 0))))) - evt_0))) - (let ((peek-start_0 - (let ((app_0 (fx+ (pipe-data-start o_0) skip451_0))) - (fxmodulo app_0 (pipe-data-len o_0))))) - (if (fx< peek-start_0 (pipe-data-end o_0)) - (let ((amt_0 - (let ((app_0 (fx- dest-end450_0 dest-start449_0))) - (fxmin - app_0 - (fx- (pipe-data-end o_0) peek-start_0))))) - (begin - (let ((app_0 (pipe-data-bstr o_0))) - (unsafe-bytes-copy! - dest-bstr448_0 - dest-start449_0 - app_0 - peek-start_0 - (fx+ peek-start_0 amt_0))) - (temp9.1$1 o_0 (+ skip451_0 amt_0)) - amt_0)) - (let ((amt_0 - (let ((app_0 (fx- dest-end450_0 dest-start449_0))) - (fxmin - app_0 - (fx- (pipe-data-len o_0) peek-start_0))))) - (begin - (let ((app_0 (pipe-data-bstr o_0))) - (unsafe-bytes-copy! - dest-bstr448_0 - dest-start449_0 - app_0 - peek-start_0 - (fx+ peek-start_0 amt_0))) - (temp9.1$1 o_0 (+ skip451_0 amt_0)) - amt_0)))))))))))) - (|#%name| - byte-ready - (lambda (this-id_0 work-done!504_0) - (begin - (begin - (begin-unsafe (void)) - (let ((o_0 (pipe-input-port-d this-id_0))) - (let ((or-part_0 (not (pipe-data-output-ref o_0)))) - (if or-part_0 - or-part_0 - (begin (temp3.1$3 o_0) (not (fx= 0 (temp4.1$2 o_0))))))))))) - (|#%name| - get-progress-evt - (lambda (this-id_0) - (begin - (begin - (unsafe-start-atomic) - (begin0 (let ((o_0 (pipe-input-port-d this-id_0))) - (if (not (pipe-data-input-ref o_0)) - always-evt - (begin (temp12.1 this-id_0) (temp4.1 this-id_0)))) - (unsafe-end-atomic)))))) - (|#%name| - commit - (lambda (this-id_0 amt594_0 progress-evt595_0 ext-evt596_0 finish597_0) - (begin - (begin - (begin-unsafe (void)) - (if (zero? amt594_0) - (temp1.1 this-id_0) - (temp3.1 - this-id_0 - progress-evt595_0 - ext-evt596_0 - (lambda () - (let ((o_0 (pipe-input-port-d this-id_0))) - (begin - (temp12.1 this-id_0) - (let ((amt_0 (min amt594_0 (temp4.1$2 o_0)))) - (if (fx= 0 amt_0) - (|#%app| finish597_0 #vu8()) - (let ((dest-bstr_0 (make-bytes amt_0))) - (let ((s_0 (pipe-data-start o_0))) - (let ((e_0 (pipe-data-end o_0))) - (begin + (if (pipe-data-input-ref o_0) + (begin + (|#%app| temp12.1 this-id_0) + (set-pipe-data-input-ref! o_0 #f) + (temp1.1 this-id_0) + (temp8.1$1 o_0) + (temp7.1$2 o_0)) + (void)))))) + (|#%name| + count-lines! + (lambda (this-id_0) (begin (|#%app| temp12.1 this-id_0)))) + app_0 + app_1 + (core-port-methods-buffer-mode.1 commit-input-port-vtable.1) + (|#%name| + prepare-change + (lambda (this-id_0) + (begin + (let ((o_0 (pipe-input-port-d this-id_0))) (temp2.1 this-id_0))))) + (|#%name| + read-in + (lambda (this-id_0 + dest-bstr396_0 + dest-start397_0 + dest-end398_0 + copy?399_0) + (begin + (begin + (begin-unsafe (void)) + (|#%app| temp12.1 this-id_0) + (let ((o_0 (pipe-input-port-d this-id_0))) + (if (temp5.1$2 o_0) + (if (pipe-data-output-ref o_0) + (pipe-data-read-ready-evt o_0) + eof) + (begin + (temp7.1$2 o_0) + (let ((s_0 (pipe-data-start o_0))) + (let ((e_0 (pipe-data-end o_0))) + (let ((amt_0 (if (fx< s_0 e_0) - (let ((app_0 (pipe-data-bstr o_0))) - (unsafe-bytes-copy! - dest-bstr_0 - 0 - app_0 - s_0 - (fx+ s_0 amt_0))) - (let ((amt1_0 - (fxmin - (fx- (pipe-data-len o_0) s_0) - amt_0))) + (let ((amt_0 + (let ((app_2 + (fx- + dest-end398_0 + dest-start397_0))) + (fxmin app_2 (fx- e_0 s_0))))) (begin - (let ((app_0 (pipe-data-bstr o_0))) + (let ((app_2 (pipe-data-bstr o_0))) + (unsafe-bytes-copy! + dest-bstr396_0 + dest-start397_0 + app_2 + s_0 + (fx+ s_0 amt_0))) + (set-pipe-data-start! o_0 (fx+ s_0 amt_0)) + (set-pipe-data-peeked-amt! + o_0 + (fxmax + 0 + (fx- (pipe-data-peeked-amt o_0) amt_0))) + amt_0)) + (let ((amt_0 + (let ((app_2 + (fx- + dest-end398_0 + dest-start397_0))) + (fxmin + app_2 + (fx- (pipe-data-len o_0) s_0))))) + (begin + (let ((app_2 (pipe-data-bstr o_0))) + (unsafe-bytes-copy! + dest-bstr396_0 + dest-start397_0 + app_2 + s_0 + (fx+ s_0 amt_0))) + (set-pipe-data-start! + o_0 + (let ((app_2 (fx+ s_0 amt_0))) + (modulo app_2 (pipe-data-len o_0)))) + (set-pipe-data-peeked-amt! + o_0 + (fxmax + 0 + (fx- (pipe-data-peeked-amt o_0) amt_0))) + amt_0))))) + (begin + (temp1.1 this-id_0) + (|#%app| temp11.1 this-id_0 amt_0) + amt_0))))))))))) + (|#%name| + peek-in + (lambda (this-id_0 + dest-bstr448_0 + dest-start449_0 + dest-end450_0 + skip451_0 + progress-evt452_0 + copy?453_0) + (begin + (let ((o_0 (pipe-input-port-d this-id_0))) + (begin + (temp3.1$3 o_0) + (let ((content-amt_0 (temp4.1$2 o_0))) + (if (if progress-evt452_0 + (sync/timeout 0 progress-evt452_0) + #f) + #f + (if (<= content-amt_0 skip451_0) + (if (not (pipe-data-output-ref o_0)) + eof + (begin + (if (let ((or-part_0 (zero? skip451_0))) + (if or-part_0 + or-part_0 + (pipe-data-more-read-ready-sema o_0))) + (void) + (begin + (set-pipe-data-more-read-ready-sema! + o_0 + (make-semaphore)) + (let ((out_0 + (let ((r_0 (pipe-data-output-ref o_0))) + (begin-unsafe (weak-box-value r_0))))) + (if out_0 (|#%app| temp19.1$1 out_0) (void))))) + (let ((evt_0 + (if (zero? skip451_0) + (pipe-data-read-ready-evt o_0) + (wrap-evt + (semaphore-peek-evt + (pipe-data-more-read-ready-sema o_0)) + (lambda (v_0) 0))))) + evt_0))) + (let ((peek-start_0 + (let ((app_2 + (fx+ (pipe-data-start o_0) skip451_0))) + (fxmodulo app_2 (pipe-data-len o_0))))) + (if (fx< peek-start_0 (pipe-data-end o_0)) + (let ((amt_0 + (let ((app_2 + (fx- dest-end450_0 dest-start449_0))) + (fxmin + app_2 + (fx- (pipe-data-end o_0) peek-start_0))))) + (begin + (let ((app_2 (pipe-data-bstr o_0))) + (unsafe-bytes-copy! + dest-bstr448_0 + dest-start449_0 + app_2 + peek-start_0 + (fx+ peek-start_0 amt_0))) + (temp9.1$1 o_0 (+ skip451_0 amt_0)) + amt_0)) + (let ((amt_0 + (let ((app_2 + (fx- dest-end450_0 dest-start449_0))) + (fxmin + app_2 + (fx- (pipe-data-len o_0) peek-start_0))))) + (begin + (let ((app_2 (pipe-data-bstr o_0))) + (unsafe-bytes-copy! + dest-bstr448_0 + dest-start449_0 + app_2 + peek-start_0 + (fx+ peek-start_0 amt_0))) + (temp9.1$1 o_0 (+ skip451_0 amt_0)) + amt_0)))))))))))) + (|#%name| + byte-ready + (lambda (this-id_0 work-done!504_0) + (begin + (begin + (begin-unsafe (void)) + (let ((o_0 (pipe-input-port-d this-id_0))) + (let ((or-part_0 (not (pipe-data-output-ref o_0)))) + (if or-part_0 + or-part_0 + (begin + (temp3.1$3 o_0) + (not (fx= 0 (temp4.1$2 o_0))))))))))) + (|#%name| + get-progress-evt + (lambda (this-id_0) + (begin + (begin + (unsafe-start-atomic) + (begin0 + (let ((o_0 (pipe-input-port-d this-id_0))) + (if (not (pipe-data-input-ref o_0)) + always-evt + (begin (|#%app| temp12.1 this-id_0) (temp4.1 this-id_0)))) + (unsafe-end-atomic)))))) + (|#%name| + commit + (lambda (this-id_0 amt594_0 progress-evt595_0 ext-evt596_0 finish597_0) + (begin + (begin + (begin-unsafe (void)) + (if (zero? amt594_0) + (temp1.1 this-id_0) + (temp3.1 + this-id_0 + progress-evt595_0 + ext-evt596_0 + (lambda () + (let ((o_0 (pipe-input-port-d this-id_0))) + (begin + (|#%app| temp12.1 this-id_0) + (let ((amt_0 (min amt594_0 (temp4.1$2 o_0)))) + (if (fx= 0 amt_0) + (|#%app| finish597_0 #vu8()) + (let ((dest-bstr_0 (make-bytes amt_0))) + (let ((s_0 (pipe-data-start o_0))) + (let ((e_0 (pipe-data-end o_0))) + (begin + (if (fx< s_0 e_0) + (let ((app_2 (pipe-data-bstr o_0))) (unsafe-bytes-copy! dest-bstr_0 0 - app_0 + app_2 s_0 - (fx+ s_0 amt1_0))) - (if (fx< amt1_0 amt_0) - (let ((app_0 (pipe-data-bstr o_0))) - (unsafe-bytes-copy! - dest-bstr_0 - amt1_0 - app_0 - 0 - (fx- amt_0 amt1_0))) - (void))))) - (set-pipe-data-start! - o_0 - (let ((app_0 (fx+ s_0 amt_0))) - (fxmodulo app_0 (pipe-data-len o_0)))) - (temp1.1 this-id_0) - (temp11.1 this-id_0 amt_0) - (|#%app| - finish597_0 - dest-bstr_0)))))))))))))))))) + (fx+ s_0 amt_0))) + (let ((amt1_0 + (fxmin + (fx- (pipe-data-len o_0) s_0) + amt_0))) + (begin + (let ((app_2 (pipe-data-bstr o_0))) + (unsafe-bytes-copy! + dest-bstr_0 + 0 + app_2 + s_0 + (fx+ s_0 amt1_0))) + (if (fx< amt1_0 amt_0) + (let ((app_2 (pipe-data-bstr o_0))) + (unsafe-bytes-copy! + dest-bstr_0 + amt1_0 + app_2 + 0 + (fx- amt_0 amt1_0))) + (void))))) + (set-pipe-data-start! + o_0 + (let ((app_2 (fx+ s_0 amt_0))) + (fxmodulo app_2 (pipe-data-len o_0)))) + (temp1.1 this-id_0) + (|#%app| temp11.1 this-id_0 amt_0) + (|#%app| + finish597_0 + dest-bstr_0)))))))))))))))))))) (define temp13.1 (|#%name| on-resize (lambda (this-id_0) (begin (temp12.1 this-id_0))))) (define temp14.1 @@ -8068,95 +8131,109 @@ (if or-part_0 or-part_0 (let ((app_6 - (+ - (pipe-data-limit o_0) - (pipe-data-peeked-amt - o_0)))) + (let ((app_6 + (pipe-data-limit + o_0))) + (+ + app_6 + (pipe-data-peeked-amt + o_0))))) (> app_6 (fx- (pipe-data-len o_0) 1))))) - (let ((r_0 - (pipe-data-input-ref o_0))) - (let ((in_0 + (let ((in_0 + (let ((r_0 + (pipe-data-input-ref + o_0))) (begin-unsafe - (weak-box-value r_0)))) - (begin - (if in_0 - (temp13.1 in_0) - (void)) - (let ((new-bstr_0 - (make-bytes - (let ((app_6 - (if (pipe-data-limit - o_0) + (weak-box-value r_0))))) + (begin + (if in_0 + (temp13.1 in_0) + (void)) + (let ((new-bstr_0 + (make-bytes + (let ((app_6 + (if (pipe-data-limit + o_0) + (let ((app_6 + (pipe-data-limit + o_0))) (+ - (pipe-data-limit - o_0) + app_6 (pipe-data-peeked-amt - o_0)) - #f))) - (min+1 - app_6 - (* - (pipe-data-len - o_0) - 2)))))) - (begin - (if (fx= - 0 - (pipe-data-start - o_0)) + o_0))) + #f))) + (min+1 + app_6 + (* + (pipe-data-len o_0) + 2)))))) + (begin + (if (fx= + 0 + (pipe-data-start o_0)) + (let ((app_6 + (pipe-data-bstr + o_0))) + (unsafe-bytes-copy! + new-bstr_0 + 0 + app_6 + 0 + (fx- + (pipe-data-len o_0) + 1))) + (begin (let ((app_6 (pipe-data-bstr o_0))) - (unsafe-bytes-copy! - new-bstr_0 - 0 - app_6 - 0 - (fx- - (pipe-data-len o_0) - 1))) - (begin - (unsafe-bytes-copy! - new-bstr_0 - 0 - (pipe-data-bstr o_0) - (pipe-data-start - o_0) - (pipe-data-len o_0)) - (let ((app_6 + (let ((app_7 + (pipe-data-start + o_0))) + (unsafe-bytes-copy! + new-bstr_0 + 0 + app_6 + app_7 + (pipe-data-len + o_0)))) + (let ((app_6 + (let ((app_6 + (pipe-data-len + o_0))) (fx- - (pipe-data-len - o_0) + app_6 (pipe-data-start - o_0)))) + o_0))))) + (let ((app_7 + (pipe-data-bstr + o_0))) (unsafe-bytes-copy! new-bstr_0 app_6 - (pipe-data-bstr - o_0) + app_7 0 (pipe-data-end - o_0))) - (set-pipe-data-start! - o_0 - 0) - (set-pipe-data-end! - o_0 - (fx- - (pipe-data-len o_0) - 1)))) - (set-pipe-data-bstr! - o_0 - new-bstr_0) - (set-pipe-data-len! - o_0 - (unsafe-bytes-length - new-bstr_0)) - (try-again_0)))))) + o_0)))) + (set-pipe-data-start! + o_0 + 0) + (set-pipe-data-end! + o_0 + (fx- + (pipe-data-len o_0) + 1)))) + (set-pipe-data-bstr! + o_0 + new-bstr_0) + (set-pipe-data-len! + o_0 + (unsafe-bytes-length + new-bstr_0)) + (try-again_0))))) (pipe-is-full_0)))))) (pipe-is-full_0 (|#%name| @@ -8175,19 +8252,24 @@ (min amt_0 (let ((app_6 - (+ - (pipe-data-limit o_0) - (pipe-data-peeked-amt - o_0)))) + (let ((app_6 + (pipe-data-limit + o_0))) + (+ + app_6 + (pipe-data-peeked-amt + o_0))))) (- app_6 (temp4.1$2 o_0)))) amt_0)))))) (if (fx= src-start819_0 src-end820_0) 0 (if (not (pipe-data-input-ref o_0)) (fx- src-end820_0 src-start819_0) - (if (if (fx>= - (pipe-data-end o_0) - (pipe-data-start o_0)) + (if (if (let ((app_6 + (pipe-data-end o_0))) + (fx>= + app_6 + (pipe-data-start o_0))) (fx< (pipe-data-end o_0) top-pos_0) @@ -8515,7 +8597,7 @@ ((limit24_0) (make-pipe_0 limit24_0 'pipe 'pipe)))))) (define struct:pipe-write-poller (make-record-type-descriptor* 'pipe-write-poller #f #f #f #f 1 0)) -(define effect_2873 +(define effect_2371 (struct-type-install-properties! struct:pipe-write-poller 'pipe-write-poller @@ -8543,15 +8625,16 @@ (if (pipe-data-write-ready-sema o_0) (void) (set-pipe-data-write-ready-sema! o_0 (make-semaphore))) - (let ((r_0 (pipe-data-input-ref o_0))) - (let ((in_0 (begin-unsafe (weak-box-value r_0)))) - (begin - (if in_0 (temp14.1 in_0) (void)) - (values - #f - (replace-evt - (semaphore-peek-evt (pipe-data-write-ready-sema o_0)) - (lambda (v_0) pwp_0)))))))))))))) + (let ((in_0 + (let ((r_0 (pipe-data-input-ref o_0))) + (begin-unsafe (weak-box-value r_0))))) + (begin + (if in_0 (temp14.1 in_0) (void)) + (values + #f + (replace-evt + (semaphore-peek-evt (pipe-data-write-ready-sema o_0)) + (lambda (v_0) pwp_0))))))))))))) (current-inspector) #f '(0) @@ -8592,7 +8675,7 @@ 'd)))))) (define struct:pipe-read-poller (make-record-type-descriptor* 'pipe-read-poller #f #f #f #f 1 0)) -(define effect_2386 +(define effect_2439 (struct-type-install-properties! struct:pipe-read-poller 'pipe-read-poller @@ -8620,15 +8703,16 @@ (if (pipe-data-read-ready-sema o_0) (void) (set-pipe-data-read-ready-sema! o_0 (make-semaphore))) - (let ((r_0 (pipe-data-output-ref o_0))) - (let ((out_0 (begin-unsafe (weak-box-value r_0)))) - (begin - (if out_0 (temp18.1$1 out_0) (void)) - (values - #f - (wrap-evt - (semaphore-peek-evt (pipe-data-read-ready-sema o_0)) - (lambda (v_0) 0)))))))))))))) + (let ((out_0 + (let ((r_0 (pipe-data-output-ref o_0))) + (begin-unsafe (weak-box-value r_0))))) + (begin + (if out_0 (temp18.1$1 out_0) (void)) + (values + #f + (wrap-evt + (semaphore-peek-evt (pipe-data-read-ready-sema o_0)) + (lambda (v_0) 0))))))))))))) (current-inspector) #f '(0) @@ -8804,243 +8888,272 @@ 'peek-via-read-input-port-methods 'read-in/inner)))))) (define peek-via-read-input-port-vtable.1 - (peek-via-read-input-port-methods10.1 - (|#%name| close (lambda (this-id_0) (begin (temp7.1 this-id_0)))) - (core-port-methods-count-lines!.1 commit-input-port-vtable.1) - (core-port-methods-get-location.1 commit-input-port-vtable.1) - (core-port-methods-file-position.1 commit-input-port-vtable.1) - (|#%name| - buffer-mode - (case-lambda - ((this-id_0) (begin (temp9.1 this-id_0))) - ((this-id_0 mode42_0) (temp9.1 this-id_0 mode42_0)))) - (|#%name| prepare-change (lambda (this-id_0) (begin (temp2.1 this-id_0)))) - (|#%name| - read-in - (lambda (this-id_0 dest-bstr131_0 start132_0 end133_0 copy?134_0) - (begin - (begin - (temp5.1$1 this-id_0) - (letrec* - ((try-again_0 - (|#%name| - try-again - (lambda () - (begin - (if (fx< - (peek-via-read-input-port-pos this-id_0) - (peek-via-read-input-port-end-pos this-id_0)) - (let ((amt_0 - (let ((app_0 - (fx- - (peek-via-read-input-port-end-pos this-id_0) - (peek-via-read-input-port-pos this-id_0)))) - (min app_0 (fx- end133_0 start132_0))))) - (begin - (let ((app_0 - (peek-via-read-input-port-bstr this-id_0))) - (let ((app_1 + (let ((app_0 (core-port-methods-count-lines!.1 commit-input-port-vtable.1))) + (let ((app_1 + (core-port-methods-get-location.1 commit-input-port-vtable.1))) + (peek-via-read-input-port-methods10.1 + (|#%name| + close + (lambda (this-id_0) (begin (|#%app| temp7.1 this-id_0)))) + app_0 + app_1 + (core-port-methods-file-position.1 commit-input-port-vtable.1) + (|#%name| + buffer-mode + (case-lambda + ((this-id_0) (begin (|#%app| temp9.1 this-id_0))) + ((this-id_0 mode42_0) (|#%app| temp9.1 this-id_0 mode42_0)))) + (|#%name| + prepare-change + (lambda (this-id_0) (begin (temp2.1 this-id_0)))) + (|#%name| + read-in + (lambda (this-id_0 dest-bstr131_0 start132_0 end133_0 copy?134_0) + (begin + (begin + (|#%app| temp5.1$1 this-id_0) + (letrec* + ((try-again_0 + (|#%name| + try-again + (lambda () + (begin + (if (let ((app_2 (peek-via-read-input-port-pos this-id_0))) - (unsafe-bytes-copy! - dest-bstr131_0 - start132_0 - app_0 - app_1 + (fx< + app_2 + (peek-via-read-input-port-end-pos this-id_0))) + (let ((amt_0 + (let ((app_2 + (let ((app_2 + (peek-via-read-input-port-end-pos + this-id_0))) + (fx- + app_2 + (peek-via-read-input-port-pos + this-id_0))))) + (min app_2 (fx- end133_0 start132_0))))) + (begin + (let ((app_2 + (peek-via-read-input-port-bstr this-id_0))) + (let ((app_3 + (peek-via-read-input-port-pos this-id_0))) + (unsafe-bytes-copy! + dest-bstr131_0 + start132_0 + app_2 + app_3 + (fx+ + (peek-via-read-input-port-pos this-id_0) + amt_0)))) + (set-peek-via-read-input-port-pos! + this-id_0 (fx+ (peek-via-read-input-port-pos this-id_0) - amt_0)))) - (set-peek-via-read-input-port-pos! - this-id_0 - (fx+ (peek-via-read-input-port-pos this-id_0) amt_0)) - (temp1.1 this-id_0) - (temp4.1$1 this-id_0 amt_0) - amt_0)) - (if (peek-via-read-input-port-peeked-eof? this-id_0) - (begin - (set-peek-via-read-input-port-peeked-eof?! - this-id_0 - #f) - eof) - (if (if (eq? - 'block - (peek-via-read-input-port-buffer-mode - this-id_0)) - (let ((app_0 (fx- end133_0 start132_0))) - (fx< - app_0 - (fxrshift - (unsafe-bytes-length - (peek-via-read-input-port-bstr this-id_0)) - 1))) - #f) - (let ((v_0 (temp1.1$1 this-id_0))) - (if (let ((or-part_0 (eqv? v_0 0))) - (if or-part_0 or-part_0 (evt? v_0))) - v_0 - (try-again_0))) - (let ((v_0 - (|#%app| - (peek-via-read-input-port-methods-read-in/inner.1 - (core-port-vtable this-id_0)) - this-id_0 - dest-bstr131_0 - start132_0 - end133_0 - copy?134_0))) - (begin - (if (eqv? v_0 0) (void) (temp1.1 this-id_0)) - v_0)))))))))) - (try-again_0)))))) - (|#%name| - peek-in - (lambda (this-id_0 - dest-bstr168_0 - start169_0 - end170_0 - skip171_0 - progress-evt172_0 - copy?173_0) - (begin - (letrec* - ((try-again_0 - (|#%name| - try-again - (lambda () - (begin - (if (if progress-evt172_0 - (sync/timeout 0 progress-evt172_0) - #f) - #f - (let ((b_0 (core-port-buffer this-id_0))) - (let ((s_0 - (if (direct-bstr b_0) - (direct-pos b_0) - (peek-via-read-input-port-pos this-id_0)))) - (let ((peeked-amt_0 - (fx- - (peek-via-read-input-port-end-pos this-id_0) - s_0))) - (if (> peeked-amt_0 skip171_0) - (let ((amt_0 - (let ((app_0 (fx- peeked-amt_0 skip171_0))) - (min app_0 (fx- end170_0 start169_0))))) - (let ((s-pos_0 (fx+ s_0 skip171_0))) - (begin - (let ((app_0 - (peek-via-read-input-port-bstr - this-id_0))) - (unsafe-bytes-copy! - dest-bstr168_0 - start169_0 - app_0 - s-pos_0 - (fx+ s-pos_0 amt_0))) - (if (commit-input-port-progress-sema this-id_0) - (void) - (temp4.1$1 this-id_0 0)) - amt_0))) - (if (peek-via-read-input-port-peeked-eof? this-id_0) - eof - (begin - (temp5.1$1 this-id_0) - (let ((v_0 - (temp2.1$1 - this-id_0 - (let ((app_0 (- skip171_0 peeked-amt_0))) - (+ app_0 (fx- end170_0 start169_0)))))) - (if (temp3.1$2 this-id_0 v_0) - (try-again_0) - v_0)))))))))))))) - (try-again_0))))) - (|#%name| - byte-ready - (lambda (this-id_0 work-done!209_0) - (begin - (letrec* - ((loop_0 - (|#%name| - loop - (lambda () - (begin - (let ((b_0 (core-port-buffer this-id_0))) - (let ((app_0 (peek-via-read-input-port-end-pos this-id_0))) - (let ((peeked-amt_0 - (fx- - app_0 - (if (direct-bstr b_0) - (direct-pos b_0) - (peek-via-read-input-port-pos this-id_0))))) - (if (fx> peeked-amt_0 0) - #t + amt_0)) + (temp1.1 this-id_0) + (|#%app| temp4.1$1 this-id_0 amt_0) + amt_0)) (if (peek-via-read-input-port-peeked-eof? this-id_0) - #t (begin - (temp5.1$1 this-id_0) - (let ((v_0 (temp1.1$1 this-id_0))) + (set-peek-via-read-input-port-peeked-eof?! + this-id_0 + #f) + eof) + (if (if (eq? + 'block + (peek-via-read-input-port-buffer-mode + this-id_0)) + (let ((app_2 (fx- end133_0 start132_0))) + (fx< + app_2 + (fxrshift + (unsafe-bytes-length + (peek-via-read-input-port-bstr this-id_0)) + 1))) + #f) + (let ((v_0 (|#%app| temp1.1$1 this-id_0))) + (if (let ((or-part_0 (eqv? v_0 0))) + (if or-part_0 or-part_0 (evt? v_0))) + v_0 + (try-again_0))) + (let ((v_0 + (|#%app| + (peek-via-read-input-port-methods-read-in/inner.1 + (core-port-vtable this-id_0)) + this-id_0 + dest-bstr131_0 + start132_0 + end133_0 + copy?134_0))) (begin - (|#%app| work-done!209_0) - (if (temp3.1$2 this-id_0 v_0) - (loop_0) - (if (evt? v_0) - v_0 - (not (eqv? v_0 0))))))))))))))))) - (loop_0))))) - (|#%name| - get-progress-evt - (lambda (this-id_0) - (begin - (begin - (unsafe-start-atomic) - (begin0 - (begin (temp5.1$1 this-id_0) (temp4.1 this-id_0)) - (unsafe-end-atomic)))))) - (|#%name| - commit - (lambda (this-id_0 amt269_0 progress-evt270_0 ext-evt271_0 finish272_0) - (begin - (begin - (temp5.1$1 this-id_0) - (temp3.1 - this-id_0 - progress-evt270_0 - ext-evt271_0 - (lambda () - (let ((amt_0 - (fxmin - amt269_0 - (fx- - (peek-via-read-input-port-end-pos this-id_0) - (peek-via-read-input-port-pos this-id_0))))) - (if (fx= 0 amt_0) - (|#%app| finish272_0 #vu8()) - (let ((dest-bstr_0 (make-bytes amt_0))) - (begin - (let ((app_0 (peek-via-read-input-port-bstr this-id_0))) - (let ((app_1 (peek-via-read-input-port-pos this-id_0))) - (unsafe-bytes-copy! - dest-bstr_0 - 0 - app_0 - app_1 - (fx+ - (peek-via-read-input-port-pos this-id_0) - amt_0)))) - (set-peek-via-read-input-port-pos! - this-id_0 - (fx+ (peek-via-read-input-port-pos this-id_0) amt_0)) - (temp1.1 this-id_0) - (|#%app| finish272_0 dest-bstr_0))))))))))) - (|#%name| - read-in/inner - (lambda (this-id_0 dest-bstr306_0 start307_0 end308_0 copy?309_0) - (begin 0))))) + (if (eqv? v_0 0) (void) (temp1.1 this-id_0)) + v_0)))))))))) + (try-again_0)))))) + (|#%name| + peek-in + (lambda (this-id_0 + dest-bstr168_0 + start169_0 + end170_0 + skip171_0 + progress-evt172_0 + copy?173_0) + (begin + (letrec* + ((try-again_0 + (|#%name| + try-again + (lambda () + (begin + (if (if progress-evt172_0 + (sync/timeout 0 progress-evt172_0) + #f) + #f + (let ((b_0 (core-port-buffer this-id_0))) + (let ((s_0 + (if (direct-bstr b_0) + (direct-pos b_0) + (peek-via-read-input-port-pos this-id_0)))) + (let ((peeked-amt_0 + (fx- + (peek-via-read-input-port-end-pos this-id_0) + s_0))) + (if (> peeked-amt_0 skip171_0) + (let ((amt_0 + (let ((app_2 + (fx- peeked-amt_0 skip171_0))) + (min app_2 (fx- end170_0 start169_0))))) + (let ((s-pos_0 (fx+ s_0 skip171_0))) + (begin + (let ((app_2 + (peek-via-read-input-port-bstr + this-id_0))) + (unsafe-bytes-copy! + dest-bstr168_0 + start169_0 + app_2 + s-pos_0 + (fx+ s-pos_0 amt_0))) + (if (commit-input-port-progress-sema + this-id_0) + (void) + (|#%app| temp4.1$1 this-id_0 0)) + amt_0))) + (if (peek-via-read-input-port-peeked-eof? + this-id_0) + eof + (begin + (|#%app| temp5.1$1 this-id_0) + (let ((v_0 + (let ((app_2 temp2.1$1)) + (|#%app| + app_2 + this-id_0 + (let ((app_3 + (- skip171_0 peeked-amt_0))) + (+ + app_3 + (fx- end170_0 start169_0))))))) + (if (|#%app| temp3.1$2 this-id_0 v_0) + (try-again_0) + v_0)))))))))))))) + (try-again_0))))) + (|#%name| + byte-ready + (lambda (this-id_0 work-done!209_0) + (begin + (letrec* + ((loop_0 + (|#%name| + loop + (lambda () + (begin + (let ((b_0 (core-port-buffer this-id_0))) + (let ((peeked-amt_0 + (let ((app_2 + (peek-via-read-input-port-end-pos + this-id_0))) + (fx- + app_2 + (if (direct-bstr b_0) + (direct-pos b_0) + (peek-via-read-input-port-pos this-id_0)))))) + (if (fx> peeked-amt_0 0) + #t + (if (peek-via-read-input-port-peeked-eof? this-id_0) + #t + (begin + (|#%app| temp5.1$1 this-id_0) + (let ((v_0 (|#%app| temp1.1$1 this-id_0))) + (begin + (|#%app| work-done!209_0) + (if (|#%app| temp3.1$2 this-id_0 v_0) + (loop_0) + (if (evt? v_0) + v_0 + (not (eqv? v_0 0)))))))))))))))) + (loop_0))))) + (|#%name| + get-progress-evt + (lambda (this-id_0) + (begin + (begin + (unsafe-start-atomic) + (begin0 + (begin (|#%app| temp5.1$1 this-id_0) (temp4.1 this-id_0)) + (unsafe-end-atomic)))))) + (|#%name| + commit + (lambda (this-id_0 amt269_0 progress-evt270_0 ext-evt271_0 finish272_0) + (begin + (begin + (|#%app| temp5.1$1 this-id_0) + (temp3.1 + this-id_0 + progress-evt270_0 + ext-evt271_0 + (lambda () + (let ((amt_0 + (fxmin + amt269_0 + (let ((app_2 + (peek-via-read-input-port-end-pos this-id_0))) + (fx- + app_2 + (peek-via-read-input-port-pos this-id_0)))))) + (if (fx= 0 amt_0) + (|#%app| finish272_0 #vu8()) + (let ((dest-bstr_0 (make-bytes amt_0))) + (begin + (let ((app_2 + (peek-via-read-input-port-bstr this-id_0))) + (let ((app_3 + (peek-via-read-input-port-pos this-id_0))) + (unsafe-bytes-copy! + dest-bstr_0 + 0 + app_2 + app_3 + (fx+ + (peek-via-read-input-port-pos this-id_0) + amt_0)))) + (set-peek-via-read-input-port-pos! + this-id_0 + (fx+ (peek-via-read-input-port-pos this-id_0) amt_0)) + (temp1.1 this-id_0) + (|#%app| finish272_0 dest-bstr_0))))))))))) + (|#%name| + read-in/inner + (lambda (this-id_0 dest-bstr306_0 start307_0 end308_0 copy?309_0) + (begin 0))))))) (define temp6.1$1 (|#%name| purge-buffer (lambda (this-id_0) (begin (begin - (temp5.1$1 this-id_0) + (|#%app| temp5.1$1 this-id_0) (set-peek-via-read-input-port-pos! this-id_0 0) (set-peek-via-read-input-port-end-pos! this-id_0 0) (set-peek-via-read-input-port-peeked-eof?! this-id_0 #f)))))) @@ -9106,14 +9219,16 @@ (peek-via-read-input-port-bstr this-id498_0)))))) (let ((v_0 - (|#%app| - (peek-via-read-input-port-methods-read-in/inner.1 - (core-port-vtable this-id498_0)) - this-id498_0 - (peek-via-read-input-port-bstr this-id498_0) - offset493_0 - get-end_0 - #f))) + (let ((app_0 + (peek-via-read-input-port-methods-read-in/inner.1 + (core-port-vtable this-id498_0)))) + (|#%app| + app_0 + this-id498_0 + (peek-via-read-input-port-bstr this-id498_0) + offset493_0 + get-end_0 + #f)))) (if (eof-object? v_0) (begin (set-peek-via-read-input-port-peeked-eof?! @@ -9157,23 +9272,27 @@ pull-more-bytes (lambda (this-id_0 amt621_0) (begin - (if (fx< - (peek-via-read-input-port-end-pos this-id_0) - (unsafe-bytes-length (peek-via-read-input-port-bstr this-id_0))) + (if (let ((app_0 (peek-via-read-input-port-end-pos this-id_0))) + (fx< + app_0 + (unsafe-bytes-length (peek-via-read-input-port-bstr this-id_0)))) (let ((pull-amt_0 (if (eq? 'block (peek-via-read-input-port-buffer-mode this-id_0)) - (fx- - (unsafe-bytes-length - (peek-via-read-input-port-bstr this-id_0)) - (peek-via-read-input-port-end-pos this-id_0)) + (let ((app_0 + (unsafe-bytes-length + (peek-via-read-input-port-bstr this-id_0)))) + (fx- app_0 (peek-via-read-input-port-end-pos this-id_0))) amt621_0))) - (temp1.1$1 - this-id_0 - pull-amt_0 - (peek-via-read-input-port-end-pos this-id_0) - (peek-via-read-input-port-pos this-id_0))) + (let ((app_0 temp1.1$1)) + (let ((app_1 (peek-via-read-input-port-end-pos this-id_0))) + (|#%app| + app_0 + this-id_0 + pull-amt_0 + app_1 + (peek-via-read-input-port-pos this-id_0))))) (if (fx= (peek-via-read-input-port-pos this-id_0) 0) (let ((new-bstr_0 (make-bytes @@ -9182,29 +9301,34 @@ (unsafe-bytes-length (peek-via-read-input-port-bstr this-id_0)))))) (begin - (unsafe-bytes-copy! - new-bstr_0 - 0 - (peek-via-read-input-port-bstr this-id_0) - 0 - (peek-via-read-input-port-end-pos this-id_0)) + (let ((app_0 (peek-via-read-input-port-bstr this-id_0))) + (unsafe-bytes-copy! + new-bstr_0 + 0 + app_0 + 0 + (peek-via-read-input-port-end-pos this-id_0))) (set-peek-via-read-input-port-bstr! this-id_0 new-bstr_0) - (temp1.1$1 - this-id_0 - amt621_0 - (peek-via-read-input-port-end-pos this-id_0)))) + (let ((app_0 temp1.1$1)) + (|#%app| + app_0 + this-id_0 + amt621_0 + (peek-via-read-input-port-end-pos this-id_0))))) (begin - (unsafe-bytes-copy! - (peek-via-read-input-port-bstr this-id_0) - 0 - (peek-via-read-input-port-bstr this-id_0) - (peek-via-read-input-port-pos this-id_0) - (peek-via-read-input-port-end-pos this-id_0)) + (let ((app_0 (peek-via-read-input-port-bstr this-id_0))) + (let ((app_1 (peek-via-read-input-port-bstr this-id_0))) + (let ((app_2 (peek-via-read-input-port-pos this-id_0))) + (unsafe-bytes-copy! + app_0 + 0 + app_1 + app_2 + (peek-via-read-input-port-end-pos this-id_0))))) (set-peek-via-read-input-port-end-pos! this-id_0 - (fx- - (peek-via-read-input-port-end-pos this-id_0) - (peek-via-read-input-port-pos this-id_0))) + (let ((app_0 (peek-via-read-input-port-end-pos this-id_0))) + (fx- app_0 (peek-via-read-input-port-pos this-id_0)))) (set-peek-via-read-input-port-pos! this-id_0 0) (temp2.1$1 this-id_0 amt621_0)))))))) (define temp3.1$2 @@ -9542,87 +9666,127 @@ 'fd-input-port-methods 'raise-read-error)))))) (define fd-input-port-vtable.1 - (fd-input-port-methods6.1 - (|#%name| - close - (lambda (this-id_0) - (begin - (begin - (|#%app| - (fd-input-port-methods-on-close.1 (core-port-vtable this-id_0)) - this-id_0) - (let ((fd75_0 (fd-input-port-fd this-id_0))) - (let ((fd-refcount76_0 (fd-input-port-fd-refcount this-id_0))) - (fd-close.1 #f fd75_0 fd-refcount76_0))) - (|#%app| - 1/unsafe-custodian-unregister - this-id_0 - (fd-input-port-custodian-reference this-id_0)) - (temp7.1 this-id_0))))) - (core-port-methods-count-lines!.1 peek-via-read-input-port-vtable.1) - (core-port-methods-get-location.1 peek-via-read-input-port-vtable.1) - (|#%name| - file-position - (case-lambda - ((this-id_0) - (begin - (let ((pos_0 - (let ((app_0 get-file-position)) - (|#%app| app_0 (fd-input-port-fd this-id_0))))) - (if pos_0 (temp8.1 this-id_0 pos_0) #f)))) - ((this-id_0 pos77_0) - (begin - (temp6.1$1 this-id_0) - (let ((app_0 set-file-position)) - (|#%app| app_0 (fd-input-port-fd this-id_0) pos77_0)))))) - (core-port-methods-buffer-mode.1 peek-via-read-input-port-vtable.1) - (core-input-port-methods-prepare-change.1 peek-via-read-input-port-vtable.1) - (core-input-port-methods-read-in.1 peek-via-read-input-port-vtable.1) - (core-input-port-methods-peek-in.1 peek-via-read-input-port-vtable.1) - (core-input-port-methods-byte-ready.1 peek-via-read-input-port-vtable.1) - (core-input-port-methods-get-progress-evt.1 - peek-via-read-input-port-vtable.1) - (core-input-port-methods-commit.1 peek-via-read-input-port-vtable.1) - (|#%name| - read-in/inner - (lambda (this-id_0 dest-bstr133_0 start134_0 end135_0 copy?136_0) - (begin - (let ((n_0 - (|#%app| - rktio_read_in - (unsafe-place-local-ref cell.1) - (fd-input-port-fd this-id_0) - dest-bstr133_0 - start134_0 - end135_0))) - (if (vector? n_0) - (begin - (unsafe-end-atomic) - (|#%app| - (fd-input-port-methods-raise-read-error.1 - (core-port-vtable this-id_0)) - this-id_0 - n_0)) - (if (eqv? n_0 -1) - eof - (if (eqv? n_0 0) - (let ((or-part_0 - (fd-semaphore-update! - (fd-input-port-fd this-id_0) - 'read))) - (if or-part_0 - or-part_0 - (fd-evt44.1 (fd-input-port-fd this-id_0) 1 this-id_0))) - n_0))))))) - (|#%name| on-close (lambda (this-id_0) (begin (void)))) - (|#%name| - raise-read-error - (lambda (this-id_0 n195_0) - (begin - (raise-filesystem-error - #f - n195_0 - "error reading from stream port")))))) + (let ((app_0 + (core-port-methods-count-lines!.1 peek-via-read-input-port-vtable.1))) + (let ((app_1 + (core-port-methods-get-location.1 + peek-via-read-input-port-vtable.1))) + (let ((app_2 + (core-port-methods-buffer-mode.1 + peek-via-read-input-port-vtable.1))) + (let ((app_3 + (core-input-port-methods-prepare-change.1 + peek-via-read-input-port-vtable.1))) + (let ((app_4 + (core-input-port-methods-read-in.1 + peek-via-read-input-port-vtable.1))) + (let ((app_5 + (core-input-port-methods-peek-in.1 + peek-via-read-input-port-vtable.1))) + (let ((app_6 + (core-input-port-methods-byte-ready.1 + peek-via-read-input-port-vtable.1))) + (let ((app_7 + (core-input-port-methods-get-progress-evt.1 + peek-via-read-input-port-vtable.1))) + (fd-input-port-methods6.1 + (|#%name| + close + (lambda (this-id_0) + (begin + (begin + (|#%app| + (fd-input-port-methods-on-close.1 + (core-port-vtable this-id_0)) + this-id_0) + (let ((fd75_0 (fd-input-port-fd this-id_0))) + (let ((fd-refcount76_0 + (fd-input-port-fd-refcount this-id_0))) + (let ((fd75_1 fd75_0)) + (fd-close.1 #f fd75_1 fd-refcount76_0)))) + (|#%app| + 1/unsafe-custodian-unregister + this-id_0 + (fd-input-port-custodian-reference this-id_0)) + (temp7.1 this-id_0))))) + app_0 + app_1 + (|#%name| + file-position + (case-lambda + ((this-id_0) + (begin + (let ((pos_0 + (let ((app_8 get-file-position)) + (|#%app| + app_8 + (fd-input-port-fd this-id_0))))) + (if pos_0 (temp8.1 this-id_0 pos_0) #f)))) + ((this-id_0 pos77_0) + (begin + (temp6.1$1 this-id_0) + (let ((app_8 set-file-position)) + (|#%app| + app_8 + (fd-input-port-fd this-id_0) + pos77_0)))))) + app_2 + app_3 + app_4 + app_5 + app_6 + app_7 + (core-input-port-methods-commit.1 + peek-via-read-input-port-vtable.1) + (|#%name| + read-in/inner + (lambda (this-id_0 + dest-bstr133_0 + start134_0 + end135_0 + copy?136_0) + (begin + (let ((n_0 + (|#%app| + rktio_read_in + (unsafe-place-local-ref cell.1) + (fd-input-port-fd this-id_0) + dest-bstr133_0 + start134_0 + end135_0))) + (if (vector? n_0) + (begin + (unsafe-end-atomic) + (|#%app| + (fd-input-port-methods-raise-read-error.1 + (core-port-vtable this-id_0)) + this-id_0 + n_0)) + (if (eqv? n_0 -1) + eof + (if (eqv? n_0 0) + (let ((or-part_0 + (fd-semaphore-update! + (fd-input-port-fd this-id_0) + 'read))) + (if or-part_0 + or-part_0 + (let ((app_8 fd-evt44.1)) + (|#%app| + app_8 + (fd-input-port-fd this-id_0) + 1 + this-id_0)))) + n_0))))))) + (|#%name| on-close (lambda (this-id_0) (begin (void)))) + (|#%name| + raise-read-error + (lambda (this-id_0 n195_0) + (begin + (raise-filesystem-error + #f + n195_0 + "error reading from stream port")))))))))))))) (define open-input-fd.1 (|#%name| open-input-fd @@ -9901,7 +10065,8 @@ (let ((fd255_0 (fd-output-port-fd this-id_0))) (let ((fd-refcount256_0 (fd-output-port-fd-refcount this-id_0))) - (fd-close.1 #f fd255_0 fd-refcount256_0))) + (let ((fd255_1 fd255_0)) + (fd-close.1 #f fd255_1 fd-refcount256_0)))) (|#%app| 1/unsafe-custodian-unregister this-id_0 @@ -9965,20 +10130,23 @@ (fd-output-port-buffer-mode this-id_0) 'none)) (if (not nonbuffer/nonblock?372_0) - (fx< - (fd-output-port-end-pos this-id_0) - (unsafe-bytes-length - (fd-output-port-bstr this-id_0))) + (let ((app_4 (fd-output-port-end-pos this-id_0))) + (fx< + app_4 + (unsafe-bytes-length + (fd-output-port-bstr this-id_0)))) #f) #f) (let ((amt_0 (let ((app_4 (fx- src-end371_0 src-start370_0))) (fxmin app_4 - (fx- - (unsafe-bytes-length - (fd-output-port-bstr this-id_0)) - (fd-output-port-end-pos this-id_0)))))) + (let ((app_5 + (unsafe-bytes-length + (fd-output-port-bstr this-id_0)))) + (fx- + app_5 + (fd-output-port-end-pos this-id_0))))))) (begin (let ((app_4 (fd-output-port-bstr this-id_0))) (let ((app_5 (fd-output-port-end-pos this-id_0))) @@ -10108,17 +10276,19 @@ (begin (temp23.1 this-id_0) (if (not - (fx= - (fd-output-port-start-pos this-id_0) - (fd-output-port-end-pos this-id_0))) + (let ((app_0 (fd-output-port-start-pos this-id_0))) + (fx= app_0 (fd-output-port-end-pos this-id_0)))) (let ((n_0 - (|#%app| - rktio_write_in - (unsafe-place-local-ref cell.1) - (fd-output-port-fd this-id_0) - (fd-output-port-bstr this-id_0) - (fd-output-port-start-pos this-id_0) - (fd-output-port-end-pos this-id_0)))) + (let ((app_0 (fd-output-port-fd this-id_0))) + (let ((app_1 (fd-output-port-bstr this-id_0))) + (let ((app_2 (fd-output-port-start-pos this-id_0))) + (|#%app| + rktio_write_in + (unsafe-place-local-ref cell.1) + app_0 + app_1 + app_2 + (fd-output-port-end-pos this-id_0))))))) (if (vector? n_0) (begin (set-fd-output-port-start-pos! this-id_0 0) @@ -10293,7 +10463,7 @@ custodian39_0))) (let ((fd_0 (fd-output-port-fd p42_0))) (let ((fd-refcount_0 (fd-output-port-fd-refcount p42_0))) - (let ((evt_0 (fd-evt44.1 fd_0 2 p42_0))) + (let ((evt_0 (|#%app| fd-evt44.1 fd_0 2 p42_0))) (let ((flush-handle_0 (if plumber_0 (plumber-add-flush! @@ -11241,66 +11411,63 @@ (let ((buffer_0 (core-port-buffer in_0))) (let ((bstr_0 (direct-bstr buffer_0))) (let ((pos_0 (direct-pos buffer_0))) - (let ((app_0 (direct-end buffer_0))) - (let ((end_0 (fxmin app_0 (fx+ pos_0 4096)))) - (let ((finish_0 - (|#%name| - finish - (lambda (end_1 read-end_0) - (begin - (begin - (set-direct-pos! buffer_0 read-end_0) - (begin - (if (core-port-count in_0) - (port-count! - in_0 - (fx- read-end_0 pos_0) - bstr_0 - pos_0) - (void)) - (let ((result_0 - (if as-string?_0 - (a-bytes->string/utf-8.1 - #f - bstr_0 - pos_0 - end_1 - '#\xfffd) - (subbytes bstr_0 pos_0 end_1)))) - (begin (unsafe-end-atomic) result_0))))))))) - (letrec* - ((loop_0 + (let ((end_0 + (let ((app_0 (direct-end buffer_0))) + (fxmin app_0 (fx+ pos_0 4096))))) + (let ((finish_0 (|#%name| - loop - (lambda (i_0) + finish + (lambda (end_1 read-end_0) (begin - (if (fx= i_0 end_0) - (begin (unsafe-end-atomic) #f) - (let ((b_0 (unsafe-bytes-ref bstr_0 i_0))) - (if (if lf?_0 (eqv? b_0 10) #f) - (finish_0 i_0 (fx+ i_0 1)) - (if (if (if cr?_0 cr?_0 crlf?_0) - (eqv? b_0 13) - #f) - (if (if crlf?_0 - (if (fx< (fx+ i_0 1) end_0) - (eqv? - (unsafe-bytes-ref - bstr_0 - (fx+ i_0 1)) - 10) - #f) + (begin + (set-direct-pos! buffer_0 read-end_0) + (begin + (if (core-port-count in_0) + (port-count! + in_0 + (fx- read-end_0 pos_0) + bstr_0 + pos_0) + (void)) + (let ((result_0 + (if as-string?_0 + (a-bytes->string/utf-8.1 + #f + bstr_0 + pos_0 + end_1 + '#\xfffd) + (subbytes bstr_0 pos_0 end_1)))) + (begin (unsafe-end-atomic) result_0))))))))) + (letrec* + ((loop_0 + (|#%name| + loop + (lambda (i_0) + (begin + (if (fx= i_0 end_0) + (begin (unsafe-end-atomic) #f) + (let ((b_0 (unsafe-bytes-ref bstr_0 i_0))) + (if (if lf?_0 (eqv? b_0 10) #f) + (finish_0 i_0 (fx+ i_0 1)) + (if (if (if cr?_0 cr?_0 crlf?_0) + (eqv? b_0 13) + #f) + (if (if crlf?_0 + (if (fx< (fx+ i_0 1) end_0) + (eqv? + (unsafe-bytes-ref bstr_0 (fx+ i_0 1)) + 10) #f) - (finish_0 i_0 (fx+ i_0 2)) - (if cr?_0 - (if (if crlf?_0 - (fx= (fx+ i_0 1) end_0) - #f) - (begin (unsafe-end-atomic) #f) - (finish_0 i_0 (fx+ i_0 1))) - (loop_0 (fx+ i_0 1)))) - (loop_0 (fx+ i_0 1))))))))))) - (loop_0 pos_0))))))))))) + #f) + (finish_0 i_0 (fx+ i_0 2)) + (if cr?_0 + (if (if crlf?_0 (fx= (fx+ i_0 1) end_0) #f) + (begin (unsafe-end-atomic) #f) + (finish_0 i_0 (fx+ i_0 1))) + (loop_0 (fx+ i_0 1)))) + (loop_0 (fx+ i_0 1))))))))))) + (loop_0 pos_0)))))))))) (define struct:progress-evt (make-record-type-descriptor* 'progress-evt #f #f #f #f 2 0)) (define effect_2813 @@ -11468,19 +11635,21 @@ (begin (unsafe-start-atomic) (begin0 - (|#%app| - (core-input-port-methods-commit.1 - (core-port-vtable in_1)) - in_1 - amt4_0 - (progress-evt-evt progress-evt5_0) - evt6_0 - (lambda (bstr_0) - (port-count! - in_1 - (unsafe-bytes-length bstr_0) - bstr_0 - 0))) + (let ((app_0 + (core-input-port-methods-commit.1 + (core-port-vtable in_1)))) + (|#%app| + app_0 + in_1 + amt4_0 + (progress-evt-evt progress-evt5_0) + evt6_0 + (lambda (bstr_0) + (port-count! + in_1 + (unsafe-bytes-length bstr_0) + bstr_0 + 0)))) (unsafe-end-atomic))))))))))) (|#%name| port-commit-peeked @@ -16779,7 +16948,7 @@ ((in-bstr_0 err-char5_0) (bytes->string/locale_0 in-bstr_0 err-char5_0 0 unsafe-undefined)))))) (define struct:path (make-record-type-descriptor* 'path #f #f #f #f 2 0)) -(define effect_2266 +(define effect_2481 (struct-type-install-properties! struct:path 'path @@ -16792,7 +16961,8 @@ prop:equal+hash (list (lambda (p1_0 p2_0 eql?_0) - (|#%app| eql?_0 (path-bytes p1_0) (path-bytes p2_0))) + (let ((app_0 (path-bytes p1_0))) + (|#%app| eql?_0 app_0 (path-bytes p2_0)))) (lambda (p_0 hc_0) (|#%app| hc_0 (path-bytes p_0))) (lambda (p_0 hc_0) (|#%app| hc_0 (path-bytes p_0))))) (cons @@ -18165,156 +18335,165 @@ (bytes-input-port-methods?.1_2316 (impersonator-val v)) #f)))))) (define bytes-input-port-vtable.1 - (bytes-input-port-methods4.1 - (|#%name| - close - (lambda (this-id_0) - (begin - (begin - (set-commit-input-port-commit-manager! this-id_0 #f) + (let ((app_0 (core-port-methods-count-lines!.1 commit-input-port-vtable.1))) + (let ((app_1 + (core-port-methods-get-location.1 commit-input-port-vtable.1))) + (bytes-input-port-methods4.1 + (|#%name| + close + (lambda (this-id_0) (begin - (temp1.1 this-id_0) (begin - (set-bytes-input-port-bstr! this-id_0 #f) - (let ((b_0 (core-port-buffer this-id_0))) - (if (direct-bstr b_0) - (begin - (set-core-port-offset! this-id_0 (direct-pos b_0)) - (set-direct-bstr! b_0 #f)) - (void))))))))) - (core-port-methods-count-lines!.1 commit-input-port-vtable.1) - (core-port-methods-get-location.1 commit-input-port-vtable.1) - (|#%name| - file-position - (case-lambda - ((this-id_0) - (begin - (let ((or-part_0 (bytes-input-port-alt-pos this-id_0))) - (if or-part_0 or-part_0 (temp3.1$1 this-id_0))))) - ((this-id_0 given-pos36_0) - (let ((b_0 (core-port-buffer this-id_0))) - (let ((len_0 (direct-end b_0))) - (let ((new-pos_0 - (if (eof-object? given-pos36_0) - len_0 - (min len_0 given-pos36_0)))) - (begin - (if (direct-bstr b_0) - (set-direct-pos! b_0 new-pos_0) - (set-bytes-input-port-pos! this-id_0 new-pos_0)) - (set-bytes-input-port-alt-pos! - this-id_0 - (if (not (eof-object? given-pos36_0)) - (if (> given-pos36_0 new-pos_0) given-pos36_0 #f) - #f))))))))) - (core-port-methods-buffer-mode.1 commit-input-port-vtable.1) - (|#%name| prepare-change (lambda (this-id_0) (begin (temp2.1 this-id_0)))) - (|#%name| - read-in - (lambda (this-id_0 dest-bstr95_0 start96_0 end97_0 copy?98_0) - (begin - (let ((b_0 (core-port-buffer this-id_0))) - (let ((len_0 (direct-end b_0))) - (let ((i_0 (temp3.1$1 this-id_0))) - (if (< i_0 len_0) - (let ((amt_0 - (let ((app_0 (- end97_0 start96_0))) - (min app_0 (fx- len_0 i_0))))) - (let ((new-pos_0 (fx+ i_0 amt_0))) - (begin - (set-direct-pos! b_0 new-pos_0) - (set-core-port-offset! this-id_0 0) - (set-direct-bstr! b_0 (bytes-input-port-bstr this-id_0)) - (unsafe-bytes-copy! - dest-bstr95_0 - start96_0 - (bytes-input-port-bstr this-id_0) - i_0 - new-pos_0) - (temp1.1 this-id_0) - amt_0))) - eof))))))) - (|#%name| - peek-in - (lambda (this-id_0 - dest-bstr122_0 - start123_0 - end124_0 - skip125_0 - progress-evt126_0 - copy?127_0) - (begin - (let ((b_0 (core-port-buffer this-id_0))) - (let ((len_0 (direct-end b_0))) - (let ((i_0 (temp3.1$1 this-id_0))) - (let ((at-pos_0 (+ i_0 skip125_0))) - (if (if progress-evt126_0 - (sync/timeout 0 progress-evt126_0) - #f) - #f - (if (< at-pos_0 len_0) - (let ((amt_0 - (let ((app_0 (- end124_0 start123_0))) - (min app_0 (fx- len_0 at-pos_0))))) + (set-commit-input-port-commit-manager! this-id_0 #f) + (begin + (temp1.1 this-id_0) + (begin + (set-bytes-input-port-bstr! this-id_0 #f) + (let ((b_0 (core-port-buffer this-id_0))) + (if (direct-bstr b_0) (begin - (let ((app_0 (bytes-input-port-bstr this-id_0))) - (unsafe-bytes-copy! - dest-bstr122_0 - start123_0 - app_0 - at-pos_0 - (fx+ at-pos_0 amt_0))) - amt_0)) - eof))))))))) - (|#%name| byte-ready (lambda (this-id_0 work-done!153_0) (begin #t))) - (|#%name| - get-progress-evt - (lambda (this-id_0) - (begin - (begin - (unsafe-start-atomic) - (begin0 - (begin - (if (commit-input-port-progress-sema this-id_0) - (void) - (let ((b_0 (core-port-buffer this-id_0))) + (set-core-port-offset! this-id_0 (direct-pos b_0)) + (set-direct-bstr! b_0 #f)) + (void))))))))) + app_0 + app_1 + (|#%name| + file-position + (case-lambda + ((this-id_0) + (begin + (let ((or-part_0 (bytes-input-port-alt-pos this-id_0))) + (if or-part_0 or-part_0 (|#%app| temp3.1$1 this-id_0))))) + ((this-id_0 given-pos36_0) + (let ((b_0 (core-port-buffer this-id_0))) + (let ((len_0 (direct-end b_0))) + (let ((new-pos_0 + (if (eof-object? given-pos36_0) + len_0 + (min len_0 given-pos36_0)))) + (begin (if (direct-bstr b_0) - (let ((i_0 (direct-pos b_0))) - (begin - (set-bytes-input-port-pos! this-id_0 i_0) - (set-core-port-offset! this-id_0 i_0) - (set-direct-bstr! b_0 #f) - (set-direct-pos! b_0 (direct-end b_0)))) - (void)))) - (temp4.1 this-id_0)) - (unsafe-end-atomic)))))) - (|#%name| - commit - (lambda (this-id_0 amt193_0 progress-evt194_0 ext-evt195_0 finish196_0) - (begin - (temp3.1 - this-id_0 - progress-evt194_0 - ext-evt195_0 - (lambda () - (let ((b_0 (core-port-buffer this-id_0))) - (let ((len_0 (direct-end b_0))) - (let ((i_0 (temp3.1$1 this-id_0))) - (let ((amt_0 (min amt193_0 (- len_0 i_0)))) - (let ((dest-bstr_0 (make-bytes amt_0))) - (begin - (let ((app_0 (bytes-input-port-bstr this-id_0))) - (unsafe-bytes-copy! - dest-bstr_0 - 0 - app_0 - i_0 - (+ i_0 amt_0))) - (set-direct-pos! b_0 (fx+ i_0 amt_0)) - (set-direct-bstr! b_0 (bytes-input-port-bstr this-id_0)) - (set-core-port-offset! this-id_0 0) - (temp1.1 this-id_0) - (|#%app| finish196_0 dest-bstr_0)))))))))))))) + (set-direct-pos! b_0 new-pos_0) + (set-bytes-input-port-pos! this-id_0 new-pos_0)) + (set-bytes-input-port-alt-pos! + this-id_0 + (if (not (eof-object? given-pos36_0)) + (if (> given-pos36_0 new-pos_0) given-pos36_0 #f) + #f))))))))) + (core-port-methods-buffer-mode.1 commit-input-port-vtable.1) + (|#%name| + prepare-change + (lambda (this-id_0) (begin (temp2.1 this-id_0)))) + (|#%name| + read-in + (lambda (this-id_0 dest-bstr95_0 start96_0 end97_0 copy?98_0) + (begin + (let ((b_0 (core-port-buffer this-id_0))) + (let ((len_0 (direct-end b_0))) + (let ((i_0 (|#%app| temp3.1$1 this-id_0))) + (if (< i_0 len_0) + (let ((amt_0 + (let ((app_2 (- end97_0 start96_0))) + (min app_2 (fx- len_0 i_0))))) + (let ((new-pos_0 (fx+ i_0 amt_0))) + (begin + (set-direct-pos! b_0 new-pos_0) + (set-core-port-offset! this-id_0 0) + (set-direct-bstr! + b_0 + (bytes-input-port-bstr this-id_0)) + (unsafe-bytes-copy! + dest-bstr95_0 + start96_0 + (bytes-input-port-bstr this-id_0) + i_0 + new-pos_0) + (temp1.1 this-id_0) + amt_0))) + eof))))))) + (|#%name| + peek-in + (lambda (this-id_0 + dest-bstr122_0 + start123_0 + end124_0 + skip125_0 + progress-evt126_0 + copy?127_0) + (begin + (let ((b_0 (core-port-buffer this-id_0))) + (let ((len_0 (direct-end b_0))) + (let ((i_0 (|#%app| temp3.1$1 this-id_0))) + (let ((at-pos_0 (+ i_0 skip125_0))) + (if (if progress-evt126_0 + (sync/timeout 0 progress-evt126_0) + #f) + #f + (if (< at-pos_0 len_0) + (let ((amt_0 + (let ((app_2 (- end124_0 start123_0))) + (min app_2 (fx- len_0 at-pos_0))))) + (begin + (let ((app_2 (bytes-input-port-bstr this-id_0))) + (unsafe-bytes-copy! + dest-bstr122_0 + start123_0 + app_2 + at-pos_0 + (fx+ at-pos_0 amt_0))) + amt_0)) + eof))))))))) + (|#%name| byte-ready (lambda (this-id_0 work-done!153_0) (begin #t))) + (|#%name| + get-progress-evt + (lambda (this-id_0) + (begin + (begin + (unsafe-start-atomic) + (begin0 + (begin + (if (commit-input-port-progress-sema this-id_0) + (void) + (let ((b_0 (core-port-buffer this-id_0))) + (if (direct-bstr b_0) + (let ((i_0 (direct-pos b_0))) + (begin + (set-bytes-input-port-pos! this-id_0 i_0) + (set-core-port-offset! this-id_0 i_0) + (set-direct-bstr! b_0 #f) + (set-direct-pos! b_0 (direct-end b_0)))) + (void)))) + (temp4.1 this-id_0)) + (unsafe-end-atomic)))))) + (|#%name| + commit + (lambda (this-id_0 amt193_0 progress-evt194_0 ext-evt195_0 finish196_0) + (begin + (temp3.1 + this-id_0 + progress-evt194_0 + ext-evt195_0 + (lambda () + (let ((b_0 (core-port-buffer this-id_0))) + (let ((len_0 (direct-end b_0))) + (let ((i_0 (|#%app| temp3.1$1 this-id_0))) + (let ((amt_0 (min amt193_0 (- len_0 i_0)))) + (let ((dest-bstr_0 (make-bytes amt_0))) + (begin + (let ((app_2 (bytes-input-port-bstr this-id_0))) + (unsafe-bytes-copy! + dest-bstr_0 + 0 + app_2 + i_0 + (+ i_0 amt_0))) + (set-direct-pos! b_0 (fx+ i_0 amt_0)) + (set-direct-bstr! + b_0 + (bytes-input-port-bstr this-id_0)) + (set-core-port-offset! this-id_0 0) + (temp1.1 this-id_0) + (|#%app| finish196_0 dest-bstr_0)))))))))))))))) (define temp3.1$1 (|#%name| in-buffer-pos @@ -18573,9 +18752,10 @@ (set-bytes-output-port-pos! this-id_0 end-i_0) (set-bytes-output-port-max-pos! this-id_0 - (fxmax - (bytes-output-port-pos this-id_0) - (bytes-output-port-max-pos this-id_0))) + (let ((app_6 (bytes-output-port-pos this-id_0))) + (fxmax + app_6 + (bytes-output-port-max-pos this-id_0)))) (|#%app| temp7.1$1 this-id_0) amt_0)))))))) app_4 @@ -18621,12 +18801,13 @@ (begin (let ((new-bstr_0 (make-bytes (fx* 2 len346_0)))) (begin - (unsafe-bytes-copy! - new-bstr_0 - 0 - (bytes-output-port-bstr this-id_0) - 0 - (bytes-output-port-pos this-id_0)) + (let ((app_0 (bytes-output-port-bstr this-id_0))) + (unsafe-bytes-copy! + new-bstr_0 + 0 + app_0 + 0 + (bytes-output-port-pos this-id_0))) (set-bytes-output-port-bstr! this-id_0 new-bstr_0))))))) (define temp6.1 (|#%name| @@ -18932,83 +19113,105 @@ (max-output-port-methods?.1_2811 (impersonator-val v)) #f)))))) (define max-output-port-vtable.1 - (max-output-port-methods1.1 - (core-port-methods-close.1 core-output-port-vtable.1) - (core-port-methods-count-lines!.1 core-output-port-vtable.1) - (core-port-methods-get-location.1 core-output-port-vtable.1) - (core-port-methods-file-position.1 core-output-port-vtable.1) - (core-port-methods-buffer-mode.1 core-output-port-vtable.1) - (|#%name| - write-out - (lambda (this-id_0 - src-bstr4_0 - src-start5_0 - src-end6_0 - nonblock?7_0 - enable-break?8_0 - copy?9_0) - (begin - (if (max-output-port-max-length this-id_0) - (let ((len_0 (- src-end6_0 src-start5_0))) - (if (eq? (max-output-port-max-length this-id_0) 'full) - len_0 - (if (pair? (max-output-port-max-length this-id_0)) - (begin - (set-max-output-port-max-length! - this-id_0 - (more-pending - (max-output-port-max-length this-id_0) - src-start5_0 - src-end6_0 - src-bstr4_0)) - len_0) - (let ((write-len_0 - (min len_0 (max-output-port-max-length this-id_0)))) - (begin - (unsafe-end-atomic) - (let ((app_0 (max-output-port-o this-id_0))) - (let ((wrote-len_0 - (1/write-bytes - src-bstr4_0 - app_0 - src-start5_0 - (+ src-start5_0 write-len_0)))) - (begin - (unsafe-start-atomic) - (if (= + (let ((app_0 (core-port-methods-close.1 core-output-port-vtable.1))) + (let ((app_1 (core-port-methods-count-lines!.1 core-output-port-vtable.1))) + (let ((app_2 + (core-port-methods-get-location.1 core-output-port-vtable.1))) + (let ((app_3 + (core-port-methods-file-position.1 core-output-port-vtable.1))) + (let ((app_4 + (core-port-methods-buffer-mode.1 core-output-port-vtable.1))) + (let ((app_5 + (core-output-port-methods-write-out-special.1 + core-output-port-vtable.1))) + (let ((app_6 + (core-output-port-methods-get-write-evt.1 + core-output-port-vtable.1))) + (max-output-port-methods1.1 + app_0 + app_1 + app_2 + app_3 + app_4 + (|#%name| + write-out + (lambda (this-id_0 + src-bstr4_0 + src-start5_0 + src-end6_0 + nonblock?7_0 + enable-break?8_0 + copy?9_0) + (begin + (if (max-output-port-max-length this-id_0) + (let ((len_0 (- src-end6_0 src-start5_0))) + (if (eq? (max-output-port-max-length this-id_0) - wrote-len_0) - (begin - (set-max-output-port-max-length! - this-id_0 - (more-pending - '(0 . #vu8()) - (+ - src-start5_0 - (max-output-port-max-length this-id_0)) - src-end6_0 - src-bstr4_0)) - len_0) - (begin - (set-max-output-port-max-length! - this-id_0 - (- - (max-output-port-max-length this-id_0) - wrote-len_0)) - wrote-len_0)))))))))) - (begin - (unsafe-end-atomic) - (let ((len_0 - (1/write-bytes - src-bstr4_0 - (max-output-port-o this-id_0) - src-start5_0 - src-end6_0))) - (begin (unsafe-start-atomic) len_0))))))) - (core-output-port-methods-write-out-special.1 core-output-port-vtable.1) - (core-output-port-methods-get-write-evt.1 core-output-port-vtable.1) - (core-output-port-methods-get-write-special-evt.1 - core-output-port-vtable.1))) + 'full) + len_0 + (if (pair? (max-output-port-max-length this-id_0)) + (begin + (set-max-output-port-max-length! + this-id_0 + (more-pending + (max-output-port-max-length this-id_0) + src-start5_0 + src-end6_0 + src-bstr4_0)) + len_0) + (let ((write-len_0 + (min + len_0 + (max-output-port-max-length this-id_0)))) + (begin + (unsafe-end-atomic) + (let ((wrote-len_0 + (let ((app_7 + (max-output-port-o this-id_0))) + (1/write-bytes + src-bstr4_0 + app_7 + src-start5_0 + (+ src-start5_0 write-len_0))))) + (begin + (unsafe-start-atomic) + (if (= + (max-output-port-max-length + this-id_0) + wrote-len_0) + (begin + (set-max-output-port-max-length! + this-id_0 + (more-pending + '(0 . #vu8()) + (+ + src-start5_0 + (max-output-port-max-length + this-id_0)) + src-end6_0 + src-bstr4_0)) + len_0) + (begin + (set-max-output-port-max-length! + this-id_0 + (- + (max-output-port-max-length + this-id_0) + wrote-len_0)) + wrote-len_0))))))))) + (begin + (unsafe-end-atomic) + (let ((len_0 + (1/write-bytes + src-bstr4_0 + (max-output-port-o this-id_0) + src-start5_0 + src-end6_0))) + (begin (unsafe-start-atomic) len_0))))))) + app_5 + app_6 + (core-output-port-methods-get-write-special-evt.1 + core-output-port-vtable.1)))))))))) (define make-max-output-port (lambda (o_0 max-length_0) (let ((app_0 (object-name o_0))) @@ -19863,20 +20066,37 @@ (nowhere-output-port-methods?.1_2940 (impersonator-val v)) #f)))))) (define nowhere-output-port-vtable.1 - (nowhere-output-port-methods1.1 - (core-port-methods-close.1 core-output-port-vtable.1) - (core-port-methods-count-lines!.1 core-output-port-vtable.1) - (core-port-methods-get-location.1 core-output-port-vtable.1) - (core-port-methods-file-position.1 core-output-port-vtable.1) - (core-port-methods-buffer-mode.1 core-output-port-vtable.1) - (core-output-port-methods-write-out.1 core-output-port-vtable.1) - (|#%name| - write-out-special - (lambda (this-id_0 any4_0 no-block/buffer?5_0 enable-break?6_0) - (begin #t))) - (core-output-port-methods-get-write-evt.1 core-output-port-vtable.1) - (core-output-port-methods-get-write-special-evt.1 - core-output-port-vtable.1))) + (let ((app_0 (core-port-methods-close.1 core-output-port-vtable.1))) + (let ((app_1 (core-port-methods-count-lines!.1 core-output-port-vtable.1))) + (let ((app_2 + (core-port-methods-get-location.1 core-output-port-vtable.1))) + (let ((app_3 + (core-port-methods-file-position.1 core-output-port-vtable.1))) + (let ((app_4 + (core-port-methods-buffer-mode.1 core-output-port-vtable.1))) + (let ((app_5 + (core-output-port-methods-write-out.1 + core-output-port-vtable.1))) + (let ((app_6 + (core-output-port-methods-get-write-evt.1 + core-output-port-vtable.1))) + (nowhere-output-port-methods1.1 + app_0 + app_1 + app_2 + app_3 + app_4 + app_5 + (|#%name| + write-out-special + (lambda (this-id_0 + any4_0 + no-block/buffer?5_0 + enable-break?6_0) + (begin #t))) + app_6 + (core-output-port-methods-get-write-special-evt.1 + core-output-port-vtable.1)))))))))) (define open-output-nowhere (lambda () (finish-port/count @@ -23213,10 +23433,8 @@ (let ((s_0 (car elems_0))) (if (null? (cdr elems_0)) (let ((bstr_0 - (subbytes - (starting-point-bstr s_0) - 0 - (starting-point-orig-len s_0)))) + (let ((app_0 (starting-point-bstr s_0))) + (subbytes app_0 0 (starting-point-orig-len s_0))))) (if (equal? bstr_0 #vu8(92 92 63 92 82 69 76)) #vu8(46) (if (equal? bstr_0 #vu8(92 92 63 92 82 69 68)) @@ -23232,10 +23450,8 @@ (bytes-append bstr_0 #vu8(92))) bstr_0))))) (let ((init-bstr_0 - (subbytes - (starting-point-bstr s_0) - 0 - (starting-point-len s_0)))) + (let ((app_0 (starting-point-bstr s_0))) + (subbytes app_0 0 (starting-point-len s_0))))) (let ((app_0 (let ((tmp_0 (starting-point-kind s_0))) (if (if (eq? tmp_0 'rel) #t (eq? tmp_0 'red)) #vu8(92) #vu8())))) @@ -23515,18 +23731,22 @@ (if (starting-point-add-ups? s_0) (let ((bstr_0 (bytes-append - (subbytes (starting-point-bstr s_0) 0 (starting-point-len s_0)) + (let ((app_0 (starting-point-bstr s_0))) + (subbytes app_0 0 (starting-point-len s_0))) #vu8(92 46 46)))) (let ((len_0 (unsafe-bytes-length bstr_0))) (if (starting-point? s_0) - (starting-point7.1 - (starting-point-kind s_0) - bstr_0 - len_0 - len_0 - (starting-point-extra-sep s_0) - (starting-point-add-ups? s_0) - (starting-point-drive? s_0)) + (let ((app_0 (starting-point-kind s_0))) + (let ((app_1 (starting-point-extra-sep s_0))) + (let ((app_2 (starting-point-add-ups? s_0))) + (starting-point7.1 + app_0 + bstr_0 + len_0 + len_0 + app_1 + app_2 + (starting-point-drive? s_0))))) (raise-argument-error 'struct-copy "starting-point?" s_0)))) s_0))) (define simplify-dots.1 @@ -27111,31 +27331,41 @@ (temp9.1 self_0 mode_0)))))) - (peek-via-read-input-port-methods10.1 - (values - (lambda (self_0) - (begin - (close_0 - self_0) - (temp7.1 - self_0)))) - count-lines!_0 - get-location_0 - file-position_0 - app_0 - (core-input-port-methods-prepare-change.1 - peek-via-read-input-port-vtable.1) - (core-input-port-methods-read-in.1 - peek-via-read-input-port-vtable.1) - (core-input-port-methods-peek-in.1 - peek-via-read-input-port-vtable.1) - (core-input-port-methods-byte-ready.1 - peek-via-read-input-port-vtable.1) - (core-input-port-methods-get-progress-evt.1 - peek-via-read-input-port-vtable.1) - (core-input-port-methods-commit.1 - peek-via-read-input-port-vtable.1) - read-in_0)))) + (let ((app_1 + (core-input-port-methods-prepare-change.1 + peek-via-read-input-port-vtable.1))) + (let ((app_2 + (core-input-port-methods-read-in.1 + peek-via-read-input-port-vtable.1))) + (let ((app_3 + (core-input-port-methods-peek-in.1 + peek-via-read-input-port-vtable.1))) + (let ((app_4 + (core-input-port-methods-byte-ready.1 + peek-via-read-input-port-vtable.1))) + (let ((app_5 + (core-input-port-methods-get-progress-evt.1 + peek-via-read-input-port-vtable.1))) + (peek-via-read-input-port-methods10.1 + (values + (lambda (self_0) + (begin + (close_0 + self_0) + (temp7.1 + self_0)))) + count-lines!_0 + get-location_0 + file-position_0 + app_0 + app_1 + app_2 + app_3 + app_4 + app_5 + (core-input-port-methods-commit.1 + peek-via-read-input-port-vtable.1) + read-in_0))))))))) (let ((app_1 (direct2.1 #f @@ -30353,7 +30583,7 @@ (begin (if (is-path? p1_0) (void) (raise-argument-error 'pathlist state_0))) - (list (cons ms-pos_0 me-pos_0))) - #f)) - (args (raise-binding-result-arity-error 2 args)))))))) + (let ((state_0 + (let ((n_0 (rx:regexp-num-groups rx_0))) + (if (positive? n_0) (make-vector n_0 #f) #f)))) + (call-with-values + (lambda () + (search-match + rx_0 + in_0 + start-pos_0 + start-pos_0 + (if end-pos_0 end-pos_0 (unsafe-bytes-length in_0)) + state_0)) + (case-lambda + ((ms-pos_0 me-pos_0) + (if ms-pos_0 + (if state_0 + (let ((app_0 (cons ms-pos_0 me-pos_0))) + (cons app_0 (vector->list state_0))) + (list (cons ms-pos_0 me-pos_0))) + #f)) + (args (raise-binding-result-arity-error 2 args))))))) (define fast-drive-regexp-match-positions/string (lambda (rx_0 in-str_0 start-offset_0 end-offset_0) (let ((in_0 @@ -8127,147 +8169,26 @@ 0 start-offset_0 (if end-offset_0 end-offset_0 (string-length in-str_0))))) - (let ((n_0 (rx:regexp-num-groups rx_0))) - (let ((state_0 (if (positive? n_0) (make-vector n_0 #f) #f))) - (call-with-values - (lambda () - (search-match rx_0 in_0 0 0 (unsafe-bytes-length in_0) state_0)) - (case-lambda - ((ms-pos_0 me-pos_0) - (let ((string-offset_0 - (|#%name| - string-offset - (lambda (pos_0) - (begin - (+ - start-offset_0 - (bytes-utf-8-length in_0 '#\x3f 0 pos_0))))))) - (if ms-pos_0 - (let ((app_0 - (let ((app_0 (string-offset_0 ms-pos_0))) - (cons app_0 (string-offset_0 me-pos_0))))) - (cons - app_0 - (if state_0 - (reverse$1 - (call-with-values - (lambda () - (begin - (check-vector state_0) - (values state_0 (unsafe-vector-length state_0)))) - (case-lambda - ((vec_0 len_0) - (begin - #f - (letrec* - ((for-loop_0 - (|#%name| - for-loop - (lambda (fold-var_0 pos_0) - (begin - (if (unsafe-fx< pos_0 len_0) - (let ((p_0 - (unsafe-vector-ref vec_0 pos_0))) - (let ((fold-var_1 - (let ((fold-var_1 - (cons - (if p_0 - (let ((app_1 - (string-offset_0 - (car p_0)))) - (cons - app_1 - (string-offset_0 - (cdr p_0)))) - #f) - fold-var_0))) - (values fold-var_1)))) - (for-loop_0 - fold-var_1 - (unsafe-fx+ 1 pos_0)))) - fold-var_0)))))) - (for-loop_0 null 0)))) - (args (raise-binding-result-arity-error 2 args))))) - null))) - #f))) - (args (raise-binding-result-arity-error 2 args))))))))) -(define fast-drive-regexp-match/bytes - (lambda (rx_0 in_0 start-pos_0 end-pos_0) - (let ((n_0 (rx:regexp-num-groups rx_0))) - (let ((state_0 (if (positive? n_0) (make-vector n_0 #f) #f))) + (let ((state_0 + (let ((n_0 (rx:regexp-num-groups rx_0))) + (if (positive? n_0) (make-vector n_0 #f) #f)))) (call-with-values (lambda () - (search-match - rx_0 - in_0 - start-pos_0 - start-pos_0 - (if end-pos_0 end-pos_0 (unsafe-bytes-length in_0)) - state_0)) + (search-match rx_0 in_0 0 0 (unsafe-bytes-length in_0) state_0)) (case-lambda ((ms-pos_0 me-pos_0) - (if ms-pos_0 - (let ((app_0 (subbytes in_0 ms-pos_0 me-pos_0))) - (cons - app_0 - (if state_0 - (reverse$1 - (call-with-values - (lambda () - (begin - (check-vector state_0) - (values state_0 (unsafe-vector-length state_0)))) - (case-lambda - ((vec_0 len_0) - (begin - #f - (letrec* - ((for-loop_0 - (|#%name| - for-loop - (lambda (fold-var_0 pos_0) - (begin - (if (unsafe-fx< pos_0 len_0) - (let ((p_0 (unsafe-vector-ref vec_0 pos_0))) - (let ((fold-var_1 - (let ((fold-var_1 - (cons - (if p_0 - (let ((app_1 (car p_0))) - (subbytes - in_0 - app_1 - (cdr p_0))) - #f) - fold-var_0))) - (values fold-var_1)))) - (for-loop_0 - fold-var_1 - (unsafe-fx+ 1 pos_0)))) - fold-var_0)))))) - (for-loop_0 null 0)))) - (args (raise-binding-result-arity-error 2 args))))) - null))) - #f)) - (args (raise-binding-result-arity-error 2 args)))))))) -(define fast-drive-regexp-match/string - (lambda (rx_0 in-str_0 start-offset_0 end-offset_0) - (let ((in_0 - (string->bytes/utf-8 - in-str_0 - 0 - start-offset_0 - (if end-offset_0 end-offset_0 (string-length in-str_0))))) - (let ((n_0 (rx:regexp-num-groups rx_0))) - (let ((state_0 (if (positive? n_0) (make-vector n_0 #f) #f))) - (call-with-values - (lambda () - (search-match rx_0 in_0 0 0 (unsafe-bytes-length in_0) state_0)) - (case-lambda - ((ms-pos_0 me-pos_0) + (let ((string-offset_0 + (|#%name| + string-offset + (lambda (pos_0) + (begin + (+ + start-offset_0 + (bytes-utf-8-length in_0 '#\x3f 0 pos_0))))))) (if ms-pos_0 (let ((app_0 - (bytes->string/utf-8 in_0 '#\x3f ms-pos_0 me-pos_0))) + (let ((app_0 (string-offset_0 ms-pos_0))) + (cons app_0 (string-offset_0 me-pos_0))))) (cons app_0 (if state_0 @@ -8294,12 +8215,13 @@ (let ((fold-var_1 (cons (if p_0 - (let ((app_1 (car p_0))) - (bytes->string/utf-8 - in_0 - '#\x3f + (let ((app_1 + (string-offset_0 + (car p_0)))) + (cons app_1 - (cdr p_0))) + (string-offset_0 + (cdr p_0)))) #f) fold-var_0))) (values fold-var_1)))) @@ -8310,8 +8232,129 @@ (for-loop_0 null 0)))) (args (raise-binding-result-arity-error 2 args))))) null))) - #f)) - (args (raise-binding-result-arity-error 2 args))))))))) + #f))) + (args (raise-binding-result-arity-error 2 args)))))))) +(define fast-drive-regexp-match/bytes + (lambda (rx_0 in_0 start-pos_0 end-pos_0) + (let ((state_0 + (let ((n_0 (rx:regexp-num-groups rx_0))) + (if (positive? n_0) (make-vector n_0 #f) #f)))) + (call-with-values + (lambda () + (search-match + rx_0 + in_0 + start-pos_0 + start-pos_0 + (if end-pos_0 end-pos_0 (unsafe-bytes-length in_0)) + state_0)) + (case-lambda + ((ms-pos_0 me-pos_0) + (if ms-pos_0 + (let ((app_0 (subbytes in_0 ms-pos_0 me-pos_0))) + (cons + app_0 + (if state_0 + (reverse$1 + (call-with-values + (lambda () + (begin + (check-vector state_0) + (values state_0 (unsafe-vector-length state_0)))) + (case-lambda + ((vec_0 len_0) + (begin + #f + (letrec* + ((for-loop_0 + (|#%name| + for-loop + (lambda (fold-var_0 pos_0) + (begin + (if (unsafe-fx< pos_0 len_0) + (let ((p_0 (unsafe-vector-ref vec_0 pos_0))) + (let ((fold-var_1 + (let ((fold-var_1 + (cons + (if p_0 + (let ((app_1 (car p_0))) + (subbytes + in_0 + app_1 + (cdr p_0))) + #f) + fold-var_0))) + (values fold-var_1)))) + (for-loop_0 + fold-var_1 + (unsafe-fx+ 1 pos_0)))) + fold-var_0)))))) + (for-loop_0 null 0)))) + (args (raise-binding-result-arity-error 2 args))))) + null))) + #f)) + (args (raise-binding-result-arity-error 2 args))))))) +(define fast-drive-regexp-match/string + (lambda (rx_0 in-str_0 start-offset_0 end-offset_0) + (let ((in_0 + (string->bytes/utf-8 + in-str_0 + 0 + start-offset_0 + (if end-offset_0 end-offset_0 (string-length in-str_0))))) + (let ((state_0 + (let ((n_0 (rx:regexp-num-groups rx_0))) + (if (positive? n_0) (make-vector n_0 #f) #f)))) + (call-with-values + (lambda () + (search-match rx_0 in_0 0 0 (unsafe-bytes-length in_0) state_0)) + (case-lambda + ((ms-pos_0 me-pos_0) + (if ms-pos_0 + (let ((app_0 (bytes->string/utf-8 in_0 '#\x3f ms-pos_0 me-pos_0))) + (cons + app_0 + (if state_0 + (reverse$1 + (call-with-values + (lambda () + (begin + (check-vector state_0) + (values state_0 (unsafe-vector-length state_0)))) + (case-lambda + ((vec_0 len_0) + (begin + #f + (letrec* + ((for-loop_0 + (|#%name| + for-loop + (lambda (fold-var_0 pos_0) + (begin + (if (unsafe-fx< pos_0 len_0) + (let ((p_0 (unsafe-vector-ref vec_0 pos_0))) + (let ((fold-var_1 + (let ((fold-var_1 + (cons + (if p_0 + (let ((app_1 (car p_0))) + (bytes->string/utf-8 + in_0 + '#\x3f + app_1 + (cdr p_0))) + #f) + fold-var_0))) + (values fold-var_1)))) + (for-loop_0 + fold-var_1 + (unsafe-fx+ 1 pos_0)))) + fold-var_0)))))) + (for-loop_0 null 0)))) + (args (raise-binding-result-arity-error 2 args))))) + null))) + #f)) + (args (raise-binding-result-arity-error 2 args)))))))) (define drive-regexp-match.1 (|#%name| drive-regexp-match diff --git a/racket/src/cs/schemified/schemify.scm b/racket/src/cs/schemified/schemify.scm index 226c0b7a04..4e6070c112 100644 --- a/racket/src/cs/schemified/schemify.scm +++ b/racket/src/cs/schemified/schemify.scm @@ -3850,19 +3850,19 @@ (if (struct-type? struct:known-accessor) struct:known-accessor (check-struct-type 'struct struct:known-accessor)) - 2 + 4 0 #f - '(0 1)) + '(0 1 2 3)) #f #f - 2 - 3)) -(define effect_1804 + 4 + 15)) +(define effect_2706 (struct-type-install-properties! struct:known-field-accessor 'known-field-accessor - 2 + 4 0 (if (struct-type? struct:known-accessor) struct:known-accessor @@ -3870,7 +3870,7 @@ null 'prefab #f - '(0 1) + '(0 1 2 3) #f 'known-field-accessor)) (define known-field-accessor @@ -3910,24 +3910,60 @@ s 'known-field-accessor 'type-id)))))) -(define known-field-accessor-pos_2286 +(define known-field-accessor-authentic?_2286 + (|#%name| + known-field-accessor-authentic? + (record-accessor struct:known-field-accessor 1))) +(define known-field-accessor-authentic? + (|#%name| + known-field-accessor-authentic? + (lambda (s) + (if (known-field-accessor?_2878 s) + (known-field-accessor-authentic?_2286 s) + ($value + (impersonate-ref + known-field-accessor-authentic?_2286 + struct:known-field-accessor + 1 + s + 'known-field-accessor + 'authentic?)))))) +(define known-field-accessor-pos_2482 (|#%name| known-field-accessor-pos - (record-accessor struct:known-field-accessor 1))) + (record-accessor struct:known-field-accessor 2))) (define known-field-accessor-pos (|#%name| known-field-accessor-pos (lambda (s) (if (known-field-accessor?_2878 s) - (known-field-accessor-pos_2286 s) + (known-field-accessor-pos_2482 s) ($value (impersonate-ref - known-field-accessor-pos_2286 + known-field-accessor-pos_2482 struct:known-field-accessor - 1 + 2 s 'known-field-accessor 'pos)))))) +(define known-field-accessor-known-immutable?_2377 + (|#%name| + known-field-accessor-known-immutable? + (record-accessor struct:known-field-accessor 3))) +(define known-field-accessor-known-immutable? + (|#%name| + known-field-accessor-known-immutable? + (lambda (s) + (if (known-field-accessor?_2878 s) + (known-field-accessor-known-immutable?_2377 s) + ($value + (impersonate-ref + known-field-accessor-known-immutable?_2377 + struct:known-field-accessor + 3 + s + 'known-field-accessor + 'known-immutable?)))))) (define struct:known-field-mutator (make-record-type-descriptor* 'known-field-mutator @@ -3939,19 +3975,19 @@ (if (struct-type? struct:known-mutator) struct:known-mutator (check-struct-type 'struct struct:known-mutator)) - 2 + 3 0 #f - '(0 1)) + '(0 1 2)) #f #f - 2 - 3)) -(define effect_2511 + 3 + 7)) +(define effect_3046 (struct-type-install-properties! struct:known-field-mutator 'known-field-mutator - 2 + 3 0 (if (struct-type? struct:known-mutator) struct:known-mutator @@ -3959,7 +3995,7 @@ null 'prefab #f - '(0 1) + '(0 1 2) #f 'known-field-mutator)) (define known-field-mutator @@ -3999,21 +4035,39 @@ s 'known-field-mutator 'type-id)))))) -(define known-field-mutator-pos_2735 +(define known-field-mutator-authentic?_2735 + (|#%name| + known-field-mutator-authentic? + (record-accessor struct:known-field-mutator 1))) +(define known-field-mutator-authentic? + (|#%name| + known-field-mutator-authentic? + (lambda (s) + (if (known-field-mutator?_2222 s) + (known-field-mutator-authentic?_2735 s) + ($value + (impersonate-ref + known-field-mutator-authentic?_2735 + struct:known-field-mutator + 1 + s + 'known-field-mutator + 'authentic?)))))) +(define known-field-mutator-pos_2749 (|#%name| known-field-mutator-pos - (record-accessor struct:known-field-mutator 1))) + (record-accessor struct:known-field-mutator 2))) (define known-field-mutator-pos (|#%name| known-field-mutator-pos (lambda (s) (if (known-field-mutator?_2222 s) - (known-field-mutator-pos_2735 s) + (known-field-mutator-pos_2749 s) ($value (impersonate-ref - known-field-mutator-pos_2735 + known-field-mutator-pos_2749 struct:known-field-mutator - 1 + 2 s 'known-field-mutator 'pos)))))) @@ -4694,7 +4748,9 @@ (if converter_0 (|#%app| converter_0 v_0) v_0)) v_0)))) (define import-lookup - (lambda (im_0) (import-group-lookup (import-grp im_0) (import-ext-id im_0)))) + (lambda (im_0) + (let ((app_0 (import-grp im_0))) + (import-group-lookup app_0 (import-ext-id im_0))))) (define hash-ref-either (lambda (knowns_0 imports_0 key_0) (let ((or-part_0 (hash-ref knowns_0 key_0 #f))) @@ -4735,8 +4791,8 @@ (find-or-add-import-from-group! grp_0 ext-id_0 imports_0))))))) (define find-or-add-import-from-group! (lambda (grp_0 ext-id_0 imports_0) - (let ((lst_0 (import-group-imports grp_0))) - (let ((or-part_0 + (let ((or-part_0 + (let ((lst_0 (import-group-imports grp_0))) (begin (letrec* ((for-loop_0 @@ -4761,19 +4817,19 @@ (for-loop_0 result_1 rest_0) result_1)))) result_0)))))) - (for-loop_0 #f lst_0))))) - (if or-part_0 - or-part_0 - (let ((id_0 (deterministic-gensym ext-id_0))) - (let ((int-id_0 (deterministic-gensym ext-id_0))) - (let ((id_1 id_0)) - (let ((im_0 (import1.1 grp_0 id_1 int-id_0 ext-id_0))) - (begin - (set-import-group-imports! - grp_0 - (cons im_0 (import-group-imports grp_0))) - (hash-set! imports_0 int-id_0 im_0) - int-id_0)))))))))) + (for-loop_0 #f lst_0)))))) + (if or-part_0 + or-part_0 + (let ((id_0 (deterministic-gensym ext-id_0))) + (let ((int-id_0 (deterministic-gensym ext-id_0))) + (let ((id_1 id_0)) + (let ((im_0 (import1.1 grp_0 id_1 int-id_0 ext-id_0))) + (begin + (set-import-group-imports! + grp_0 + (cons im_0 (import-group-imports grp_0))) + (hash-set! imports_0 int-id_0 im_0) + int-id_0))))))))) (define find-or-add-import-group! (lambda (grps_0 key_0 @@ -6913,32 +6969,63 @@ proc_1 #f))))) (if (if pure?1_0 - (if (if no-alloc?2_0 - (known-procedure/pure? - v_0) - (let ((or-part_0 + (if (let ((or-part_0 + (if no-alloc?2_0 + (known-procedure/pure? + v_0) (known-procedure/allocates? - v_0))) - (if or-part_0 - or-part_0 - (if unsafe-mode?13_0 - (known-accessor? - v_0) - #f)))) + v_0)))) + (if or-part_0 + or-part_0 + (if unsafe-mode?13_0 + (if (known-field-accessor? + v_0) + (if (known-field-accessor-authentic? + v_0) + (known-field-accessor-known-immutable? + v_0) + #f) + #f) + #f))) (returns_0 1) #f) - (if (let ((or-part_0 - (known-procedure/no-prompt? - v_0))) - (if or-part_0 - or-part_0 - (known-procedure/no-prompt/multi? - v_0))) - (eqv? - result-arity_0 - #f) - #f)) + (let ((or-part_0 + (if (known-procedure/no-prompt? + v_0) + (returns_0 + 1) + #f))) + (if or-part_0 + or-part_0 + (let ((or-part_1 + (if (known-procedure/no-prompt/multi? + v_0) + (eqv? + result-arity_0 + #f) + #f))) + (if or-part_1 + or-part_1 + (let ((or-part_2 + (if (known-field-accessor? + v_0) + (if (known-field-accessor-authentic? + v_0) + (returns_0 + 1) + #f) + #f))) + (if or-part_2 + or-part_2 + (if (known-field-mutator? + v_0) + (if (known-field-mutator-authentic? + v_0) + (returns_0 + 1) + #f) + #f)))))))) (let ((app_0 (known-procedure-arity-mask v_0))) @@ -11702,9 +11789,8 @@ app_1 app_2 (begin-unsafe (hash-map needed_0 cons #t)))))) - (known-constructor - (known-procedure-arity-mask k_0) - (known-constructor-type k_0)))) + (let ((app_0 (known-procedure-arity-mask k_0))) + (known-constructor app_0 (known-constructor-type k_0))))) (if (known-struct-predicate? k_0) (let ((needed_0 (needed-imports @@ -11725,9 +11811,8 @@ app_2 app_3 (begin-unsafe (hash-map needed_0 cons #t))))))) - (known-predicate - (known-procedure-arity-mask k_0) - (known-predicate-type k_0)))) + (let ((app_0 (known-procedure-arity-mask k_0))) + (known-predicate app_0 (known-predicate-type k_0))))) (if (known-field-accessor? k_0) (let ((needed_0 (needed-imports @@ -11741,16 +11826,20 @@ (let ((app_0 (known-procedure-arity-mask k_0))) (let ((app_1 (known-accessor-type k_0))) (let ((app_2 (known-field-accessor-type-id k_0))) - (let ((app_3 (known-field-accessor-pos k_0))) - (known-field-accessor/need-imports - app_0 - app_1 - app_2 - app_3 - (begin-unsafe (hash-map needed_0 cons #t))))))) - (known-accessor - (known-procedure-arity-mask k_0) - (known-accessor-type k_0)))) + (let ((app_3 (known-field-accessor-authentic? k_0))) + (let ((app_4 (known-field-accessor-pos k_0))) + (let ((app_5 + (known-field-accessor-known-immutable? k_0))) + (known-field-accessor/need-imports + app_0 + app_1 + app_2 + app_3 + app_4 + app_5 + (begin-unsafe (hash-map needed_0 cons #t))))))))) + (let ((app_0 (known-procedure-arity-mask k_0))) + (known-accessor app_0 (known-accessor-type k_0))))) (if (known-field-mutator? k_0) (let ((needed_0 (needed-imports @@ -11764,16 +11853,17 @@ (let ((app_0 (known-procedure-arity-mask k_0))) (let ((app_1 (known-mutator-type k_0))) (let ((app_2 (known-field-mutator-type-id k_0))) - (let ((app_3 (known-field-mutator-pos k_0))) - (known-field-mutator/need-imports - app_0 - app_1 - app_2 - app_3 - (begin-unsafe (hash-map needed_0 cons #t))))))) - (known-mutator - (known-procedure-arity-mask k_0) - (known-mutator-type k_0)))) + (let ((app_3 (known-field-mutator-authentic? k_0))) + (let ((app_4 (known-field-mutator-pos k_0))) + (known-field-mutator/need-imports + app_0 + app_1 + app_2 + app_3 + app_4 + (begin-unsafe (hash-map needed_0 cons #t)))))))) + (let ((app_0 (known-procedure-arity-mask k_0))) + (known-mutator app_0 (known-mutator-type k_0))))) k_0))))))) (define needed-imports (lambda (v_0 prim-knowns_0 imports_0 exports_0 env_0 needed_0) @@ -12228,10 +12318,12 @@ (hash-set needed_0 u-v_0 - (cons - (import-ext-id c2_0) - (import-group-index - (import-grp c2_0)))) + (let ((app_0 + (import-ext-id c2_0))) + (cons + app_0 + (import-group-index + (import-grp c2_0))))) #f))))) needed_0)))))))))))))))) #f))) @@ -14957,262 +15049,235 @@ type_0 struct:s_0) a-known-constant))))) - (let ((knowns_1 - (let ((app_0 (unwrap s?_0))) - (hash-set - knowns_0 - app_0 - (known-struct-predicate - 2 - type_0 - struct:s_0 - (struct-type-info-authentic? info_0)))))) - (let ((immediate-count_0 - (struct-type-info-immediate-field-count - info_0))) + (let ((authentic?_0 + (struct-type-info-authentic? info_0))) + (let ((knowns_1 + (let ((app_0 (unwrap s?_0))) + (hash-set + knowns_0 + app_0 + (known-struct-predicate + 2 + type_0 + struct:s_0 + authentic?_0))))) (let ((knowns_2 - (let ((parent-count_0 - (- - (struct-type-info-field-count - info_0) - immediate-count_0))) - (begin - (letrec* - ((for-loop_0 - (|#%name| - for-loop - (lambda (knowns_2 lst_0 lst_1) - (begin - (if (if (pair? lst_0) - (pair? lst_1) - #f) - (let ((id_0 - (unsafe-car lst_0))) - (let ((rest_0 - (unsafe-cdr lst_0))) - (let ((maker_0 - (unsafe-car - lst_1))) - (let ((rest_1 - (unsafe-cdr + (let ((immediate-count_0 + (struct-type-info-immediate-field-count + info_0))) + (let ((parent-count_0 + (- + (struct-type-info-field-count + info_0) + immediate-count_0))) + (begin + (letrec* + ((for-loop_0 + (|#%name| + for-loop + (lambda (knowns_2 lst_0 lst_1) + (begin + (if (if (pair? lst_0) + (pair? lst_1) + #f) + (let ((id_0 + (unsafe-car lst_0))) + (let ((rest_0 + (unsafe-cdr + lst_0))) + (let ((maker_0 + (unsafe-car lst_1))) - (let ((knowns_3 - (let ((knowns_3 - (if (let ((p_0 - (unwrap - maker_0))) - (if (pair? - p_0) - (let ((a_0 - (cdr - p_0))) - (let ((p_1 - (unwrap - a_0))) - (if (pair? - p_1) - (let ((a_1 - (cdr - p_1))) - (let ((p_2 - (unwrap - a_1))) - (if (pair? - p_2) - (let ((a_2 - (cdr - p_2))) - (let ((p_3 - (unwrap - a_2))) - (if (pair? - p_3) - (if (let ((a_3 - (car - p_3))) - (let ((p_4 - (unwrap - a_3))) - (if (pair? - p_4) - (if (let ((a_4 - (car - p_4))) - (begin-unsafe - (let ((app_0 - (unwrap - 'quote))) - (eq? - app_0 - (unwrap - a_4))))) - (let ((a_4 - (cdr - p_4))) - (let ((p_5 - (unwrap - a_4))) - (if (pair? - p_5) - (let ((a_5 - (cdr - p_5))) - (begin-unsafe - (let ((app_0 - (unwrap - '()))) - (eq? - app_0 - (unwrap - a_5))))) - #f))) - #f) - #f))) - (let ((a_3 - (cdr - p_3))) - (begin-unsafe - (let ((app_0 - (unwrap - '()))) - (eq? - app_0 - (unwrap - a_3))))) - #f) - #f))) - #f))) - #f))) - #f)) - (call-with-values - (lambda () - (let ((p_0 - (unwrap - maker_0))) - (let ((make_1 - (let ((a_0 - (car - p_0))) - a_0))) - (call-with-values - (lambda () - (let ((d_0 - (cdr - p_0))) - (let ((p_1 - (unwrap - d_0))) - (let ((ref-or-set_0 - (let ((a_0 - (car - p_1))) - a_0))) - (call-with-values - (lambda () - (let ((d_1 - (cdr - p_1))) - (let ((p_2 - (unwrap - d_1))) - (let ((pos_0 - (let ((a_0 + (let ((rest_1 + (unsafe-cdr + lst_1))) + (let ((knowns_3 + (let ((knowns_3 + (if (let ((p_0 + (unwrap + maker_0))) + (if (pair? + p_0) + (let ((a_0 + (cdr + p_0))) + (let ((p_1 + (unwrap + a_0))) + (if (pair? + p_1) + (let ((a_1 + (cdr + p_1))) + (let ((p_2 + (unwrap + a_1))) + (if (pair? + p_2) + (let ((a_2 + (cdr + p_2))) + (let ((p_3 + (unwrap + a_2))) + (if (pair? + p_3) + (if (let ((a_3 (car - p_2))) - a_0))) - (let ((name_0 - (let ((d_2 - (cdr - p_2))) - (let ((a_0 - (car - (unwrap - d_2)))) - (let ((d_3 - (cdr - (unwrap - a_0)))) - (let ((a_1 - (car + p_3))) + (let ((p_4 + (unwrap + a_3))) + (if (pair? + p_4) + (if (let ((a_4 + (car + p_4))) + (begin-unsafe + (let ((app_0 + (unwrap + 'quote))) + (eq? + app_0 (unwrap - d_3)))) - a_1)))))) - (let ((pos_1 - pos_0)) - (values - pos_1 - name_0))))))) - (case-lambda - ((pos_0 - name_0) - (let ((ref-or-set_1 - ref-or-set_0)) - (values - ref-or-set_1 - pos_0 - name_0))) - (args - (raise-binding-result-arity-error - 2 - args)))))))) - (case-lambda - ((ref-or-set_0 - pos_0 - name_0) - (let ((make_2 - make_1)) - (values - make_2 - ref-or-set_0 - pos_0 - name_0))) - (args - (raise-binding-result-arity-error - 3 - args))))))) - (case-lambda - ((make_1 - ref-or-set_0 - pos_0 - name_0) - (let ((or-part_0 - (if (exact-nonnegative-integer? - pos_0) - (if (< - pos_0 - immediate-count_0) - (if (symbol? - name_0) - (if (if (begin-unsafe - (let ((app_0 - (unwrap - make_1))) - (eq? - app_0 - (unwrap - 'make-struct-field-accessor)))) - (begin-unsafe - (let ((app_0 + a_4))))) + (let ((a_4 + (cdr + p_4))) + (let ((p_5 + (unwrap + a_4))) + (if (pair? + p_5) + (let ((a_5 + (cdr + p_5))) + (begin-unsafe + (let ((app_0 + (unwrap + '()))) + (eq? + app_0 + (unwrap + a_5))))) + #f))) + #f) + #f))) + (let ((a_3 + (cdr + p_3))) + (begin-unsafe + (let ((app_0 + (unwrap + '()))) + (eq? + app_0 + (unwrap + a_3))))) + #f) + #f))) + #f))) + #f))) + #f)) + (call-with-values + (lambda () + (let ((p_0 + (unwrap + maker_0))) + (let ((make_1 + (let ((a_0 + (car + p_0))) + a_0))) + (call-with-values + (lambda () + (let ((d_0 + (cdr + p_0))) + (let ((p_1 + (unwrap + d_0))) + (let ((ref-or-set_0 + (let ((a_0 + (car + p_1))) + a_0))) + (call-with-values + (lambda () + (let ((d_1 + (cdr + p_1))) + (let ((p_2 (unwrap - ref-or-set_0))) - (eq? - app_0 - (unwrap - -ref_0)))) - #f) - (let ((app_0 - (unwrap - id_0))) - (hash-set - knowns_2 - app_0 - (known-field-accessor + d_1))) + (let ((pos_0 + (let ((a_0 + (car + p_2))) + a_0))) + (let ((name_0 + (let ((d_2 + (cdr + p_2))) + (let ((a_0 + (car + (unwrap + d_2)))) + (let ((d_3 + (cdr + (unwrap + a_0)))) + (let ((a_1 + (car + (unwrap + d_3)))) + a_1)))))) + (let ((pos_1 + pos_0)) + (values + pos_1 + name_0))))))) + (case-lambda + ((pos_0 + name_0) + (let ((ref-or-set_1 + ref-or-set_0)) + (values + ref-or-set_1 + pos_0 + name_0))) + (args + (raise-binding-result-arity-error 2 - type_0 - struct:s_0 - (+ - parent-count_0 - pos_0)))) + args)))))))) + (case-lambda + ((ref-or-set_0 + pos_0 + name_0) + (let ((make_2 + make_1)) + (values + make_2 + ref-or-set_0 + pos_0 + name_0))) + (args + (raise-binding-result-arity-error + 3 + args))))))) + (case-lambda + ((make_1 + ref-or-set_0 + pos_0 + name_0) + (let ((or-part_0 + (if (exact-nonnegative-integer? + pos_0) + (if (< + pos_0 + immediate-count_0) + (if (symbol? + name_0) (if (if (begin-unsafe (let ((app_0 (unwrap @@ -15220,7 +15285,7 @@ (eq? app_0 (unwrap - 'make-struct-field-mutator)))) + 'make-struct-field-accessor)))) (begin-unsafe (let ((app_0 (unwrap @@ -15228,54 +15293,104 @@ (eq? app_0 (unwrap - -set!_0)))) + -ref_0)))) #f) - (let ((app_0 - (unwrap - id_0))) - (hash-set - knowns_2 - app_0 - (known-field-mutator - 4 - type_0 - struct:s_0 - (+ - parent-count_0 - pos_0)))) - knowns_2)) + (let ((immutable?_0 + (memv + pos_0 + (let ((or-part_0 + (struct-type-info-prefab-immutables + info_0))) + (if or-part_0 + or-part_0 + (let ((or-part_1 + (struct-type-info-non-prefab-immutables + info_0))) + (if or-part_1 + or-part_1 + '()))))))) + (let ((app_0 + (unwrap + id_0))) + (hash-set + knowns_2 + app_0 + (known-field-accessor + 2 + type_0 + struct:s_0 + authentic?_0 + (+ + parent-count_0 + pos_0) + immutable?_0)))) + (if (if (begin-unsafe + (let ((app_0 + (unwrap + make_1))) + (eq? + app_0 + (unwrap + 'make-struct-field-mutator)))) + (begin-unsafe + (let ((app_0 + (unwrap + ref-or-set_0))) + (eq? + app_0 + (unwrap + -set!_0)))) + #f) + (let ((app_0 + (unwrap + id_0))) + (hash-set + knowns_2 + app_0 + (known-field-mutator + 4 + type_0 + struct:s_0 + authentic?_0 + (+ + parent-count_0 + pos_0)))) + knowns_2)) + #f) #f) - #f) - #f))) - (if or-part_0 - or-part_0 - knowns_2))) - (args - (raise-binding-result-arity-error - 4 - args)))) - knowns_2))) - (values - knowns_3)))) - (for-loop_0 - knowns_3 - rest_0 - rest_1)))))) - knowns_2)))))) - (for-loop_0 - knowns_1 - acc/muts_0 - make-acc/muts_0)))))) + #f))) + (if or-part_0 + or-part_0 + knowns_2))) + (args + (raise-binding-result-arity-error + 4 + args)))) + knowns_2))) + (values + knowns_3)))) + (for-loop_0 + knowns_3 + rest_0 + rest_1)))))) + knowns_2)))))) + (for-loop_0 + knowns_1 + acc/muts_0 + make-acc/muts_0))))))) (values (let ((app_0 (unwrap struct:s_0))) (hash-set knowns_2 app_0 - (known-struct-type - type_0 - (struct-type-info-field-count info_0) - (struct-type-info-pure-constructor? - info_0)))) + (let ((app_1 + (struct-type-info-field-count + info_0))) + (known-struct-type + type_0 + app_1 + (struct-type-info-pure-constructor? + info_0))))) info_0)))))) (values knowns7_0 #f)))) (args (raise-binding-result-arity-error 14 args)))) @@ -15465,11 +15580,13 @@ (hash-set knowns_1 app_0 - (known-struct-type - type_0 - (struct-type-info-field-count info_0) - (struct-type-info-pure-constructor? - info_0)))))) + (let ((app_1 + (struct-type-info-field-count info_0))) + (known-struct-type + type_0 + app_1 + (struct-type-info-pure-constructor? + info_0))))))) info_0)) (values knowns7_0 #f)))) (args (raise-binding-result-arity-error 6 args)))) @@ -16821,18 +16938,20 @@ (struct-type-info-parent sti_0) knowns_0))) - (list - 'structure-type-lookup-prefab-uid - app_2 - app_3 - (struct-type-info-immediate-field-count - sti_0) - 0 - #f - (list - 'quote - (struct-type-info-prefab-immutables - sti_0)))))))) + (let ((app_4 + (struct-type-info-immediate-field-count + sti_0))) + (list + 'structure-type-lookup-prefab-uid + app_2 + app_3 + app_4 + 0 + #f + (list + 'quote + (struct-type-info-prefab-immutables + sti_0))))))))) (let ((app_3 (struct-type-info-immediate-field-count sti_0))) @@ -17035,21 +17154,25 @@ (list 'record-predicate struct:s_0))) - (begin-unsafe - (wrap-property-set - proc-expr_0 - 'inferred-name - (string->symbol - (let ((app_3 - (symbol->string - st_0))) - (string-append - pre_0 - app_3 - sep_0 - (symbol->string - '||) - post_0))))))))))) + (let ((post_1 post_0) + (sep_1 sep_0) + (st_1 st_0) + (pre_1 pre_0)) + (begin-unsafe + (wrap-property-set + proc-expr_0 + 'inferred-name + (string->symbol + (let ((app_3 + (symbol->string + st_1))) + (string-append + pre_1 + app_3 + sep_1 + (symbol->string + '||) + post_1)))))))))))) (if (if can-impersonate?_0 can-impersonate?_0 system-opaque?_0) @@ -17094,21 +17217,27 @@ '((impersonator-val v))) '(#f))))))) - (begin-unsafe - (wrap-property-set - proc-expr_0 - 'inferred-name - (string->symbol - (let ((app_4 - (symbol->string - st_0))) - (string-append - pre_0 - app_4 - sep_0 - (symbol->string - '||) - post_0))))))))))) + (let ((post_1 + post_0) + (sep_1 sep_0) + (st_1 st_0) + (pre_1 + pre_0)) + (begin-unsafe + (wrap-property-set + proc-expr_0 + 'inferred-name + (string->symbol + (let ((app_4 + (symbol->string + st_1))) + (string-append + pre_1 + app_4 + sep_1 + (symbol->string + '||) + post_1)))))))))))) (if system-opaque?_0 p_0 (list @@ -17303,21 +17432,29 @@ 'record-accessor struct:s_0 pos_0))) - (begin-unsafe - (wrap-property-set - proc-expr_0 - 'inferred-name - (string->symbol - (let ((app_5 - (symbol->string - st_0))) - (string-append - pre_0 - app_5 - sep_0 - (symbol->string - field-name_0) - post_0))))))))))) + (let ((post_1 + post_0) + (sep_1 + sep_0) + (st_1 + st_0) + (pre_1 + pre_0)) + (begin-unsafe + (wrap-property-set + proc-expr_0 + 'inferred-name + (string->symbol + (let ((app_5 + (symbol->string + st_1))) + (string-append + pre_1 + app_5 + sep_1 + (symbol->string + field-name_0) + post_1)))))))))))) (if (if can-impersonate?_0 can-impersonate?_0 system-opaque?_0) @@ -17348,44 +17485,58 @@ (list 'lambda '(s) - (list - 'if - (list* - raw-s?_0 - '(s)) - (list* - raw-acc/mut_0 - '(s)) - (list - '$value - (list - 'impersonate-ref - raw-acc/mut_0 - struct:s_0 - pos_0 - 's - (list - 'quote - (struct-type-info-name - sti_0)) - (list - 'quote - field-name_0))))))) - (begin-unsafe - (wrap-property-set - proc-expr_0 - 'inferred-name - (string->symbol - (let ((app_5 - (symbol->string - st_0))) - (string-append - pre_0 - app_5 - sep_0 - (symbol->string - field-name_0) - post_0))))))))))) + (let ((app_5 + (list* + raw-s?_0 + '(s)))) + (let ((app_6 + (list* + raw-acc/mut_0 + '(s)))) + (list + 'if + app_5 + app_6 + (list + '$value + (let ((app_7 + (list + 'quote + (struct-type-info-name + sti_0)))) + (list + 'impersonate-ref + raw-acc/mut_0 + struct:s_0 + pos_0 + 's + app_7 + (list + 'quote + field-name_0)))))))))) + (let ((post_1 + post_0) + (sep_1 + sep_0) + (st_1 + st_0) + (pre_1 + pre_0)) + (begin-unsafe + (wrap-property-set + proc-expr_0 + 'inferred-name + (string->symbol + (let ((app_5 + (symbol->string + st_1))) + (string-append + pre_1 + app_5 + sep_1 + (symbol->string + field-name_0) + post_1)))))))))))) (if system-opaque?_0 p_0 (list @@ -17545,21 +17696,29 @@ 'record-mutator struct:s_0 pos_0))) - (begin-unsafe - (wrap-property-set - proc-expr_0 - 'inferred-name - (string->symbol - (let ((app_5 - (symbol->string - st_0))) - (string-append - pre_0 - app_5 - sep_0 - (symbol->string - field-name_0) - post_0))))))))))) + (let ((post_1 + post_0) + (sep_1 + sep_0) + (st_1 + st_0) + (pre_1 + pre_0)) + (begin-unsafe + (wrap-property-set + proc-expr_0 + 'inferred-name + (string->symbol + (let ((app_5 + (symbol->string + st_1))) + (string-append + pre_1 + app_5 + sep_1 + (symbol->string + field-name_0) + post_1)))))))))))) (if (if can-impersonate?_0 can-impersonate?_0 system-opaque?_0) @@ -17572,11 +17731,13 @@ (let ((abs-pos_0 (+ pos_0 - (- - (struct-type-info-field-count - sti_0) - (struct-type-info-immediate-field-count - sti_0))))) + (let ((app_5 + (struct-type-info-field-count + sti_0))) + (- + app_5 + (struct-type-info-immediate-field-count + sti_0)))))) (if can-impersonate?_0 (list 'begin @@ -17599,47 +17760,61 @@ 'lambda '(s v) - (list - 'if - (list* - raw-s?_0 - '(s)) - (list* - raw-acc/mut_0 - '(s - v)) - (list - '$value - (list - 'impersonate-set! - raw-acc/mut_0 - struct:s_0 - pos_0 - abs-pos_0 - 's - 'v - (list - 'quote - (struct-type-info-name - sti_0)) - (list - 'quote - field-name_0))))))) - (begin-unsafe - (wrap-property-set - proc-expr_0 - 'inferred-name - (string->symbol - (let ((app_5 - (symbol->string - st_0))) - (string-append - pre_0 - app_5 - sep_0 - (symbol->string - field-name_0) - post_0))))))))))) + (let ((app_5 + (list* + raw-s?_0 + '(s)))) + (let ((app_6 + (list* + raw-acc/mut_0 + '(s + v)))) + (list + 'if + app_5 + app_6 + (list + '$value + (let ((app_7 + (list + 'quote + (struct-type-info-name + sti_0)))) + (list + 'impersonate-set! + raw-acc/mut_0 + struct:s_0 + pos_0 + abs-pos_0 + 's + 'v + app_7 + (list + 'quote + field-name_0)))))))))) + (let ((post_1 + post_0) + (sep_1 + sep_0) + (st_1 + st_0) + (pre_1 + pre_0)) + (begin-unsafe + (wrap-property-set + proc-expr_0 + 'inferred-name + (string->symbol + (let ((app_5 + (symbol->string + st_1))) + (string-append + pre_1 + app_5 + sep_1 + (symbol->string + field-name_0) + post_1)))))))))))) (if system-opaque?_0 p_0 (list @@ -22245,10 +22420,10 @@ (let ((rest_0 (unsafe-cdr lst_0))) - (let ((lst_1 - (import-group-imports - grp_0))) - (let ((fold-var_1 + (let ((fold-var_1 + (let ((lst_1 + (import-group-imports + grp_0))) (begin (letrec* ((for-loop_1 @@ -22266,23 +22441,23 @@ (unsafe-cdr lst_2))) (let ((fold-var_2 - (cons - (import-id - im_0) - fold-var_1))) - (let ((fold-var_3 + (let ((fold-var_2 + (cons + (import-id + im_0) + fold-var_1))) (values - fold-var_2))) - (for-loop_1 - fold-var_3 - rest_1))))) + fold-var_2)))) + (for-loop_1 + fold-var_2 + rest_1)))) fold-var_1)))))) (for-loop_1 fold-var_0 - lst_1))))) - (for-loop_0 - fold-var_1 - rest_0))))) + lst_1)))))) + (for-loop_0 + fold-var_1 + rest_0)))) fold-var_0)))))) (for-loop_0 null @@ -22364,16 +22539,16 @@ (unsafe-cdr lst_2))) (let ((fold-var_2 - (cons - (import-ext-id - im_0) - fold-var_1))) - (let ((fold-var_3 + (let ((fold-var_2 + (cons + (import-ext-id + im_0) + fold-var_1))) (values - fold-var_2))) - (for-loop_1 - fold-var_3 - rest_1))))) + fold-var_2)))) + (for-loop_1 + fold-var_2 + rest_1)))) fold-var_1)))))) (for-loop_1 null @@ -22776,20 +22951,20 @@ (case-lambda ((int-id_0 ex_0) (let ((fold-var_1 - (cons - (list* - 'define - (export-id ex_0) - '((make-internal-variable - 'int-id))) - fold-var_0))) - (let ((fold-var_2 - (values fold-var_1))) - (for-loop_0 - fold-var_2 - (hash-iterate-next - extra-variables_0 - i_0))))) + (let ((fold-var_1 + (cons + (list* + 'define + (export-id ex_0) + '((make-internal-variable + 'int-id))) + fold-var_0))) + (values fold-var_1)))) + (for-loop_0 + fold-var_1 + (hash-iterate-next + extra-variables_0 + i_0)))) (args (raise-binding-result-arity-error 2 @@ -29516,7 +29691,10 @@ args_0) 'v))) (let ((sel_0 - (if unsafe-mode?_0 + (if (if unsafe-mode?_0 + (known-field-accessor-authentic? + k_0) + #f) (list 'unsafe-struct*-ref tmp_0 @@ -29529,17 +29707,19 @@ (schemify_0 type-id_0 'fresh)))) - (list - 'if - app_0 - (list - 'unsafe-struct*-ref - tmp_0 - (known-field-accessor-pos - k_0)) - (list - s-rator_0 - tmp_0)))))) + (let ((app_1 + (list + 'unsafe-struct*-ref + tmp_0 + (known-field-accessor-pos + k_0)))) + (list + 'if + app_0 + app_1 + (list + s-rator_0 + tmp_0))))))) (wrap-tmp_0 tmp_0 (car @@ -29584,7 +29764,10 @@ args_0) 'rhs))) (let ((mut_0 - (if unsafe-mode?_0 + (if (if unsafe-mode?_0 + (known-field-mutator-authentic? + k_0) + #f) (list 'unsafe-struct*-set! tmp_0 @@ -29598,19 +29781,21 @@ (schemify_0 type-id_0 'fresh)))) - (list - 'if - app_0 - (list - 'unsafe-struct*-set! - tmp_0 - (known-field-mutator-pos - k_0) - tmp-rhs_0) - (list - s-rator_0 - tmp_0 - tmp-rhs_0)))))) + (let ((app_1 + (list + 'unsafe-struct*-set! + tmp_0 + (known-field-mutator-pos + k_0) + tmp-rhs_0))) + (list + 'if + app_0 + app_1 + (list + s-rator_0 + tmp_0 + tmp-rhs_0))))))) (let ((app_0 (car args_0))) @@ -35078,11 +35263,13 @@ (begin (if (convert-mode? cm_0) (if (convert-mode? cm_0) - (convert-mode1.1 - (convert-mode-sizes cm_0) - #f - (convert-mode-lift? cm_0) - (convert-mode-no-more-conversions? cm_0)) + (let ((app_0 (convert-mode-sizes cm_0))) + (let ((app_1 (convert-mode-lift? cm_0))) + (convert-mode1.1 + app_0 + #f + app_1 + (convert-mode-no-more-conversions? cm_0)))) (raise-argument-error 'struct-copy "convert-mode?" cm_0)) (if (eq? 'no-lift (cdr cm_0)) '(not-called . no-lift) @@ -35094,11 +35281,13 @@ (begin (if (convert-mode? cm_0) (if (convert-mode? cm_0) - (convert-mode1.1 - (convert-mode-sizes cm_0) - #t - (convert-mode-lift? cm_0) - (convert-mode-no-more-conversions? cm_0)) + (let ((app_0 (convert-mode-sizes cm_0))) + (let ((app_1 (convert-mode-lift? cm_0))) + (convert-mode1.1 + app_0 + #t + app_1 + (convert-mode-no-more-conversions? cm_0)))) (raise-argument-error 'struct-copy "convert-mode?" cm_0)) (if (eq? 'no-lift (cdr cm_0)) '(called . no-lift) @@ -39215,7 +39404,8 @@ (to-unfasl-wrt v_0))) (let ((temp7_0 (to-unfasl-bstr v_0))) (let ((temp10_0 (to-unfasl-externals v_0))) - (fasl->s-exp.1 #t temp10_0 #t temp7_0)))))) + (let ((temp7_1 temp7_0)) + (fasl->s-exp.1 #t temp10_0 #t temp7_1))))))) (letrec* ((loop_0 (|#%name| @@ -39394,41 +39584,30 @@ (let ((C_0 (node-right yellow_0))) (let ((D_0 (node-right t_0))) (single-rotate.1 - (let ((app_0 (node-key t_0))) - (let ((app_1 (node-val t_0))) - (combine - app_0 - app_1 - (let ((app_2 (node-key yellow_0))) - (let ((app_3 (node-val yellow_0))) - (combine - app_2 - app_3 - (combine - (node-key orange_0) - (node-val orange_0) - A_0 - B_0) - C_0))) - D_0)))))))))))))) + (combine + (node-key t_0) + (node-val t_0) + (combine + (node-key yellow_0) + (node-val yellow_0) + (combine (node-key orange_0) (node-val orange_0) A_0 B_0) + C_0) + D_0)))))))))))) (define single-rotate.1 (|#%name| single-rotate (lambda (t_0) (begin (let ((yellow_0 (node-left t_0))) - (let ((app_0 (node-key yellow_0))) - (let ((app_1 (node-val yellow_0))) - (let ((app_2 (node-left yellow_0))) - (combine - app_0 - app_1 - app_2 - (combine - (node-key t_0) - (node-val t_0) - (node-right yellow_0) - (node-right t_0))))))))))) + (combine + (node-key yellow_0) + (node-val yellow_0) + (node-left yellow_0) + (combine + (node-key t_0) + (node-val t_0) + (node-right yellow_0) + (node-right t_0)))))))) (define rotate-left (lambda (t_0) (let ((to_0 (node-right t_0))) @@ -39789,12 +39968,15 @@ pos_0))))))))))))) (define stack-info-branch (lambda (stk-i_0) - (stack-info4.1 - (stack-info-capture-depth stk-i_0) - (stack-info-closure-map stk-i_0) - (stack-info-use-map stk-i_0) - hash2610 - (stack-info-non-tail-call-later? stk-i_0)))) + (let ((app_0 (stack-info-capture-depth stk-i_0))) + (let ((app_1 (stack-info-closure-map stk-i_0))) + (let ((app_2 (stack-info-use-map stk-i_0))) + (stack-info4.1 + app_0 + app_1 + app_2 + hash2610 + (stack-info-non-tail-call-later? stk-i_0))))))) (define stack-info-branch-need-clears? (lambda (stk-i_0) (stack-info-non-tail-call-later? stk-i_0))) (define stack-info-merge! @@ -43616,39 +43798,39 @@ u_0))) (if (indirect? var_0) - (let ((temp36_0 - (indirect-pos - var_0))) - (let ((pos_0 + (let ((pos_0 + (let ((temp36_0 + (indirect-pos + var_0))) (stack->pos.1 #f temp36_0 - stk-i_0))) - (let ((elem_0 - (indirect-element - var_0))) - (cons - pos_0 - elem_0)))) + stk-i_0)))) + (let ((elem_0 + (indirect-element + var_0))) + (cons + pos_0 + elem_0))) (if (boxed? var_0) - (let ((temp38_0 - (boxed-pos - var_0))) - (let ((pos_0 + (let ((pos_0 + (let ((temp38_0 + (boxed-pos + var_0))) (stack->pos.1 #f temp38_0 - stk-i_0))) - (if (boxed/check? - var_0) - (vector - 'unbox/checked - pos_0 - u_0) - (vector - 'unbox - pos_0)))) + stk-i_0)))) + (if (boxed/check? + var_0) + (vector + 'unbox/checked + pos_0 + u_0) + (vector + 'unbox + pos_0))) (stack->pos.1 #f var_0 @@ -43957,16 +44139,18 @@ (let ((u_0 (unwrap id_0))) (let ((var_0 (hash-ref env_0 u_0))) (if (indirect? var_0) - (let ((temp47_0 (indirect-pos var_0))) - (let ((s_0 (stack->pos.1 #f temp47_0 stk-i_0))) - (let ((e_0 (indirect-element var_0))) - (vector 'set!-indirect s_0 e_0 compiled-rhs_0)))) + (let ((s_0 + (let ((temp47_0 (indirect-pos var_0))) + (stack->pos.1 #f temp47_0 stk-i_0)))) + (let ((e_0 (indirect-element var_0))) + (vector 'set!-indirect s_0 e_0 compiled-rhs_0))) (if (boxed? var_0) - (let ((temp49_0 (boxed-pos var_0))) - (let ((s_0 (stack->pos.1 #f temp49_0 stk-i_0))) - (if (boxed/check? var_0) - (vector 'set!-boxed/checked s_0 compiled-rhs_0 u_0) - (vector 'set!-boxed s_0 compiled-rhs_0 u_0)))) + (let ((s_0 + (let ((temp49_0 (boxed-pos var_0))) + (stack->pos.1 #f temp49_0 stk-i_0)))) + (if (boxed/check? var_0) + (vector 'set!-boxed/checked s_0 compiled-rhs_0 u_0) + (vector 'set!-boxed s_0 compiled-rhs_0 u_0))) (error 'compile "unexpected set! ~s -> ~v" diff --git a/racket/src/cs/schemified/thread.scm b/racket/src/cs/schemified/thread.scm index 5b47dbf0f5..eda69aa6cf 100644 --- a/racket/src/cs/schemified/thread.scm +++ b/racket/src/cs/schemified/thread.scm @@ -1090,10 +1090,12 @@ (lambda (q_0 n_0) (begin (if (node-prev$1 n_0) - (set-node-next!$1 (node-prev$1 n_0) (node-next$1 n_0)) + (let ((app_0 (node-prev$1 n_0))) + (set-node-next!$1 app_0 (node-next$1 n_0))) (set-queue-start! q_0 (node-next$1 n_0))) (if (node-next$1 n_0) - (set-node-prev!$1 (node-next$1 n_0) (node-prev$1 n_0)) + (let ((app_0 (node-next$1 n_0))) + (set-node-prev!$1 app_0 (node-prev$1 n_0))) (set-queue-end! q_0 (node-prev$1 n_0)))))) (define internal-error (lambda (s_0) @@ -1333,24 +1335,18 @@ (if (|#%app| syncers)) - (|#%app| - app_1 - #f - (choice-evt-evts - new-evt_0) - (syncer-wraps sr_0) - (syncer-commits sr_0) - (syncer-abandons - sr_0))))))) + (let ((app_2 + (choice-evt-evts + new-evt_0))) + (let ((app_3 + (syncer-wraps + sr_0))) + (let ((app_4 + (syncer-commits + sr_0))) + (|#%app| + app_1 + #f + app_2 + app_3 + app_4 + (syncer-abandons + sr_0)))))))))) (if (not new-syncers_0) (begin (syncer-remove! sr_0 s32_0) @@ -10294,17 +10301,17 @@ (let ((ns_0 (unsafe-car lst_0))) (let ((rest_0 (unsafe-cdr lst_0))) (let ((result_1 - (syncing-selected ns_0))) - (let ((result_2 - (values result_1))) - (if (if (not - (let ((x_0 - (list ns_0))) - result_2)) - #t - #f) - (for-loop_0 result_2 rest_0) - result_2))))) + (let ((result_1 + (syncing-selected + ns_0))) + (values result_1)))) + (if (if (not + (let ((x_0 (list ns_0))) + result_1)) + #t + #f) + (for-loop_0 result_1 rest_0) + result_1)))) result_0)))))) (for-loop_0 #f nss_0))))) void @@ -10488,24 +10495,24 @@ (if (procedure? next_0) (void) (raise-argument-error 'replace-evt "procedure?" next_0)) - (let ((orig-evt_0 unsafe-undefined)) - (set! orig-evt_0 - (replacing-evt34.1 - (lambda () - (let ((s_0 - (let ((temp89_0 - (let ((app_0 evts->syncers)) - (|#%app| app_0 'replace-evt (list evt_0))))) - (make-syncing.1 #f temp89_0)))) - (values - #f - (control-state-evt9.1 - (nested-sync-evt35.1 s_0 next_0 orig-evt_0) - values - (lambda () (syncing-interrupt! s_0)) - (lambda () (syncing-abandon! s_0)) - (lambda () (syncing-retry! s_0)))))))) - orig-evt_0))))))) + (letrec* + ((orig-evt_0 + (replacing-evt34.1 + (lambda () + (let ((s_0 + (let ((temp89_0 + (let ((app_0 evts->syncers)) + (|#%app| app_0 'replace-evt (list evt_0))))) + (make-syncing.1 #f temp89_0)))) + (values + #f + (control-state-evt9.1 + (nested-sync-evt35.1 s_0 next_0 orig-evt_0) + values + (lambda () (syncing-interrupt! s_0)) + (lambda () (syncing-abandon! s_0)) + (lambda () (syncing-retry! s_0))))))))) + orig-evt_0))))))) (define poll-nested-sync (lambda (ns_0 just-poll?_0 fast-only?_0 sched-info_0) (let ((temp90_0 (|#%app| nested-sync-evt-s ns_0))) @@ -11675,10 +11682,12 @@ (if or-part_0 or-part_0 (future*-next f_0))) (begin (if (future*-prev f_0) - (set-future*-next! (future*-prev f_0) (future*-next f_0)) + (let ((app_0 (future*-prev f_0))) + (set-future*-next! app_0 (future*-next f_0))) (set-scheduler-futures-head! s_0 (future*-next f_0))) (if (future*-next f_0) - (set-future*-prev! (future*-next f_0) (future*-prev f_0)) + (let ((app_0 (future*-next f_0))) + (set-future*-prev! app_0 (future*-prev f_0))) (set-scheduler-futures-tail! s_0 (future*-prev f_0))) (set-future*-prev! f_0 #f) (set-future*-next! f_0 #f)) @@ -12302,9 +12311,10 @@ (if (pair? lst_0) (let ((t_0 (unsafe-car lst_0))) (let ((rest_0 (unsafe-cdr lst_0))) - (let ((sched-info_0 (thread-sched-info t_0))) - (let ((exts_1 - (let ((exts_1 + (let ((exts_1 + (let ((exts_1 + (let ((sched-info_0 + (thread-sched-info t_0))) (let ((t-exts_0 (if sched-info_0 (schedule-info-exts @@ -12315,9 +12325,9 @@ (sandman-do-merge-external-event-sets the-sandman) exts_0 - t-exts_0))))) - (values exts_1)))) - (for-loop_0 exts_1 rest_0))))) + t-exts_0)))))) + (values exts_1)))) + (for-loop_0 exts_1 rest_0)))) exts_0)))))) (for-loop_0 sleeping-exts_0 ts_0))))) (begin @@ -13678,10 +13688,11 @@ (let ((temp12_0 (place-id new-place_0))) - (log-place.1 - unsafe-undefined - temp12_0 - temp11_0))) + (let ((temp11_1 temp11_0)) + (log-place.1 + unsafe-undefined + temp12_0 + temp11_1)))) (values new-place_0 parent-in_0 @@ -13897,7 +13908,8 @@ (end-atomic))) (let ((temp26_0 "reap")) (let ((temp27_0 (place-id p_0))) - (log-place.1 unsafe-undefined temp27_0 temp26_0))) + (let ((temp26_1 temp26_0)) + (log-place.1 unsafe-undefined temp27_0 temp26_1)))) (void)) (void)) (let ((cref_0 (place-custodian-ref p_0))) @@ -14631,18 +14643,18 @@ (lock-release (fsemaphore-lock fs_0)) (future-suspend) (void)) - (let ((or-part_0 (fsemaphore-dep-box fs_0))) - (let ((dep-box_0 + (let ((dep-box_0 + (let ((or-part_0 (fsemaphore-dep-box fs_0))) (if or-part_0 or-part_0 (let ((b_0 (box #f))) (begin (set-fsemaphore-dep-box! fs_0 b_0) - b_0))))) - (begin - (lock-release (fsemaphore-lock fs_0)) - (1/sync (fsemaphore-box-evt2.1 dep-box_0)) - (1/fsemaphore-wait fs_0)))))) + b_0)))))) + (begin + (lock-release (fsemaphore-lock fs_0)) + (1/sync (fsemaphore-box-evt2.1 dep-box_0)) + (1/fsemaphore-wait fs_0))))) (begin (set-fsemaphore-c! fs_0 (sub1 c_0)) (lock-release (fsemaphore-lock fs_0))))))))))) @@ -14698,14 +14710,14 @@ (void)))))) (define struct:os-semaphore (make-record-type-descriptor* 'os-semaphore #f #f #f #f 3 1)) -(define effect_2794 +(define effect_3038 (struct-type-install-properties! struct:os-semaphore 'os-semaphore 3 0 #f - null + (list (cons prop:authentic #t)) (current-inspector) #f '(1 2) @@ -14716,84 +14728,16 @@ os-semaphore (record-constructor (make-record-constructor-descriptor struct:os-semaphore #f #f)))) -(define os-semaphore?_1935 - (|#%name| os-semaphore? (record-predicate struct:os-semaphore))) (define os-semaphore? - (|#%name| - os-semaphore? - (lambda (v) - (if (os-semaphore?_1935 v) - #t - ($value - (if (impersonator? v) - (os-semaphore?_1935 (impersonator-val v)) - #f)))))) -(define os-semaphore-count_2300 - (|#%name| os-semaphore-count (record-accessor struct:os-semaphore 0))) + (|#%name| os-semaphore? (record-predicate struct:os-semaphore))) (define os-semaphore-count - (|#%name| - os-semaphore-count - (lambda (s) - (if (os-semaphore?_1935 s) - (os-semaphore-count_2300 s) - ($value - (impersonate-ref - os-semaphore-count_2300 - struct:os-semaphore - 0 - s - 'os-semaphore - 'count)))))) -(define os-semaphore-mutex_3012 - (|#%name| os-semaphore-mutex (record-accessor struct:os-semaphore 1))) + (|#%name| os-semaphore-count (record-accessor struct:os-semaphore 0))) (define os-semaphore-mutex - (|#%name| - os-semaphore-mutex - (lambda (s) - (if (os-semaphore?_1935 s) - (os-semaphore-mutex_3012 s) - ($value - (impersonate-ref - os-semaphore-mutex_3012 - struct:os-semaphore - 1 - s - 'os-semaphore - 'mutex)))))) -(define os-semaphore-condition_1733 - (|#%name| os-semaphore-condition (record-accessor struct:os-semaphore 2))) + (|#%name| os-semaphore-mutex (record-accessor struct:os-semaphore 1))) (define os-semaphore-condition - (|#%name| - os-semaphore-condition - (lambda (s) - (if (os-semaphore?_1935 s) - (os-semaphore-condition_1733 s) - ($value - (impersonate-ref - os-semaphore-condition_1733 - struct:os-semaphore - 2 - s - 'os-semaphore - 'condition)))))) -(define set-os-semaphore-count!_2394 - (|#%name| set-os-semaphore-count! (record-mutator struct:os-semaphore 0))) + (|#%name| os-semaphore-condition (record-accessor struct:os-semaphore 2))) (define set-os-semaphore-count! - (|#%name| - set-os-semaphore-count! - (lambda (s v) - (if (os-semaphore?_1935 s) - (set-os-semaphore-count!_2394 s v) - ($value - (impersonate-set! - set-os-semaphore-count!_2394 - struct:os-semaphore - 0 - 0 - s - v - 'os-semaphore - 'count)))))) + (|#%name| set-os-semaphore-count! (record-mutator struct:os-semaphore 0))) (define 1/unsafe-make-os-semaphore (|#%name| unsafe-make-os-semaphore diff --git a/racket/src/schemify/find-definition.rkt b/racket/src/schemify/find-definition.rkt index 773342022d..3faac8cc29 100644 --- a/racket/src/schemify/find-definition.rkt +++ b/racket/src/schemify/find-definition.rkt @@ -45,9 +45,10 @@ (if (struct-type-info-pure-constructor? info) (known-struct-constructor (arithmetic-shift 1 (struct-type-info-field-count info)) type struct:s) a-known-constant))] + [authentic? (struct-type-info-authentic? info)] [knowns (hash-set knowns (unwrap s?) - (known-struct-predicate 2 type struct:s (struct-type-info-authentic? info)))] + (known-struct-predicate 2 type struct:s authentic?))] [knowns (let* ([immediate-count (struct-type-info-immediate-field-count info)] [parent-count (- (struct-type-info-field-count info) @@ -62,10 +63,14 @@ (cond [(and (wrap-eq? make 'make-struct-field-accessor) (wrap-eq? ref-or-set -ref)) - (hash-set knowns (unwrap id) (known-field-accessor 2 type struct:s (+ parent-count pos)))] + (define immutable? (memv pos (or (struct-type-info-prefab-immutables info) + (struct-type-info-non-prefab-immutables info) + '()))) + (hash-set knowns (unwrap id) (known-field-accessor 2 type struct:s authentic? (+ parent-count pos) + immutable?))] [(and (wrap-eq? make 'make-struct-field-mutator) (wrap-eq? ref-or-set -set!)) - (hash-set knowns (unwrap id) (known-field-mutator 4 type struct:s (+ parent-count pos)))] + (hash-set knowns (unwrap id) (known-field-mutator 4 type struct:s authentic? (+ parent-count pos)))] [else knowns])) knowns)] [`,_ knowns])))]) diff --git a/racket/src/schemify/inline.rkt b/racket/src/schemify/inline.rkt index f4c7bee9c7..e1b4e08510 100644 --- a/racket/src/schemify/inline.rkt +++ b/racket/src/schemify/inline.rkt @@ -277,7 +277,9 @@ (known-field-accessor/need-imports (known-procedure-arity-mask k) (known-accessor-type k) (known-field-accessor-type-id k) + (known-field-accessor-authentic? k) (known-field-accessor-pos k) + (known-field-accessor-known-immutable? k) (needed->list needed))] [else (known-accessor (known-procedure-arity-mask k) @@ -289,6 +291,7 @@ (known-field-mutator/need-imports (known-procedure-arity-mask k) (known-mutator-type k) (known-field-mutator-type-id k) + (known-field-mutator-authentic? k) (known-field-mutator-pos k) (needed->list needed))] [else diff --git a/racket/src/schemify/known.rkt b/racket/src/schemify/known.rkt index 42c361db9b..37f855be05 100644 --- a/racket/src/schemify/known.rkt +++ b/racket/src/schemify/known.rkt @@ -36,8 +36,10 @@ known-mutator known-mutator? known-mutator-type known-struct-constructor known-struct-constructor? known-struct-constructor-type-id known-struct-predicate known-struct-predicate? known-struct-predicate-type-id known-struct-predicate-authentic? - known-field-accessor known-field-accessor? known-field-accessor-type-id known-field-accessor-pos - known-field-mutator known-field-mutator? known-field-mutator-type-id known-field-mutator-pos + known-field-accessor known-field-accessor? known-field-accessor-type-id known-field-accessor-authentic? + known-field-accessor-pos known-field-accessor-known-immutable? + known-field-mutator known-field-mutator? known-field-mutator-type-id known-field-mutator-authentic? + known-field-mutator-pos known-struct-constructor/need-imports known-struct-constructor/need-imports? known-struct-constructor/need-imports-needed known-struct-predicate/need-imports known-struct-predicate/need-imports? known-struct-predicate/need-imports-needed known-field-accessor/need-imports known-field-accessor/need-imports? known-field-accessor/need-imports-needed @@ -122,8 +124,8 @@ (struct known-mutator (type) #:prefab #:omit-define-syntaxes #:super struct:known-procedure/single-valued) (struct known-struct-constructor (type-id) #:prefab #:omit-define-syntaxes #:super struct:known-constructor) (struct known-struct-predicate (type-id authentic?) #:prefab #:omit-define-syntaxes #:super struct:known-predicate) -(struct known-field-accessor (type-id pos) #:prefab #:omit-define-syntaxes #:super struct:known-accessor) -(struct known-field-mutator (type-id pos) #:prefab #:omit-define-syntaxes #:super struct:known-mutator) +(struct known-field-accessor (type-id authentic? pos known-immutable?) #:prefab #:omit-define-syntaxes #:super struct:known-accessor) +(struct known-field-mutator (type-id authentic? pos) #:prefab #:omit-define-syntaxes #:super struct:known-mutator) (struct known-struct-constructor/need-imports (needed) #:prefab #:omit-define-syntaxes #:super struct:known-struct-constructor) (struct known-struct-predicate/need-imports (needed) #:prefab #:omit-define-syntaxes #:super struct:known-struct-predicate) (struct known-field-accessor/need-imports (needed) #:prefab #:omit-define-syntaxes #:super struct:known-field-accessor) diff --git a/racket/src/schemify/schemify.rkt b/racket/src/schemify/schemify.rkt index ef008c8c2f..b9276bd00a 100644 --- a/racket/src/schemify/schemify.rkt +++ b/racket/src/schemify/schemify.rkt @@ -857,7 +857,8 @@ (cond [type-id (define tmp (maybe-tmp (car args) 'v)) - (define sel (if unsafe-mode? + (define sel (if (and unsafe-mode? + (known-field-accessor-authentic? k)) `(unsafe-struct*-ref ,tmp ,(known-field-accessor-pos k)) `(if (unsafe-struct? ,tmp ,(schemify type-id 'fresh)) (unsafe-struct*-ref ,tmp ,(known-field-accessor-pos k)) @@ -874,7 +875,8 @@ [type-id (define tmp (maybe-tmp (car args) 'v)) (define tmp-rhs (maybe-tmp (cadr args) 'rhs)) - (define mut (if unsafe-mode? + (define mut (if (and unsafe-mode? + (known-field-mutator-authentic? k)) `(unsafe-struct*-set! ,tmp ,(known-field-mutator-pos k) ,tmp-rhs) `(if (unsafe-struct? ,tmp ,(schemify type-id 'fresh)) (unsafe-struct*-set! ,tmp ,(known-field-mutator-pos k) ,tmp-rhs) diff --git a/racket/src/schemify/simple.rkt b/racket/src/schemify/simple.rkt index 6b3b7f13b2..e394ae054b 100644 --- a/racket/src/schemify/simple.rkt +++ b/racket/src/schemify/simple.rkt @@ -107,15 +107,25 @@ (let ([v (or (hash-ref-either knowns imports proc) (hash-ref prim-knowns proc #f))]) (and (if pure? - (and (if no-alloc? - (known-procedure/pure? v) - (or (known-procedure/allocates? v) - (and unsafe-mode? - (known-accessor? v)))) + (and (or (if no-alloc? + (known-procedure/pure? v) + (known-procedure/allocates? v)) + ;; in unsafe mode, we can assume no constract error: + (and unsafe-mode? + (known-field-accessor? v) + (known-field-accessor-authentic? v) + (known-field-accessor-known-immutable? v))) (returns 1)) - (and (or (known-procedure/no-prompt? v) - (known-procedure/no-prompt/multi? v)) - (eqv? result-arity #f))) + (or (and (known-procedure/no-prompt? v) + (returns 1)) + (and (known-procedure/no-prompt/multi? v) + (eqv? result-arity #f)) + (and (known-field-accessor? v) + (known-field-accessor-authentic? v) + (returns 1)) + (and (known-field-mutator? v) + (known-field-mutator-authentic? v) + (returns 1)))) (bitwise-bit-set? (known-procedure-arity-mask v) (length args)))) (simple-mutated-state? (hash-ref mutated proc #f)) (for/and ([arg (in-list args)]) diff --git a/racket/src/thread/os-thread.rkt b/racket/src/thread/os-thread.rkt index 85f7830c69..5cd604e8fc 100644 --- a/racket/src/thread/os-thread.rkt +++ b/racket/src/thread/os-thread.rkt @@ -20,7 +20,8 @@ (proc))) (void)) -(struct os-semaphore ([count #:mutable] mutex condition)) +(struct os-semaphore ([count #:mutable] mutex condition) + #:authentic) (define/who (unsafe-make-os-semaphore) (unless threaded? (raise-unsupported who)) diff --git a/racket/src/version/racket_version.h b/racket/src/version/racket_version.h index e38dec453c..cc149f51c6 100644 --- a/racket/src/version/racket_version.h +++ b/racket/src/version/racket_version.h @@ -16,7 +16,7 @@ #define MZSCHEME_VERSION_X 7 #define MZSCHEME_VERSION_Y 9 #define MZSCHEME_VERSION_Z 0 -#define MZSCHEME_VERSION_W 20 +#define MZSCHEME_VERSION_W 21 /* A level of indirection makes `#` work as needed: */ #define AS_a_STR_HELPER(x) #x