From 36bf695eb1c4deee6d33caed3a4991d4ec382fe2 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Fri, 17 Apr 2015 15:15:33 -0400 Subject: [PATCH] Added possible solution --- runtime.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/runtime.h b/runtime.h index 38338175..24b993cb 100644 --- a/runtime.h +++ b/runtime.h @@ -1756,6 +1756,11 @@ static void main_main (stack_size,heap_size,stack_base) // 2) looks like it is crashing in parser code // an over-simplification: // parse => reverse => foldl => (prim cont) +// 3) could be looking at this all wrong. we do the following in funcall: +// //#define funcall1(cfn,a1) if (type_of(cfn) == cons_tag || prim(cfn)) { Cyc_apply(0, (closure)a1, cfn); } else { ((cfn)->fn)(1,cfn,a1);} +// isn't it obvious we need to do the same thing after GC (called via return_funcall)? instead we just +// try to call the prim directly, and predictably the call fails... +/// I think this is the solution! // // { // int i;