core: Remove make_keyword.
* mes.c (make_keyword): Remove. * module/mes/read-0.mes (<cell:keyword>): New global. (read-word): Use it with make_cell instead fo make-keyword. * strting.c (symbol_to_keyword): Use make_cell instead of make_keyword.
This commit is contained in:
parent
976c86318e
commit
89e78bec77
9
mes.c
9
mes.c
|
@ -693,15 +693,6 @@ make_function (SCM name, SCM id, SCM arity)
|
||||||
return make_cell (tmp_num3, name, tmp_num4);
|
return make_cell (tmp_num3, name, tmp_num4);
|
||||||
}
|
}
|
||||||
|
|
||||||
SCM
|
|
||||||
make_keyword (SCM s)
|
|
||||||
{
|
|
||||||
SCM x = lookup_symbol_ (s);
|
|
||||||
x = x ? x : make_symbol_ (s);
|
|
||||||
g_cells[tmp_num].value = KEYWORD;
|
|
||||||
return make_cell (tmp_num, STRING (x), 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
SCM
|
SCM
|
||||||
make_number (int x)
|
make_number (int x)
|
||||||
{
|
{
|
||||||
|
|
|
@ -104,6 +104,7 @@
|
||||||
;; * lookup in Scheme
|
;; * lookup in Scheme
|
||||||
;; * read characters, quote, strings
|
;; * read characters, quote, strings
|
||||||
|
|
||||||
|
(define <cell:keyword> 2)
|
||||||
(define (read)
|
(define (read)
|
||||||
(read-word (read-byte) (list) (current-module)))
|
(read-word (read-byte) (list) (current-module)))
|
||||||
|
|
||||||
|
@ -283,7 +284,7 @@
|
||||||
((eq? (peek-byte) 39) (read-byte)
|
((eq? (peek-byte) 39) (read-byte)
|
||||||
(cons (quote syntax) (cons (read-word (read-byte) w a) (list))))
|
(cons (quote syntax) (cons (read-word (read-byte) w a) (list))))
|
||||||
((eq? (peek-byte) 58) (read-byte)
|
((eq? (peek-byte) 58) (read-byte)
|
||||||
(make-keyword (symbol->list (read-word (read-byte) (list) a))))
|
(make-cell <cell:keyword> (symbol->list (read-word (read-byte) (list) a)) 0))
|
||||||
((eq? (peek-byte) 59) (read-byte)
|
((eq? (peek-byte) 59) (read-byte)
|
||||||
(read-word (read-byte) w a)
|
(read-word (read-byte) w a)
|
||||||
(read-word (read-byte) w a))
|
(read-word (read-byte) w a))
|
||||||
|
|
Loading…
Reference in New Issue