diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/float-complex.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/float-complex.rkt index e7ac86ac64..eed8d5a904 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/float-complex.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/float-complex.rkt @@ -396,7 +396,7 @@ (pattern (#%plain-app op:unboxed-fun args:expr ...) ;no need to optimize op - #:with (~var || (float-complex-call-site-opt-expr #'op.unboxed-info #'op)) this-syntax + #:with (~var || (float-complex-call-site-opt-expr #'op.unboxed-info)) #'(op args ...) #:do [(log-arity-raising-opt "call to fun with unboxed args")]) (pattern :float-complex-arith-opt-expr)) @@ -480,19 +480,19 @@ ;; takes as argument a structure describing which arguments will be unboxed ;; and the optimized version of the operator. operators are optimized elsewhere ;; to benefit from local information -(define-syntax-class (float-complex-call-site-opt-expr unboxed-info opt-operator) +(define-syntax-class (float-complex-call-site-opt-expr unboxed-info) #:commit #:attributes (opt) ;; call site of a function with unboxed parameters ;; the calling convention is: real parts of unboxed, imag parts, boxed - (pattern (#%plain-app op:expr args:expr ...) + (pattern (op:expr args:expr ...) #:with (unboxed-args ...) unboxed-info #:with opt (syntax-parse #'((unboxed-args args) ...) [(e:possibly-unboxed ...) (log-unboxing-opt "unboxed call site") #`(let*-values (e.bindings ... ...) - (#%plain-app #,opt-operator + (#%plain-app op e.real-binding ... ... e.imag-binding ... ... e.boxed-binding ... ...))]))) diff --git a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/unboxed-let.rkt b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/unboxed-let.rkt index 67acac2ef5..44f6dafda3 100644 --- a/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/unboxed-let.rkt +++ b/pkgs/typed-racket-pkgs/typed-racket-lib/typed-racket/optimizer/unboxed-let.rkt @@ -35,7 +35,8 @@ #:with (~var operator (unboxed-let-opt-expr-internal #t)) #'let-e #:with loop-fun2:unboxed-fun #'loop-fun #:do [(log-optimization "unboxed let loop" arity-raising-opt-msg #'loop-fun2)] - #:with (~var || (float-complex-call-site-opt-expr #'loop-fun2.unboxed-info #'operator.opt)) this-syntax)) + #:with (~var || (float-complex-call-site-opt-expr #'loop-fun2.unboxed-info)) + #'(operator.opt args ...))) ;; does the bulk of the work ;; detects which let bindings can be unboxed, same for arguments of let-bound