Make parsing unboxed calls more declarative.
This commit is contained in:
parent
957e856a14
commit
a41e70375e
|
@ -394,9 +394,8 @@
|
||||||
#:with opt #`(let*-values (exp.bindings ...)
|
#:with opt #`(let*-values (exp.bindings ...)
|
||||||
(unsafe-make-flrectangular exp.real-binding exp.imag-binding)))
|
(unsafe-make-flrectangular exp.real-binding exp.imag-binding)))
|
||||||
|
|
||||||
(pattern (#%plain-app op:unboxed-fun args:expr ...)
|
(pattern (#%plain-app op:unboxed-fun .
|
||||||
;no need to optimize op
|
(~var call (float-complex-call-site-opt-expr #'op.unboxed-info)))
|
||||||
#:with (~var call (float-complex-call-site-opt-expr #'op.unboxed-info)) #'(args ...)
|
|
||||||
#:do [(log-arity-raising-opt "call to fun with unboxed args")]
|
#:do [(log-arity-raising-opt "call to fun with unboxed args")]
|
||||||
#:with opt #'(let*-values (call.bindings ...) (op call.args ...)))
|
#:with opt #'(let*-values (call.bindings ...) (op call.args ...)))
|
||||||
|
|
||||||
|
|
|
@ -28,15 +28,11 @@
|
||||||
#:literal-sets (kernel-literals)
|
#:literal-sets (kernel-literals)
|
||||||
#:attributes (opt)
|
#:attributes (opt)
|
||||||
(pattern (#%plain-app
|
(pattern (#%plain-app
|
||||||
(~and let-e (letrec-values
|
(~and (letrec-values _ :id) ; sole element of the body is an id
|
||||||
bindings
|
(~var operator (unboxed-let-opt-expr-internal #t))
|
||||||
loop-fun:id)) ; sole element of the body
|
(letrec-values _ loop-fun:unboxed-fun)) .
|
||||||
args:expr ...)
|
(~var call (float-complex-call-site-opt-expr #'loop-fun.unboxed-info)))
|
||||||
#:with (~var operator (unboxed-let-opt-expr-internal #t)) #'let-e
|
#:do [(log-optimization "unboxed let loop" arity-raising-opt-msg #'loop-fun)]
|
||||||
#:with loop-fun2:unboxed-fun #'loop-fun
|
|
||||||
#:do [(log-optimization "unboxed let loop" arity-raising-opt-msg #'loop-fun2)]
|
|
||||||
#:with (~var call (float-complex-call-site-opt-expr #'loop-fun2.unboxed-info))
|
|
||||||
#'(args ...)
|
|
||||||
#:with opt #'(let*-values
|
#:with opt #'(let*-values
|
||||||
(((op) operator.opt) call.bindings ...)
|
(((op) operator.opt) call.bindings ...)
|
||||||
(op call.args ...))))
|
(op call.args ...))))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user