Added record_tag

This commit is contained in:
Justin Ethier 2020-12-20 22:39:28 -05:00
parent a6860d7ea8
commit c3075a6396
4 changed files with 17 additions and 0 deletions

1
gc.c
View file

@ -967,6 +967,7 @@ char *gc_copy_obj(object dest, char *obj, gc_thread_data * thd)
return (char *)forward(obj);
case eof_tag:
case void_tag:
case record_tag:
case primitive_tag:
case boolean_tag:
case symbol_tag:

View file

@ -37,6 +37,12 @@ extern const object Cyc_EOF;
*/
extern const object Cyc_VOID;
/**
* The record marker value.
* \ingroup objects
*/
extern const object Cyc_RECORD_MARKER;
/**
* \ingroup gc_minor
*/

View file

@ -70,6 +70,7 @@ enum object_tag {
, complex_num_tag = 21
, atomic_tag = 22
, void_tag = 23
, record_tag = 24
};
/**

View file

@ -50,6 +50,7 @@ const char *tag_names[] = {
/*complex_num_tag*/ , "complex number"
/*atomic_tag*/ , "atomic"
/*void_tag*/ , "void"
/*record_tag*/ , "record"
, "Reserved for future use"
};
@ -192,9 +193,11 @@ char **_cyc_argv = NULL;
static symbol_type __EOF = { {0}, eof_tag, ""}; // symbol_type in lieu of custom type
static symbol_type __VOID = { {0}, void_tag, ""}; // symbol_type in lieu of custom type
static symbol_type __RECORD = { {0}, record_tag, ""}; // symbol_type in lieu of custom type
const object Cyc_EOF = &__EOF;
const object Cyc_VOID = &__VOID;
const object Cyc_RECORD_MARKER = &__RECORD;
static ck_hs_t lib_table;
static ck_hs_t symbol_table;
static int symbol_table_initial_size = 4096;
@ -1042,6 +1045,9 @@ object Cyc_display(void *data, object x, FILE * port)
break;
case void_tag:
break;
case record_tag:
fprintf(port, "<Record Marker>");
break;
case port_tag:
fprintf(port, "<port %p>", ((port_type *) x)->fp);
break;
@ -5879,6 +5885,7 @@ static char *gc_move(char *obj, gc_thread_data * thd, int *alloci, int *heap_gro
return (char *)forward(obj);
case eof_tag:
case void_tag:
case record_tag:
break;
case primitive_tag:
break;
@ -6057,6 +6064,7 @@ int gc_minor(void *data, object low_limit, object high_limit, closure cont,
// These types are not heap-allocated
case eof_tag:
case void_tag:
case record_tag:
case primitive_tag:
case symbol_tag:
case boolean_tag:
@ -6124,6 +6132,7 @@ void Cyc_make_shared_object(void *data, object k, object obj)
// closure0_tag = 3
// eof_tag = 9
// void_tag
// record_tag
// macro_tag = 13
// primitive_tag = 17