Changeset: 15558a41f3d2 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/15558a41f3d2
Modified Files:
        gdk/gdk_atoms.h
        gdk/gdk_bat.c
        gdk/gdk_batop.c
Branch: no_type_bat
Log Message:

Completely remove atomFix/atomUnfix.


diffs (79 lines):

diff --git a/gdk/gdk_atoms.h b/gdk/gdk_atoms.h
--- a/gdk/gdk_atoms.h
+++ b/gdk/gdk_atoms.h
@@ -53,9 +53,6 @@ typedef struct {
        gdk_return (*atomWrite) (const void *src, stream *s, size_t cnt);
        int (*atomCmp) (const void *v1, const void *v2);
        BUN (*atomHash) (const void *v);
-       /* optional functions */
-       gdk_return (*atomFix) (const void *atom);
-       gdk_return (*atomUnfix) (const void *atom);
 
        /* varsized atom-only ADT functions */
        var_t (*atomPut) (BAT *, var_t *off, const void *src);
diff --git a/gdk/gdk_bat.c b/gdk/gdk_bat.c
--- a/gdk/gdk_bat.c
+++ b/gdk/gdk_bat.c
@@ -775,9 +775,7 @@ wrongtype(int t1, int t2)
                        if (ATOMvarsized(t1) ||
                            ATOMvarsized(t2) ||
                            t1 == TYPE_msk || t2 == TYPE_msk ||
-                           ATOMsize(t1) != ATOMsize(t2) ||
-                           BATatoms[t1].atomFix ||
-                           BATatoms[t2].atomFix)
+                           ATOMsize(t1) != ATOMsize(t2))
                                return true;
                }
        }
@@ -898,7 +896,7 @@ COLcopy(BAT *b, int tt, bool writable, r
                                bn->batCapacity = (BUN) (bn->theap->size >> 
bn->tshift);
                        else
                                bn->batCapacity = 0;
-               } else if (BATatoms[tt].atomFix || tt != TYPE_void || 
ATOMextern(tt)) {
+               } else if (tt != TYPE_void || ATOMextern(tt)) {
                        /* case (4): one-by-one BUN insert (really slow) */
                        QryCtx *qry_ctx = MT_thread_get_qry_ctx();
 
@@ -2543,9 +2541,7 @@ BATmode(BAT *b, bool transient)
 
        if (transient != bi.transient) {
                if (!transient) {
-                       if (ATOMisdescendant(b->ttype, TYPE_ptr) ||
-                           BATatoms[b->ttype].atomUnfix ||
-                           BATatoms[b->ttype].atomFix) {
+                       if (ATOMisdescendant(b->ttype, TYPE_ptr)) {
                                GDKerror("%s type implies that %s[%s] "
                                         "cannot be made persistent.\n",
                                         ATOMname(b->ttype), BATgetId(b),
diff --git a/gdk/gdk_batop.c b/gdk/gdk_batop.c
--- a/gdk/gdk_batop.c
+++ b/gdk/gdk_batop.c
@@ -432,7 +432,7 @@ append_varsized_bat(BAT *b, BATiter *ni,
                        BBPrelease(oh->parentid);
                HEAPdecref(oh, false);
        }
-       if (BATcount(b) == 0 && BATatoms[b->ttype].atomFix == NULL &&
+       if (BATcount(b) == 0 &&
            ci->tpe == cand_dense && ci->ncand == ni->count) {
                /* just copy the heaps */
                MT_lock_set(&b->theaplock);
@@ -926,8 +926,7 @@ BATappend2(BAT *b, BAT *n, BAT *s, bool 
                }
                MT_rwlock_wrlock(&b->thashlock);
                hlocked = true;
-               if (BATatoms[b->ttype].atomFix == NULL &&
-                   b->ttype != TYPE_void &&
+               if (b->ttype != TYPE_void &&
                    ni.type != TYPE_void &&
                    ci.tpe == cand_dense) {
                        /* use fast memcpy if we can */
@@ -1898,8 +1897,7 @@ BATslice(BAT *b, BUN l, BUN h)
 
                if (bn->ttype == TYPE_void) {
                        BATsetcount(bn, h - l);
-               } else if (bn->tvheap == NULL &&
-                          BATatoms[bn->ttype].atomFix == NULL) {
+               } else if (bn->tvheap == NULL) {
                        assert(BATatoms[bn->ttype].atomPut == NULL);
                        memcpy(Tloc(bn, 0), (const char *) bi.base + (p << 
bi.shift),
                               (q - p) << bn->tshift);
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to