[Vm-dev] Request for review of VMMaker-dtl.262.mcz

Stefan Marr smalltalk at stefan-marr.de
Fri Jan 6 19:53:21 UTC 2012


On 06 Jan 2012, at 17:33, David T. Lewis wrote:

> 
> Thanks, this is a good idea to add an explicit check for invalid
> argument count, and it would cost nothing in performance. I'll
> wait for any further feedback on this, and include add the check
> in a future update.

Why not just change the current test around?
I see a conceptual problem with that test anyway.
By testing for 3 arguments, you are pulling an invariant out of primitivePerformAt: and check it upfront. That seems to me like a 'maintainability' issue.

While if you would check for 5 arguments and do the mirror thing in the success case, and the old stuff in the else branch, you would get the old error handling behavior and would only test an invariant local to primitivePerformInSuperclass.


Best regards
Stefan




-- 
Stefan Marr
Software Languages Lab
Vrije Universiteit Brussel
Pleinlaan 2 / B-1050 Brussels / Belgium
http://soft.vub.ac.be/~smarr
Phone: +32 2 629 2974
Fax:   +32 2 629 3525



More information about the Vm-dev mailing list