Changeset: 6f80764d65f1 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=6f80764d65f1
Modified Files:
        monetdb5/mal/mal_instruction.c
Branch: gdk_tracer
Log Message:

merged with default


diffs (47 lines):

diff --git a/monetdb5/mal/mal_instruction.c b/monetdb5/mal/mal_instruction.c
--- a/monetdb5/mal/mal_instruction.c
+++ b/monetdb5/mal/mal_instruction.c
@@ -1146,20 +1146,21 @@ pushArgument(MalBlkPtr mb, InstrPtr p, i
        }
        if (p->argc == p->maxarg) {
                pn = extendInstruction(mb, p);
-               if (mb->errors)
-                       return p;
 
                /* if the instruction is already stored in the MAL block
                 * it should be replaced by an extended version.
                 */
                if (p != pn) {
-                       for (int i = mb->stop - 1; i >= 0; i--)
+                       for (int i = mb->stop - 1; i >= 0; i--) {
                                if (mb->stmt[i] == p) {
                                        mb->stmt[i] =  pn;
                                        break;
                                }
+                       }
                }
                p = pn;
+               if (mb->errors)
+                       return p;
        }
        /* protect against the case that the instruction is malloced
         * in isolation */
@@ -1189,14 +1190,15 @@ addArgument(MalBlkPtr mb, InstrPtr p, in
 
        if (p->argc == p->maxarg) {
                pn = extendInstruction(mb, p);
-               if ( mb->errors)
-                       return p;
 #ifndef NDEBUG
-               if( p != pn)
+               if (p != pn) {
                        for (int i = mb->stop - 1; i >= 0; i--)
                                assert(mb->stmt[i] != p);
+              }
 #endif
                p = pn;
+               if (mb->errors)
+                       return p;
        }
        /* protect against the case that the instruction is malloced in 
isolation */
        if( mb->maxarg < p->maxarg)
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to