Changeset: 965f81ab3660 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=965f81ab3660
Modified Files:
        monetdb5/mal/mal_interpreter.mx
Branch: Aug2011
Log Message:

Keep track of stack depth.


diffs (19 lines):

diff --git a/monetdb5/mal/mal_interpreter.mx b/monetdb5/mal/mal_interpreter.mx
--- a/monetdb5/mal/mal_interpreter.mx
+++ b/monetdb5/mal/mal_interpreter.mx
@@ -281,6 +281,7 @@ str runMAL(Client cntxt, MalBlkPtr mb, i
                if (env) {
                        stk->stkdepth = stk->stksize + env->stkdepth;
                        stk->calldepth = env->calldepth + 1;
+                       stk->up = env;
                        if (stk->calldepth > 256)
                                throw(MAL, "mal.interpreter", 
MAL_CALLDEPTH_FAIL);
                        if ((unsigned)stk->stkdepth > THREAD_STACK_SIZE / 
sizeof(mb->var[0]) / 4 && THRhighwater())
@@ -2088,6 +2089,7 @@ safeguardStack(Client cntxt, MalBlkPtr m
        /*safeguardStack*/
        nstk->stkdepth = nstk->stksize + stk->stkdepth;
        nstk->calldepth = stk->calldepth + 1;
+       nstk->up = stk;
        if (nstk->calldepth > 256)
                throw(MAL, "mal.interpreter", MAL_CALLDEPTH_FAIL);
        if ((unsigned)nstk->stkdepth > THREAD_STACK_SIZE / sizeof(mb->var[0]) / 
4 && THRhighwater())
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to