Primitive argument count

Bert Freudenberg bert at impara.de
Tue Aug 23 14:25:40 UTC 2005


I just noticed that many primitives do not check methodArgumentCount  
but just pop a fixed assumed number of arguments. Wouldn't it be  
better to always check this and fail if called with the wrong count?  
I guess stack corruption isn't as big a problem for us as it is for  
other systems, but still ... Another idea might be to "pop: self  
methodArgumentCount + 1" in the end so it doesn't matter how many  
arguments were supplied.

- Bert -




More information about the Vm-dev mailing list