1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-17 17:20:29 +02:00

rename translate.scm to compile-ghil.scm, and more work on compiler.texi

* doc/ref/api-evaluation.texi: Fix some typos and xrefs.

* doc/ref/compiler.texi (The Scheme Compiler): Document the scheme
  compiler, and start documenting the GHIL language.

* doc/ref/guile.texi (Guile Implementation): Whoops, put autoconf after
  the implementation foo. Unless we want it before?

* doc/ref/history.texi (The Emacs Thesis): Fix typo.

* doc/ref/vm.texi (Environment Control Instructions): Rename offset to
  index.

* module/language/ghil.scm (parse-ghil): Fix what I think was a bug --
  the consumer in a mv-call shouldn't be a rest arg.

* module/language/scheme/Makefile.am (SOURCES):
* module/language/scheme/compile-ghil.scm: Rename this file from
  translate.scm.

* module/oop/goops.scm:
* module/language/scheme/spec.scm: Deal with renaming.
This commit is contained in:
Andy Wingo 2009-01-09 17:49:09 +01:00
parent e3ba263de4
commit ca445ba5ec
10 changed files with 208 additions and 47 deletions

View file

@ -404,7 +404,7 @@
((call ,proc . ,args)
(make-ghil-call env loc (retrans proc) (map retrans args)))
((mv-call ,producer . ,consumer)
((mv-call ,producer ,consumer)
(make-ghil-mv-call env loc (retrans producer) (retrans consumer)))
((inline ,op . ,args)

View file

@ -1,3 +1,3 @@
SOURCES = translate.scm spec.scm inline.scm
SOURCES = compile-ghil.scm spec.scm inline.scm
modpath = language/scheme
include $(top_srcdir)/am/guilec

View file

@ -19,7 +19,7 @@
;;; Code:
(define-module (language scheme translate)
(define-module (language scheme compile-ghil)
#:use-module (system base pmatch)
#:use-module (system base language)
#:use-module (language ghil)
@ -29,7 +29,7 @@
#:use-module (ice-9 optargs)
#:use-module ((ice-9 syncase) #:select (sc-macro))
#:use-module ((system base compile) #:select (syntax-error))
#:export (translate translate-1
#:export (compile-ghil translate-1
*translate-table* define-scheme-translator))
@ -59,7 +59,7 @@
(define (translate x e opts)
(define (compile-ghil x e opts)
(save-module-excursion
(lambda ()
(and=> (cenv-module e) set-current-module)
@ -158,11 +158,11 @@
(define *translate-table* (make-hash-table))
(define-macro (define-scheme-translator sym . clauses)
`(hashq-set! (@ (language scheme translate) *translate-table*)
`(hashq-set! (@ (language scheme compile-ghil) *translate-table*)
,sym
(lambda (e l exp)
(define (retrans x)
((@ (language scheme translate) translate-1) e #f x))
((@ (language scheme compile-ghil) translate-1) e #f x))
(define syntax-error (@ (system base compile) syntax-error))
(pmatch (cdr exp)
,@clauses

View file

@ -21,7 +21,7 @@
(define-module (language scheme spec)
#:use-module (system base language)
#:use-module (language scheme translate)
#:use-module (language scheme compile-ghil)
#:use-module (language ghil spec)
#:export (scheme))
@ -46,7 +46,7 @@
#:version "0.5"
#:reader read
#:read-file read-file
#:compilers `((,ghil . ,translate))
#:compilers `((,ghil . ,compile-ghil))
#:evaluator (lambda (x module) (primitive-eval x))
#:printer write
)