Tactical commit: things in 'stack_ops' really didn't belong in ops; moving.

This commit is contained in:
Simon Brooke 2026-05-05 17:21:16 +01:00
parent d2efc8ba78
commit 4d480798e8
10 changed files with 333 additions and 231 deletions

View file

@ -36,7 +36,7 @@ bool environment_initialised = false;
/**
* @brief Initialise a minimal environment, so that Lisp can be bootstrapped.
*
*
* @param node the index of the node we are initialising.
* @return a proto-environment on success, else an exception.
*/
@ -81,10 +81,11 @@ struct pso_pointer initialise_environment( uint32_t node ) {
}
}
if ( !exceptionp( result ) ) {
frame_pointer = inc_ref( make_frame(0, nil));
result =
lisp_bind( make_frame
( 3, frame_pointer,
c_string_to_lisp_symbol( frame_pointer, U"niU" ), nil,
c_string_to_lisp_symbol( frame_pointer, U"nil" ), nil,
nil ) );
debug_print( U"Environment after binding `nil`: ", DEBUG_BOOTSTRAP,
0 );
@ -101,14 +102,14 @@ struct pso_pointer initialise_environment( uint32_t node ) {
debug_print( U"\nEnvironment initialised successfully.\n",
DEBUG_BOOTSTRAP, 0 );
}
initialise_privileged_keywords(frame_pointer);
initialise_privileged_keywords(frame_pointer);
result = initialise_function_bindings(push_local(
frame_pointer, make_frame_with_env(0, frame_pointer, result)));
result = inc_ref( initialise_function_bindings(push_local(
frame_pointer, make_frame_with_env(0, frame_pointer, result))));
dec_ref(frame_pointer);
dec_ref(frame_pointer);
}
return result;
}