mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Removed 'Cyc_procedure as it is unnecessary
This commit is contained in:
parent
1fb0ae623b
commit
783f85e439
5 changed files with 5 additions and 24 deletions
11
cgen.scm
11
cgen.scm
|
@ -392,7 +392,6 @@
|
|||
((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")
|
||||
|
@ -811,15 +810,9 @@
|
|||
|
||||
(define *symbols* '())
|
||||
|
||||
(cond-expand
|
||||
(chicken
|
||||
(define (Cyc-reserved-symbol? sym) (member sym (list 'Cyc_procedure))))
|
||||
(else #f))
|
||||
|
||||
(define (allocate-symbol sym)
|
||||
(trace:error `(JAE DEBUG allocate-symbol ,sym ,(Cyc-reserved-symbol? sym)))
|
||||
(if (and (not (member sym *symbols*))
|
||||
(not (Cyc-reserved-symbol? sym)))
|
||||
(if (not (member sym *symbols*))
|
||||
;(not (Cyc-reserved-symbol? sym)))
|
||||
(set! *symbols* (cons sym *symbols*))))
|
||||
|
||||
;; Lambda compilation.
|
||||
|
|
2
eval.scm
2
eval.scm
|
@ -89,7 +89,7 @@
|
|||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Evaluator data structures
|
||||
|
||||
(define procedure-tag 'Cyc_procedure)
|
||||
(define procedure-tag 'procedure)
|
||||
(define (make-procedure parameters body env)
|
||||
(list procedure-tag parameters body env))
|
||||
(define (compound-procedure? p)
|
||||
|
|
13
runtime.c
13
runtime.c
|
@ -67,9 +67,6 @@ static boolean_type f_boolean = {boolean_tag, "f"};
|
|||
const object boolean_t = &t_boolean;
|
||||
const object boolean_f = &f_boolean;
|
||||
|
||||
static symbol_type Cyc_191procedure_symbol = {symbol_tag, "procedure", nil};
|
||||
const object quote_Cyc_191procedure = &Cyc_191procedure_symbol;
|
||||
|
||||
static symbol_type Cyc_void_symbol = {symbol_tag, "", nil};
|
||||
const object quote_void = &Cyc_void_symbol;
|
||||
|
||||
|
@ -391,7 +388,7 @@ object Cyc_display(object x, FILE *port)
|
|||
// Experimenting with displaying lambda defs in REPL
|
||||
// not good enough but this is a start. would probably need
|
||||
// the same code in write()
|
||||
if (equal(quote_Cyc_191procedure, car(x))) {
|
||||
if (strncmp(((symbol)car(x))->pname, "procedure", 10) == 0) {
|
||||
fprintf(port, " ");
|
||||
Cyc_display(cadr(x), port);
|
||||
fprintf(port, " ...)"); /* skip body and env for now */
|
||||
|
@ -464,7 +461,7 @@ static object _Cyc_write(object x, FILE *port)
|
|||
// Experimenting with displaying lambda defs in REPL
|
||||
// not good enough but this is a start. would probably need
|
||||
// the same code in write()
|
||||
if (equal(quote_Cyc_191procedure, car(x))) {
|
||||
if (strncmp(((symbol)car(x))->pname, "procedure", 10) == 0) {
|
||||
fprintf(port, " ");
|
||||
_Cyc_write(cadr(x), port);
|
||||
fprintf(port, " ...)"); /* skip body and env for now */
|
||||
|
@ -613,12 +610,6 @@ 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) == boolean_t)
|
||||
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,7 +133,6 @@ 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);
|
||||
|
@ -237,7 +236,6 @@ extern jmp_buf jmp_main; /* Where to jump to. */
|
|||
/* Define the Lisp atoms that we need. */
|
||||
extern const object boolean_t;
|
||||
extern const object boolean_f;
|
||||
extern const object quote_Cyc_191procedure;
|
||||
extern const object quote_void;
|
||||
|
||||
/* This section is auto-generated via --autogen */
|
||||
|
|
|
@ -512,7 +512,6 @@
|
|||
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