From 6290d34db943b1e2dfd96293f180c10d99da6d1c Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Mon, 20 Oct 2014 00:59:26 -0400 Subject: [PATCH] slightly cut down lowered code for kwcall Conflicts: src/julia-syntax.scm --- src/julia-syntax.scm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/julia-syntax.scm b/src/julia-syntax.scm index 4c216d7502ac3..6dbbb1d2e6d4d 100644 --- a/src/julia-syntax.scm +++ b/src/julia-syntax.scm @@ -1489,10 +1489,13 @@ `(block (= (tuple ,k ,v) ,rk) ,push-expr)))) restkeys)) - (if (call (top isempty) ,container) - (call ,f ,@pa) - (call (top kwcall) ,f ,(length keys) ,@keyargs - ,container ,@pa)))))))) + ,(let ((kw-call `(call (top kwcall) ,f ,(length keys) ,@keyargs + ,container ,@pa))) + (if (not (null? keys)) + kw-call + `(if (call (top isempty) ,container) + (call ,f ,@pa) + ,kw-call))))))))) (define (expand-transposed-op e ops) (let ((a (caddr e))