Changeset: ddbca66372e5 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/ddbca66372e5
Modified Files:
monetdb5/mal/mal.c
monetdb5/mal/mal.h
monetdb5/mal/mal_atom.c
monetdb5/mal/mal_atom.h
monetdb5/mal/mal_authorize.c
monetdb5/mal/mal_builder.c
monetdb5/mal/mal_builder.h
monetdb5/mal/mal_client.c
monetdb5/mal/mal_client.h
monetdb5/mal/mal_dataflow.c
monetdb5/mal/mal_dataflow.h
monetdb5/mal/mal_embedded.c
monetdb5/mal/mal_embedded.h
monetdb5/mal/mal_exception.c
monetdb5/mal/mal_exception.h
monetdb5/mal/mal_function.c
monetdb5/mal/mal_function.h
monetdb5/mal/mal_import.c
monetdb5/mal/mal_import.h
monetdb5/mal/mal_instruction.c
monetdb5/mal/mal_instruction.h
monetdb5/mal/mal_internal.h
monetdb5/mal/mal_interpreter.c
monetdb5/mal/mal_interpreter.h
monetdb5/mal/mal_linker.c
monetdb5/mal/mal_linker.h
monetdb5/mal/mal_listing.c
monetdb5/mal/mal_listing.h
monetdb5/mal/mal_module.c
monetdb5/mal/mal_module.h
monetdb5/mal/mal_namespace.c
monetdb5/mal/mal_namespace.h
monetdb5/mal/mal_parser.c
monetdb5/mal/mal_parser.h
monetdb5/mal/mal_prelude.c
monetdb5/mal/mal_prelude.h
monetdb5/mal/mal_profiler.c
monetdb5/mal/mal_profiler.h
monetdb5/mal/mal_resolve.c
monetdb5/mal/mal_resolve.h
monetdb5/mal/mal_resource.c
monetdb5/mal/mal_resource.h
monetdb5/mal/mal_runtime.c
monetdb5/mal/mal_runtime.h
monetdb5/mal/mal_scenario.c
monetdb5/mal/mal_session.c
monetdb5/mal/mal_session.h
monetdb5/mal/mal_stack.c
monetdb5/mal/mal_type.c
monetdb5/mal/mal_type.h
monetdb5/mal/mal_utils.c
monetdb5/mal/mel.h
monetdb5/modules/atoms/batxml.c
monetdb5/modules/atoms/blob.c
monetdb5/modules/atoms/color.c
monetdb5/modules/atoms/color.h
monetdb5/modules/atoms/identifier.c
monetdb5/modules/atoms/inet.c
monetdb5/modules/atoms/json.c
monetdb5/modules/atoms/mtime.c
monetdb5/modules/atoms/mtime.h
monetdb5/modules/atoms/str.c
monetdb5/modules/atoms/str.h
monetdb5/modules/atoms/streams.c
monetdb5/modules/atoms/strptime.c
monetdb5/modules/atoms/url.c
monetdb5/modules/atoms/utf8.h
monetdb5/modules/atoms/uuid.c
monetdb5/modules/atoms/xml.c
monetdb5/modules/kernel/aggr.c
monetdb5/modules/kernel/aggr.h
monetdb5/modules/kernel/alarm.c
monetdb5/modules/kernel/algebra.c
monetdb5/modules/kernel/bat5.c
monetdb5/modules/kernel/bat5.h
monetdb5/modules/kernel/batcolor.c
monetdb5/modules/kernel/batmmath.c
monetdb5/modules/kernel/batstr.c
monetdb5/modules/kernel/group.c
monetdb5/modules/kernel/group.h
monetdb5/modules/kernel/microbenchmark.c
monetdb5/modules/kernel/mmath.c
monetdb5/modules/kernel/mmath_private.h
monetdb5/modules/mal/batExtensions.c
monetdb5/modules/mal/batMask.c
monetdb5/modules/mal/batcalc.c
monetdb5/modules/mal/bbp.c
monetdb5/modules/mal/calc.c
monetdb5/modules/mal/clients.c
monetdb5/modules/mal/clients.h
monetdb5/modules/mal/groupby.c
monetdb5/modules/mal/inspect.c
monetdb5/modules/mal/iterator.c
monetdb5/modules/mal/language.c
monetdb5/modules/mal/mal_io.c
monetdb5/modules/mal/mal_mapi.c
monetdb5/modules/mal/manifold.c
monetdb5/modules/mal/manifold.h
monetdb5/modules/mal/manual.c
monetdb5/modules/mal/mat.c
monetdb5/modules/mal/mdb.c
monetdb5/modules/mal/mkey.c
monetdb5/modules/mal/orderidx.c
monetdb5/modules/mal/orderidx.h
monetdb5/modules/mal/pcre.c
monetdb5/modules/mal/profiler.c
monetdb5/modules/mal/projectionpath.c
monetdb5/modules/mal/querylog.c
monetdb5/modules/mal/remote.c
monetdb5/modules/mal/remote.h
monetdb5/modules/mal/sample.c
monetdb5/modules/mal/sysmon.c
monetdb5/modules/mal/tablet.c
monetdb5/modules/mal/tablet.h
monetdb5/modules/mal/tokenizer.c
monetdb5/modules/mal/tracer.c
monetdb5/modules/mal/txtsim.c
monetdb5/optimizer/opt_aliases.c
monetdb5/optimizer/opt_aliases.h
monetdb5/optimizer/opt_candidates.c
monetdb5/optimizer/opt_candidates.h
monetdb5/optimizer/opt_coercion.c
monetdb5/optimizer/opt_coercion.h
monetdb5/optimizer/opt_commonTerms.c
monetdb5/optimizer/opt_commonTerms.h
monetdb5/optimizer/opt_constants.c
monetdb5/optimizer/opt_constants.h
monetdb5/optimizer/opt_costModel.c
monetdb5/optimizer/opt_costModel.h
monetdb5/optimizer/opt_dataflow.c
monetdb5/optimizer/opt_dataflow.h
monetdb5/optimizer/opt_deadcode.c
monetdb5/optimizer/opt_deadcode.h
monetdb5/optimizer/opt_dict.c
monetdb5/optimizer/opt_dict.h
monetdb5/optimizer/opt_emptybind.c
monetdb5/optimizer/opt_emptybind.h
monetdb5/optimizer/opt_evaluate.c
monetdb5/optimizer/opt_evaluate.h
monetdb5/optimizer/opt_fastpath.c
monetdb5/optimizer/opt_fastpath.h
monetdb5/optimizer/opt_for.c
monetdb5/optimizer/opt_for.h
monetdb5/optimizer/opt_garbageCollector.c
monetdb5/optimizer/opt_garbageCollector.h
monetdb5/optimizer/opt_generator.c
monetdb5/optimizer/opt_generator.h
monetdb5/optimizer/opt_inline.c
monetdb5/optimizer/opt_inline.h
monetdb5/optimizer/opt_macro.c
monetdb5/optimizer/opt_matpack.c
monetdb5/optimizer/opt_matpack.h
monetdb5/optimizer/opt_mergetable.c
monetdb5/optimizer/opt_mergetable.h
monetdb5/optimizer/opt_mitosis.c
monetdb5/optimizer/opt_mitosis.h
monetdb5/optimizer/opt_multiplex.c
monetdb5/optimizer/opt_multiplex.h
monetdb5/optimizer/opt_pipes.c
monetdb5/optimizer/opt_pipes.h
monetdb5/optimizer/opt_postfix.c
monetdb5/optimizer/opt_postfix.h
monetdb5/optimizer/opt_prelude.c
monetdb5/optimizer/opt_prelude.h
monetdb5/optimizer/opt_profiler.c
monetdb5/optimizer/opt_profiler.h
monetdb5/optimizer/opt_projectionpath.c
monetdb5/optimizer/opt_projectionpath.h
monetdb5/optimizer/opt_pushselect.c
monetdb5/optimizer/opt_pushselect.h
monetdb5/optimizer/opt_querylog.c
monetdb5/optimizer/opt_querylog.h
monetdb5/optimizer/opt_reduce.c
monetdb5/optimizer/opt_reduce.h
monetdb5/optimizer/opt_remap.c
monetdb5/optimizer/opt_remap.h
monetdb5/optimizer/opt_remoteQueries.c
monetdb5/optimizer/opt_remoteQueries.h
monetdb5/optimizer/opt_reorder.c
monetdb5/optimizer/opt_reorder.h
monetdb5/optimizer/opt_support.c
monetdb5/optimizer/opt_support.h
monetdb5/optimizer/opt_wrapper.c
monetdb5/optimizer/optimizer.c
tools/mserver/mserver5.c
Branch: Jun2023
Log Message:
Layout: ran indent on monetdb5 sources.
diffs (truncated from 60820 to 300 lines):
diff --git a/monetdb5/mal/mal.c b/monetdb5/mal/mal.c
--- a/monetdb5/mal/mal.c
+++ b/monetdb5/mal/mal.c
@@ -12,8 +12,9 @@
#include "monetdb_config.h"
#include "mal.h"
-char monet_cwd[FILENAME_MAX] = { 0 };
-char monet_characteristics[4096];
+char monet_cwd[FILENAME_MAX] = { 0 };
+
+char monet_characteristics[4096];
stream *maleventstream = 0;
/* The compile time debugging flags are turned into bit masks, akin to GDK */
@@ -26,7 +27,7 @@ lng MALdebug;
#include "mal_scenario.h"
#include "mal_parser.h"
#include "mal_interpreter.h"
-#include "mal_namespace.h" /* for initNamespace() */
+#include "mal_namespace.h" /* for initNamespace() */
#include "mal_profiler.h"
#include "mal_client.h"
#include "msabaoth.h"
@@ -38,10 +39,10 @@ lng MALdebug;
#include "mal_atom.h"
#include "mutils.h"
-MT_Lock mal_contextLock = MT_LOCK_INITIALIZER(mal_contextLock);
-MT_Lock mal_profileLock = MT_LOCK_INITIALIZER(mal_profileLock);
-MT_Lock mal_copyLock = MT_LOCK_INITIALIZER(mal_copyLock);
-MT_Lock mal_delayLock = MT_LOCK_INITIALIZER(mal_delayLock);
+MT_Lock mal_contextLock = MT_LOCK_INITIALIZER(mal_contextLock);
+MT_Lock mal_profileLock = MT_LOCK_INITIALIZER(mal_profileLock);
+MT_Lock mal_copyLock = MT_LOCK_INITIALIZER(mal_copyLock);
+MT_Lock mal_delayLock = MT_LOCK_INITIALIZER(mal_delayLock);
const char *
@@ -55,7 +56,8 @@ mal_version(void)
*/
int
-mal_init(char *modules[], bool embedded, const char *initpasswd, const char
*caller_revision)
+mal_init(char *modules[], bool embedded, const char *initpasswd,
+ const char *caller_revision)
{
/* Any error encountered here terminates the process
* with a message sent to stderr
@@ -68,7 +70,8 @@ mal_init(char *modules[], bool embedded,
const char *version = GDKlibversion();
sscanf(version, "%d.%d.%d", &maj, &min, &patch);
if (maj != GDK_VERSION_MAJOR || min < GDK_VERSION_MINOR) {
- TRC_CRITICAL(MAL_SERVER, "Linked GDK library not compatible
with the one this was compiled with\n");
+ TRC_CRITICAL(MAL_SERVER,
+ "Linked GDK library not compatible
with the one this was compiled with\n");
TRC_CRITICAL(MAL_SERVER, "Linked version: %s, compiled version:
%s\n",
version, GDK_VERSION);
return -1;
@@ -77,7 +80,9 @@ mal_init(char *modules[], bool embedded,
if (caller_revision) {
const char *p = mercurial_revision();
if (p && strcmp(p, caller_revision) != 0) {
- TRC_CRITICAL(MAL_SERVER, "incompatible versions: caller
is %s, MAL is %s\n", caller_revision, p);
+ TRC_CRITICAL(MAL_SERVER,
+ "incompatible versions: caller
is %s, MAL is %s\n",
+ caller_revision, p);
return -1;
}
}
@@ -87,7 +92,7 @@ mal_init(char *modules[], bool embedded,
initNamespace();
err = malBootstrap(modules, embedded, initpasswd);
- if (err != MAL_SUCCEED) {
+ if (err !=MAL_SUCCEED) {
mal_client_reset();
TRC_CRITICAL(MAL_SERVER, "%s\n", err);
freeException(err);
@@ -108,7 +113,8 @@ mal_init(char *modules[], bool embedded,
* activity first.
* This function should be called after you have issued sql_reset();
*/
-void mal_reset(void)
+void
+mal_reset(void)
{
GDKprepareExit();
MCstopClients(0);
@@ -118,29 +124,29 @@ void mal_reset(void)
if (!GDKinmemory(0) && !GDKembedded()) {
str err = 0;
- if ((err = msab_wildRetreat()) != NULL) {
+ if ((err = msab_wildRetreat()) !=NULL) {
TRC_ERROR(MAL_SERVER, "%s\n", err);
free(err);
}
- if ((err = msab_registerStop()) != NULL) {
+ if ((err = msab_registerStop()) !=NULL) {
TRC_ERROR(MAL_SERVER, "%s\n", err);
free(err);
}
}
mal_dataflow_reset();
mal_client_reset();
- mal_linker_reset();
+ mal_linker_reset();
mal_resource_reset();
mal_runtime_reset();
mal_module_reset();
mal_atom_reset();
- memset((char*)monet_cwd, 0, sizeof(monet_cwd));
- memset((char*)monet_characteristics,0, sizeof(monet_characteristics));
+ memset((char *) monet_cwd, 0, sizeof(monet_cwd));
+ memset((char *) monet_characteristics, 0,
sizeof(monet_characteristics));
mal_namespace_reset();
/* No need to clean up the namespace, it will simply be extended
* upon restart mal_namespace_reset(); */
- GDKreset(0); // terminate all other threads
+ GDKreset(0); // terminate all other threads
}
@@ -152,7 +158,8 @@ void mal_reset(void)
* For this we mark the client records as BLOCKCLIENT.
*/
-void mal_exit(int status)
+void
+mal_exit(int status)
{
mal_reset();
exit(status); /* properly end GDK */
diff --git a/monetdb5/mal/mal.h b/monetdb5/mal/mal.h
--- a/monetdb5/mal/mal.h
+++ b/monetdb5/mal/mal.h
@@ -48,9 +48,9 @@ mal_export lng MALdebug;
#define GB (((lng)1024)*1024*1024)
#define MEMORY_THRESHOLD (0.2 * GDK_mem_maxsize > 8 * GB? GDK_mem_maxsize -
8 * GB: 0.8 * GDK_mem_maxsize)
-mal_export char monet_cwd[FILENAME_MAX];
-mal_export char monet_characteristics[4096];
-mal_export stream *maleventstream;
+mal_export char monet_cwd[FILENAME_MAX];
+mal_export char monet_characteristics[4096];
+mal_export stream *maleventstream;
/*
See gdk/gdk.h for the definition of all debug masks.
@@ -70,7 +70,8 @@ mal_export stream *maleventstream;
mal_export MT_Lock mal_contextLock;
-mal_export int mal_init(char *modules[], bool embedded, const char
*initpasswd, const char *caller_revision);
+mal_export int mal_init(char *modules[], bool embedded, const char *initpasswd,
+ const char *caller_revision);
mal_export _Noreturn void mal_exit(int status);
mal_export void mal_reset(void);
mal_export const char *mal_version(void);
@@ -82,15 +83,15 @@ mal_export const char *mal_version(void)
*/
/* Listing modes are globally known */
-#define LIST_INPUT 1 /* echo original input */
-#define LIST_MAL_NAME 2 /* show variable name */
-#define LIST_MAL_TYPE 4 /* show type resolutoin */
-#define LIST_MAL_VALUE 8 /* list bat tuple count */
-#define LIST_MAL_PROPS 16 /* show variable properties */
-#define LIST_MAL_MAPI 32 /* output Mapi compatible output */
-#define LIST_MAL_REMOTE 64 /* output MAL for remote execution */
-#define LIST_MAL_FLOW 128 /* output MAL dataflow dependencies */
-#define LIST_MAL_ALGO 256 /* output algorithm used */
+#define LIST_INPUT 1 /* echo original input */
+#define LIST_MAL_NAME 2 /* show variable name */
+#define LIST_MAL_TYPE 4 /* show type resolutoin */
+#define LIST_MAL_VALUE 8 /* list bat tuple count */
+#define LIST_MAL_PROPS 16 /* show variable properties */
+#define LIST_MAL_MAPI 32 /* output Mapi compatible output */
+#define LIST_MAL_REMOTE 64 /* output MAL for remote execution */
+#define LIST_MAL_FLOW 128 /* output MAL dataflow dependencies */
+#define LIST_MAL_ALGO 256 /* output algorithm used */
#define LIST_MAL_CALL (LIST_MAL_NAME | LIST_MAL_VALUE )
#define LIST_MAL_DEBUG (LIST_MAL_NAME | LIST_MAL_VALUE | LIST_MAL_TYPE |
LIST_MAL_PROPS | LIST_MAL_FLOW)
#define LIST_MAL_ALL (LIST_MAL_NAME | LIST_MAL_VALUE | LIST_MAL_TYPE |
LIST_MAL_MAPI)
@@ -116,8 +117,8 @@ typedef struct SYMDEF {
} *Symbol, SymRecord;
typedef struct VARRECORD {
- char name[IDLENGTH]; /* use the space for the full
name */
- char kind; /* Could be either _, X or C to
stamp the variable type */
+ char name[IDLENGTH]; /* use the space for the full name */
+ char kind; /* Could be either _, X
or C to stamp the variable type */
malType type; /* internal type signature */
bool constant:1,
typevar:1,
@@ -131,8 +132,8 @@ typedef struct VARRECORD {
int declared; /* pc index when it was first
assigned */
int updated; /* pc index when it was first
updated */
int eolife; /* pc index when it
should be garbage collected */
- int stc; /* pc index for rendering
schema.table.column */
- BUN rowcnt; /* estimated row count*/
+ int stc; /* pc index for
rendering schema.table.column */
+ BUN rowcnt; /* estimated row count
*/
} *VarPtr, VarRecord;
/* For performance analysis we keep track of the number of calls and
@@ -149,7 +150,7 @@ typedef struct {
bte polymorphic; /* complex type analysis */
bit varargs; /* variable number of arguments
*/
int jump; /* controlflow program
counter */
- int pc; /* location in MAL plan
for profiler*/
+ int pc; /* location in MAL plan
for profiler */
MALfcn fcn; /* resolved function
address */
struct MALBLK *blk; /* resolved MAL function
address */
/* inline statistics */
@@ -158,53 +159,53 @@ typedef struct {
const char *modname; /* module context, reference into
namespace */
const char *fcnname; /* function name, reference into
namespace */
int argc, retc, maxarg; /* total and result argument count */
- int argv[FLEXIBLE_ARRAY_MEMBER]; /* at least a few entries */
+ int argv[FLEXIBLE_ARRAY_MEMBER]; /* at least a few entries */
} *InstrPtr, InstrRecord;
typedef struct MALBLK {
- char binding[IDLENGTH]; /* related C-function */
- str help; /* supportive commentary */
- str statichelp; /* static help string should not be
freed */
- oid tag; /* unique block tag */
+ char binding[IDLENGTH]; /* related C-function */
+ str help; /* supportive
commentary */
+ str statichelp; /* static help string should
not be freed */
+ oid tag; /* unique block tag */
struct MALBLK *alternative;
- int vtop; /* next free slot */
- int vsize; /* size of variable arena */
- int vid; /* generate local variable
counter */
- VarRecord *var; /* Variable table */
- int stop; /* next free slot */
- int ssize; /* byte size of arena */
+ int vtop; /* next free slot */
+ int vsize; /* size of variable
arena */
+ int vid; /* generate local
variable counter */
+ VarRecord *var; /* Variable table */
+ int stop; /* next free slot */
+ int ssize; /* byte size of arena */
InstrPtr *stmt; /* Instruction location */
- bool inlineProp:1, /* inline property */
- unsafeProp:1; /* unsafe property */
+ bool inlineProp:1, /* inline property */
+ unsafeProp:1; /* unsafe property */
- str errors; /* left over errors */
- struct MALBLK *history; /* of optimizer actions */
- short keephistory; /* do we need the history at all */
- int maxarg; /* keep track on the maximal
arguments used */
- ptr replica; /* for the replicator tests */
+ str errors; /* left over errors */
+ struct MALBLK *history; /* of optimizer actions */
+ short keephistory; /* do we need the history at
all */
+ int maxarg; /* keep track on the
maximal arguments used */
+ ptr replica; /* for the replicator tests */
/* During the run we keep track on the maximum number of concurrent
threads and memory claim */
ATOMIC_TYPE workers;
- lng memory;
- lng runtime; /* average execution time of block in
ticks */
- int calls; /* number of calls */
- lng optimize; /* total optimizer time */
+ lng memory;
+ lng runtime; /* average execution time of
block in ticks */
+ int calls; /* number of calls */
+ lng optimize; /* total optimizer time */
} *MalBlkPtr, MalBlkRecord;
#define STACKINCR 128
#define MAXGLOBALS (4 * STACKINCR)
-typedef int (*DFhook) (void *, void *, void *, void *);
+typedef int (*DFhook)(void *, void *, void *, void *);
typedef struct MALSTK {
int stksize;
int stktop;
- int stkbot; /* the first variable to be initialized
*/
- int stkdepth; /* to protect against runtime stack overflow */
- int calldepth; /* to protect against runtime stack overflow */
- bool keepAlive:1, /* do not garbage collect when set */
- keepTmps:1; /* also do not garbage collect tmps (needed for
interactive debugging only) */
+ int stkbot; /* the first variable
to be initialized */
+ int stkdepth; /* to protect against runtime
stack overflow */
+ int calldepth; /* to protect against runtime
stack overflow */
+ bool keepAlive:1, /* do not garbage collect when
set */
+ keepTmps:1; /* also do not garbage collect
tmps (needed for interactive debugging only) */
/*
* Parallel processing is mostly driven by dataflow, but within this
context
* there may be different schemes to take instructions into execution.
@@ -217,15 +218,15 @@ typedef struct MALSTK {
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]