summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2011-05-08 16:13:41 +0200
committerAndy Wingo <wingo@pobox.com>2011-05-08 16:13:41 +0200
commit6994fa9fef526782836db8b0b3cedbda18c69da3 (patch)
tree1c64ec3b37886daeb2cabf2d1c752a60178aa971
parent55fb5058a88b783f0e1b7c375775afeb112dbc0c (diff)
downloadguile-6994fa9fef526782836db8b0b3cedbda18c69da3.tar.gz
compile-assembly: make-meta refactor
* module/language/glil/compile-assembly.scm (make-meta): Avoid going through the compiler.
-rw-r--r--module/language/glil/compile-assembly.scm18
1 files 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)