Update of /cvsroot/monetdb/MonetDB4/src/modules/plain
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv9402/src/modules/plain

Modified Files:
        algebra.mx ascii_io.mx 
Log Message:
work around gcc compiler bug. It seems that inlining a the Tpos function
is to much for gcc with -g -O2, so we hand inline it.


Index: ascii_io.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB4/src/modules/plain/ascii_io.mx,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- ascii_io.mx 14 Dec 2007 12:01:18 -0000      1.18
+++ ascii_io.mx 9 Jan 2008 22:52:29 -0000       1.19
@@ -324,7 +324,6 @@
 void_bat_create(int adt, size_t nr)
 {
        BAT *b = BATnew(TYPE_void, adt, BATTINY);
-       BAT *bm = NULL;
 
        /* check for correct structures */
        if (b == NULL)
@@ -339,12 +338,11 @@
                return b;
 
        /* disable all properties here */
-       bm = BBP_cache(-b->batCacheid);
        b->tsorted = FALSE;
        b->T->nosorted = 0;
        b->tdense = FALSE;
        b->T->nodense = 0;
-       b->tkey = bm->hkey = FALSE;
+       b->tkey = FALSE;
        b->T->nokey[0] = 0;
        b->T->nokey[1] = 1;
        return b;

Index: algebra.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB4/src/modules/plain/algebra.mx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- algebra.mx  30 Dec 2007 18:05:01 -0000      1.8
+++ algebra.mx  9 Jan 2008 22:52:29 -0000       1.9
@@ -2077,7 +2077,7 @@
                return GDK_FAIL;
        }
        i += BUNfirst(b);
-       @:putTail((size_t)i)@
+       @:putTail((BUN)i)@
 @= putTail
        if (b->ttype && b->theap) {
                ptr _src = BUNtvar(bi,@1);/*b->theap->base + *(var_t*) 
BUNtloc(bi,@1);*/
@@ -2089,19 +2089,23 @@
                int _s = ATOMsize(ATOMtype(b->ttype));
                if (ATOMvarsized(b->ttype)) {
                        memcpy(*(ptr*) ret=GDKmalloc(_s), BUNtvar(bi, @1), _s);
+               } else if (b->ttype == TYPE_void) {
+                       *(oid*) ret = b->tseqbase;
+                       if (b->tseqbase != oid_nil)
+                               *(oid*)ret += @1 - BUNfirst(b);
                } else if (b->ttype == TYPE_bat) {
-                       bat bid = *(bat*) BUNtloc(bi, @1);
+                       bat bid = *(bat*) Tloc(b, @1);
                        *(BAT**) ret = BATdescriptor(bid);
                } else if (_s == 4) {
-                       *(int*) ret = *(int*) BUNtail(bi, @1);
+                       *(int*) ret = *(int*) Tloc(b, @1);
                } else if (_s == 1) {
-                       *(bte*) ret = *(bte*) BUNtail(bi, @1);
+                       *(bte*) ret = *(bte*) Tloc(b, @1);
                } else if (_s == 2) {
-                       *(sht*) ret = *(sht*) BUNtail(bi, @1);
+                       *(sht*) ret = *(sht*) Tloc(b, @1);
                } else if (_s == 8) {
-                       *(lng*) ret = *(lng*) BUNtail(bi, @1);
+                       *(lng*) ret = *(lng*) Tloc(b, @1);
                } else {
-                       memcpy(ret, BUNtloc(bi, @1), _s);
+                       memcpy(ret, Tloc(b, @1), _s);
                }
        }
 @c


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins

Reply via email to