diff --git a/TODO b/TODO index ce541b55..f57e3c7a 100644 --- a/TODO +++ b/TODO @@ -3,30 +3,6 @@ Working TODO list: - Issues with library hello example: 1) Need to manually assign Cyc_global_variables in lib2.c -2) Need to add this manually, need to compute it: - -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; { - // TODO: should do these explicitly instead of using macros, in case they are not generated - mclosure1(c_done, __lambda_3, &c_done); - mclosure1(c_lib2, c_libslib2_entry_pt, &c_done); - mclosure1(c_lib1, c_libslib1_entry_pt, &c_lib2); - mclosure1(c_base, c_schemebase_entry_pt, &c_lib1); - - // TODO: need to change each entry point to accept above closures - // will need to check in each one for closure1 or closure0, I think??? - (c_base.fn)(0, &c_base); - } - -3) Need to change signature of library entry_pt functions, and append this at the end: - -cont = ((closure1_type *)cont)->elt1; -((cont)->fn)(0, cont); - -Alternatively, we can leave the existing signature and pass cont twice... - - Reduction in size of generated code is there anything we can do? diff --git a/cgen.scm b/cgen.scm index 90b89bf0..68a087fb 100644 --- a/cgen.scm +++ b/cgen.scm @@ -1073,7 +1073,7 @@ required-libs) (emit ;; Start cont chain, but do not assume funcall1 macro was defined - (string-append "(" prev-clo ".fn)(0, &" prev-clo ", &" prev-clo ");")) + (string-append "(" this-clo ".fn)(0, &" this-clo ", &" this-clo ");")) (emit "}") (emit "static void c_entry_pt_first_lambda(int argc, closure env, closure cont) {") (emit (string-append "printf(\"init first lambda\\n\");"))