Good news: only one test failing. Bad news: it's nlambda.
This commit is contained in:
parent
e52ccce0eb
commit
96dad29f91
8 changed files with 80 additions and 90 deletions
22
src/repl.c
22
src/repl.c
|
|
@ -52,16 +52,11 @@ struct cons_pointer repl_read( struct cons_pointer stream_pointer ) {
|
|||
* Dummy up a Lisp eval call with its own stack frame.
|
||||
*/
|
||||
struct cons_pointer repl_eval( struct cons_pointer input ) {
|
||||
debug_print( L"Entered repl_eval\n", DEBUG_REPL );
|
||||
debug_print( L"Entered repl_eval\n", DEBUG_REPL );
|
||||
struct cons_pointer result = NIL;
|
||||
struct cons_pointer frame_pointer = make_stack_frame( NIL, make_cons( input, NIL ), oblist);
|
||||
|
||||
if ( !nilp( frame_pointer ) ) {
|
||||
inc_ref(frame_pointer);
|
||||
result = lisp_eval( get_stack_frame( frame_pointer ), frame_pointer, oblist );
|
||||
result = eval_form( NULL, NIL, input, oblist );
|
||||
|
||||
dec_ref( frame_pointer );
|
||||
}
|
||||
debug_print( L"repl_eval: returning\n", DEBUG_REPL );
|
||||
debug_dump_object( result, DEBUG_REPL );
|
||||
|
||||
|
|
@ -73,15 +68,10 @@ struct cons_pointer repl_eval( struct cons_pointer input ) {
|
|||
*/
|
||||
struct cons_pointer repl_print( struct cons_pointer stream_pointer,
|
||||
struct cons_pointer value ) {
|
||||
debug_print( L"Entered repl_print\n", DEBUG_REPL );
|
||||
debug_print( L"Entered repl_print\n", DEBUG_REPL );
|
||||
debug_dump_object( value, DEBUG_REPL );
|
||||
struct cons_pointer result = NIL;
|
||||
struct cons_pointer frame_pointer = make_stack_frame( NIL, make_cons( value, NIL ), oblist);
|
||||
if ( !nilp( frame_pointer ) ) {
|
||||
inc_ref(frame_pointer);
|
||||
result = lisp_print( get_stack_frame( frame_pointer ), frame_pointer, oblist );
|
||||
dec_ref( frame_pointer );
|
||||
}
|
||||
struct cons_pointer result =
|
||||
print( pointer2cell( stream_pointer ).payload.stream.stream, value );
|
||||
debug_print( L"repl_print: returning\n", DEBUG_REPL );
|
||||
debug_dump_object( result, DEBUG_REPL );
|
||||
|
||||
|
|
@ -98,7 +88,7 @@ struct cons_pointer repl_print( struct cons_pointer stream_pointer,
|
|||
void
|
||||
repl( FILE * in_stream, FILE * out_stream, FILE * error_stream,
|
||||
bool show_prompt ) {
|
||||
debug_print( L"Entered repl\n", DEBUG_REPL );
|
||||
debug_print( L"Entered repl\n", DEBUG_REPL );
|
||||
struct cons_pointer input_stream = make_read_stream( in_stream );
|
||||
inc_ref( input_stream );
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue