Fixed assigning arguments to slots in the frame; also fixed a bug in bind...
But did that by switching away from using Lisp calling convention, because that broke horribly. This is bad news and must be sorted out.
This commit is contained in:
parent
cb3dcb352e
commit
f915a9993f
14 changed files with 158 additions and 112 deletions
|
|
@ -23,10 +23,10 @@
|
|||
|
||||
struct pso_pointer lisp_bind(
|
||||
#ifndef MANAGED_POINTER_ONLY
|
||||
struct pso4 *frame,
|
||||
struct pso4 *frame,
|
||||
#endif
|
||||
struct pso_pointer frame_pointer,
|
||||
struct pso_pointer env ) {
|
||||
struct pso_pointer frame_pointer,
|
||||
struct pso_pointer env ) {
|
||||
#ifdef MANAGED_POINTER_ONLY
|
||||
struct pso4 *frame = pointer_to_pso4( frame_pointer );
|
||||
#endif
|
||||
|
|
@ -40,15 +40,5 @@ struct pso_pointer lisp_bind(
|
|||
struct pso_pointer c_bind( struct pso_pointer key,
|
||||
struct pso_pointer value,
|
||||
struct pso_pointer store ) {
|
||||
struct pso_pointer result = nil;
|
||||
struct pso_pointer next = make_frame( nil, key, value, store );
|
||||
inc_ref( next );
|
||||
result = lisp_bind(
|
||||
#ifndef MANAGED_POINTER_ONLY
|
||||
pointer_to_pso4( next ),
|
||||
#endif
|
||||
next, nil );
|
||||
dec_ref( next );
|
||||
|
||||
return result;
|
||||
return c_cons( c_cons( key, value ), store );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ struct pso_pointer c_bind( struct pso_pointer key,
|
|||
|
||||
struct pso_pointer lisp_bind(
|
||||
#ifndef MANAGED_POINTER_ONLY
|
||||
struct pso4 *frame,
|
||||
struct pso4 *frame,
|
||||
#endif
|
||||
struct pso_pointer frame_pointer,
|
||||
struct pso_pointer env );
|
||||
struct pso_pointer frame_pointer,
|
||||
struct pso_pointer env );
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@
|
|||
* @return a sequence like the `sequence` passed, but reversed; or `nil` if
|
||||
* the argument was not a sequence.
|
||||
*/
|
||||
struct pso_pointer reverse( struct pso_pointer sequence ) {
|
||||
struct pso_pointer c_reverse( struct pso_pointer sequence ) {
|
||||
struct pso_pointer result = nil;
|
||||
|
||||
for ( struct pso_pointer cursor = sequence; !nilp( sequence );
|
||||
|
|
|
|||
|
|
@ -16,6 +16,6 @@
|
|||
|
||||
#include "memory/pointer.h"
|
||||
|
||||
struct pso_pointer reverse( struct pso_pointer sequence );
|
||||
struct pso_pointer c_reverse( struct pso_pointer sequence );
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ struct pso_pointer make_string_like_thing( wint_t c, struct pso_pointer tail,
|
|||
char *tag ) {
|
||||
struct pso_pointer pointer = nil;
|
||||
|
||||
if ( check_type( tail, tag ) || nilp(tail) ) {
|
||||
if ( check_type( tail, tag ) || nilp( tail ) ) {
|
||||
pointer = allocate( tag, CONS_SIZE_CLASS );
|
||||
struct pso2 *cell = pointer_to_object( pointer );
|
||||
|
||||
|
|
@ -85,7 +85,7 @@ struct pso_pointer make_string_like_thing( wint_t c, struct pso_pointer tail,
|
|||
debug_println( DEBUG_ALLOC );
|
||||
} else {
|
||||
// \todo should throw an exception!
|
||||
struct pso2* tobj = pointer_to_object( tail);
|
||||
struct pso2 *tobj = pointer_to_object( tail );
|
||||
debug_printf( DEBUG_ALLOC, 0,
|
||||
L"Warning: %3.3s cannot be prepended to %3.3s\n",
|
||||
tag, tobj->header.tag.bytes.mnemonic );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue