1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-24 04:15:36 +02:00

unify variant types and records; also make-foo instead of <foo>

* module/system/base/syntax.scm (define-record): Rework to separate the
  type and its constructor. Now (define-record (<foo> bar)) will create
  `make-foo' as the constructor, not `<foo>'. Also the constructor now
  takes either keyword or positional arguments, so that it can be used as
  the implementation of variant types as well.
  (|): Map directly to define-record instead of rolling our own thing.

* module/language/scheme/translate.scm:
* module/system/base/language.scm:
* module/system/il/compile.scm:
* module/system/il/ghil.scm:
* module/system/il/glil.scm:
* module/system/repl/common.scm:
* module/system/vm/assemble.scm:
* module/system/vm/debug.scm: Change instances of record creation to use
  the make-foo procedures instead of <foo>. Adjust module exports as
  necessary.
This commit is contained in:
Andy Wingo 2008-05-03 18:32:46 +02:00
parent 1aa0dd2b45
commit 849cefacf1
9 changed files with 151 additions and 151 deletions

View file

@ -24,26 +24,26 @@
:use-module (ice-9 match)
:export
(pprint-glil
<glil-vars>
<glil-asm> <glil-asm>?
<glil-vars> make-glil-vars
<glil-asm> make-glil-asm <glil-asm>?
<glil-asm>-1 <glil-asm>-2 <glil-asm>-3 <glil-asm>-4 <glil-asm>-5
<glil-bind> <glil-bind>? <glil-bind>-1
<glil-unbind> <glil-unbind>?
<glil-source> <glil-source>? <glil-source>-1 <glil-source>-2
<glil-bind> make-glil-bind <glil-bind>? <glil-bind>-1
<glil-unbind> make-glil-unbind <glil-unbind>?
<glil-source> make-glil-source <glil-source>? <glil-source>-1 <glil-source>-2
<glil-void> <glil-void>?
<glil-const> <glil-const>? <glil-const>-1
<glil-void> make-glil-void <glil-void>?
<glil-const> make-glil-const <glil-const>? <glil-const>-1
<glil-argument> <glil-argument>? <glil-argument>-1 <glil-argument>-2
<glil-local> <glil-local>? <glil-local>-1 <glil-local>-2
<glil-external> <glil-external>?
<glil-argument> make-glil-argument <glil-argument>? <glil-argument>-1 <glil-argument>-2
<glil-local> make-glil-local <glil-local>? <glil-local>-1 <glil-local>-2
<glil-external> make-glil-external <glil-external>?
<glil-external>-1 <glil-external>-2 <glil-external>-3
<glil-module> <glil-module>?
<glil-module> make-glil-module <glil-module>?
<glil-module>-1 <glil-module>-2 <glil-module>-3
<glil-label> <glil-label>? <glil-label>-1
<glil-branch> <glil-branch>? <glil-branch>-1 <glil-branch>-2
<glil-call> <glil-call>? <glil-call>-1 <glil-call>-2
<glil-label> make-glil-label <glil-label>? <glil-label>-1
<glil-branch> make-glil-branch <glil-branch>? <glil-branch>-1 <glil-branch>-2
<glil-call> make-glil-call <glil-call>? <glil-call>-1 <glil-call>-2
))
(define-record (<glil-vars> nargs nrest nlocs nexts))