Changeset: a34fd16978f7 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a34fd16978f7 Modified Files: monetdb5/mal/mal_parser.c Branch: default Log Message:
Use the proper return variables to initialize return statement diffs (24 lines): diff --git a/monetdb5/mal/mal_parser.c b/monetdb5/mal/mal_parser.c --- a/monetdb5/mal/mal_parser.c +++ b/monetdb5/mal/mal_parser.c @@ -1683,14 +1683,13 @@ parseAssign(Client cntxt, int cntrl) /* look for assignment operator */ if (!keyphrase2(cntxt, ":=")) { /* no assignment !! a control variable is allowed */ - /* for the case RETURN X, we normalize it */ + /* for the case RETURN X, we normalize it to include the function arguments */ if (cntrl == RETURNsymbol || cntrl == YIELDsymbol) { - int e, lim; - lim = curInstr->retc; - for (e = 0; e < lim; e++) { - curInstr = pushArgument(curBlk, curInstr, getArg(curInstr, e)); - curInstr->argv[e] = getArg(getInstrPtr(curBlk, 0), e); - } + int e; + InstrPtr sig = getInstrPtr(curBlk,0); + curInstr->retc = 0; + for (e = 0; e < sig->retc; e++) + curInstr = pushReturn(curBlk, curInstr, getArg(sig, e)); } goto part3; _______________________________________________ checkin-list mailing list checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list