Update of /cvsroot/monetdb/MonetDB5/src/compiler
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv25089/compiler
Modified Files:
mal_compiler.mx
Log Message:
preparing for handling multiplexed inline functions.
minor code cleanup, saving 1.5 page of code.
Index: mal_compiler.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/compiler/mal_compiler.mx,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- mal_compiler.mx 17 Oct 2007 14:24:22 -0000 1.23
+++ mal_compiler.mx 24 Dec 2007 12:28:24 -0000 1.24
@@ -797,7 +797,6 @@
str
MCdynamicCompiler(MalBlkPtr mb, MalStkPtr stk, InstrPtr p)
{
- Module s;
Symbol t;
str alias;
str nme, fcn, msg = MAL_SUCCEED;
@@ -812,13 +811,10 @@
printf("MCdynamicCompiler: %s.%s\n", nme, fcn);
#endif
- s = findModule(MCgetClient()->nspace, nme);
- if( s){
- t= findSymbolInModule(s,fcn);
- if(t== 0)
- throw(MAL,"compiler.MALtoC","Could not find function");
- msg= mccGenerate(t->def,alias);
- }
+ t= findSymbol(putName(nme,strlen(nme)),fcn);
+ if(t== 0)
+ throw(MAL,"compiler.MALtoC","Could not find function");
+ msg= mccGenerate(t->def,alias);
#ifdef DEBUG_MAL_COMPILER
mccDump();
#endif
@@ -827,23 +823,19 @@
str
MCloadFunction(int *ret, str *mod, str *fcn, str *fname){
- Module s;
Symbol t;
InstrPtr sig;
char buf[1024];
- s = findModule(MCgetClient()->nspace, *mod);
- if( s){
- t= findSymbolInModule(s, *fcn);
- if(t== 0)
- throw(MAL,"compiler.load","Could not find function");
- loadLibrary(*fname,FALSE);
- snprintf(buf,1024,"MCC%s_%s", *mod,*fcn);
- sig=getInstrPtr(t->def,0);
- sig->fcn = getAddress(*fname,*mod, buf,0);
- if(sig->fcn)
- sig->token= COMMANDsymbol;
- }
+ t= findSymbol(putName(*mod, strlen(*mod)), *fcn);
+ if(t== 0)
+ throw(MAL,"compiler.load","Could not find function");
+ loadLibrary(*fname,FALSE);
+ snprintf(buf,1024,"MCC%s_%s", *mod,*fcn);
+ sig=getInstrPtr(t->def,0);
+ sig->fcn = getAddress(*fname,*mod, buf,0);
+ if(sig->fcn)
+ sig->token= COMMANDsymbol;
(void) ret;
return MAL_SUCCEED;
}
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins