Changeset: 5222828651b0 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=5222828651b0
Modified Files:
        monetdb5/mal/mal_debugger.c
        monetdb5/mal/mal_instruction.c
        monetdb5/mal/mal_listing.c
        monetdb5/mal/mal_profiler.c
Branch: default
Log Message:

Minor issues removed


diffs (57 lines):

diff --git a/monetdb5/mal/mal_debugger.c b/monetdb5/mal/mal_debugger.c
--- a/monetdb5/mal/mal_debugger.c
+++ b/monetdb5/mal/mal_debugger.c
@@ -141,7 +141,6 @@ printStackElm(stream *f, MalBlkPtr mb, V
        if (nmeOnStk && strcmp(nmeOnStk, nme) && strncmp(nmeOnStk, "BAT", 3))
                mnstr_printf(f, "!%s ", nmeOnStk);
        mnstr_printf(f, " %s", (isVarConstant(mb, index) ? " constant" : ""));
-       mnstr_printf(f, " %s", (isVarUsed(mb,index) ? "": " not used" ));
        mnstr_printf(f, " %s", (isVarTypedef(mb, index) ? " type variable" : 
""));
        GDKfree(nme);
        mnstr_printf(f, "\n");
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
@@ -949,9 +949,11 @@ trimMalVariables_(MalBlkPtr mb, MalStkPt
        }
        /* rename the temporary variable */
        mb->vid = 0;
+/* Obsolete, name generation is postponed until needed
        for( i =0; i< cnt; i++)
        if( isTmpVar(mb,i))
                (void) snprintf(getVarName(mb,i), IDLENGTH,"%c_%d", 
getVarKind(mb,i), mb->vid++);
+*/
 
        GDKfree(alias);
        mb->vtop = cnt;
diff --git a/monetdb5/mal/mal_listing.c b/monetdb5/mal/mal_listing.c
--- a/monetdb5/mal/mal_listing.c
+++ b/monetdb5/mal/mal_listing.c
@@ -351,12 +351,16 @@ instruction2str(MalBlkPtr mb, MalStkPtr 
        case CMDcall:
        case ASSIGNsymbol :
                // is any variable explicit or used
+               /* this code was meant to make it easy to detect functions 
whose 
+                * result variable was not used anywhere.
+                * It is not essential
                for (i = 0; i < p->retc; i++)
                        if ( !isTmpVar(mb,getArg(p,i)) || isVarUsed(mb, 
getArg(p, i)))
                                break;
 
                if (i == p->retc)
                        break;
+               */
 
                /* display multi-assignment list */
                if (p->retc > 1 && !copystring(&t, "(", &len))
diff --git a/monetdb5/mal/mal_profiler.c b/monetdb5/mal/mal_profiler.c
--- a/monetdb5/mal/mal_profiler.c
+++ b/monetdb5/mal/mal_profiler.c
@@ -396,7 +396,6 @@ renderProfilerEvent(Client cntxt, MalBlk
                        }
                        if (!logadd(&logbuf, ",\"eol\":%d", 
getVarEolife(mb,getArg(pci,j))))
                                return;
-                       // if (!logadd(&logbuf, ",\"used\":%d", 
isVarUsed(mb,getArg(pci,j)))) return;
                        // if (!logadd(&logbuf, ",\"fixed\":%d", 
isVarFixed(mb,getArg(pci,j)))) return;
                        if (!logadd(&logbuf, "}"))
                                return;
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to