Update of /cvsroot/monetdb/MonetDB/src/gdk
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv28589/src/gdk
Modified Files:
gdk_scanselect.mx
Log Message:
work around gcc bug, handle void (vid) more as a special case.
Index: gdk_scanselect.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB/src/gdk/gdk_scanselect.mx,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- gdk_scanselect.mx 9 Jan 2008 15:12:04 -0000 1.46
+++ gdk_scanselect.mx 9 Jan 2008 23:33:37 -0000 1.47
@@ -223,8 +223,9 @@
ATOMfix(tpe, src); \
}
@h
-#define SIMPLE_PUT(sh,tpe,hp,dst,p,src) { ((tpe*)(dst))[p] = *(tpe*) (ptr)
(src); }
+#define SIMPLE_PUT(sh,tpe,hp,dst,p,src) ((tpe*)(dst))[p] = *(tpe*)(ptr)(src);
#define VOID_PUT(sh,tpe,hp,dst,p,src) {}
+#define VID_PUT(sh,tpe,hp,dst,p,src) ((oid*)(dst))[p] = src;
@-
Type-specific
@@ -279,6 +280,7 @@
@:H_BUNfastins(sht,SIMPLE,sht)@
@:H_BUNfastins(int,SIMPLE,int)@
@:H_BUNfastins(lng,SIMPLE,lng)@
+@:H_BUNfastins(vid,VID,vid)@
@:H_BUNfastins(fix,FIXEDATOM,(b)->htype)@
@:H_BUNfastins(var,VARATOM,(b)->htype)@
@@ -362,14 +364,6 @@
For backward compatibility:
(also to be move to gdk.mx and gdk_bat.mx, respectively)
@h
-/*
-#define bunfastins_nocheck(b, p, h, t, s) anyany_bunfastins_nocheck(b, p, h,
t, s)
-#define bunfastins(b, h, t) anyany_bunfastins(b, h, t)
-
-BAT *BUNfastins(BAT *b, ptr h, ptr t) {
- return anyany_BUNfastins(b,h,t);
-}
-*/
BAT *BAT_scanselect(BAT *b, BAT *bn, ptr tl, ptr th, bit li, bit hi, int equi,
int lval, int hval, int nocheck);
@@ -401,10 +395,12 @@
BUN p,q;
int t = b->ttype;
ptr nil = ATOMnilptr(t);
+ oid oid_ctr = b->hseqbase - BUNfirst(b);
(void) nil;
(void) tl;
(void) th;
+ (void) oid_ctr;
@= seqscanEpilogue
if (!bn->batDirty)
bn->batDirty = TRUE;
@@ -451,13 +447,11 @@
*/
@= DEFseqscan
-/* Parameter "oid_ctr" is only used to hand-over the base oid in case we
- * generate a oid head from a void head.
- * Parameter "str_idx" is only used to hand-over the integer index for
+/* Parameter "str_idx" is only used to hand-over the integer index for
* equi-str-selects.
*/
static BAT *
[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED](BAT* b, BAT* bn, ptr tl,
ptr th, oid oid_ctr, var_t str_idx)
[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED](BAT* b, BAT* bn, ptr tl,
ptr th, var_t str_idx)
{
BATiter bi = bat_iterator(b);
REGISTER BUN _p = BUNlast(bn);
@@ -468,7 +462,7 @@
ptr v = [EMAIL PROTECTED](bi, p);
@4 {
- @[EMAIL PROTECTED](bn, _p, (void *) (@8), @5);
+ @[EMAIL PROTECTED](bn, _p, @8, @5);
_p++;
}
@9
@@ -478,7 +472,7 @@
}
static BAT *
[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED](BAT* b, BAT* bn, ptr tl,
ptr th, oid oid_ctr, var_t str_idx)
[EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED](BAT* b, BAT* bn, ptr tl,
ptr th, var_t str_idx)
{
BATiter bi = bat_iterator(b);
@:seqscanPrologue@
@@ -488,7 +482,7 @@
ptr v = [EMAIL PROTECTED](bi, p);
@4 {
- @[EMAIL PROTECTED](bn, (void *) (@8), @5);
+ @[EMAIL PROTECTED](bn, @8, @5);
}
@9
}
@@ -496,9 +490,9 @@
}
@= seqscan
if (nocheck) {
- return [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED](b,
bn, tl, th, oid_ctr, str_idx);
+ return [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED](b,
bn, tl, th, str_idx);
} else {
- return [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED](b,
bn, tl, th, oid_ctr, str_idx);
+ return [EMAIL PROTECTED]@[EMAIL PROTECTED]@[EMAIL PROTECTED](b,
bn, tl, th, str_idx);
}
@-
@@ -624,19 +618,13 @@
*/
@= DEFseqscanHTget
@:DEFseqscan(@1,@2,@3,@4,@5,void,void,&oid_ctr,)@
-#if SIZEOF_OID == SIZEOF_INT && !defined(NOEXPAND_INT)
- @:DEFseqscanTTput(@1,@2,@3,@4,@5,oid,int,&oid_ctr,oid_ctr++;)@
-#elif SIZEOF_OID == SIZEOF_LNG && !defined(NOEXPAND_LNG)
- @:DEFseqscanTTput(@1,@2,@3,@4,@5,oid,lng,&oid_ctr,oid_ctr++;)@
-#else
- @:DEFseqscanTTput(@1,@2,@3,@4,@5,oid,fix,&oid_ctr,oid_ctr++;)@
-#endif /* SIZEOF_OID == SIZEOF_INT */
+ @:DEFseqscanTTput(@1,@2,@3,@4,@5,oid,vid,oid_ctr,oid_ctr++;)@
@:DEFseqscanHTput(@1,@2,@3,@4,@5)@
@= seqscanHTget
if (BAThvoid(b)) {
/* input-head is void. we decide here, whether output-head
* sould be void or oid, and skip seqscanHTput */
- oid_ctr = b->hseqbase;
+ oid oid_ctr = b->hseqbase;
if (oid_ctr == oid_nil) {
/* avoid computing BUNpos many times over
* output-head is void, hence output-tail cannot be
void,
@@ -644,13 +632,7 @@
@:seqscan(@1,@2,@3,@4,@5,void,void,&oid_ctr,)@
} else {
/* increment instead of compute BUNpos */
-#if SIZEOF_OID == SIZEOF_INT && !defined(NOEXPAND_INT)
-
@:seqscanTTput(@1,@2,@3,@4,@5,oid,int,&oid_ctr,oid_ctr++;)@
-#elif SIZEOF_OID == SIZEOF_LNG && !defined(NOEXPAND_LNG)
-
@:seqscanTTput(@1,@2,@3,@4,@5,oid,lng,&oid_ctr,oid_ctr++;)@
-#else
-
@:seqscanTTput(@1,@2,@3,@4,@5,oid,fix,&oid_ctr,oid_ctr++;)@
-#endif
+
@:seqscanTTput(@1,@2,@3,@4,@5,oid,vid,oid_ctr,oid_ctr++;)@
}
} else {
/* output-head is identical to input-head. */
@@ -828,7 +810,6 @@
#endif
#endif
var_t str_idx = 0;
- oid oid_ctr = (oid) 0;
@:seqscanTTget@
-------------------------------------------------------------------------
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