Well, I'm back to the same failed unit tests as the develop branch
and I *feel* that the intern code is better. But it's not without problems and I don't think I can release at this. But it may be ready to merge back.
This commit is contained in:
parent
bcb227a5f9
commit
3a1f64d7ff
15 changed files with 284 additions and 184 deletions
|
|
@ -78,7 +78,7 @@ struct cons_pointer inc_ref( struct cons_pointer pointer ) {
|
|||
cell->count++;
|
||||
#ifdef DEBUG
|
||||
debug_printf( DEBUG_ALLOC,
|
||||
L"\nIncremented cell of type %4.4s at page %d, offset %d to count %d",
|
||||
L"\nIncremented cell of type %4.4s at page %u, offset %u to count %u",
|
||||
( ( char * ) cell->tag.bytes ), pointer.page,
|
||||
pointer.offset, cell->count );
|
||||
if ( strncmp( cell->tag.bytes, VECTORPOINTTAG, TAGLENGTH ) == 0 ) {
|
||||
|
|
@ -131,6 +131,19 @@ struct cons_pointer dec_ref( struct cons_pointer pointer ) {
|
|||
return pointer;
|
||||
}
|
||||
|
||||
/**
|
||||
* given a cons_pointer as argument, return the tag.
|
||||
*/
|
||||
uint32_t get_tag_value( struct cons_pointer pointer ) {
|
||||
uint32_t result = pointer2cell( pointer ).tag.value;
|
||||
|
||||
if ( result == VECTORPOINTTV ) {
|
||||
result = pointer_to_vso( pointer )->header.tag.value;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Lisp type of the single argument.
|
||||
* @param pointer a pointer to the object whose type is requested.
|
||||
|
|
@ -399,15 +412,15 @@ struct cons_pointer make_symbol_or_key( wint_t c, struct cons_pointer tail,
|
|||
if ( tag == SYMBOLTV || tag == KEYTV ) {
|
||||
result = make_string_like_thing( c, tail, tag );
|
||||
|
||||
if ( tag == KEYTV ) {
|
||||
struct cons_pointer r = interned( result, oblist );
|
||||
// if ( tag == KEYTV ) {
|
||||
// struct cons_pointer r = interned( result, oblist );
|
||||
|
||||
if ( nilp( r ) ) {
|
||||
intern( result, oblist );
|
||||
} else {
|
||||
result = r;
|
||||
}
|
||||
}
|
||||
// if ( nilp( r ) ) {
|
||||
// intern( result, oblist );
|
||||
// } else {
|
||||
// result = r;
|
||||
// }
|
||||
// }
|
||||
} else {
|
||||
result =
|
||||
make_exception( c_string_to_lisp_string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue