summaryrefslogtreecommitdiff
path: root/module/system/base/syntax.scm
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2008-05-04 15:37:54 +0200
committerAndy Wingo <wingo@pobox.com>2008-05-04 15:37:54 +0200
commit61dc81d993c25d75aaaa5b29463c0f5b55eceb6f (patch)
tree4e308c93bc4a9322e95720d9459635fae496ed32 /module/system/base/syntax.scm
parent9f8ec6eb1fabb4d02a458d029c50eb0ebaa8a4d8 (diff)
downloadguile-61dc81d993c25d75aaaa5b29463c0f5b55eceb6f.tar.gz
procedures-with-setters, debitrot `optimize', dedottification
* module/system/base/syntax.scm (define-record): Define the accessors as procedures-with-setters, not just as getters. * module/system/il/compile.scm (optimize): This function was bitrotten since the addition of source locations in cb4cca12e719edfef1740f238d9187c21c8e1e35. Untested attempts to de-bitrot it. Dedottify as well. * module/system/il/ghil.scm: * module/system/il/glil.scm (unparse): * module/system/vm/debug.scm (debugger-repl): Ongoing dedottification.
Diffstat (limited to 'module/system/base/syntax.scm')
-rw-r--r--module/system/base/syntax.scm12
1 files changed, 7 insertions, 5 deletions
diff --git a/module/system/base/syntax.scm b/module/system/base/syntax.scm
index 27baa5558..672fa210d 100644
--- a/module/system/base/syntax.scm
+++ b/module/system/base/syntax.scm
@@ -93,13 +93,15 @@
(and (vector? x) (eq? (vector-ref x 0) ',name)))
,@(do ((n 1 (1+ n))
(slots (cdr def) (cdr slots))
- (ls '() (append (let* ((slot (car slots))
- (slot (if (pair? slot) (car slot) slot)))
+ (ls '() (append (let* ((sdef (car slots))
+ (sname (if (pair? sdef) (car sdef) sdef)))
`((define ,(string->symbol
(format #f "~A-~A" name n))
- (lambda (x) (slot x ',slot)))
- (define ,(symbol-append stem '- slot)
- (lambda (x) (slot x ',slot)))))
+ (lambda (x) (slot x ',sname)))
+ (define ,(symbol-append stem '- sname)
+ ,(make-procedure-with-setter
+ (lambda (x) (get-slot x sname))
+ (lambda (x v) (set-slot! x sname v))))))
ls)))
((null? slots) (reverse! ls))))))