Still making progress. Dropped the archive because it was causing problems.

This commit is contained in:
Simon Brooke 2026-04-22 21:09:15 +01:00
parent eed4711fee
commit 8d2acbeb0f
97 changed files with 490 additions and 13322 deletions

View file

@ -41,11 +41,11 @@ bool environment_initialised = false;
struct pso_pointer initialise_environment( uint32_t node ) {
struct pso_pointer result = initialise_memory( node );
struct pso_pointer frame = make_frame(0, nil);
struct pso_pointer frame_pointer = make_frame( 0, nil );
if ( c_truep( result ) ) {
debug_print( L"Initialising `nil`... ", DEBUG_BOOTSTRAP, 0 );
struct pso_pointer n = allocate( frame, NILTAG, 2 );
struct pso_pointer n = allocate( frame_pointer, NILTAG, 2 );
if ( ( n.page == 0 ) && ( n.offset == 0 ) ) {
struct pso2 *object = pointer_to_object( n );
@ -62,7 +62,7 @@ struct pso_pointer initialise_environment( uint32_t node ) {
}
if ( !c_nilp( result ) ) {
debug_print( L"Initialising `t`... ", DEBUG_BOOTSTRAP, 0 );
struct pso_pointer n = allocate( frame, TRUETAG, 2 );
struct pso_pointer n = allocate( frame_pointer, TRUETAG, 2 );
// offset is in words, and size of a pso2 is four words
if ( ( n.page == 0 ) && ( n.offset == 4 ) ) {
@ -79,11 +79,19 @@ struct pso_pointer initialise_environment( uint32_t node ) {
}
}
if ( !exceptionp( result ) ) {
result = c_bind( c_string_to_lisp_symbol( frame, L"nil" ), nil, nil );
result =
lisp_bind( make_frame
( 3, frame_pointer,
c_string_to_lisp_symbol( frame_pointer, L"nil" ), nil,
nil ) );
debug_print( L"Environment after binding `nil`: ", DEBUG_BOOTSTRAP,
0 );
debug_print_object( result, DEBUG_BOOTSTRAP, 0 );
result = c_bind( c_string_to_lisp_symbol( frame, L"t" ), t, result );
result =
lisp_bind( make_frame
( 3, frame_pointer,
c_string_to_lisp_symbol( frame_pointer, L"t" ), t,
result ) );
environment_initialised = true;
debug_print( L"Environment after binding `t`: ", DEBUG_BOOTSTRAP, 0 );
@ -93,5 +101,7 @@ struct pso_pointer initialise_environment( uint32_t node ) {
DEBUG_BOOTSTRAP, 0 );
}
dec_ref( frame_pointer );
return result;
}