From 774f32dad35050701cf93093c55c321bf3b55327 Mon Sep 17 00:00:00 2001 From: Eric Dobson Date: Mon, 21 Oct 2013 22:31:14 -0700 Subject: [PATCH] Make unboxing call site messages work again. original commit: 210aa98d6cb2204ac88069cd3603d9a1ea1b4ddc --- .../typed-racket/optimizer/float-complex.rkt | 5 +++-- .../typed-racket-lib/typed-racket/optimizer/unboxed-let.rkt | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) 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 21e4ccdd..65211a04 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 @@ -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 ... ... 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 a3e881d0..a5eca312 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 @@ -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 ...))))