This commit is contained in:
Justin Ethier 2015-05-18 11:29:29 -04:00
parent eb8bd8001f
commit da54b226e4
4 changed files with 34 additions and 7 deletions

View file

@ -115,6 +115,7 @@ static void __lambda_1(int argc, closure _,object r_732) ;
static void __lambda_0(int argc, closure _,object r_733) ; static void __lambda_0(int argc, closure _,object r_733) ;
static void __lambda_3(int argc, closure _) { static void __lambda_3(int argc, closure _) {
printf("Done with library inits\n");
make_int(c_7318, 0); make_int(c_7318, 0);
return_check1(__lambda_2,&c_7318);; return_check1(__lambda_2,&c_7318);;
} }
@ -133,6 +134,9 @@ static void __lambda_0(int argc, closure _,object r_733) {
__halt(Cyc_write(&c_7312)); __halt(Cyc_write(&c_7312));
} }
extern void c_libslib2_entry_pt(int argc, closure cont);
extern void c_libslib1_entry_pt(int argc, closure cont);
extern void c_schemebase_entry_pt(int argc, closure cont);
static void c_entry_pt(argc, env,cont) int argc; closure env,cont; { static void c_entry_pt(argc, env,cont) int argc; closure env,cont; {
// TODO: should do these explicitly instead of using macros, in case they are not generated // TODO: should do these explicitly instead of using macros, in case they are not generated
mclosure0(c_done, __lambda_3); mclosure0(c_done, __lambda_3);
@ -142,7 +146,7 @@ static void c_entry_pt(argc, env,cont) int argc; closure env,cont; {
// TODO: need to change each entry point to accept above closures // TODO: need to change each entry point to accept above closures
// will need to check in each one for closure1 or closure0, I think??? // will need to check in each one for closure1 or closure0, I think???
funcall0(c_base); funcall0(&c_base);
// TODO: these can't return, they need to call into each other as a continuation chain // TODO: these can't return, they need to call into each other as a continuation chain
//c_schemebase_entry_pt(argc, env,cont); //c_schemebase_entry_pt(argc, env,cont);

View file

@ -118,7 +118,8 @@ void __lambda_0(int argc, closure _,object k_735) {
return_funcall1( k_735, Cyc_write(__glo_lib2_91hello));; return_funcall1( k_735, Cyc_write(__glo_lib2_91hello));;
} }
void c_libslib1_entry_pt(argc, env,cont) int argc; closure env,cont; { void c_libslib1_entry_pt(argc, cont) int argc; closure cont; {
printf("Initializing lib1\n");
add_global((object *) &__glo_lib1_91hello); add_global((object *) &__glo_lib1_91hello);
add_global((object *) &__glo_internal_91func); add_global((object *) &__glo_internal_91func);
@ -136,4 +137,10 @@ void c_libslib1_entry_pt(argc, env,cont) int argc; closure env,cont; {
make_cons(c_7333, &pair_7326,Cyc_global_variables); make_cons(c_7333, &pair_7326,Cyc_global_variables);
make_cons(c_7332, &pair_7328, &c_7333); make_cons(c_7332, &pair_7328, &c_7333);
make_cons(c_7331, &pair_7330, &c_7332); make_cons(c_7331, &pair_7330, &c_7332);
Cyc_global_variables = &c_7331;} Cyc_global_variables = &c_7331;
if (((closure)cont)->tag == closure1_tag) {
((cont)->fn)(1, ((closure1_type *)cont)->elt1);
} else {
((cont)->fn)(0, cont);
}}

View file

@ -46,7 +46,8 @@
object __glo_lib2_91hello = nil; object __glo_lib2_91hello = nil;
#include "runtime.h" #include "runtime.h"
void c_libslib2_entry_pt(argc, env,cont) int argc; closure env,cont; { void c_libslib2_entry_pt(argc, cont) int argc; closure cont; {
printf("Initializing lib2\n");
add_global((object *) &__glo_lib2_91hello); add_global((object *) &__glo_lib2_91hello);
make_string(c_733, "Hello from library #2"); make_string(c_733, "Hello from library #2");
@ -55,4 +56,9 @@ void c_libslib2_entry_pt(argc, env,cont) int argc; closure env,cont; {
make_cvar(cvar_737, (object *)&__glo_lib2_91hello);make_cons(pair_738, find_or_add_symbol("lib2-hello"), &cvar_737); make_cvar(cvar_737, (object *)&__glo_lib2_91hello);make_cons(pair_738, find_or_add_symbol("lib2-hello"), &cvar_737);
make_cons(c_739, &pair_738,Cyc_global_variables); make_cons(c_739, &pair_738,Cyc_global_variables);
Cyc_global_variables = &c_739; Cyc_global_variables = &c_739;
}
if (((closure)cont)->tag == closure1_tag) {
((cont)->fn)(1, ((closure1_type *)cont)->elt1);
} else {
((cont)->fn)(0, cont);
}}

View file

@ -2641,7 +2641,8 @@ static void __lambda_0(int argc, object self_73378, object _191, object result)
return_funcall1( ((closureN)self_73378)->elts[0], result);; return_funcall1( ((closureN)self_73378)->elts[0], result);;
} }
void c_schemebase_entry_pt(argc, env,cont) int argc; closure env,cont; { void c_schemebase_entry_pt(argc, cont) int argc; closure cont; {
printf("Initializing base\n");
add_global((object *) &__glo_Cyc_91remove_91exception_91handler); add_global((object *) &__glo_Cyc_91remove_91exception_91handler);
add_global((object *) &__glo_Cyc_91add_91exception_91handler); add_global((object *) &__glo_Cyc_91add_91exception_91handler);
@ -2891,4 +2892,13 @@ make_cons(c_731473, &pair_731463, &c_731474);
make_cons(c_731472, &pair_731465, &c_731473); make_cons(c_731472, &pair_731465, &c_731473);
make_cons(c_731471, &pair_731467, &c_731472); make_cons(c_731471, &pair_731467, &c_731472);
make_cons(c_731470, &pair_731469, &c_731471); make_cons(c_731470, &pair_731469, &c_731471);
Cyc_global_variables = &c_731470;} Cyc_global_variables = &c_731470;
if (((closure)cont)->tag == closure1_tag) {
((cont)->fn)(1, ((closure1_type *)cont)->elt1);
} else {
((cont)->fn)(0, cont);
}
}