Update of /cvsroot/monetdb/MonetDB5/src/mal
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv10448
Modified Files:
mal_instruction.mx mal_parser.mx
Log Message:
Simplify running MAL programs gathered from traces and SQL compilations,
by turning the TMPMARKER of parsed identifiers into a REFMARKER during the
parse.
A better way is to separate out completely the property of being a
temporary from its name. [TODO]
Index: mal_parser.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/mal/mal_parser.mx,v
retrieving revision 1.212
retrieving revision 1.213
diff -u -d -r1.212 -r1.213
--- mal_parser.mx 20 Jan 2008 08:26:52 -0000 1.212
+++ mal_parser.mx 24 Jan 2008 11:55:17 -0000 1.213
@@ -186,6 +186,9 @@
if (!idCharacter[(int) (*s)])
return 0;
+ /* avoid a clash with old temporaries */
+ if( s[0]== TMPMARKER)
+ s[0]= REFMARKER;
/* prepare escape of temporary names */
s++;
while (idCharacter2[(int) (*s)] )
@@ -219,6 +222,9 @@
str s= GDKmalloc(length+1);
memcpy(s, CURRENT(cntxt),(size_t) length);
s[length]=0;
+ /* avoid a clash with old temporaries */
+ if( s[0]== TMPMARKER)
+ s[0]= REFMARKER;
advance(cntxt,length);
return s;
}
Index: mal_instruction.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/mal/mal_instruction.mx,v
retrieving revision 1.296
retrieving revision 1.297
diff -u -d -r1.296 -r1.297
--- mal_instruction.mx 11 Jan 2008 10:41:32 -0000 1.296
+++ mal_instruction.mx 24 Jan 2008 11:55:17 -0000 1.297
@@ -439,7 +439,7 @@
#define getVar(M,I) (M)->var[I]
#define getVarTmp(M,I) (M)->var[I]->tmpindex
-#define isTmpVar(M,I) (!(M)->var[I]->name || *(M)->var[I]->name == TMPMARKER)
+#define isTmpVar(M,I) ((M)->var[I]->tmpindex)
#define getVarType(M,I) ((M)->var[I]->type)
#define getVarGDKType(M,I) getGDKType((M)->var[I]->type)
@-
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins