Changeset: b7a25cbf66b3 for MonetDB URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b7a25cbf66b3 Modified Files: monetdb5/mal/mal_instruction.c Branch: default Log Message:
Safe cycles diffs (20 lines): diff --git a/monetdb5/mal/mal_instruction.c b/monetdb5/mal/mal_instruction.c --- a/monetdb5/mal/mal_instruction.c +++ b/monetdb5/mal/mal_instruction.c @@ -1064,11 +1064,12 @@ fndConstant(MalBlkPtr mb, const ValRecor k = mb->vtop - depth; if (k < 0) k = 0; - for (i=k; i < mb->vtop - 1; i++) - if (getVar(mb,i) && isVarConstant(mb,i)){ + for (i=k; i < mb->vtop - 1; i++){ VarPtr v = getVar(mb, i); - if (v && v->type == cst->vtype && ATOMcmp(cst->vtype, VALptr(&v->value), p) == 0) - return i; + if (v->constant){ + if (v && v->type == cst->vtype && ATOMcmp(cst->vtype, VALptr(&v->value), p) == 0) + return i; + } } return -1; } _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list