Changeset: b6afbb10a027 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/b6afbb10a027
Modified Files:
        monetdb5/mal/mal_function.c
        monetdb5/mal/mal_interpreter.c
        monetdb5/mal/mal_listing.c
        monetdb5/mal/mal_type.h
        monetdb5/optimizer/opt_commonTerms.c
Branch: default
Log Message:

Remove NOOPsymbol (deadcode).


diffs (74 lines):

diff --git a/monetdb5/mal/mal_function.c b/monetdb5/mal/mal_function.c
--- a/monetdb5/mal/mal_function.c
+++ b/monetdb5/mal/mal_function.c
@@ -558,8 +558,6 @@ setVariableScope(MalBlkPtr mb)
 
        for (pc = 0; pc < mb->stop; pc++) {
                p = getInstrPtr(mb, pc);
-               if( p->token == NOOPsymbol)
-                       continue;
 
                if( blockStart(p)){
                        if (getModuleId(p) && getFunctionId(p) && 
strcmp(getModuleId(p),"language")==0 && strcmp(getFunctionId(p),"dataflow")==0){
@@ -718,7 +716,7 @@ chkDeclarations(MalBlkPtr mb){
 
        for(pc=1;pc<mb->stop; pc++){
                p= getInstrPtr(mb,pc);
-               if ( p->token == REMsymbol || p->token == NOOPsymbol)
+               if ( p->token == REMsymbol)
                        continue;
                /* check correct use of the arguments*/
                for(k=p->retc;k<p->argc; k++) {
diff --git a/monetdb5/mal/mal_interpreter.c b/monetdb5/mal/mal_interpreter.c
--- a/monetdb5/mal/mal_interpreter.c
+++ b/monetdb5/mal/mal_interpreter.c
@@ -803,7 +803,6 @@ runMALsequence(Client cntxt, MalBlkPtr m
                        }
                        break;
                }
-               case NOOPsymbol:
                case REMsymbol:
                        break;
                case ENDsymbol:
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
@@ -444,15 +444,6 @@ instruction2str(MalBlkPtr mb, MalStkPtr 
                return fcnDefinition(mb, p, t, flg, base, len + (t - base));
        case REMsymbol:
                return fmtRemark(mb, stk, p, t, flg, base, len);
-       case NOOPsymbol:
-               if (!copystring(&t, "#", &len))
-                       return base;
-               if (getVar(mb, getArg(p, 0))->value.val.sval && getVar(mb, 
getArg(p, 0))->value.len > 0 &&
-                       !copystring(&t, getVar(mb, getArg(p, 
0))->value.val.sval, &len))
-                       return base;
-               if (!copystring(&t, " ", &len))
-                       return base;
-               break;
        default:
                i = snprintf(t, len, " unknown symbol ?%d? ", p->token);
                if (i < 0 || (size_t) i >= len)
diff --git a/monetdb5/mal/mal_type.h b/monetdb5/mal/mal_type.h
--- a/monetdb5/mal/mal_type.h
+++ b/monetdb5/mal/mal_type.h
@@ -45,7 +45,6 @@
 
 #define ASSIGNsymbol    40     /* interpreter entry points */
 #define ENDsymbol       41
-#define NOOPsymbol      43     /* no operation required */
 
 #define COMMANDsymbol   61     /* these tokens should be the last group !! */
 #define FUNCTIONsymbol  62     /* the designate the signature start */
diff --git a/monetdb5/optimizer/opt_commonTerms.c 
b/monetdb5/optimizer/opt_commonTerms.c
--- a/monetdb5/optimizer/opt_commonTerms.c
+++ b/monetdb5/optimizer/opt_commonTerms.c
@@ -112,7 +112,7 @@ OPTcommonTermsImplementation(Client cntx
                 * Like all optimizer decisions, it is safe to stop.
                 */
                barrier |= getFunctionId(p) == assertRef;
-               if (barrier || p->token == NOOPsymbol || p->token == 
ASSIGNsymbol) {
+               if (barrier || p->token == ASSIGNsymbol) {
                        TRC_DEBUG(MAL_OPTIMIZER, "Skipped[%d]: %d %d\n", i, 
barrier, p->retc == p->argc);
                        pushInstruction(mb,p);
                        continue;
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to