Make unboxing call site messages work again.

This commit is contained in:
Eric Dobson 2013-10-21 22:31:14 -07:00
parent 78b9a8a360
commit 210aa98d6c
2 changed files with 5 additions and 3 deletions

View File

@ -406,7 +406,8 @@
(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")]
#:do [(log-unboxing-opt "unboxed call site")
(log-arity-raising-opt "call to fun with unboxed args")]
#:with opt #'(let*-values (call.bindings ...) (op call.args ...)))
(pattern :float-complex-arith-opt-expr))
@ -488,6 +489,7 @@
#:with (boxed-binding ...) #'(binding-name)))
;; takes as argument a structure describing which arguments will be unboxed
;; We cannot log opt here because this doesn't see the full original syntax
(define-syntax-class (float-complex-call-site-opt-expr unboxed-info)
#:commit
#:attributes ((bindings 1) (args 1))
@ -498,7 +500,6 @@
#:with ((bindings ...) (args ...))
(syntax-parse #'((unboxed-args orig-args) ...)
[(e:possibly-unboxed ...)
(log-unboxing-opt "unboxed call site")
#'((e.bindings ... ...)
(e.real-binding ... ...
e.imag-binding ... ...

View File

@ -32,7 +32,8 @@
(~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)]
#:do [(log-opt "unboxed call site" "Complex number unboxing")
(log-optimization "unboxed let loop" arity-raising-opt-msg #'loop-fun)]
#:with opt #'(let*-values
(((op) operator.opt) call.bindings ...)
(op call.args ...))))