|Issue 249:||limbo compilers use too much stack for eg array data|
|2 people starred this issue and may be notified of changes.||Back to list|
compiling appl/lib/ida/idatab.b crashes the limbo compilers on most systems, due to stack growth due to recursion. i have another limbo program that is compiled with a huge "array of byte", it has the same problem. the big recursion depth seems to happen in three places (found by running the c compiler and looking at the backtrace when it crashes; other limbo code might trigger big recursion in other places). the attached patch fixes both the c & limbo versions of the compiler. i think, but i'm not completely sure, that the Oseq nodes can be handled this way (i.e. their lefts & rights folded/rewritten independently; the third case (in decls.[bc]) makes it tail recursive). without this, my limbo program crashes the c limbo compiler on openbsd/386 even with an allowed stack of 24mb (32mb does work). with this, 250kb stack is enough. idatab.b can be compiled with this too.
Mar 8, 2011
(No comment was entered for this change.)
|► Sign in to add a comment|