Changeset: eb78e4704c15 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=eb78e4704c15
Modified Files:
        MonetDB5/src/mal/mal_interpreter.mx
        MonetDB5/src/modules/mal/Makefile.ag
        MonetDB5/src/modules/mal/mal_init.mx
        sql/src/common/sql_types.c
Branch: default
Log Message:

Merge with Oct2010 branch.


diffs (truncated from 378 to 300 lines):

diff -r 30a7279f3b95 -r eb78e4704c15 MonetDB5/RunMtest.bat.in
--- a/MonetDB5/RunMtest.bat.in  Wed Oct 06 15:49:17 2010 +0200
+++ b/MonetDB5/RunMtest.bat.in  Wed Oct 06 19:13:07 2010 +0200
@@ -32,6 +32,8 @@
 REM enable auto-loading of modules before `make install`
 if not exist %builddir%\src\modules\mal\rdf\autoload mkdir 
%builddir%\src\modules\mal\rdf\autoload
 copy /y %srcdir%\src\modules\mal\rdf\??_*.mal 
%builddir%\src\modules\mal\rdf\autoload
+if not exist %builddir%\src\modules\atoms\autoload mkdir 
%builddir%\src\modules\atoms\autoload
+copy /y %srcdir%\src\modules\atoms\??_*.mal 
%builddir%\src\modules\atoms\autoload
 
 set PATH=%MOD_PATH%;%PATH%
 set PATH=%builddir%\src\mal;%PATH%
diff -r 30a7279f3b95 -r eb78e4704c15 MonetDB5/src/mal/mal_interpreter.mx
--- a/MonetDB5/src/mal/mal_interpreter.mx       Wed Oct 06 15:49:17 2010 +0200
+++ b/MonetDB5/src/mal/mal_interpreter.mx       Wed Oct 06 19:13:07 2010 +0200
@@ -598,9 +598,10 @@
        MalBlkPtr mb;           /* carry the context */
        MalStkPtr stk;
        int start, stop;        /* guarded block under consideration*/
-       char *status;   /* statements can be blocked on other statements */
+       char *status;           /* statements can be blocked on other 
statements */
        char *blocked;          /* blocked, should be created first */
-       int *inuse;                     /* inuse in parallel threads reference 
count */
+       int *assign;            /* first assignment of variable */ 
+       int *inuse;             /* inuse in parallel threads reference count */
        queue *done;            /* work finished */
        queue *todo;            /* pending actions for this client */
        int    nway;            /* number of workers */
