@@ -500,8 +500,7 @@ static int exec_program(char *program)
500500 jl_load (jl_main_module , program );
501501 }
502502 JL_CATCH {
503- // TODO: It is possible for this output
504- // to be mangled due to `jlbacktrace`
503+ // TODO: It is possible for this output to be mangled due to `jl_print_backtrace`
505504 // printing directly to STDERR_FILENO.
506505 int shown_err = 0 ;
507506 jl_printf (JL_STDERR , "error during bootstrap:\n" );
@@ -520,32 +519,13 @@ static int exec_program(char *program)
520519 jl_static_show ((JL_STREAM * )STDERR_FILENO , exc );
521520 jl_printf ((JL_STREAM * )STDERR_FILENO , "\n" );
522521 }
523- jlbacktrace (); // written to STDERR_FILENO
522+ jl_print_backtrace (); // written to STDERR_FILENO
524523 jl_printf ((JL_STREAM * )STDERR_FILENO , "\n" );
525524 return 1 ;
526525 }
527526 return 0 ;
528527}
529528
530- #ifdef JL_GF_PROFILE
531- static void print_profile (void )
532- {
533- size_t i ;
534- void * * table = jl_base_module -> bindings .table ;
535- for (i = 1 ; i < jl_base_module -> bindings .size ; i += 2 ) {
536- if (table [i ] != HT_NOTFOUND ) {
537- jl_binding_t * b = (jl_binding_t * )table [i ];
538- if (b -> value != NULL && jl_is_function (b -> value ) &&
539- jl_is_gf (b -> value )) {
540- jl_printf (JL_STDERR , "%d\t%s\n" ,
541- jl_gf_mtable (b -> value )-> ncalls ,
542- jl_gf_name (b -> value )-> name );
543- }
544- }
545- }
546- }
547- #endif
548-
549529static NOINLINE int true_main (int argc , char * argv [])
550530{
551531 jl_set_ARGS (argc , argv );
@@ -573,9 +553,9 @@ static NOINLINE int true_main(int argc, char *argv[])
573553 }
574554 }
575555
576- ios_puts ( "WARNING: Base._start not defined, falling back to economy mode repl.\n" , ios_stdout );
556+ jl_printf ( JL_STDOUT , "WARNING: Base._start not defined, falling back to economy mode repl.\n" );
577557 if (!jl_errorexception_type )
578- ios_puts ( "WARNING: jl_errorexception_type not defined; any errors will be fatal.\n" , ios_stdout );
558+ jl_printf ( JL_STDOUT , "WARNING: jl_errorexception_type not defined; any errors will be fatal.\n" );
579559
580560 while (!ios_eof (ios_stdin )) {
581561 char * volatile line = NULL ;
@@ -597,7 +577,7 @@ static NOINLINE int true_main(int argc, char *argv[])
597577 jl_printf (JL_STDOUT , "\n" );
598578 free (line );
599579 line = NULL ;
600- uv_run ( jl_global_event_loop (), UV_RUN_NOWAIT );
580+ jl_process_events ( );
601581 }
602582 JL_CATCH {
603583 if (line ) {
@@ -607,7 +587,7 @@ static NOINLINE int true_main(int argc, char *argv[])
607587 jl_printf ((JL_STREAM * )STDERR_FILENO , "\nparser error:\n" );
608588 jl_static_show ((JL_STREAM * )STDERR_FILENO , jl_current_exception ());
609589 jl_printf ((JL_STREAM * )STDERR_FILENO , "\n" );
610- jlbacktrace (); // written to STDERR_FILENO
590+ jl_print_backtrace (); // written to STDERR_FILENO
611591 }
612592 }
613593 return 0 ;
@@ -665,7 +645,7 @@ static void rr_detach_teleport(void) {
665645#endif
666646}
667647
668- JL_DLLEXPORT int repl_entrypoint (int argc , char * argv [])
648+ JL_DLLEXPORT int jl_repl_entrypoint (int argc , char * argv [])
669649{
670650 // no-op on Windows, note that the caller must have already converted
671651 // from `wchar_t` to `UTF-8` already if we're running on Windows.
0 commit comments