Changeset: 8b68c506c418 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=8b68c506c418
Modified Files:
monetdb5/mal/mal.c
monetdb5/mal/mal_instruction.c
monetdb5/mal/mal_instruction.h
Branch: malparsing
Log Message:
Removed unused function
diffs (72 lines):
diff --git a/monetdb5/mal/mal.c b/monetdb5/mal/mal.c
--- a/monetdb5/mal/mal.c
+++ b/monetdb5/mal/mal.c
@@ -144,6 +144,7 @@ void mserver_reset(int exit)
mal_dataflow_reset();
THRdel(mal_clients->mythread);
GDKfree(mal_clients->errbuf);
+ mal_clients->fdin->s = NULL;
bstream_destroy(mal_clients->fdin);
mal_clients->fdin = 0;
GDKfree(mal_clients->prompt);
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
@@ -1322,46 +1322,6 @@ delArgument(InstrPtr p, int idx)
p->retc--;
}
-/* Cleaning a variable type by setting it to TYPE_any possibly
- * invalidates all other type derivations in the program. Beware of
- * the exception variables. They are globally known. */
-void
-clrAllTypes(MalBlkPtr mb)
-{
- int i;
- InstrPtr p;
-
- p = getInstrPtr(mb, 0);
-
- for (i = p->argc; i < mb->vtop; i++)
- if (!isVarUDFtype(mb, i) && isVarUsed(mb, i) &&
!isVarTypedef(mb, i) && !isVarConstant(mb, i) && !isExceptionVariable(
getVarName(mb,i)) ) {
- setVarType(mb, i, TYPE_any);
- clrVarCleanup(mb, i);
- clrVarFixed(mb, i);
- }
- for (i = 1; i < mb->stop - 1; i++) {
- p = getInstrPtr(mb, i);
- p->typechk = TYPE_UNKNOWN;
- p->fcn = 0;
- p->blk = NULL;
-
- switch (p->token) {
- default:
- p->token = ASSIGNsymbol;
- case RAISEsymbol:
- case CATCHsymbol:
- case RETURNsymbol:
- case LEAVEsymbol:
- case YIELDsymbol:
- case EXITsymbol:
- case NOOPsymbol:
- break;
- case ENDsymbol:
- return;
- }
- }
-}
-
void
setArgType(MalBlkPtr mb, InstrPtr p, int i, int tpe)
{
diff --git a/monetdb5/mal/mal_instruction.h b/monetdb5/mal/mal_instruction.h
--- a/monetdb5/mal/mal_instruction.h
+++ b/monetdb5/mal/mal_instruction.h
@@ -178,7 +178,6 @@ mal_export InstrPtr setArgument(MalBlkPt
mal_export InstrPtr pushReturn(MalBlkPtr mb, InstrPtr p, int varid);
mal_export InstrPtr pushArgumentId(MalBlkPtr mb, InstrPtr p, const char *name);
mal_export void delArgument(InstrPtr p, int varid);
-mal_export void clrAllTypes(MalBlkPtr mb);
mal_export void setArgType(MalBlkPtr mb, InstrPtr p, int i, int tpe);
mal_export void setReturnArgument(InstrPtr p, int varid);
mal_export malType destinationType(MalBlkPtr mb, InstrPtr p);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list