Changeset: c06e6854351f for MonetDB URL: https://dev.monetdb.org/hg/MonetDB/rev/c06e6854351f Removed Files: monetdb5/mal/Tests/tst009.maltest monetdb5/modules/mal/Tests/call00.maltest monetdb5/modules/mal/Tests/callfunction.maltest monetdb5/modules/mal/Tests/callstring.maltest monetdb5/modules/mal/Tests/register00.maltest Modified Files: clients/Tests/MAL-signatures-hge.test clients/Tests/MAL-signatures.test clients/Tests/exports.stable.out monetdb5/mal/mal_import.c monetdb5/mal/mal_import.h monetdb5/modules/mal/language.c Branch: default Log Message:
Removed a bunch of unused MAL functions in the language module. diffs (truncated from 795 to 300 lines): diff --git a/clients/Tests/MAL-signatures-hge.test b/clients/Tests/MAL-signatures-hge.test --- a/clients/Tests/MAL-signatures-hge.test +++ b/clients/Tests/MAL-signatures-hge.test @@ -46019,66 +46019,11 @@ command json.values(X_0:json):bat[:json] JSONvalueTable; Expands the outermost JSON values. language -assert -unsafe command language.assert(X_0:bit, X_1:str):void -MALassertBit; -(empty) -language -assert -unsafe command language.assert(X_0:hge, X_1:str):void -MALassertHge; -(empty) -language -assert -unsafe command language.assert(X_0:int, X_1:str):void -MALassertInt; -(empty) -language -assert -unsafe command language.assert(X_0:lng, X_1:str):void -MALassertLng; -(empty) -language -assert -unsafe command language.assert(X_0:oid, X_1:str):void -MALassertOid; -(empty) -language -assert -unsafe command language.assert(X_0:sht, X_1:str):void -MALassertSht; -(empty) -language -assert -unsafe command language.assert(X_0:str, X_1:str):void -MALassertStr; -(empty) -language -assert -unsafe pattern language.assert(X_0:any_1, X_1:str, X_2:str, X_3:any_2):void -MALassertTriple; -Assertion test. -language block pattern language.block(X_0:int, X_1:any...):int deblockdataflow; Block on availability of all variables w, and then pass on v language -call -pattern language.call(X_0:bat[:str]):void -CMDcallBAT; -Evaluate a program stored in a BAT. -language -call -pattern language.call(X_0:str, X_1:str):void -CMDcallFunction; -(empty) -language -call -pattern language.call(X_0:str):void -CMDcallString; -Evaluate a MAL string program. -language dataflow pattern language.dataflow():bit MALstartDataflow; @@ -46088,26 +46033,6 @@ pass pattern language.pass(X_0:any_1):void MALpass; Cheap instruction to disgard storage while retaining the dataflow dependency -language -raise -unsafe command language.raise(X_0:str):str -CMDraise; -Raise an exception labeled @with a specific message. -language -register -pattern language.register(X_0:str, X_1:str, X_2:str, X_3:str):void -CMDregisterFunction; -Compile the code string to MAL and register it as a function. -language -sink -pattern language.sink(X_0:any...):void -MALgarbagesink; -Variables to be considered together when triggering garbage collection.@Used in the dataflow blocks to avoid early release of values. -language -source -pattern language.source(X_0:str):void -CMDevalFile; -Merge the instructions stored in the file with the current program. logging compinfo pattern logging.compinfo() (X_0:bat[:int], X_1:bat[:str], X_2:bat[:str]) diff --git a/clients/Tests/MAL-signatures.test b/clients/Tests/MAL-signatures.test --- a/clients/Tests/MAL-signatures.test +++ b/clients/Tests/MAL-signatures.test @@ -34454,61 +34454,11 @@ command json.values(X_0:json):bat[:json] JSONvalueTable; Expands the outermost JSON values. language -assert -unsafe command language.assert(X_0:bit, X_1:str):void -MALassertBit; -(empty) -language -assert -unsafe command language.assert(X_0:int, X_1:str):void -MALassertInt; -(empty) -language -assert -unsafe command language.assert(X_0:lng, X_1:str):void -MALassertLng; -(empty) -language -assert -unsafe command language.assert(X_0:oid, X_1:str):void -MALassertOid; -(empty) -language -assert -unsafe command language.assert(X_0:sht, X_1:str):void -MALassertSht; -(empty) -language -assert -unsafe command language.assert(X_0:str, X_1:str):void -MALassertStr; -(empty) -language -assert -unsafe pattern language.assert(X_0:any_1, X_1:str, X_2:str, X_3:any_2):void -MALassertTriple; -Assertion test. -language block pattern language.block(X_0:int, X_1:any...):int deblockdataflow; Block on availability of all variables w, and then pass on v language -call -pattern language.call(X_0:bat[:str]):void -CMDcallBAT; -Evaluate a program stored in a BAT. -language -call -pattern language.call(X_0:str, X_1:str):void -CMDcallFunction; -(empty) -language -call -pattern language.call(X_0:str):void -CMDcallString; -Evaluate a MAL string program. -language dataflow pattern language.dataflow():bit MALstartDataflow; @@ -34518,26 +34468,6 @@ pass pattern language.pass(X_0:any_1):void MALpass; Cheap instruction to disgard storage while retaining the dataflow dependency -language -raise -unsafe command language.raise(X_0:str):str -CMDraise; -Raise an exception labeled @with a specific message. -language -register -pattern language.register(X_0:str, X_1:str, X_2:str, X_3:str):void -CMDregisterFunction; -Compile the code string to MAL and register it as a function. -language -sink -pattern language.sink(X_0:any...):void -MALgarbagesink; -Variables to be considered together when triggering garbage collection.@Used in the dataflow blocks to avoid early release of values. -language -source -pattern language.source(X_0:str):void -CMDevalFile; -Merge the instructions stored in the file with the current program. logging compinfo pattern logging.compinfo() (X_0:bat[:int], X_1:bat[:str], X_2:bat[:str]) diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out --- a/clients/Tests/exports.stable.out +++ b/clients/Tests/exports.stable.out @@ -869,7 +869,6 @@ const char *bpmRef; const char *bstreamRef; const char *calcRef; str callMAL(Client cntxt, MalBlkPtr mb, MalStkPtr *glb, ValPtr argv[], char debug); -str callString(Client c, str s, int listing); const char *capiRef; const char *catalogRef; str chkDeclarations(MalBlkPtr mb); @@ -960,7 +959,6 @@ void dumpModules(stream *out); const char *emptybindRef; const char *emptybindidxRef; const char *eqRef; -str evalFile(str fname, int listing); const char *evalRef; const char *execRef; const char *expandRef; diff --git a/monetdb5/mal/Tests/tst009.maltest b/monetdb5/mal/Tests/tst009.maltest deleted file mode 100644 --- a/monetdb5/mal/Tests/tst009.maltest +++ /dev/null @@ -1,20 +0,0 @@ -query T nosort -language.call("io.print(1);"); ----- -1 - -query T nosort -language.call("io.print(\"hello\");"); ----- -"hello" - -query T nosort -language.call("s:=\"goodbye\";io.print(s);"); ----- -"goodbye" - -query T nosort -language.call("language.call(\"io.print(\\\\\"hello\\\\\");\");"); ----- -"hello" - diff --git a/monetdb5/mal/mal_import.c b/monetdb5/mal/mal_import.c --- a/monetdb5/mal/mal_import.c +++ b/monetdb5/mal/mal_import.c @@ -253,78 +253,6 @@ malInclude(Client c, const char *name, i return msg; } -/*File and input processing - * A recurring situation is to execute a stream of simple MAL instructions - * stored on a file or comes from standard input. We parse one MAL - * instruction line at a time and attempt to execute it immediately. - * Note, this precludes entering complex MAL structures on the primary - * input channel, because 1) this requires complex code to keep track - * that we are in 'definition mode' 2) this requires (too) careful - * typing by the user, because he cannot make a typing error - * - * Therefore, all compound code fragments should be loaded and executed - * using the evalFile and callString command. It will parse the complete - * file into a MAL program block and execute it. - * - * Running looks much like an Import operation, except for the execution - * phase. This is performed in the context of an a priori defined - * stack frame. Life becomes a little complicated when the script contains - * a definition. - */ -str -evalFile(str fname, int listing) -{ - Client c, c_old; - stream *fd; - str filename; - str msg = MAL_SUCCEED; - bstream *bs; - - filename = malResolveFile(fname); - if (filename == NULL) - throw(MAL, "mal.eval","could not open file: %s\n", fname); - fd = malOpenSource(filename); - GDKfree(filename); - if (fd == 0 || mnstr_errnr(fd) == MNSTR_OPEN_ERROR) { - if (fd) - close_stream(fd); - throw(MAL,"mal.eval", "WARNING: could not open file '%s'\n", fname); - } - if (!(bs = bstream_create(fd, 128 * BLOCK))) { - if (fd) - close_stream(fd); - throw(MAL,"mal.eval",SQLSTATE(HY013) MAL_MALLOC_FAIL); - } - c_old = setClientContext(NULL); // save context - c = MCinitClient(MAL_ADMIN, bs, 0); - if( c == NULL){ - throw(MAL,"mal.eval","Can not create user context"); - } - c->curmodule = c->usermodule = userModule(); - if(c->curmodule == NULL) { - MCcloseClient(c); - setClientContext(c_old); // restore context - throw(MAL,"mal.eval",SQLSTATE(HY013) MAL_MALLOC_FAIL); - } - c->promptlength = 0; - c->listing = listing; - - if ( (msg = defaultScenario(c)) ) { - MCcloseClient(c); - setClientContext(c_old); // restore context - return msg; _______________________________________________ checkin-list mailing list -- checkin-list@monetdb.org To unsubscribe send an email to checkin-list-le...@monetdb.org