From 6994fa9fef526782836db8b0b3cedbda18c69da3 Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Sun, 8 May 2011 16:13:41 +0200 Subject: [PATCH] compile-assembly: make-meta refactor * module/language/glil/compile-assembly.scm (make-meta): Avoid going through the compiler. --- module/language/glil/compile-assembly.scm | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/module/language/glil/compile-assembly.scm b/module/language/glil/compile-assembly.scm index 8d82eab91..3e44c689c 100644 --- a/module/language/glil/compile-assembly.scm +++ b/module/language/glil/compile-assembly.scm @@ -94,16 +94,16 @@ (else (lp (cdr in) out filename))))))) + +;; Avoid going through the compiler so as to avoid adding to the +;; constant store. (define (make-meta bindings sources arities tail) - ;; sounds silly, but the only case in which we have no arities is when - ;; compiling a meta procedure. - (if (and (null? bindings) (null? sources) (null? arities) (null? tail)) - #f - (compile-assembly - (make-glil-program '() - (list - (make-glil-const `(,bindings ,sources ,arities ,@tail)) - (make-glil-call 'return 1)))))) + (let ((body `(,@(dump-object `(,bindings ,sources ,arities ,@tail) 0) + (return)))) + `(load-program () + ,(addr+ 0 body) + #f + ,@body))) ;; A functional stack of names of live variables. (define (make-open-binding name boxed? index)