Update of /cvsroot/monetdb/MonetDB5/src/optimizer
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv28628

Modified Files:
        opt_accumulators.mx opt_commonTerms.mx opt_deadcode.mx 
Log Message:
Handle propagation of all instruction records.


Index: opt_deadcode.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/optimizer/opt_deadcode.mx,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -d -r1.24 -r1.25
--- opt_deadcode.mx     5 Aug 2007 19:36:30 -0000       1.24
+++ opt_deadcode.mx     31 Oct 2007 07:16:26 -0000      1.25
@@ -86,7 +86,7 @@
 static int 
 OPTdeadcodeImplementation(MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
 {
-       int i, k, se,limit;
+       int i, k, se,limit,slimit;
        InstrPtr p=0, *old= mb->stmt;
        int actions = 0;
 
@@ -102,7 +102,8 @@
 #endif
 
        limit= mb->stop;
-       newMalBlkStmt(mb, mb->stop); /* a new statement stack */
+       slimit= mb->ssize;
+       newMalBlkStmt(mb, mb->ssize); /* a new statement stack */
 
        pushInstruction(mb, old[0]);
        for (i = 1; i < limit; i++) {
@@ -112,6 +113,7 @@
                if( se){
                        pushInstruction(mb,p);
                        for(i++; i<limit; i++)
+                       if(old[i])
                                pushInstruction(mb,old[i]);
                        break;
                }

Index: opt_commonTerms.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/optimizer/opt_commonTerms.mx,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- opt_commonTerms.mx  28 Jul 2007 01:52:04 -0000      1.19
+++ opt_commonTerms.mx  31 Oct 2007 07:16:25 -0000      1.20
@@ -113,7 +113,7 @@
        setLifespan(mb);
        old= mb->stmt;
        limit= mb->stop;
-       newMalBlkStmt(mb, mb->stop); /* a new statement stack */
+       newMalBlkStmt(mb, mb->ssize); /* a new statement stack */
        for ( n= i = 0; i < limit; i++) {
                p = old[i];
                pushInstruction(mb,p);
@@ -123,6 +123,7 @@
 @c
                if( p->token == ENDsymbol){
                        for(i++; i<limit; i++)
+                       if(old[i])
                                pushInstruction(mb,old[i]);
                        break;
                }

Index: opt_accumulators.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/optimizer/opt_accumulators.mx,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- opt_accumulators.mx 17 Aug 2007 13:56:53 -0000      1.19
+++ opt_accumulators.mx 31 Oct 2007 07:16:25 -0000      1.20
@@ -67,7 +67,7 @@
 static int
 OPTaccumulatorsImplementation(MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
 {
-       int i,j, a=0, b, valid, limit;
+       int i,j, a=0, b, valid, limit,slimit;
        InstrPtr p,q;
        Client cntxt = MCgetClient();
        Module scope = cntxt->nspace;
@@ -86,6 +86,7 @@
        memset(available,0, sizeof(int)* mb->vtop);
        old= mb->stmt;
        limit= mb->stop;
+       slimit= mb->ssize;
        newMalBlkStmt(mb,mb->stop);
 @-
 Check for errors encountered sofar. If encountered
@@ -195,6 +196,9 @@
                } 
                pushInstruction(mb,p);
        }
+       for (i = limit; i<slimit; i++) 
+       if(old[i])
+               freeInstruction(old[i]);
        GDKfree(old);
        return actions;
 }


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to