Changeset: c9f43537264c for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=c9f43537264c
Modified Files:
        monetdb5/mal/mal_debugger.c
        monetdb5/mal/mal_interpreter.c
        monetdb5/mal/mal_module.c
        monetdb5/mal/mal_module.h
Branch: default
Log Message:

Remove obsolete  code


diffs (115 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
@@ -18,7 +18,6 @@
 #include "mal_linker.h"                /* for getAddress() */
 #include "mal_listing.h"
 #include "mal_function.h"
-#include "mal_module.h"                /* for showModuleStatistics() */
 #include "mal_parser.h"
 #include "mal_namespace.h"
 #include "mal_private.h"
@@ -495,10 +494,6 @@ retryRead:
                        } else if (strncmp("scenario", b, 3) == 0) {
                                showScenarioByName(out, cntxt->scenario);
                                continue;
-                       } else if (strncmp("scope", b, 3) == 0) {
-                               /* used to inspect the identifier distribution 
*/
-                               showModuleStatistics(out, cntxt->nspace);
-                               continue;
                        } 
                        stk->cmd = *b;
                        m = 0;
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
@@ -1239,30 +1239,6 @@ str runMALsequence(Client cntxt, MalBlkP
        return ret;
 }
 
-/* Safeguarding
- * The physical stack for each thread is an operating system parameter.
- * We do not want recursive programs crashing the server, so once in
- * a while we check whether we are running dangerously low on available
- * stack space.
- *
- * This situation can be detected by calling upon the GDK functionality
- * of by limiting the depth of a function calls.
- * Expensive? 70 msec for 1M calls. Use with care.
- */
-str
-safeguardStack(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci)
-{
-       int depth = *getArgReference_int(stk, pci, 1);
-       (void)cntxt;
-       if (stk->stkdepth > depth * mb->vtop && THRhighwater()) {
-               throw(MAL, "mal.interpreter", MAL_STACK_FAIL);
-       }
-       if (stk->calldepth > 256)
-               throw(MAL, "mal.interpreter", MAL_CALLDEPTH_FAIL);
-       return MAL_SUCCEED;
-}
-
-
 
 /*
  * MAL API
diff --git a/monetdb5/mal/mal_module.c b/monetdb5/mal/mal_module.c
--- a/monetdb5/mal/mal_module.c
+++ b/monetdb5/mal/mal_module.c
@@ -326,44 +326,6 @@ findInstruction(Module scope, MalBlkPtr 
 }
 
 /*
- * Summarize the type resolution table for debugging purposes.
- */
-
-static void showModuleStat(stream *f, Module v,int cnt[256]){
-       int sigs=0,i,max=0,m;
-       Symbol s;
-       int c[256];
-       for(i=0;i<256;i++) c[i]=0;
-       for(i=0;i<256;i++){
-               m=0;
-               s= v->subscope[i];
-               while(s!=NULL){
-                       m++;
-                       sigs++;
-                       cnt[i]++;
-                       c[i]++;
-                       s= s->peer;
-               }
-               if(m>max)max=m;
-       }
-       m=0;
-       for(i=0;i<256;i++)
-       if(v->subscope[i]){
-               mnstr_printf(f,"%20s",(m++ ==0?v->name:""));
-               mnstr_printf(f,"[%c] %5d %5d\n",i,c[i],(cnt[i]-c[i]/2));
-       }
-       if(v->outer) showModuleStat(f,v->outer,cnt);
-}
-
-void showModuleStatistics(stream *f,Module s){
-       int i,cnt[256];
-
-       mnstr_printf(f,"%20s%5s%5s\n","module","#sig","avg chk");
-       for(i=0;i<256;i++) cnt[i]=0;
-       showModuleStat(f,s,cnt);
-}
-
-/*
  * Some primitives to aid online help and completions.
  * Note that pattern matching is on string prefix.
  */
diff --git a/monetdb5/mal/mal_module.h b/monetdb5/mal/mal_module.h
--- a/monetdb5/mal/mal_module.h
+++ b/monetdb5/mal/mal_module.h
@@ -40,7 +40,6 @@ mal_export Symbol   findSymbolInModule(M
 mal_export int         findInstruction(Module scope, MalBlkPtr mb, InstrPtr 
pci);
 mal_export void        dumpHelpTable(stream *f, Module s, str text, int flag);
 mal_export void        dumpSearchTable(stream *f, str text);
-mal_export void     showModuleStatistics(stream *f,Module s); /* used in 
src/mal/mal_debugger.c */
 mal_export char **getHelp(Module m, str pat, int flag);
 mal_export char **getHelpMatch(char *pat);
 mal_export void showHelp(Module m, str txt,stream *fs);
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to