@@ -1176,7 +1177,6 @@
 DFLOWinit(DataFlow flow, FlowStep fs)
 {
        int i, n;
-       char *assign= (char*) GDKzalloc(sizeof(char) * flow->mb->vtop);
 
        PARDEBUG
                printf("Initialize dflow block\n");
@@ -1197,8 +1197,11 @@
                for (j=0; j<p->argc; j++){
                        a = getArg(p, j);
 
-                       if (j<p->retc && assign[a] == 0 && flow->inuse[a] == 0) 
{
-                               assign[a] = i;
+                       if (j<p->retc && flow->assign[a] != 0) 
+                               assert(0);
+
+                       if (j<p->retc && flow->assign[a] == 0 && flow->inuse[a] 
== 0) {
+                               flow->assign[a] = i;
                                flow->blocked[a] = isNotUsedIn(p,p->retc,a)?1:0;
                        }
 
@@ -1211,13 +1214,12 @@
                flow->inuse[i] = 0;
        PARDEBUG
        for (i=0; i < flow->mb->vtop; i++) 
-       if ( flow->blocked[i] || flow->inuse[i] || assign[i] ){
+       if ( flow->blocked[i] || flow->inuse[i] || flow->assign[i] ){
                printf("%s %d %d [ %1d %2d ]\n", getVarName(flow->mb,i), 
                        getEndOfLife(flow->mb,i), i,
                        flow->blocked[i],
                        flow->inuse[i]);
        }
-       GDKfree(assign);
 }
 @-
 The liberal use of MAL to construct programs complicate proper dataflow
@@ -1243,28 +1245,29 @@
        (void) pc;
 
        for(j=0; j<p->argc && !blocked; j++) {
-               if ( j >= p->retc && flow->blocked[getArg(p,j)] )
+               int var = getArg(p,j);
+               if ( j >= p->retc && flow->blocked[var] )
                        blocked++;
-               if (j < p->retc && flow->inuse[getArg(p,j)] )
+               if (j < p->retc && flow->inuse[var] )
                        blocked++;
                else
-               if ( getEndOfLife(flow->mb,getArg(p,j))  == fs[i].pc ) {
+               if ( getEndOfLife(flow->mb,var)  == fs[i].pc ) {
                        /* make sure all instructions interested have already 
been executed */
                        /* and the eoscope variables are not used anymore */
 
-                       blocked += flow->inuse[getArg(p,j)] != 0;
+                       blocked += flow->inuse[var] != 0;
                        for ( k=0; k < i && !blocked; k++)
                        if (fs[k].status != DFLOWwrapup && fs[k].pc >= 0 ) /* 
pc = -1 could be the case before wrapup is set*/
-                               blocked += !isNotUsedIn(getInstrPtr(flow->mb, 
fs[k].pc), 0, getArg(p,j));
+                               blocked += !isNotUsedIn(getInstrPtr(flow->mb, 
fs[k].pc), 0, var);
                } else {
                        /* handle the dependencies sketched above */
                        /* search the statement that assigns a value to the 
argument or target */
                        /* it should have been finished already */
-                       for (l = i-1 ; l >= 0 && !blocked; l--)
+                       for (l = i-1 ; l >= flow->assign[var] && !blocked; l--)
                        if ( fs[l].status != DFLOWwrapup && fs[l].pc >= 0){
                                q= getInstrPtr(flow->mb, fs[l].pc);
                                for ( k=0; k < q->retc && !blocked; k++)
-                               if ( getArg(q,k) == getArg(p,j) )
+                               if ( getArg(q,k) == var )
                                        blocked = 1;
                        }
                }
@@ -1489,12 +1492,14 @@
 
        flow->status = (char*) GDKzalloc((stoppc-startpc+1));
        flow->blocked = (char*) GDKzalloc(sizeof(char)*mb->vtop);
+       flow->assign = (int*) GDKzalloc(sizeof(int)*mb->vtop);
        flow->inuse = (int*) GDKzalloc(sizeof(int)*mb->vtop);
        mal_unset_lock(mal_contextLock, "runMALdataflow");
 
        ret = DFLOWscheduler(flow);
        GDKfree(flow->status);
        GDKfree(flow->blocked);
+       GDKfree(flow->assign);
        GDKfree(flow->inuse);
        mal_set_lock(mal_contextLock, "runMALdataflow");
        flow->free = flows;
diff -r 30a7279f3b95 -r eb78e4704c15 MonetDB5/src/modules/atoms/05_xml.mal
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/MonetDB5/src/modules/atoms/05_xml.mal     Wed Oct 06 19:13:07 2010 +0200
@@ -0,0 +1,20 @@
+# The contents of this file are subject to the MonetDB Public License
+# Version 1.1 (the "License"); you may not use this file except in
+# compliance with the License. You may obtain a copy of the License at
+# http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html
+#
+# Software distributed under the License is distributed on an "AS IS"
+# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
+# License for the specific language governing rights and limitations
+# under the License.
+#
+# The Original Code is the MonetDB Database System.
+#
+# The Initial Developer of the Original Code is CWI.
+# Portions created by CWI are Copyright (C) 1997-July 2008 CWI.
+# Copyright August 2008-2010 MonetDB B.V.
+# All Rights Reserved.
+
+# This loads the MonetDB/XML module
+include xml;
+include batxml;
diff -r 30a7279f3b95 -r eb78e4704c15 MonetDB5/src/modules/atoms/Makefile.ag
--- a/MonetDB5/src/modules/atoms/Makefile.ag    Wed Oct 06 15:49:17 2010 +0200
+++ b/MonetDB5/src/modules/atoms/Makefile.ag    Wed Oct 06 19:13:07 2010 +0200
@@ -67,19 +67,39 @@
                $(LIBXML2_LIBS) $(ICONV_LIBS) ../../mal/libmonetdb5
 }
 
+headers_xml_autoload = {
+       COND = HAVE_LIBXML2
+       HEADERS = mal
+       DIR = libdir/MonetDB5/autoload
+       SOURCES = 05_xml.mal
+}
+
+headers_xml_h = {
+       COND = HAVE_LIBXML2
+       DIR = includedir/MonetDB5/atoms
+       SOURCES = xml.mx
+       HEADERS = h 
+}
+
+headers_xml_mal = {
+       COND = HAVE_LIBXML2
+       HEADERS = mal
+       DIR = libdir/MonetDB5
+       SOURCES = xml.mx
+}
+
 headers_h = {
        DIR = includedir/MonetDB5/atoms
        SOURCES = blob.mx url.mx mtime.mx streams.mx inet.mx color.mx \
-                         xml.mx str.mx identifier.mx
+                         str.mx identifier.mx
        HEADERS = h 
 }
 
-
 headers_mal = {
        HEADERS = mal
        DIR = libdir/MonetDB5
        SOURCES = str.mx blob.mx url.mx mtime.mx streams.mx inet.mx color.mx \
-                         xml.mx identifier.mx
+                         identifier.mx
 }
 
 EXTRA_DIST_DIR = Tests
diff -r 30a7279f3b95 -r eb78e4704c15 MonetDB5/src/modules/kernel/Makefile.ag
--- a/MonetDB5/src/modules/kernel/Makefile.ag   Wed Oct 06 15:49:17 2010 +0200
+++ b/MonetDB5/src/modules/kernel/Makefile.ag   Wed Oct 06 19:13:07 2010 +0200
@@ -121,6 +121,20 @@
                $(SPHINXCLIENT_LIBS) ../../mal/libmonetdb5
 }
 
+headers_sphinx_h = {
+       COND = HAVE_SPHINXCLIENT
+       DIR = includedir/MonetDB5/kernel
+       SOURCES = sphinx.mx
+       HEADERS = h 
+}
+
+headers_sphinx_mal = {
+       COND = HAVE_SPHINXCLIENT
+       HEADERS = mal
+       DIR = libdir/MonetDB5
+       SOURCES = sphinx.mx
+}
+
 headers_h = {
        DIR = includedir/MonetDB5/kernel
        SOURCES = \
@@ -131,8 +145,7 @@
                aggr_be_sum.mx aggr_be_prod.mx aggr_be_avg.mx aggr_be_minmax.mx 
aggr_be_count.mx \
                aggr_bge_sum.mx aggr_bge_prod.mx aggr_bge_avg.mx 
aggr_bge_minmax.mx aggr_bge_count.mx \
                counters.mx microbenchmark.mx \
-               batstr.mx batmtime.mx batcolor.mx group.mx array.mx logger.mx \
-               sphinx.mx
+               batstr.mx batmtime.mx batcolor.mx group.mx array.mx logger.mx
        HEADERS = h 
 }
 
@@ -143,8 +156,7 @@
                mmath.mx lock.mx sema.mx alarm.mx batstr.mx batmtime.mx \
                batcolor.mx batifthen.mx batcast.mx batcalc.mx batmmath.mx \
                group.mx aggr.mx array.mx \
-               counters.mx logger.mx microbenchmark.mx \
-               sphinx.mx
+               counters.mx logger.mx microbenchmark.mx
 }
 
 EXTRA_DIST_DIR = Tests
diff -r 30a7279f3b95 -r eb78e4704c15 MonetDB5/src/modules/mal/Makefile.ag
--- a/MonetDB5/src/modules/mal/Makefile.ag      Wed Oct 06 15:49:17 2010 +0200
+++ b/MonetDB5/src/modules/mal/Makefile.ag      Wed Oct 06 19:13:07 2010 +0200
@@ -176,6 +176,20 @@
                 $(MALLOC_LIBS) $(PTHREAD_LIBS) $(DL_LIBS)
 }
 
+headers_batxml_h = {
+       COND = HAVE_LIBXML2
+       DIR = includedir/MonetDB5/mal
+       SOURCES = batxml.mx
+       HEADERS = h 
+}
+
+headers_batxml_mal = {
+       COND = HAVE_LIBXML2
+       HEADERS = mal
+       DIR = libdir/MonetDB5
+       SOURCES = batxml.mx
+}
+
 headers_h = {
        DIR = includedir/MonetDB5/mal
        SOURCES = batExtensions.mx bpm.mx mal_mapi.mx mal_io.mx clients.mx \
@@ -185,7 +199,7 @@
                inspect.mx manual.mx pqueue.mx mkey.mx \
                factories.mx groupby.mx mdb.mx  \
                urlbox.mx mat.mx histogram.mx \
-               sabaoth.mx remote.mx  batxml.mx  recycle.mx \
+               sabaoth.mx remote.mx  recycle.mx \
                cluster.mx trader.mx replication.mx pma.mx \
                tokenizer.mx zorder.mx
                #radix.mx 
@@ -203,7 +217,7 @@
                factories.mx groupby.mx mdb.mx pcre.mx  tablet.mx mat.mx 
histogram.mx \
                urlbox.mx statistics.mx transaction.mx \
                mal_mapi.mx sabaoth.mx remote.mx  \
-               bpm.mx batxml.mx txtsim.mx recycle.mx \
+               bpm.mx txtsim.mx recycle.mx \
                cluster.mx trader.mx replication.mx pma.mx \
                tokenizer.mx zorder.mx
        #radix.mx
diff -r 30a7279f3b95 -r eb78e4704c15 MonetDB5/src/modules/mal/mal_init.mx
--- a/MonetDB5/src/modules/mal/mal_init.mx      Wed Oct 06 15:49:17 2010 +0200
+++ b/MonetDB5/src/modules/mal/mal_init.mx      Wed Oct 06 19:13:07 2010 +0200
@@ -261,8 +261,6 @@
 include opt_remoteQueries;
 include crackers; 
 
-include xml;
-include batxml;
 @-
 @mal
 # Any extensions (MAL scripts) that should be automatically loaded upon
diff -r 30a7279f3b95 -r eb78e4704c15 sql/src/common/sql_types.c
--- a/sql/src/common/sql_types.c        Wed Oct 06 15:49:17 2010 +0200
+++ b/sql/src/common/sql_types.c        Wed Oct 06 19:13:07 2010 +0200
@@ -381,16 +381,16 @@
 }
 
 int
-is_subtype(sql_subtype *t1, sql_subtype *t2)
-/* returns true if t1 is a sub type of t2 */
+is_subtype(sql_subtype *sub, sql_subtype *super)
+/* returns true if sub is a sub type of super */
 {
-       if (!t1 || !t2)
+       if (!sub || !super)
                return 0;
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to