mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-24 12:20:20 +02:00
allow specification of languages by name; add decompilers to languages
* module/system/base/language.scm (lookup-decompilation-order): New function, like its compiling cousin, but backwards. (compute-translation-order): Rework so that languages can be specified either by name or by identity. Return a list of language - procedure pairs, without the "to" language in the list, instead of a list of languages. (invalidate-compilation-cache!): Invalidate the decompilation cache too. (<language>): Add a decompiler field. * module/system/base/compile.scm (compile-passes): Much simpler now that lookup-compilation-order gives us the procedures directly. * module/language/*/spec.scm: Specify compilers by name, so that we can avoid unnecessary module loads, and so that when we specify decompilers, we can avoid cycles.
This commit is contained in:
parent
4b31848284
commit
5d6fb8bbeb
8 changed files with 43 additions and 34 deletions
|
@ -22,7 +22,6 @@
|
|||
(define-module (language scheme spec)
|
||||
#:use-module (system base language)
|
||||
#:use-module (language scheme compile-ghil)
|
||||
#:use-module (language ghil spec)
|
||||
#:export (scheme))
|
||||
|
||||
;;;
|
||||
|
@ -46,7 +45,7 @@
|
|||
#:version "0.5"
|
||||
#:reader read
|
||||
#:read-file read-file
|
||||
#:compilers `((,ghil . ,compile-ghil))
|
||||
#:compilers `((ghil . ,compile-ghil))
|
||||
#:evaluator (lambda (x module) (primitive-eval x))
|
||||
#:printer write
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue