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

Add assertions about inter-instruction dependencies.
Instructions should only depend on earlier instructions.
These asserts would probably have made finding the problem with bugs
2865 and 2888 a lot easier...


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
@@ -1158,6 +1158,7 @@ DFLOWinit(DataFlow flow, Client cntxt, M
                for (j = p->retc; j < p->argc; j++) {
                        /* list of instructions that wake n-th instruction up */
                        if (!isVarConstant(mb, getArg(p, j)) && (k = 
assign[getArg(p, j)])) {
+                               assert(k < pc); /* only dependencies on earlier 
instructions */
                                /* add edge to the target instruction for 
wakeup call */
                                k -= flow->start;
                                if (flow->nodes[k]) {
@@ -1186,6 +1187,7 @@ DFLOWinit(DataFlow flow, Client cntxt, M
                                if (l != pc && l < flow->stop && l > 
flow->start) {
                                        /* add edge to the target instruction 
for wakeup call */
                                        PARDEBUG mnstr_printf(GDKstdout, 
"endoflife for %s is %d -> %d\n", getVarName(mb, getArg(p,j)), n + flow->start, 
l);
+                                       assert(pc < l); /* only dependencies on 
earlier instructions */
                                        l -= flow->start;
                                        if (flow->nodes[n]) {
                                                /* add wakeup to tail of list */
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to