> Update of /cvsroot/monetdb/MonetDB5/src/optimizer
> In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv3358
>
> Modified Files:
> opt_replicator.mx
> Log Message:
> defConstant already performs a search for the constant value.
>
>
This was my first version too, but defConstant sets a pointer and does not
copy the value. The next call finds whatever has left in memory and
breaks.
Milena
> Index: opt_replicator.mx
> ===================================================================
> RCS file: /cvsroot/monetdb/MonetDB5/src/optimizer/opt_replicator.mx,v
> retrieving revision 1.28
> retrieving revision 1.29
> diff -u -d -r1.28 -r1.29
> --- opt_replicator.mx 29 Feb 2008 15:43:20 -0000 1.28
> +++ opt_replicator.mx 2 Mar 2008 11:46:49 -0000 1.29
> @@ -438,20 +438,15 @@
> static int newReplica(MalStkPtr s, InstrPtr p, bit keep)
> {
> int i, j, k, c, bid, r;
> - ValPtr v, v1;
> + ValPtr v;
> InstrPtr p1;
>
> assureSpace();
> p1 = copyInstruction(p);
> for(i = 0; i< p->argc; i++){
> j = p->argv[i];
> - v = &s->stk[j];
> - c = fndConstant(repl, v);
> - if ( c < 0 ){
> - v1 = VALnew();
> - VALcopy(v1,v);
> - c = defConstant(repl, v1->vtype, v1);
> - }
> + v = &s->stk[j];
> + c = defConstant(repl, v->vtype, v);
> setArg(p1,i,c);
>
> if ((i > 0) ||
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Monetdb-checkins mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/monetdb-checkins
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-developers