mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Stubbing-out Cyc-reserved-symbol?
This commit is contained in:
parent
6c20402e3a
commit
9562137f34
5 changed files with 19 additions and 3 deletions
8
Makefile
8
Makefile
|
@ -77,6 +77,14 @@ self:
|
|||
./cyclone scheme/cyclone/cgen.sld
|
||||
./cyclone cyclone-self.scm
|
||||
|
||||
.PHONY: self2
|
||||
self2:
|
||||
./cyclone-self scheme/cyclone/common.sld
|
||||
./cyclone-self scheme/cyclone/libraries.sld
|
||||
./cyclone-self scheme/cyclone/transforms.sld
|
||||
./cyclone-self scheme/cyclone/cgen.sld
|
||||
./cyclone-self cyclone-self.scm
|
||||
|
||||
.PHONY: test
|
||||
test: $(TESTFILES) cyclone
|
||||
$(foreach f,$(TESTSCM), echo tests/$(f) ; ./cyclone tests/$(f).scm && tests/$(f) && rm -rf tests/$(f);)
|
||||
|
|
7
cgen.scm
7
cgen.scm
|
@ -392,6 +392,7 @@
|
|||
((eq? p 'Cyc-set-cvar!) "Cyc_set_cvar")
|
||||
((eq? p 'Cyc-cvar?) "Cyc_is_cvar")
|
||||
((eq? p 'Cyc-has-cycle?) "Cyc_has_cycle")
|
||||
((eq? p 'Cyc-reserved-symbol?) "Cyc_is_reserved_symbol")
|
||||
((eq? p 'Cyc-stdout) "Cyc_stdout")
|
||||
((eq? p 'Cyc-stdin) "Cyc_stdin")
|
||||
((eq? p 'Cyc-stderr) "Cyc_stderr")
|
||||
|
@ -810,10 +811,10 @@
|
|||
|
||||
(define *symbols* '())
|
||||
|
||||
; These are (at least for now) preallocated by the runtime
|
||||
(define *reserved-symbols* '(Cyc_procedure))
|
||||
|
||||
(define (allocate-symbol sym)
|
||||
; These are (at least for now) preallocated by the runtime
|
||||
(define *reserved-symbols* (list 'Cyc_procedure))
|
||||
|
||||
(if (and (not (member sym *symbols*))
|
||||
(not (member sym *reserved-symbols*)))
|
||||
(set! *symbols* (cons sym *symbols*))))
|
||||
|
|
|
@ -613,6 +613,11 @@ object Cyc_is_symbol(object o){
|
|||
return boolean_t;
|
||||
return boolean_f;}
|
||||
|
||||
object Cyc_is_reserved_symbol(object o) {
|
||||
if (Cyc_is_symbol(o) == boolean_t && equalp(o, quote_Cyc_191procedure))
|
||||
return boolean_t;
|
||||
return boolean_f; }
|
||||
|
||||
object Cyc_is_vector(object o){
|
||||
if (!nullp(o) && !is_value_type(o) && ((list)o)->tag == vector_tag)
|
||||
return boolean_t;
|
||||
|
|
|
@ -133,6 +133,7 @@ object Cyc_is_integer(object o);
|
|||
object Cyc_is_vector(object o);
|
||||
object Cyc_is_port(object o);
|
||||
object Cyc_is_symbol(object o);
|
||||
object Cyc_is_reserved_symbol(object o);
|
||||
object Cyc_is_string(object o);
|
||||
object Cyc_is_char(object o);
|
||||
object Cyc_is_procedure(object o);
|
||||
|
|
|
@ -512,6 +512,7 @@
|
|||
Cyc-set-cvar!
|
||||
Cyc-cvar? ;; Cyclone-specific
|
||||
Cyc-has-cycle?
|
||||
Cyc-reserved-symbol?
|
||||
Cyc-stdout
|
||||
Cyc-stdin
|
||||
Cyc-stderr
|
||||
|
|
Loading…
Add table
Reference in a new issue