Changeset: 799c47d097c2 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/799c47d097c2
Removed Files:
monetdb5/mal/mal_factory.c
monetdb5/mal/mal_factory.h
monetdb5/modules/mal/factories.c
Modified Files:
clients/Tests/MAL-signatures-hge.test
clients/Tests/MAL-signatures.test
clients/Tests/exports.stable.out
monetdb5/mal/CMakeLists.txt
monetdb5/mal/Tests/All
monetdb5/mal/mal.c
monetdb5/mal/mal_debugger.c
monetdb5/mal/mal_embedded.c
monetdb5/mal/mal_function.c
monetdb5/mal/mal_instruction.h
monetdb5/mal/mal_interpreter.c
monetdb5/mal/mal_listing.c
monetdb5/mal/mal_parser.c
monetdb5/mal/mal_private.h
monetdb5/mal/mal_resolve.c
monetdb5/mal/mal_type.h
monetdb5/modules/mal/CMakeLists.txt
monetdb5/modules/mal/mdb.c
monetdb5/optimizer/opt_inline.c
monetdb5/optimizer/opt_macro.c
monetdb5/optimizer/opt_querylog.c
sql/backends/monet5/sql_gencode.c
sql/test/sysmon/timeout/Tests/All
Branch: simplify_scenario
Log Message:
sad day part one: removed the factories.
diffs (truncated from 1312 to 300 lines):
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
@@ -44923,36 +44923,6 @@ thetaselect
pattern dict.thetaselect(X_0:bat[:any], X_1:bat[:oid], X_2:bat[:any_1],
X_3:any_1, X_4:str):bat[:oid]
DICTthetaselect;
thetaselect on a dictionary
-factories
-getArrival
-command factories.getArrival():bat[:timestamp]
-FCTgetArrival;
-Retrieve the time stamp the last call was made.
-factories
-getCaller
-command factories.getCaller():int
-FCTgetCaller;
-Retrieve the unique identity of the factory caller.
-factories
-getDeparture
-command factories.getDeparture():bat[:timestamp]
-FCTgetDeparture;
-Retrieve the time stamp the last answer was returned.
-factories
-getOwners
-command factories.getOwners():bat[:str]
-FCTgetOwners;
-Retrieve the factory owners table.
-factories
-getPlants
-command factories.getPlants() (X_0:bat[:str], X_1:bat[:str])
-FCTgetPlants;
-Retrieve the names for all active factories.
-factories
-shutdown
-pattern factories.shutdown(X_0:str, X_1:str):void
-FCTshutdown;
-Close a factory.
fits
attach
unsafe pattern fits.attach(X_0:str):void
@@ -47329,11 +47299,6 @@ pattern mdb.start(X_0:int):void
MDBstart;
Start interactive debugger on a client
mdb
-start
-pattern mdb.start(X_0:str, X_1:str):void
-MDBstartFactory;
-Start interactive debugger on a running factory
-mdb
stop
pattern mdb.stop():void
MDBstop;
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
@@ -33418,36 +33418,6 @@ thetaselect
pattern dict.thetaselect(X_0:bat[:any], X_1:bat[:oid], X_2:bat[:any_1],
X_3:any_1, X_4:str):bat[:oid]
DICTthetaselect;
thetaselect on a dictionary
-factories
-getArrival
-command factories.getArrival():bat[:timestamp]
-FCTgetArrival;
-Retrieve the time stamp the last call was made.
-factories
-getCaller
-command factories.getCaller():int
-FCTgetCaller;
-Retrieve the unique identity of the factory caller.
-factories
-getDeparture
-command factories.getDeparture():bat[:timestamp]
-FCTgetDeparture;
-Retrieve the time stamp the last answer was returned.
-factories
-getOwners
-command factories.getOwners():bat[:str]
-FCTgetOwners;
-Retrieve the factory owners table.
-factories
-getPlants
-command factories.getPlants() (X_0:bat[:str], X_1:bat[:str])
-FCTgetPlants;
-Retrieve the names for all active factories.
-factories
-shutdown
-pattern factories.shutdown(X_0:str, X_1:str):void
-FCTshutdown;
-Close a factory.
fits
attach
unsafe pattern fits.attach(X_0:str):void
@@ -35759,11 +35729,6 @@ pattern mdb.start(X_0:int):void
MDBstart;
Start interactive debugger on a client
mdb
-start
-pattern mdb.start(X_0:str, X_1:str):void
-MDBstartFactory;
-Start interactive debugger on a running factory
-mdb
stop
pattern mdb.stop():void
MDBstop;
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
@@ -1098,7 +1098,6 @@ InstrPtr newInstruction(MalBlkPtr mb, co
InstrPtr newInstructionArgs(MalBlkPtr mb, const char *modnme, const char
*fcnnme, int args);
MalBlkPtr newMalBlk(int elements);
int newMalBlkStmt(MalBlkPtr mb, int elements);
-Plant newPlant(MalBlkPtr mb);
InstrPtr newRaiseStmt(MalBlkPtr mb, const char *nme);
const char *newRef;
InstrPtr newReturnStmt(MalBlkPtr mb);
diff --git a/monetdb5/mal/CMakeLists.txt b/monetdb5/mal/CMakeLists.txt
--- a/monetdb5/mal/CMakeLists.txt
+++ b/monetdb5/mal/CMakeLists.txt
@@ -38,7 +38,6 @@ target_sources(mal
mal_client.c
mal_debugger.c mal_debugger.h
mal_exception.c
- mal_factory.c mal_factory.h
mal_function.c mal_function.h
mal_import.c
mal_runtime.c mal_runtime.h
diff --git a/monetdb5/mal/Tests/All b/monetdb5/mal/Tests/All
--- a/monetdb5/mal/Tests/All
+++ b/monetdb5/mal/Tests/All
@@ -121,19 +121,19 @@ tst234
tst235
tst237
tst250
-tst2500
-tst2501
-tst2502
-tst2503
-tst2504
-tst2505
-tst2510
+#tst2500
+#tst2501
+#tst2502
+#tst2503
+#tst2504
+#tst2505
+#tst2510
tst251
tst252
tst255
-tst2550
+#tst2550
tst256
-tst2570
+#tst2570
tst272
#tst275 # incorrect hash
tst280
@@ -184,7 +184,7 @@ tst906
tst907
tst908
#tst911 micro benchmark, should move ..
-tst912
+#tst912
tst913
tst914
tst960
diff --git a/monetdb5/mal/mal.c b/monetdb5/mal/mal.c
--- a/monetdb5/mal/mal.c
+++ b/monetdb5/mal/mal.c
@@ -218,7 +218,6 @@ void mal_reset(void)
free(err);
}
}
- mal_factory_reset();
mal_dataflow_reset();
mal_client_reset();
mal_linker_reset();
diff --git a/monetdb5/mal/mal_debugger.c b/monetdb5/mal/mal_debugger.c
--- a/monetdb5/mal/mal_debugger.c
+++ b/monetdb5/mal/mal_debugger.c
@@ -926,11 +926,9 @@ retryRead:
/* terminate the execution for ordinary functions only
*/
if (strncmp("exit", b, 4) == 0) {
case 'x':
- if (!(getInstrPtr(mb, 0)->token == FACcall)) {
- stk->cmd = 'x';
- cntxt->prompt = oldprompt;
- cntxt->promptlength = oldpromptlength;
- }
+ stk->cmd = 'x';
+ cntxt->prompt = oldprompt;
+ cntxt->promptlength = oldpromptlength;
}
return;
case 'q':
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
@@ -187,7 +187,6 @@ malEmbeddedReset(void) //remove extra mo
free(err);
}
}
- mal_factory_reset();
mal_dataflow_reset();
mal_client_reset();
mal_linker_reset();
diff --git a/monetdb5/mal/mal_factory.c b/monetdb5/mal/mal_factory.c
deleted file mode 100644
--- a/monetdb5/mal/mal_factory.c
+++ /dev/null
@@ -1,410 +0,0 @@
-/*
- * SPDX-License-Identifier: MPL-2.0
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * Copyright 1997 - July 2008 CWI, August 2008 - 2023 MonetDB B.V.
- */
-
-/*
- * (author) M. Kersten
- * For documentation see website
- */
-#include "monetdb_config.h"
-#include "mal_factory.h"
-#include "mal_instruction.h"
-#include "mal_interpreter.h"
-#include "mal_function.h"
-#include "mal_exception.h"
-#include "mal_session.h"
-#include "mal_namespace.h"
-#include "mal_private.h"
-
-typedef struct {
- int id; /* unique plant number */
- MalBlkPtr factory;
- MalStkPtr stk; /* private state */
- int pc; /* where we are */
- int inuse; /* able to handle it */
- int next; /* next plant of same factory */
- int policy; /* flags to control behavior */
-
- Client client; /* who called it */
- MalBlkPtr caller; /* from routine */
- MalStkPtr env; /* with the stack */
- InstrPtr pci; /* with the instruction */
-} PlantRecord, *Plant;
-
-#define MAXPLANTS 256
-static PlantRecord plants[MAXPLANTS];
-static int lastPlant= 0;
-static int plantId = 1;
-
-mal_export Plant newPlant(MalBlkPtr mb);
-
-
-static int
-findPlant(MalBlkPtr mb){
- int i;
- for(i=0; i<lastPlant; i++)
- if( plants[i].factory == mb)
- return i;
- return -1;
-}
-
-str
-runFactory(Client cntxt, MalBlkPtr mb, MalBlkPtr mbcaller, MalStkPtr stk,
InstrPtr pci)
-{
- Plant pl=0;
- int firstcall= TRUE, i, k;
- InstrPtr psig = getInstrPtr(mb, 0);
- ValPtr lhs, rhs;
- char cmd;
- str msg;
-
-
- /* the lookup can be largely avoided by handing out the index
- upon factory definition. todo
- Alternative is to move them to the front
- */
- for(i=0; i< lastPlant; i++)
- if( plants[i].factory == mb){
- if(i > 0 && i< lastPlant ){
- PlantRecord prec= plants[i-1];
- plants[i-1] = plants[i];
- plants[i]= prec;
- i--;
- }
- pl= plants+i;
- firstcall= FALSE;
- break;
- }
- if (pl == 0) {
- /* compress the plant table*/
- for(k=i=0;i<=lastPlant; i++)
- if( plants[i].inuse)
- plants[k++]= plants[i];
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]