mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-18 01:30:27 +02:00
tree-il -> glil compiler works now, at least in initial tests
* module/language/tree-il/analyze.scm: Break analyzer out into its own file. * module/language/tree-il/compile-glil.scm: Port the GHIL->GLIL compiler over to work on tree-il. Works, but still misses a number of important optimizations. * module/language/tree-il.scm: Add <void>. Not used quite yet. * module/language/glil.scm: Remove <glil-argument>, as it is the same as <glil-local> (minus an offset). * module/language/glil/compile-assembly.scm: * module/language/glil/decompile-assembly.scm: * module/language/ghil/compile-glil.scm: Adapt for <glil-argument> * removal. * module/Makefile.am (TREE_IL_LANG_SOURCES): Reorder, and add analyze.scm.
This commit is contained in:
parent
073bb617eb
commit
cf10678fe7
8 changed files with 456 additions and 517 deletions
|
@ -175,15 +175,11 @@
|
|||
(1+ pos)))
|
||||
((local-ref ,n)
|
||||
(lp (cdr in) (cons *placeholder* stack)
|
||||
(cons (if (< n nargs)
|
||||
(make-glil-argument 'ref n)
|
||||
(make-glil-local 'ref (- n nargs)))
|
||||
(cons (make-glil-local 'ref n)
|
||||
out) (+ pos 2)))
|
||||
((local-set ,n)
|
||||
(lp (cdr in) (cdr stack)
|
||||
(cons (if (< n nargs)
|
||||
(make-glil-argument 'set n)
|
||||
(make-glil-local 'set (- n nargs)))
|
||||
(cons (make-glil-local 'set n)
|
||||
(emit-constants (list-head stack 1) out))
|
||||
(+ pos 2)))
|
||||
((br-if-not ,l)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue