Changeset: c55c3babe3d6 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/c55c3babe3d6
Modified Files:
MonetDB.spec
Branch: default
Log Message:
Merge with Dec2025 branch.
diffs (truncated from 622 to 300 lines):
diff --git a/MonetDB.spec b/MonetDB.spec
--- a/MonetDB.spec
+++ b/MonetDB.spec
@@ -864,7 +864,7 @@ package. You probably don't need this,
Summary: MonetDB - Monet Database Management System
Group: Applications/Databases
Requires: %{name}-client-tests = %{version}-%{release}
-Requires: python3dist(pymonetdb)
+Requires: python3dist(pymonetdb) >= 1.9
BuildArch: noarch
%endif
diff --git a/clients/Tests/MAL-signatures-hge.test
b/clients/Tests/MAL-signatures-hge.test
--- a/clients/Tests/MAL-signatures-hge.test
+++ b/clients/Tests/MAL-signatures-hge.test
@@ -49064,11 +49064,6 @@ pattern optimizer.nomitosispipe(X_0:str,
OPTwrapper
Fast compound optimizer pipe without mitosis
optimizer
-optimize
-pattern optimizer.optimize(X_0:str, X_1:str):void
-QOToptimize
-Optimize a specific operation
-optimizer
postfix
pattern optimizer.postfix():str
OPTwrapper
diff --git a/clients/Tests/MAL-signatures.test
b/clients/Tests/MAL-signatures.test
--- a/clients/Tests/MAL-signatures.test
+++ b/clients/Tests/MAL-signatures.test
@@ -37544,11 +37544,6 @@ pattern optimizer.nomitosispipe(X_0:str,
OPTwrapper
Fast compound optimizer pipe without mitosis
optimizer
-optimize
-pattern optimizer.optimize(X_0:str, X_1:str):void
-QOToptimize
-Optimize a specific operation
-optimizer
postfix
pattern optimizer.postfix():str
OPTwrapper
diff --git a/clients/Tests/exports.stable.out b/clients/Tests/exports.stable.out
--- a/clients/Tests/exports.stable.out
+++ b/clients/Tests/exports.stable.out
@@ -572,7 +572,6 @@ const char *ma_name(allocator *sa);
allocator_state ma_open(allocator *sa);
void *ma_realloc(allocator *sa, void *ptr, size_t sz, size_t osz);
void ma_reset(allocator *sa);
-size_t ma_size(allocator *sa);
char *ma_strconcat(allocator *sa, const char *s1, const char *s2);
char *ma_strdup(allocator *sa, const char *s);
char *ma_strndup(allocator *sa, const char *s, size_t l);
@@ -1096,7 +1095,6 @@ const char mitosisRef[];
const char mmathRef[];
const char modRef[];
char monet_cwd[FILENAME_MAX];
-void moveInstruction(MalBlkPtr mb, int pc, int target);
const char mtimeRef[];
const char mulRef[];
const char multiplexRef[];
@@ -1193,8 +1191,6 @@ const char registerRef[];
const char register_supervisorRef[];
const char remapRef[];
const char remoteRef[];
-void removeInstruction(MalBlkPtr mb, InstrPtr p);
-void removeInstructionBlock(MalBlkPtr mb, int pc, int cnt);
const char rename_columnRef[];
const char rename_schemaRef[];
const char rename_tableRef[];
diff --git a/gdk/gdk.h b/gdk/gdk.h
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -1764,7 +1764,6 @@ gdk_export void ma_destroy(allocator *sa
gdk_export char *ma_strndup(allocator *sa, const char *s, size_t l);
gdk_export char *ma_strdup(allocator *sa, const char *s);
gdk_export char *ma_strconcat(allocator *sa, const char *s1, const char *s2);
-gdk_export size_t ma_size(allocator *sa);
gdk_export const char *ma_name(allocator *sa);
gdk_export allocator_state ma_open(allocator *sa); /* open new frame of
tempory allocations */
gdk_export void ma_close(const allocator_state *); /* close temporary frame,
reset to old state */
diff --git a/gdk/gdk_string.c b/gdk/gdk_string.c
--- a/gdk/gdk_string.c
+++ b/gdk/gdk_string.c
@@ -7338,9 +7338,9 @@ GDKstrcasestr(const char *haystack, cons
/* The asciify table uses the same technique as the case conversion
* tables, except that the value that is calculated is not a codepoint.
* Instead it is the index into the valtab table which contains the
- * string that is to be used to replace the asciified character.
- * This combination of tables is derived from the command
- * ``iconv -futf-8 -tASCII//TRANSLIT`` */
+ * string that is to be used to replace the asciified character. */
+
+/* These tables were created using the code in uniiconvtab.py */
static const char *const valtab[] = {
NULL,
[1] = " ",
diff --git a/gdk/gdk_utils.c b/gdk/gdk_utils.c
--- a/gdk/gdk_utils.c
+++ b/gdk/gdk_utils.c
@@ -448,7 +448,7 @@ size_t GDK_mmap_pagesize = MMAP_PAGESIZE
size_t GDK_mem_maxsize = GDK_VM_MAXSIZE;
size_t GDK_vm_maxsize = GDK_VM_MAXSIZE;
-#define SEG_SIZE(x) ((ssize_t) (((x) + _MT_pagesize - 1) & ~(_MT_pagesize -
1)))
+#define SEG_SIZE(x) (((x) + _MT_pagesize - 1) & ~(_MT_pagesize - 1))
/* This block is to provide atomic addition and subtraction to select
* variables. We use intrinsic functions (recognized and inlined by
@@ -1699,32 +1699,34 @@ GDKvm_cursize(void)
return (size_t) ATOMIC_GET(&GDK_vm_cursize) + GDKmem_cursize();
}
-#define heapinc(_memdelta) \
- ATOMIC_ADD(&GDK_mallocedbytes_estimate, _memdelta)
-#ifndef NDEBUG
-#define heapdec(_memdelta)
\
- do { \
- ATOMIC_BASE_TYPE old = ATOMIC_SUB(&GDK_mallocedbytes_estimate,
_memdelta); \
- assert(old >= (ATOMIC_BASE_TYPE) _memdelta); \
- } while (0)
-#else
-#define heapdec(_memdelta) \
- ATOMIC_SUB(&GDK_mallocedbytes_estimate, _memdelta)
-#endif
+static inline void
+heapinc(size_t memdelta)
+{
+ ATOMIC_ADD(&GDK_mallocedbytes_estimate, memdelta);
+}
+
+static inline void
+heapdec(size_t memdelta)
+{
+ size_t old = (size_t) ATOMIC_SUB(&GDK_mallocedbytes_estimate, memdelta);
+ (void) old;
+ assert(old >= memdelta);
+}
-#define meminc(vmdelta)
\
- ATOMIC_ADD(&GDK_vm_cursize, SEG_SIZE(vmdelta))
-#ifndef NDEBUG
-#define memdec(vmdelta)
\
- do { \
- ssize_t diff = SEG_SIZE(vmdelta); \
- ATOMIC_BASE_TYPE old = ATOMIC_SUB(&GDK_vm_cursize, diff); \
- assert(old >= (ATOMIC_BASE_TYPE) diff); \
- } while (0)
-#else
-#define memdec(vmdelta)
\
- ATOMIC_SUB(&GDK_vm_cursize, SEG_SIZE(vmdelta))
-#endif
+static inline void
+meminc(size_t vmdelta)
+{
+ ATOMIC_ADD(&GDK_vm_cursize, SEG_SIZE(vmdelta));
+}
+
+static inline void
+memdec(size_t vmdelta)
+{
+ size_t diff = SEG_SIZE(vmdelta);
+ size_t old = (size_t) ATOMIC_SUB(&GDK_vm_cursize, diff);
+ (void) old;
+ assert(old >= diff);
+}
/* Memory allocation
*
@@ -1744,9 +1746,6 @@ GDKvm_cursize(void)
* is also where the extra space at the end comes in.
*/
-/* malloc smaller than this aren't subject to the GDK_vm_maxsize test */
-#define SMALL_MALLOC 256
-
static void *
GDKmalloc_internal(size_t size, bool clear)
{
@@ -1867,7 +1866,7 @@ GDKfree(void *s)
#endif
free((char *) s - MALLOC_EXTRA_SPACE);
- heapdec((ssize_t) asize);
+ heapdec(asize);
}
#undef GDKrealloc
@@ -1926,7 +1925,7 @@ GDKrealloc(void *s, size_t size)
#endif
heapinc(nsize + MALLOC_EXTRA_SPACE + DEBUG_SPACE);
- heapdec((ssize_t) asize);
+ heapdec(asize);
return s;
}
@@ -2068,7 +2067,7 @@ ma_free_obj(allocator *sa, void *obj, si
}
-static void
+static inline void
ma_free_blk_memory(allocator *sa, void *blk)
{
// all blks are GDKmalloc
@@ -2127,9 +2126,6 @@ ma_use_freed_obj(allocator *sa, size_t s
return NULL;
}
-static int ma_double_num_blks(allocator *sa);
-
-
/*
* Free blocks are maintained at top level
*/
@@ -2214,7 +2210,7 @@ ma_realloc(allocator *sa, void *p, size_
return r;
}
-static void *
+static inline void *
ma_fill_in_header(void *r, size_t sz)
{
if (r) {
@@ -2426,12 +2422,6 @@ ma_strconcat(allocator *sa, const char *
return r;
}
-size_t
-ma_size(allocator *sa)
-{
- return sa->usedmem;
-}
-
const char *
ma_name(allocator *sa)
{
@@ -2452,7 +2442,6 @@ ma_open(allocator *sa)
assert(sa);
if (sa) {
assert(sa == MT_thread_getallocator());
- COND_LOCK_ALLOCATOR(sa);
st = (allocator_state) {
.nr = sa->nr,
.used = sa->used,
@@ -2462,7 +2451,6 @@ ma_open(allocator *sa)
.ma = sa,
};
sa->tmp_used += 1;
- COND_UNLOCK_ALLOCATOR(sa);
}
return st;
}
@@ -2474,19 +2462,17 @@ ma_close(const allocator_state *state)
allocator *sa = state->ma;
assert(sa);
if (sa) {
- COND_LOCK_ALLOCATOR(sa);
assert(ma_tmp_active(sa));
if (sa->tmp_used > 0) {
sa->tmp_used -= 1;
}
- // check if we can reset to the initial state
- if (state->tmp_used == 0) {
- COND_UNLOCK_ALLOCATOR(sa);
- ma_reset(sa);
- return;
- }
- assert((state->nr > 0) && (state->nr <= sa->nr));
if (state->nr != sa->nr || state->used != sa->used) {
+ // check if we can reset to the initial state
+ if (state->tmp_used == 0) {
+ ma_reset(sa);
+ return;
+ }
+ assert((state->nr > 0) && (state->nr <= sa->nr));
_ma_free_blks(sa, state->nr);
sa->nr = state->nr;
sa->used = state->used;
@@ -2494,7 +2480,6 @@ ma_close(const allocator_state *state)
sa->inuse = state->inuse;
sa->tmp_used = state->tmp_used;
}
- COND_UNLOCK_ALLOCATOR(sa);
}
}
diff --git a/misc/python/unicaseconvtabs.py b/misc/python/unicaseconvtabs.py
--- a/misc/python/unicaseconvtabs.py
+++ b/misc/python/unicaseconvtabs.py
@@ -10,6 +10,11 @@
# Copyright August 2008 - 2023 MonetDB B.V.;
# Copyright 1997 - July 2008 CWI.
+# This script is used to create tables for gdk/gdk_string.c to support
+# case conversion.
+# Usage: run the script and replace the appropriate tables in
+# gdk_string.c with the output produced.
+
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]