FFI problem: too many arguments

Dan Ingalls Dan at SqueakLand.org
Sun Feb 19 00:42:57 UTC 2006


>There is no fix for this problem. In Squeak, the number of parameters for a method invocation is limited to 15.

I think there may be a relatively simple solution for extending the number of arguments to 31.  I realize that it is only a factor of two, and folks may consider it not worth worrying about this unless all limits are to be relieved but, if I'm correct, I'd be remiss if I didn't point this out.

 It looks to me like the method headers can take another bit of argCount as is, and the double-extended-do-anything bytecode can specify up to 31 arguments on a send.  I added the DEDA bytecode for other reasons, and may just never have bothered extending argcount at the time, figuring such code is, um, not generally found in Smalltalk programs.

So  if I'm not mistaken about the argCount bits in the method header and the DEDA bytecode, all that remains is a bit of compiler work and a few methods in CompiledMethod which shouldn't add up to more than an hour or two for someone who knows the territory.

FWIW

	- Dan



More information about the Squeak-dev mailing list