Changeset: 1f8595b34ca9 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=1f8595b34ca9
Modified Files:
        monetdb5/mal/mal_dataflow.c
        monetdb5/mal/mal_embedded.c
        monetdb5/mal/mal_module.c
        monetdb5/modules/kernel/alarm.include
        monetdb5/modules/kernel/alarm.mal
        monetdb5/modules/mal/mal_init.mal
Branch: mdbl-mal
Log Message:

Add two more files and upgrade alarm.mal


diffs (114 lines):

diff --git a/monetdb5/mal/mal_dataflow.c b/monetdb5/mal/mal_dataflow.c
--- a/monetdb5/mal/mal_dataflow.c
+++ b/monetdb5/mal/mal_dataflow.c
@@ -814,7 +814,7 @@ runMALdataflow(Client cntxt, MalBlkPtr m
 
 #ifdef DEBUG_FLOW
        fprintf(stderr, "#runMALdataflow for block %d - %d\n", startpc, stoppc);
-       fprintFunction(stderr, mb, 0, LIST_ALL);
+       fprintFunction(stderr, mb, 0, LIST_MAL_ALL);
 #endif
 
        /* in debugging mode we should not start multiple threads */
diff --git a/monetdb5/mal/mal_embedded.c b/monetdb5/mal/mal_embedded.c
--- a/monetdb5/mal/mal_embedded.c
+++ b/monetdb5/mal/mal_embedded.c
@@ -52,7 +52,7 @@ static struct{
 #include "../modules/atoms/uuid.include"
 #include "../modules/atoms/json.include"
 #include "../modules/mal/json_util.include"
-//#include "../modules/atoms/mtime.include"
+#include "../modules/atoms/mtime.include"
 #include "../modules/atoms/inet.include"
 #include "../modules/atoms/identifier.include"
 #include "../modules/atoms/xml.include"
@@ -90,7 +90,7 @@ static struct{
 
 //#include "../modules/mal/mal_mapi.include"
 #include "../modules/mal/oltp.include"
-//#include "../modules/mal/wlc.include"
+#include "../modules/mal/wlc.include"
 
 // Any extensions (MAL scripts) that should be automatically loaded upon
 // startup can be placed in the autoload directory.  One typically finds
@@ -128,6 +128,7 @@ malEmbeddedBoot(Client c)
 
                // fprintf(stderr, "Parse the source %s\n", 
malSignatures[i].source);
                compileString(&fcn, c, malSignatures[i].source);
+               fprintFunction(stderr, c->curprg->def, 0, LIST_MAL_ALL);
        }
        embeddedinitialized = 1;
        return MAL_SUCCEED;
diff --git a/monetdb5/mal/mal_module.c b/monetdb5/mal/mal_module.c
--- a/monetdb5/mal/mal_module.c
+++ b/monetdb5/mal/mal_module.c
@@ -251,8 +251,10 @@ void freeModule(Module m)
                if (pci && pci->token == COMMANDsymbol && pci->argc == 1) {
                        int ret = 0;
 
-                       assert(pci->fcn != NULL);
-                       (*pci->fcn)(&ret);
+                       if ( pci->fcn)
+                               (*pci->fcn)(&ret);
+                       else
+                               GDKerror("Missing address for epilogue '%s' ", 
m->name); 
                        (void)ret;
                }
        }
diff --git a/monetdb5/modules/kernel/alarm.include 
b/monetdb5/modules/kernel/alarm.include
--- a/monetdb5/modules/kernel/alarm.include
+++ b/monetdb5/modules/kernel/alarm.include
@@ -8,12 +8,6 @@
 "unsafe command alarm.sleep(secs:int):void \n"
 "address ALARMsleep \n"
 "comment \"Sleep a few seconds\"; \n"
-"#command alarm.action(secs:int, action:str):void \n"
-"#address ALARMsetalarm \n"
-"#comment \"Execute a MAL action after a few secs. NYI\"; \n"
-"#unsafe command alarm.timers() (time:bat[:str],action:bat[:str]) \n"
-"#address ALARMtimers \n"
-"#comment \"Give the list of all active timers. NYI\"; \n"
 "unsafe command alarm.usec() :lng \n"
 "address ALARMusec \n"
 "comment \"Return time in microseconds.\"; \n"
@@ -26,11 +20,4 @@
 "unsafe command alarm.ctime() :str \n"
 "address ALARMctime \n"
 "comment \"Return the current time as a C-time string.\"; \n"
-"command alarm.prelude():void \n"
-"address ALARMprelude \n"
-"comment \"Initialize alarm module.\"; \n"
-"command alarm.epilogue():void \n"
-"address ALARMepilogue \n"
-"comment \"Finalize alarm module.\"; \n"
-"alarm.prelude(); \n"
 },
diff --git a/monetdb5/modules/kernel/alarm.mal 
b/monetdb5/modules/kernel/alarm.mal
--- a/monetdb5/modules/kernel/alarm.mal
+++ b/monetdb5/modules/kernel/alarm.mal
@@ -25,3 +25,4 @@ comment "Return the current time as UNIX
 unsafe command alarm.ctime() :str
 address ALARMctime
 comment "Return the current time as a C-time string.";
+
diff --git a/monetdb5/modules/mal/mal_init.mal 
b/monetdb5/modules/mal/mal_init.mal
--- a/monetdb5/modules/mal/mal_init.mal
+++ b/monetdb5/modules/mal/mal_init.mal
@@ -47,7 +47,7 @@
 #include uuid;
 #include json;
 #include json_util;
-include mtime;
+#include mtime;
 #include inet;
 #include identifier;
 #include xml;
@@ -88,7 +88,7 @@ include optimizer; -- FATAL: error initS
 
 include mal_mapi;
 #include oltp;
-include wlc;
+#include wlc;
 
 # Any extensions (MAL scripts) that should be automatically loaded upon
 # startup can be placed in the autoload directory.  One typically finds
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to