tailcall: properly merge tailcall frames
commit381cd0bed1a0ed9421eb1f5a0d368ec95024fd23
authorSteve Bennett <steveb@workware.net.au>
Thu, 2 Jan 2014 23:46:40 +0000 (3 09:46 +1000)
committerSteve Bennett <steveb@workware.net.au>
Fri, 3 Jan 2014 01:02:57 +0000 (3 11:02 +1000)
treec4a79855f960c2d6dcd96d23f82f5cb2bb339bdd
parentc07febeefdee3e620d61152574267107d59a1d6b
tailcall: properly merge tailcall frames

Resolve the tailcall command immediately in [tailcall] and stash it.

If a tailcall is currently being evaluated, new tailcalls in the same
frame are merged/deferred to evaluate in the same C stack frame.

Can't merge tailcall evaluations across uplevel.

Add some tests for these cases

Signed-off-by: Steve Bennett <steveb@workware.net.au>
jim.c
jim.h
tests/tailcall.test