Changeset: d03c460fe8a6 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/d03c460fe8a6 Modified Files: monetdb5/mal/mal_instruction.c Branch: no_type_bat Log Message:
merged diffs (truncated from 725 to 300 lines): diff --git a/clients/Tests/MAL-signatures.test b/clients/Tests/MAL-signatures.test --- a/clients/Tests/MAL-signatures.test +++ b/clients/Tests/MAL-signatures.test @@ -38480,7 +38480,12 @@ SQLwindow_bound; computes window ranges for each row sqlcatalog alter_add_range_partition -pattern sqlcatalog.alter_add_range_partition(X_0:str, X_1:str, X_2:str, X_3:str, X_4:any_1, X_5:any_1, X_6:bit, X_7:int):void +pattern sqlcatalog.alter_add_range_partition(X_0:str, X_1:str, X_2:str, X_3:str, X_4:any_1, X_5:any_1, X_6:bit, X_7:int, X_8:bat[:lng]):void +SQLalter_add_range_partition; +Catalog operation alter_add_range_partition +sqlcatalog +alter_add_range_partition +pattern sqlcatalog.alter_add_range_partition(X_0:str, X_1:str, X_2:str, X_3:str, X_4:any_1, X_5:any_1, X_6:bit, X_7:int, X_8:lng):void SQLalter_add_range_partition; Catalog operation alter_add_range_partition sqlcatalog @@ -38490,12 +38495,22 @@ SQLalter_add_table; Catalog operation alter_add_table sqlcatalog alter_add_value_partition -pattern sqlcatalog.alter_add_value_partition(X_0:str, X_1:str, X_2:str, X_3:str, X_4:bit, X_5:int):void +pattern sqlcatalog.alter_add_value_partition(X_0:str, X_1:str, X_2:str, X_3:str, X_4:bit, X_5:int, X_6:bat[:lng]):void SQLalter_add_value_partition; Catalog operation alter_add_value_partition sqlcatalog alter_add_value_partition -pattern sqlcatalog.alter_add_value_partition(X_0:str, X_1:str, X_2:str, X_3:str, X_4:bit, X_5:int, X_6:any...):void +pattern sqlcatalog.alter_add_value_partition(X_0:str, X_1:str, X_2:str, X_3:str, X_4:bit, X_5:int, X_6:bat[:lng], X_7:any...):void +SQLalter_add_value_partition; +Catalog operation alter_add_value_partition +sqlcatalog +alter_add_value_partition +pattern sqlcatalog.alter_add_value_partition(X_0:str, X_1:str, X_2:str, X_3:str, X_4:bit, X_5:int, X_6:lng):void +SQLalter_add_value_partition; +Catalog operation alter_add_value_partition +sqlcatalog +alter_add_value_partition +pattern sqlcatalog.alter_add_value_partition(X_0:str, X_1:str, X_2:str, X_3:str, X_4:bit, X_5:int, X_6:lng, X_7:any...):void SQLalter_add_value_partition; Catalog operation alter_add_value_partition sqlcatalog @@ -38717,17 +38732,7 @@ str contains pattern str.contains(X_0:str, X_1:str, X_2:bit):bit STRcontains; -Check if string chaystack contains string needle, icase flag. -str -containsjoin -pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] -STRcontainsjoin1; -The same as STRcontainsjoin, but only produce one output + icase. -str -containsjoin -pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] -STRcontainsjoin1; -The same as STRcontainsjoin, but only produce one output. +Check if string haystack contains string needle, icase flag. str containsjoin pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit) (X_8:bat[:oid], X_9:bat[:oid]) @@ -38735,10 +38740,20 @@ STRcontainsjoin; Join the string bat L with the bat R if L contains the string of R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows + icase. str containsjoin +pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] +STRcontainsjoin; +The same as STRcontainsjoin, but only produce one output + icase. +str +containsjoin pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit) (X_7:bat[:oid], X_8:bat[:oid]) STRcontainsjoin; Join the string bat L with the bat R if L contains the string of R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows. str +containsjoin +pattern str.containsjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] +STRcontainsjoin; +The same as STRcontainsjoin, but only produce one output. +str containsselect pattern str.containsselect(X_0:bat[:str], X_1:bat[:oid], X_2:str, X_3:bit):bat[:oid] STRcontainsselect; @@ -38760,25 +38775,25 @@ STRendswith; Check if string ends with substring, icase flag. str endswithjoin -pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] -STRendswithjoin1; -The same as STRendswithjoin, but only produce one output + icase. -str -endswithjoin -pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] -STRendswithjoin1; -The same as STRendswithjoin, but only produce one output. -str -endswithjoin pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit) (X_8:bat[:oid], X_9:bat[:oid]) STRendswithjoin; Join the string bat L with the suffix bat R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows + icase. str endswithjoin +pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] +STRendswithjoin; +The same as STRendswithjoin, but only produce one output + icase. +str +endswithjoin pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit) (X_7:bat[:oid], X_8:bat[:oid]) STRendswithjoin; Join the string bat L with the suffix bat R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows. str +endswithjoin +pattern str.endswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] +STRendswithjoin; +The same as STRendswithjoin, but only produce one output. +str endswithselect pattern str.endswithselect(X_0:bat[:str], X_1:bat[:oid], X_2:str, X_3:bit):bat[:oid] STRendswithselect; @@ -38930,25 +38945,25 @@ STRstartswith; Check if string starts with substring, icase flag. str startswithjoin -pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] -STRstartswithjoin1; -The same as STRstartswithjoin, but only produce one output + icase. -str -startswithjoin -pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] -STRstartswithjoin1; -The same as STRstartswithjoin, but only produce one output. -str -startswithjoin pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit) (X_8:bat[:oid], X_9:bat[:oid]) STRstartswithjoin; Join the string bat L with the prefix bat R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows + icase. str startswithjoin +pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:bit], X_3:bat[:oid], X_4:bat[:oid], X_5:bit, X_6:lng, X_7:bit):bat[:oid] +STRstartswithjoin; +The same as STRstartswithjoin, but only produce one output + icase. +str +startswithjoin pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit) (X_7:bat[:oid], X_8:bat[:oid]) STRstartswithjoin; Join the string bat L with the prefix bat R@with optional candidate lists SL and SR@The result is two aligned bats with oids of matching rows. str +startswithjoin +pattern str.startswithjoin(X_0:bat[:str], X_1:bat[:str], X_2:bat[:oid], X_3:bat[:oid], X_4:bit, X_5:lng, X_6:bit):bat[:oid] +STRstartswithjoin; +The same as STRstartswithjoin, but only produce one output. +str startswithselect pattern str.startswithselect(X_0:bat[:str], X_1:bat[:oid], X_2:str, X_3:bit):bat[:oid] STRstartswithselect; diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out --- a/clients/Tests/exports.stable.out +++ b/clients/Tests/exports.stable.out @@ -1005,7 +1005,7 @@ int getStrConstant(MalBlkPtr mb, str val const char *getTraceRef; str getTypeIdentifier(malType tpe); str getTypeName(malType tpe); -char *getVarNameIntoBuffer(MalBlkPtr mb, int idx, const char *buf); +char *getVarNameIntoBuffer(MalBlkPtr mb, int idx, char *buf); const char *getVariableRef; Module globalModule(const char *nme); const char *grantRef; @@ -1194,7 +1194,7 @@ InstrPtr pushReturn(MalBlkPtr mb, InstrP InstrPtr pushSht(MalBlkPtr mb, InstrPtr q, sht val); InstrPtr pushStr(MalBlkPtr mb, InstrPtr q, const char *val); InstrPtr pushType(MalBlkPtr mb, InstrPtr q, int tpe); -InstrPtr pushValue(MalBlkPtr mb, InstrPtr q, ValPtr cst); +InstrPtr pushValue(MalBlkPtr mb, InstrPtr q, const ValRecord *cst); InstrPtr pushVoid(MalBlkPtr mb, InstrPtr q); InstrPtr pushZero(MalBlkPtr mb, InstrPtr q, int tpe); const char *putName(const char *nme); diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c --- a/gdk/gdk_batop.c +++ b/gdk/gdk_batop.c @@ -1050,8 +1050,7 @@ BATdel(BAT *b, BAT *d) BUN p = o - b->hseqbase; BUN q = p + c; while (p < q) { - if (atmdel) - (*atmdel)(b->tvheap, (var_t *) BUNtloc(bi, p)); + (*atmdel)(b->tvheap, (var_t *) BUNtloc(bi, p)); p++; } } diff --git a/gdk/gdk_calc.c b/gdk/gdk_calc.c --- a/gdk/gdk_calc.c +++ b/gdk/gdk_calc.c @@ -147,7 +147,7 @@ bailout: gdk_return VARcalcnot(ValPtr ret, const ValRecord *v) { - ret->vtype = v->vtype; + *ret = (ValRecord) {.vtype = v->vtype}; switch (ATOMbasetype(v->vtype)) { case TYPE_msk: ret->val.mval = !v->val.mval; @@ -311,7 +311,7 @@ bailout: gdk_return VARcalcnegate(ValPtr ret, const ValRecord *v) { - ret->vtype = v->vtype; + *ret = (ValRecord) {.vtype = v->vtype}; switch (ATOMbasetype(v->vtype)) { case TYPE_bte: if (is_bte_nil(v->val.btval)) @@ -451,7 +451,7 @@ bailout: gdk_return VARcalcabsolute(ValPtr ret, const ValRecord *v) { - ret->vtype = v->vtype; + *ret = (ValRecord) {.vtype = v->vtype}; switch (ATOMbasetype(v->vtype)) { case TYPE_bte: if (is_bte_nil(v->val.btval)) @@ -589,7 +589,7 @@ bailout: gdk_return VARcalciszero(ValPtr ret, const ValRecord *v) { - ret->vtype = TYPE_bit; + *ret = (ValRecord) {.vtype = TYPE_bit}; switch (ATOMbasetype(v->vtype)) { case TYPE_bte: if (is_bte_nil(v->val.btval)) @@ -731,7 +731,7 @@ bailout: gdk_return VARcalcsign(ValPtr ret, const ValRecord *v) { - ret->vtype = TYPE_bte; + *ret = (ValRecord) {.vtype = TYPE_bte}; switch (ATOMbasetype(v->vtype)) { case TYPE_bte: if (is_bte_nil(v->val.btval)) @@ -921,16 +921,20 @@ BATcalcisnotnil(BAT *b, BAT *s) gdk_return VARcalcisnil(ValPtr ret, const ValRecord *v) { - ret->vtype = TYPE_bit; - ret->val.btval = (bit) VALisnil(v); + *ret = (ValRecord) { + .vtype = TYPE_bit, + .val.btval = (bat) VALisnil(v), + }; return GDK_SUCCEED; } gdk_return VARcalcisnotnil(ValPtr ret, const ValRecord *v) { - ret->vtype = TYPE_bit; - ret->val.btval = (bit) !VALisnil(v); + *ret = (ValRecord) { + .vtype = TYPE_bit, + .val.btval = (bat) !VALisnil(v), + }; return GDK_SUCCEED; } @@ -2569,6 +2573,7 @@ VARcalcxor(ValPtr ret, const ValRecord * return GDK_FAIL; } + ret->bat = false; if (xor_typeswitchloop(VALptr(lft), false, VALptr(rgt), false, VALget(ret), lft->vtype, @@ -2804,6 +2809,7 @@ VARcalcor(ValPtr ret, const ValRecord *l return GDK_FAIL; } + ret->bat = false; if (or_typeswitchloop(VALptr(lft), false, VALptr(rgt), false, VALget(ret), lft->vtype, @@ -3034,6 +3040,7 @@ VARcalcand(ValPtr ret, const ValRecord * return GDK_FAIL; } + ret->bat = false; if (and_typeswitchloop(VALptr(lft), false, VALptr(rgt), false, VALget(ret), lft->vtype, @@ -3399,7 +3406,7 @@ BATcalccstlsh(const ValRecord *v, BAT *b gdk_return VARcalclsh(ValPtr ret, const ValRecord *lft, const ValRecord *rgt) { - ret->vtype = lft->vtype; + *ret = (ValRecord) {.vtype = lft->vtype}; if (lsh_typeswitchloop(VALptr(lft), lft->vtype, false, VALptr(rgt), rgt->vtype, false, VALget(ret), @@ -3749,7 +3756,7 @@ BATcalccstrsh(const ValRecord *v, BAT *b gdk_return VARcalcrsh(ValPtr ret, const ValRecord *lft, const ValRecord *rgt) { - ret->vtype = lft->vtype; + *ret = (ValRecord) {.vtype = lft->vtype}; _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org