Another inconclusive session: still nothing works, still making progress.

This commit is contained in:
Simon Brooke 2026-04-22 18:16:00 +01:00
parent ef59563e25
commit eed4711fee
35 changed files with 317 additions and 232 deletions

View file

@ -41,10 +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);
if ( truep( result ) ) {
if ( c_truep( result ) ) {
debug_print( L"Initialising `nil`... ", DEBUG_BOOTSTRAP, 0 );
struct pso_pointer n = allocate( NILTAG, 2 );
struct pso_pointer n = allocate( frame, NILTAG, 2 );
if ( ( n.page == 0 ) && ( n.offset == 0 ) ) {
struct pso2 *object = pointer_to_object( n );
@ -55,16 +56,13 @@ struct pso_pointer initialise_environment( uint32_t node ) {
lock_object( nil );
debug_print( L"success\n", DEBUG_BOOTSTRAP, 0 );
} else {
result =
make_exception( c_string_to_lisp_string
( L"Unexpected cell while allocating `nil`." ),
nil, nil, n );
result = nil;
debug_print( L"fail\n", DEBUG_BOOTSTRAP, 0 );
}
}
if ( !exceptionp( result ) ) {
if ( !c_nilp( result ) ) {
debug_print( L"Initialising `t`... ", DEBUG_BOOTSTRAP, 0 );
struct pso_pointer n = allocate( TRUETAG, 2 );
struct pso_pointer n = allocate( frame, TRUETAG, 2 );
// offset is in words, and size of a pso2 is four words
if ( ( n.page == 0 ) && ( n.offset == 4 ) ) {
@ -76,19 +74,16 @@ struct pso_pointer initialise_environment( uint32_t node ) {
lock_object( t );
debug_print( L"success\n", DEBUG_BOOTSTRAP, 0 );
} else {
result =
make_exception( c_string_to_lisp_string
( L"Unexpected cell while allocating `t`." ),
nil, nil, n );
result = nil;
debug_print( L"fail\n", DEBUG_BOOTSTRAP, 0 );
}
}
if ( !exceptionp( result ) ) {
result = c_bind( c_string_to_lisp_symbol( L"nil" ), nil, nil );
result = c_bind( c_string_to_lisp_symbol( frame, 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( L"t" ), t, result );
result = c_bind( c_string_to_lisp_symbol( frame, L"t" ), t, result );
environment_initialised = true;
debug_print( L"Environment after binding `t`: ", DEBUG_BOOTSTRAP, 0 );