diff --git a/module/language/scheme/translate.scm b/module/language/scheme/translate.scm index f26b37d84..87f4435bb 100644 --- a/module/language/scheme/translate.scm +++ b/module/language/scheme/translate.scm @@ -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)) diff --git a/module/system/vm/assemble.scm b/module/system/vm/assemble.scm index ad0aac9a6..cbb307b92 100644 --- a/module/system/vm/assemble.scm +++ b/module/system/vm/assemble.scm @@ -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))) diff --git a/src/vm_loader.c b/src/vm_loader.c index e658381dc..2b182d819 100644 --- a/src/vm_loader.c +++ b/src/vm_loader.c @@ -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; }