Changeset: df5578efca66 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=df5578efca66 Modified Files: monetdb5/mal/Tests/tst240.mal monetdb5/mal/Tests/tst240.stable.err monetdb5/mal/Tests/tst240.stable.out monetdb5/modules/atoms/Makefile.ag monetdb5/modules/kernel/Makefile.ag monetdb5/modules/kernel/calc.mal.mx monetdb5/modules/kernel/colcalc.c.mx monetdb5/modules/kernel/colcalc.mal.mx monetdb5/modules/kernel/colstr.mal monetdb5/modules/kernel/column.mal.mx monetdb5/modules/mal/Makefile.ag monetdb5/modules/mal/cbp.c monetdb5/modules/mal/cbp.h monetdb5/modules/mal/cbp.mal monetdb5/modules/mal/extensions.mal monetdb5/modules/mal/language.mal monetdb5/modules/mal/mal_init.mal monetdb5/optimizer/optimizer.mal Branch: headless Log Message:
Bunch of things Moved many instructions out of the way for compilation. Solved a series of programming errors due to colified work Mserver5 runs, but type resolution is not correct yet. diffs (truncated from 1099 to 300 lines): diff --git a/monetdb5/mal/Tests/tst240.mal b/monetdb5/mal/Tests/tst240.mal deleted file mode 100644 --- a/monetdb5/mal/Tests/tst240.mal +++ /dev/null @@ -1,9 +0,0 @@ -# testing pack/unpack of columns -i:= 1; -j:= 2; -b:= column.pack(i,j); -io.print(b); - -(g,h):= column.unpack(b); -io.print(g); -io.print(h); diff --git a/monetdb5/mal/Tests/tst240.stable.err b/monetdb5/mal/Tests/tst240.stable.err deleted file mode 100644 --- a/monetdb5/mal/Tests/tst240.stable.err +++ /dev/null @@ -1,12 +0,0 @@ -stderr of test 'tst240` in directory 'mal` itself: - - -# 18:22:21 > -# 18:22:21 > Mtimeout -timeout 60 Mserver "--config=/ufs/mk/monet5/src/mal/Tests/All.conf" --debug=10 --set "monet_mod_path=/ufs/mk/monet5/Linux/lib/MonetDB5:/ufs/mk/opensource/MonetDB/Linux/lib/MonetDB" --set "gdk_dbfarm=/ufs/mk/opensource/MonetDB/Linux/var/MonetDB5/dbfarm" --set "sql_logdir=/ufs/mk/opensource/MonetDB/Linux/var/MonetDB5/log" --set mapi_port=39583 --set sql_port=47272 --set xquery_port=57837 --set monet_prompt= --trace "--config=/ufs/mk/monet5/src/mal/Tests/All.conf" --dbname=mTests_src_mal tst240.mal </dev/null -# 18:22:21 > - - -# 18:22:21 > -# 18:22:21 > Done. -# 18:22:21 > - diff --git a/monetdb5/mal/Tests/tst240.stable.out b/monetdb5/mal/Tests/tst240.stable.out deleted file mode 100644 --- a/monetdb5/mal/Tests/tst240.stable.out +++ /dev/null @@ -1,46 +0,0 @@ -stdout of test 'tst240` in directory 'mal` itself: - - -# 18:22:21 > -# 18:22:21 > Mtimeout -timeout 60 Mserver "--config=/ufs/mk/monet5/src/mal/Tests/All.conf" --debug=10 --set "monet_mod_path=/ufs/mk/monet5/Linux/lib/MonetDB5:/ufs/mk/opensource/MonetDB/Linux/lib/MonetDB" --set "gdk_dbfarm=/ufs/mk/opensource/MonetDB/Linux/var/MonetDB5/dbfarm" --set "sql_logdir=/ufs/mk/opensource/MonetDB/Linux/var/MonetDB5/log" --set mapi_port=39583 --set sql_port=47272 --set xquery_port=57837 --set monet_prompt= --trace "--config=/ufs/mk/monet5/src/mal/Tests/All.conf" --dbname=mTests_src_mal tst240.mal </dev/null -# 18:22:21 > - -# Monet Database Server V4.99.19 -# Copyright (c) 1993-2005, CWI. All rights reserved. -# Compiled for x86_64-redhat-linux-gnu/64bit with 64bit OIDs; dynamically linked. -# config:/ufs/mk/monet5/src/mal/Tests/All.conf -# dbfarm:/ufs/mk/opensource/MonetDB/Linux/var/MonetDB5/dbfarm -# dbname:mTests_src_mal -# Visit http://monetdb.cwi.nl/ for further information. -## testing pack/unpack of bats -#i:= 1; -#j:= 2; -#b:= bbp.pack(i,j); -#io.print(b); -# -#(g,h):= bbp.unpack(b); -#io.print(g); -#io.print(h); -# -function user.main():void; -# testing pack/unpack of bats - i := 1; - j := 2; - b := bat.pack(i,j); - io.print(b); - (g,h) := bat.unpack(b); - io.print(g); - io.print(h); -end main; -#-----------------# -# h t # name -# int int # type -#-----------------# -[ 1, 2 ] -[ 1 ] -[ 2 ] - -# 18:22:21 > -# 18:22:21 > Done. -# 18:22:21 > - diff --git a/monetdb5/modules/atoms/Makefile.ag b/monetdb5/modules/atoms/Makefile.ag --- a/monetdb5/modules/atoms/Makefile.ag +++ b/monetdb5/modules/atoms/Makefile.ag @@ -52,4 +52,4 @@ } EXTRA_DIST_DIR = Tests -EXTRA_DIST = blob.mal blob.h color.mal color.h identifier.mal identifier.h inet.mal inet.h xml.mal xml.h xml.sql mtime.h mtime.mal +EXTRA_DIST = blob.mal blob.h color.mal color.h identifier.mal identifier.h inet.mal inet.h xml.mal xml.h xml.sql mtime.h mtime.mal str.h str.mal diff --git a/monetdb5/modules/kernel/Makefile.ag b/monetdb5/modules/kernel/Makefile.ag --- a/monetdb5/modules/kernel/Makefile.ag +++ b/monetdb5/modules/kernel/Makefile.ag @@ -61,8 +61,8 @@ calc.h.mx \ calc.c.mx \ lock.c \ - microbenchmark.h.mx \ - microbenchmark.c.mx \ +# microbenchmark.h \ +# microbenchmark.c \ mmath.h.mx \ mmath.c.mx \ sema.c \ @@ -74,10 +74,10 @@ HEADERS = mal DIR = libdir/monetdb5 SOURCES = calc.mal.mx \ - aggr.mx \ +# aggr.mx \ alarm.mal \ algebra.mx \ - array.mx \ +# array.mx \ colcolor.mal.mx \ colcast.mal.mx \ colcalc.mal.mx \ @@ -89,7 +89,7 @@ # group.mx \ lock.mal \ # logger.mal \ - microbenchmark.mal.mx \ +# microbenchmark.mal \ mmath.mal.mx \ sema.mal \ status.mal \ diff --git a/monetdb5/modules/kernel/calc.mal.mx b/monetdb5/modules/kernel/calc.mal.mx --- a/monetdb5/modules/kernel/calc.mal.mx +++ b/monetdb5/modules/kernel/calc.mal.mx @@ -124,10 +124,10 @@ command +(l:str,r:str):str address CALCstrConcat -comment "Concatenate two strings"; +comment "Concatenate (+) two strings"; command +(l:str,r:int):str address CALCstrConcatInt -comment "Concatenate two strings"; +comment "Concatenate (+) two strings"; @= mal_calc_ops command sqladd(left:@1, right:@2) :@3 diff --git a/monetdb5/modules/kernel/colcalc.c.mx b/monetdb5/modules/kernel/colcalc.c.mx --- a/monetdb5/modules/kernel/colcalc.c.mx +++ b/monetdb5/modules/kernel/colcalc.c.mx @@ -42,12 +42,12 @@ @1: +, -, *, / basic arithmetic operator symbol @2: ADD, SUB, MUL, DIV basic arithmetic operator name @3: (bit pattern) disable/enable sorting propagation - 1 propagate as-is on bat,const - 2 propagate as-is on const,bat - 4 propagate reverted on bat,const (not required/used!) - 8 propagate reverted on const,bat - 16 propagate as-is / reverted on bat,const if const >=0 / <0 - 32 propagate as-is / reverted on const,bat if const >=0 / <0 + 1 propagate as-is on column,const + 2 propagate as-is on const,column + 4 propagate reverted on column,const (not required/used!) + 8 propagate reverted on const,column + 16 propagate as-is / reverted on column,const if const >=0 / <0 + 32 propagate as-is / reverted on const,column if const >=0 / <0 */ @- @= accum @@ -87,9 +87,8 @@ } @= accumCstRight { - c = *(@4*)cst; - lbase = (@3*) COLbase(bl); - nbase = (@5*) COLbase(bn); + @3 *lbase = (@3*) COLbase(bl); + nbase = (@4*) COLbase(bn); COLaccessBegin(bl, USE_HEAP, MMAP_SEQUENTIAL); if( c == @3_nil){ @@ -102,7 +101,7 @@ nbase[o]= lbase[o] @1 c; else COLforloop(bl,o) - if (lbase[o] == @2_nil ) { + if (lbase[o] == @3_nil ) { nbase[o] = @4_nil; bn->nonil = 0; } else @@ -111,9 +110,8 @@ } @= accumCstLeft { - c = *(@2*)cst; - rbase = (@3*)COLbase(br); - nbase = (@5*) COLbase(bn); + @3 *rbase = (@3*)COLbase(br); + nbase = (@4*) COLbase(bn); COLaccessBegin(br, USE_HEAP, MMAP_SEQUENTIAL); if (c == @2_nil) { @@ -172,7 +170,7 @@ COLaccessBegin(br, USE_HEAP, MMAP_SEQUENTIAL); #if CMD_@2 == CMD_DIV - COLforloop(bl, rbase, o) + COLforloop(bl, o) if ( rbase[o] == 0) { msg = createException(ARITH, "colcalc.@1", "Division by zero"); break; @@ -184,7 +182,7 @@ if (bl->nonil && br->nonil) { COLforloop(bl,o) nbase[o] = (@5) ( lbase[o] @1 rbase[o]); - } else if (b->nonil ) { + } else if (bl->nonil ) { COLforloop(bl,o) if ( rbase[o] == @4_nil) { nbase[o] = @5_nil; @@ -223,10 +221,10 @@ str CMDcol@2cst_@3_@4_@5(int *ret, int *l, void *cst) { oid o; - @3 *lbase; - @5 *nbase; COL *bn, *bl; str msg = MAL_SUCCEED; + @5 *nbase; + @4 c = *(@4*)cst; if ( (msg = getCOLdescriptor(&bl,l)) ) throwagain(MAL,"colcalc.@1",msg); @@ -245,37 +243,27 @@ COLsetcount(bn, COLcount(bl)); COLsetreadonly(bn); if (@6 & 1) - bn->sorted = br->sorted; + bn->sorted = bl->sorted; else - if (@6 & 4) - bn->sorted = REVERT_SORTED(COLisordered(b)); - else - if (@6 & 16) { - if (*(@4*)cst < 0) - bn->sorted = REVERT_SORTED(COLisordered(b)); - else - bn->sorted = COLisordered(b); - } else bn->sorted = 0; } *ret = CBPkeepref( bn); - CBPreleaseref(br); + CBPreleaseref(bl); return msg; } str CMDcst@2col_@3_@4_@5(int *ret, void *cst, int *r) { oid o; - @2 c = *(@2*)cst; - @3 *rbase; - @5 *nbase; COL *bn, *br; str msg = MAL_SUCCEED; + @5 *nbase; + @3 c = *(@3*)cst; if ( (msg = getCOLdescriptor(&br,r)) ) throwagain(MAL,"colcalc.@1",msg); - if ( (bn = COLnew(TYPE_@5, COLcount(br)) ) === NULL) { + if ( (bn = COLnew(TYPE_@5, COLcount(br)) ) == NULL) { CBPreleaseref(br); throw(MAL,"colcalc.@1",msg); } @@ -291,15 +279,6 @@ if (@6 & 2) bn->sorted = COLisordered(br); else - if (@6 & 8) - bn->sorted = REVERT_SORTED(COLisordered(br)); - else - if (@6 & 32) { - if (*(@4*)cst < 0) - bn->sorted = REVERT_SORTED(COLisordered(br)); - else - bn->sorted = COLisordered(br); - } else bn->sorted = 0; } @@ -311,8 +290,22 @@ /* the normal implementation of an operator is to just stick the operator between the operands */ @c +#define CMD_DIV 1 +#define CMD_MUL 2 +#define CMD_SUB 3 +#define CMD_ADD 4 + +#define CMD_MOD 5 + +#define CMD_LSH 8 _______________________________________________ Checkin-list mailing list [email protected] http://mail.monetdb.org/mailman/listinfo/checkin-list
