mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-24 20:30:28 +02:00
rudimentary syncase support; some dash symbol syncase removal
* module/system/vm/assemble.scm (dump-object!): * src/vm_loader.c (VM_DEFINE_LOADER): Use scm_from_locale_keywordn, not the krazy dash symbol stuff. * module/language/scheme/translate.scm (lookup-transformer): Add a special case for syncase macros.
This commit is contained in:
parent
7f52f9e3b4
commit
a52b96a70a
3 changed files with 8 additions and 5 deletions
|
@ -61,6 +61,12 @@
|
|||
(lambda (env loc exp)
|
||||
(retrans (apply (defmacro-transformer val) (cdr exp)))))
|
||||
|
||||
((and (macro? val) (eq? (macro-name val) 'sc-macro))
|
||||
;; syncase!
|
||||
(let ((syncase (module-ref (resolve-interface '(ice-9 syncase)) 'syncase)))
|
||||
(lambda (env loc exp)
|
||||
(retrans (syncase exp)))))
|
||||
|
||||
((macro? val)
|
||||
(syntax-error #f "unknown kind of macro" head))
|
||||
|
||||
|
|
|
@ -280,8 +280,7 @@
|
|||
((symbol? x)
|
||||
(push-code! `(load-symbol ,(symbol->string x))))
|
||||
((keyword? x)
|
||||
(push-code! `(load-keyword
|
||||
,(symbol->string (keyword-dash-symbol x)))))
|
||||
(push-code! `(load-keyword ,(symbol->string (keyword->symbol x)))))
|
||||
((list? x)
|
||||
(for-each dump! x)
|
||||
(let ((len (length x)))
|
||||
|
|
|
@ -91,11 +91,9 @@ VM_DEFINE_LOADER (load_symbol, "load-symbol")
|
|||
|
||||
VM_DEFINE_LOADER (load_keyword, "load-keyword")
|
||||
{
|
||||
SCM sym;
|
||||
size_t len;
|
||||
FETCH_LENGTH (len);
|
||||
sym = scm_from_locale_symboln ((char *)ip, len);
|
||||
PUSH (scm_make_keyword_from_dash_symbol (sym));
|
||||
PUSH (scm_from_locale_keywordn ((char *)ip, len));
|
||||
ip += len;
|
||||
NEXT;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue