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

Modified Files:
        opt_inline.mx 
Log Message:
Properly handle inlining of functions with 1 statement, which
themselves may have to be inlined.


Index: opt_inline.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/optimizer/opt_inline.mx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- opt_inline.mx       27 Dec 2007 19:04:44 -0000      1.8
+++ opt_inline.mx       5 Jan 2008 09:15:32 -0000       1.9
@@ -41,7 +41,7 @@
 #include "mal_interpreter.h"
 #include "opt_macro.h"
 
-/*#define DEBUG_OPT_INLINE     show partial result */
+/* #define DEBUG_OPT_INLINE     show partial result */
 
 @c
 #include "mal_config.h"
@@ -85,8 +85,10 @@
                        if (sig->token == FUNCTIONsymbol &&
                            varGetProp(q->blk, getArg(sig, 0), inlineProp) != 
NULL) {
                                (void) inlineMALblock(mb,i,q->blk);
+                               i--;
                                actions++;
 #ifdef DEBUG_OPT_INLINE
+                               stream_printf(GDKout,"inline function at 
%d\n",i);
                                printFunction(GDKout, mb, LIST_MAL_ALL);
 #endif
                        } else 
@@ -95,8 +97,10 @@
 @c
                        if (varGetProp(mb, getArg(q,0), inlineProp) != NULL) {
                                inlineMALblock(mb,i,q->blk);
+                               i--;
                                actions++;
 #ifdef DEBUG_OPT_INLINE
+                               stream_printf(GDKout,"inlined called at 
%d\n",i);
                                printFunction(GDKout, mb, LIST_MAL_ALL);
 #endif
                        } 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to