Update of /cvsroot/monetdb/MonetDB5/src/mal
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv8247

Modified Files:
        mal_instruction.mx 
Log Message:
Reduce the storage space of variable records with 8 bytes.
Still 56 left.


Index: mal_instruction.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/mal/mal_instruction.mx,v
retrieving revision 1.290
retrieving revision 1.291
diff -u -d -r1.290 -r1.291
--- mal_instruction.mx  25 Dec 2007 13:08:47 -0000      1.290
+++ mal_instruction.mx  27 Dec 2007 17:13:14 -0000      1.291
@@ -318,7 +318,6 @@
 typedef struct VARRECORD {
        str name;               /* argname or lexical value repr */
        malType type;           /* internal type signature */
-       int gdktype;            /* for backend */
        bit isaconstant;        /* value cannot change */
        bit isatypevar;         /* denotes a type variable */
        bit fixtype;            /* the type has been fixed */
@@ -440,7 +439,7 @@
 #define isTypeVar(M,I)  ((M)->var[I]->isatypevar)
 #define isTmpVar(M,I)   (!(M)->var[I]->name || *(M)->var[I]->name == TMPMARKER)
 #define getVarType(M,I)     ((M)->var[I]->type)
-#define getVarGDKType(M,I)      ((M)->var[I]->gdktype)
+#define getVarGDKType(M,I)      getGDKType((M)->var[I]->type)
 #define getVarScope(M,I)   ((M)->var[I]->scope)
 
 #define isFixed(M,I)        ((M)->var[I]->fixtype)
@@ -477,6 +476,7 @@
 mal_export void freeSymbol(Symbol s);
 mal_export void freeSymbolList(Symbol s);
 mal_export void printSignature(stream *fd, Symbol s, int flg);
+mal_export int getGDKType(int tpe);
 
 mal_export MalBlkPtr newMalBlk(int maxvars, int maxstmts);
 mal_export void resetMalBlk(MalBlkPtr mb, int stop);
@@ -1357,7 +1357,6 @@
                GDKfree((str)mb->var);
                mb->vsize= s;
                mb->var= new;
-               mb->var[mb->vtop-1]->gdktype= TYPE_void;
        }
 @c
 int
@@ -1488,7 +1487,6 @@
        w = (VarPtr) GDKzalloc(sizeof(VarRecord) + v->maxprop * sizeof(short));
        w->name = v->name ? GDKstrdup(v->name) : 0;
        w->type = v->type;
-       w->gdktype = v->gdktype;
        w->cleanup = v->cleanup;
        w->fixtype = v->fixtype;
        w->isudftype = v->isudftype;
@@ -1546,7 +1544,6 @@
                VALclear(&v->value);
        v->name = 0;
        v->type = 0;
-       v->gdktype = 0;
        v->cleanup = 0;
        v->fixtype = 0;
        v->isudftype = 0;
@@ -1947,6 +1944,11 @@
                p->retc--;
 }
 
+int
+getGDKType(int tpe){
+       return tpe <= TYPE_str ? tpe : (tpe == TYPE_any ? TYPE_void : 
findGDKtype(tpe));
+}
+
 void
 setVarType(MalBlkPtr mb, int i, int tpe)
 {
@@ -1954,7 +1956,6 @@
        v = mb->var[i];
 
        v->type = tpe;
-       v->gdktype = tpe <= TYPE_str ? tpe : (tpe == TYPE_any ? TYPE_void : 
findGDKtype(tpe));
 }
 
 @-
@@ -1977,7 +1978,6 @@
                !isExceptionVariable(mb->var[i]->name)){
                setVarType(mb,i,TYPE_any);
                setVarCleanup(mb,i) = FALSE;
-               mb->var[i]->gdktype= TYPE_void;
                mb->var[i]->fixtype= 0;
        }
        for(i=1; i<mb->stop-1; i++){
@@ -2800,7 +2800,7 @@
                        } else {
                                bit t = TRUE;
                                VALset(&varTrue.value, TYPE_bit, &t);
-                               varTrue.gdktype = varTrue.type = TYPE_bit;
+                               varTrue.type = TYPE_bit;
                                return &varTrue;
                        }
                }


-------------------------------------------------------------------------
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

Reply via email to