diff options
author | Steve Bennett <steveb@workware.net.au> | 2020-04-02 20:43:55 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2020-04-02 21:52:20 +1000 |
commit | 0d5a208e9240218757e0d4658f9b0d14a4263831 (patch) | |
tree | 769fb1ab1a54ae9bd67d5f5d85012f29704b18c9 /jim_tcl.txt | |
parent | bd7037fdd108729999cfb32a1304abd0eec1d1ad (diff) | |
download | jimtcl-0d5a208e9240218757e0d4658f9b0d14a4263831.zip jimtcl-0d5a208e9240218757e0d4658f9b0d14a4263831.tar.gz jimtcl-0d5a208e9240218757e0d4658f9b0d14a4263831.tar.bz2 |
tailcall: Fix to avoid tailcalls consuming C stack frames
The purpose of a tailcall is to avoid using additional stack frames,
however although were were not creating an extra Tcl callframe we were
using C stack frames through the call sequence:
JimCallProcedure -> Jim_EvalObjList -> JimInvokeCommand -> JimCallProcedure
This meant that a large number of tailcalls would overflow the stack.
Instead we need to have JimCallProcedure return to JimInvokeCommand
where the tailcall can be handled by a subsequent call to JimCallProcedure.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'jim_tcl.txt')
0 files changed, 0 insertions, 0 deletions