Changeset: 4c28583b796e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=4c28583b796e
Modified Files:
        monetdb5/mal/mal_interpreter.c
Branch: Apr2019
Log Message:

Don't check return types if call failed.


diffs (79 lines):

diff --git a/monetdb5/mal/mal_interpreter.c b/monetdb5/mal/mal_interpreter.c
--- a/monetdb5/mal/mal_interpreter.c
+++ b/monetdb5/mal/mal_interpreter.c
@@ -643,6 +643,34 @@ str runMALsequence(Client cntxt, MalBlkP
                        } else {
                                ret = (*pci->fcn)(cntxt, mb, stk, pci);
 #ifndef NDEBUG
+                               if (ret == MAL_SUCCEED) {
+                                       /* check that the types of actual 
results match
+                                        * expected results */
+                                       for (i = 0; i < pci->retc; i++) {
+                                               int a = getArg(pci, i);
+                                               int t = getArgType(mb, pci, i);
+
+                                               if (isaBatType(t)) {
+                                                       bat bid = 
stk->stk[a].val.bval;
+                                                       BAT *_b = 
BATdescriptor(bid);
+                                                       t = getBatType(t);
+                                                       
assert(stk->stk[a].vtype == TYPE_bat);
+                                                       assert(is_bat_nil(bid) 
||
+                                                                  t == 
TYPE_any ||
+                                                                  
ATOMtype(_b->ttype) == ATOMtype(t));
+                                                       if(_b) BBPunfix(bid);
+                                               } else {
+                                                       assert(t == 
stk->stk[a].vtype);
+                                               }
+                                       }
+                               }
+#endif
+                       }
+                       break;
+               case CMDcall:
+                       ret = malCommandCall(stk, pci);
+#ifndef NDEBUG
+                       if (ret == MAL_SUCCEED) {
                                /* check that the types of actual results match
                                 * expected results */
                                for (i = 0; i < pci->retc; i++) {
@@ -651,39 +679,15 @@ str runMALsequence(Client cntxt, MalBlkP
 
                                        if (isaBatType(t)) {
                                                bat bid = stk->stk[a].val.bval;
-                                               BAT *_b = BATdescriptor(bid);
                                                t = getBatType(t);
                                                assert(stk->stk[a].vtype == 
TYPE_bat);
                                                assert(is_bat_nil(bid) ||
                                                           t == TYPE_any ||
-                                                          ATOMtype(_b->ttype) 
== ATOMtype(t));
-                                               if(_b) BBPunfix(bid);
+                                                          
ATOMtype(BBP_desc(bid)->ttype) == ATOMtype(t));
                                        } else {
                                                assert(t == stk->stk[a].vtype);
                                        }
                                }
-#endif
-                       }
-                       break;
-               case CMDcall:
-                       ret = malCommandCall(stk, pci);
-#ifndef NDEBUG
-                       /* check that the types of actual results match
-                        * expected results */
-                       for (i = 0; i < pci->retc; i++) {
-                               int a = getArg(pci, i);
-                               int t = getArgType(mb, pci, i);
-
-                               if (isaBatType(t)) {
-                                       bat bid = stk->stk[a].val.bval;
-                                       t = getBatType(t);
-                                       assert(stk->stk[a].vtype == TYPE_bat);
-                                       assert(is_bat_nil(bid) ||
-                                                  t == TYPE_any ||
-                                                  
ATOMtype(BBP_desc(bid)->ttype) == ATOMtype(t));
-                               } else {
-                                       assert(t == stk->stk[a].vtype);
-                               }
                        }
 #endif
                        break;
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to