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