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