Re: [Monetdb-developers] MonetDB: jacqueline - mal: allow command calls up to 16 arguments
at some point commands should become patterns. There is no limitation on the number of arguments per se. On 1/27/12 10:14 PM, Fabian Groffen wrote:
Changeset: a9fa1c35a273 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=a9fa1c35a273 Modified Files: monetdb5/mal/mal_interpreter.mx Branch: jacqueline Log Message:
mal: allow command calls up to 16 arguments
future functions will need more arguments in total (in particular because each json argument or return requires 7 separate variables)
diffs (76 lines):
diff --git a/monetdb5/mal/mal_interpreter.mx b/monetdb5/mal/mal_interpreter.mx --- a/monetdb5/mal/mal_interpreter.mx +++ b/monetdb5/mal/mal_interpreter.mx @@ -2053,6 +2053,72 @@ safeguardStack(Client cntxt, MalBlkPtr m (ptr)getArgReference(stk, pci, 10), (ptr)getArgReference(stk, pci, 11)); break; + case 13: ret = (str)(*pci->fcn)( + (ptr)getArgReference(stk, pci, 0), + (ptr)getArgReference(stk, pci, 1), + (ptr)getArgReference(stk, pci, 2), + (ptr)getArgReference(stk, pci, 3), + (ptr)getArgReference(stk, pci, 4), + (ptr)getArgReference(stk, pci, 5), + (ptr)getArgReference(stk, pci, 6), + (ptr)getArgReference(stk, pci, 7), + (ptr)getArgReference(stk, pci, 8), + (ptr)getArgReference(stk, pci, 9), + (ptr)getArgReference(stk, pci, 10), + (ptr)getArgReference(stk, pci, 11), + (ptr)getArgReference(stk, pci, 12)); + break; + case 14: ret = (str)(*pci->fcn)( + (ptr)getArgReference(stk, pci, 0), + (ptr)getArgReference(stk, pci, 1), + (ptr)getArgReference(stk, pci, 2), + (ptr)getArgReference(stk, pci, 3), + (ptr)getArgReference(stk, pci, 4), + (ptr)getArgReference(stk, pci, 5), + (ptr)getArgReference(stk, pci, 6), + (ptr)getArgReference(stk, pci, 7), + (ptr)getArgReference(stk, pci, 8), + (ptr)getArgReference(stk, pci, 9), + (ptr)getArgReference(stk, pci, 10), + (ptr)getArgReference(stk, pci, 11), + (ptr)getArgReference(stk, pci, 12), + (ptr)getArgReference(stk, pci, 13)); + break; + case 15: ret = (str)(*pci->fcn)( + (ptr)getArgReference(stk, pci, 0), + (ptr)getArgReference(stk, pci, 1), + (ptr)getArgReference(stk, pci, 2), + (ptr)getArgReference(stk, pci, 3), + (ptr)getArgReference(stk, pci, 4), + (ptr)getArgReference(stk, pci, 5), + (ptr)getArgReference(stk, pci, 6), + (ptr)getArgReference(stk, pci, 7), + (ptr)getArgReference(stk, pci, 8), + (ptr)getArgReference(stk, pci, 9), + (ptr)getArgReference(stk, pci, 10), + (ptr)getArgReference(stk, pci, 11), + (ptr)getArgReference(stk, pci, 12), + (ptr)getArgReference(stk, pci, 13), + (ptr)getArgReference(stk, pci, 14)); + break; + case 16: ret = (str)(*pci->fcn)( + (ptr)getArgReference(stk, pci, 0), + (ptr)getArgReference(stk, pci, 1), + (ptr)getArgReference(stk, pci, 2), + (ptr)getArgReference(stk, pci, 3), + (ptr)getArgReference(stk, pci, 4), + (ptr)getArgReference(stk, pci, 5), + (ptr)getArgReference(stk, pci, 6), + (ptr)getArgReference(stk, pci, 7), + (ptr)getArgReference(stk, pci, 8), + (ptr)getArgReference(stk, pci, 9), + (ptr)getArgReference(stk, pci, 10), + (ptr)getArgReference(stk, pci, 11), + (ptr)getArgReference(stk, pci, 12), + (ptr)getArgReference(stk, pci, 13), + (ptr)getArgReference(stk, pci, 14), + (ptr)getArgReference(stk, pci, 15)); + break; default: ret = createScriptException(mb, stkpc, MAL, NULL, "too many arguments for command call"); _______________________________________________ Checkin-list mailing list Checkin-list@monetdb.org http://mail.monetdb.org/mailman/listinfo/checkin-list
On 28-01-2012 08:41:19 +0100, Martin Kersten wrote:
at some point commands should become patterns. There is no limitation on the number of arguments per se.
I know, but I just needed 16, and keeping it a command was just about simpler than switching it to a pattern ;) Besides, 16 is a more logical number than 12 :D
participants (2)
-
fabian Groffen
-
Martin Kersten