Author: leo
Date: Tue Nov 1 21:21:30 2005
New Revision: 9698
Modified:
trunk/classes/coroutine.pmc
Log:
disallow tailcalls to coroutines
Modified: trunk/classes/coroutine.pmc
==============================================================================
--- trunk/classes/coroutine.pmc (original)
+++ trunk/classes/coroutine.pmc Tue Nov 1 21:21:30 2005
@@ -122,6 +122,9 @@ Swaps the "context".
if (ccont == NEED_CONTINUATION) {
ccont = new_ret_continuation_pmc(interpreter, next);
}
+ if (PObj_get_FLAGS(ccont) & SUB_FLAG_TAILCALL) {
+ internal_exception(1, "tail call to coro not allowed");
+ }
caller_ctx = CONTEXT(INTERP->ctx);
/*
* first time set current sub, cont, object