mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-31 01:10:24 +02:00
compile-assembly: make-meta refactor
* module/language/glil/compile-assembly.scm (make-meta): Avoid going through the compiler.
This commit is contained in:
parent
55fb5058a8
commit
6994fa9fef
1 changed files with 9 additions and 9 deletions
|
@ -94,16 +94,16 @@
|
||||||
(else
|
(else
|
||||||
(lp (cdr in) out filename)))))))
|
(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)
|
(define (make-meta bindings sources arities tail)
|
||||||
;; sounds silly, but the only case in which we have no arities is when
|
(let ((body `(,@(dump-object `(,bindings ,sources ,arities ,@tail) 0)
|
||||||
;; compiling a meta procedure.
|
(return))))
|
||||||
(if (and (null? bindings) (null? sources) (null? arities) (null? tail))
|
`(load-program ()
|
||||||
#f
|
,(addr+ 0 body)
|
||||||
(compile-assembly
|
#f
|
||||||
(make-glil-program '()
|
,@body)))
|
||||||
(list
|
|
||||||
(make-glil-const `(,bindings ,sources ,arities ,@tail))
|
|
||||||
(make-glil-call 'return 1))))))
|
|
||||||
|
|
||||||
;; A functional stack of names of live variables.
|
;; A functional stack of names of live variables.
|
||||||
(define (make-open-binding name boxed? index)
|
(define (make-open-binding name boxed? index)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue