Changeset: ad6f7285ae43 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=ad6f7285ae43
Modified Files:
        MonetDB5/src/optimizer/opt_dataflow.mx
        clients/src/mapilib/Mapi.mx
Branch: Jun2010
Log Message:

merged heads


diffs (57 lines):

diff -r 203a7f84f1de -r ad6f7285ae43 MonetDB5/src/optimizer/opt_dataflow.mx
--- a/MonetDB5/src/optimizer/opt_dataflow.mx    Tue Jul 27 08:55:33 2010 +0200
+++ b/MonetDB5/src/optimizer/opt_dataflow.mx    Tue Jul 27 20:04:45 2010 +0200
@@ -89,6 +89,19 @@
 #include "mal_interpreter.h"
 
 static int
+dflowAssignTest(Lifespan span, InstrPtr p, int i)
+{
+       int j;
+       /* flow blocks should be closed (and not opened) when we reach a point
+          where a variable is assigned that is not the last
+       */
+       for(j=0; j<p->retc; j++)
+               if (getLastUpdate(span, getArg(p,j)) != i)
+                       return 1;
+       return 0;
+}
+
+static int
 OPTdataflowImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr 
p)
 {
        int i,j, cnt, start=1,entries=0, actions=0;
@@ -143,7 +156,7 @@
 
                if (p->token == ENDsymbol)
                        break;
-               if (hasSideEffects(p,TRUE) || isUnsafeFunction(p) || 
blockCntrl(p) || (!dumbcopy && blockExit(p))){
+               if (hasSideEffects(p,TRUE) || isUnsafeFunction(p) || 
blockCntrl(p) || (!dumbcopy && blockExit(p)) || dflowAssignTest(span,p,i) ){
                        @:flowblock@
                        pushInstruction(mb,p);
                        continue;
@@ -177,6 +190,9 @@
                        for(j=p->retc; j<p->argc; j++)
                                if (getLastUpdate(span, getArg(p,j)) <= start)
                                        cnt++;
+               if ( dflowAssignTest(span,p,i))
+                       cnt = 0;
+
                if (cnt && cnt == p->argc-p->retc)
                        entries++;
        }
diff -r 203a7f84f1de -r ad6f7285ae43 clients/src/mapilib/Mapi.mx
--- a/clients/src/mapilib/Mapi.mx       Tue Jul 27 08:55:33 2010 +0200
+++ b/clients/src/mapilib/Mapi.mx       Tue Jul 27 20:04:45 2010 +0200
@@ -2339,10 +2339,9 @@
 #ifdef HAVE_SYS_UN_H
        if (mid->hostname == NULL) {
                struct stat st;
-               struct sockaddr_un s; /* just for sizeof(s.sun_path) */
                snprintf(errbuf, sizeof(errbuf),
                         CLIENTS_PREFIX "/var/MonetDB5/dbfarm/mapi_socket");
-               if (strlen(errbuf) <= sizeof(s.sun_path) &&
+               if (strlen(errbuf) <= sizeof(((struct sockaddr_un *) 
0)->sun_path) &&
                                stat(errbuf, &st) != 1 &&
                                S_ISSOCK(st.st_mode))
                        mid->hostname = strdup(errbuf);
_______________________________________________
Checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to