From 1dbc0cdd15e3c0d96e676ed686e8f02163a0bf20 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Tue, 26 Apr 2016 16:06:30 -0400 Subject: [PATCH] avoid allocating Boxes for variables assigned once in the first basic block helps the easier cases of #15276 --- src/julia-syntax.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/julia-syntax.scm b/src/julia-syntax.scm index 0e79308edd805..6f76f02a4a261 100644 --- a/src/julia-syntax.scm +++ b/src/julia-syntax.scm @@ -2716,6 +2716,8 @@ f(x) = yt(x) (error (string "cannot add method to function argument " name))) (if (eqv? (string.char (string name) 0) #\@) (error "macro definition not allowed inside a local scope")))) + (if lam2 + (lambda-optimize-vars! lam2)) (if (not local?) ;; not a local function; will not be closure converted to a new type (cond (short e) ((null? cvs)