Charles O Nutter wrote: > On 7/17/06, *Ola Bini* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: > > An interesting side note is that args are just local vars in Java...0 is > self for non-static methods, 1, 2, 3 would be the first, second, and > third args, and anything beyond that is a "normal" local variable. > There's no reason we couldn't do the same by specifying a specific > format for the stack frame: > > 0 = self (and in Ruby there's always a self) > 1 = block arg (nil if nothing, maybe true if available for yield, and a > proc if using &block arg) > 2 thru n = normal args > n + 1 = rest arg > > Then all a method needs to know is how many args it expects, and whether > it expects a rest arg or not to size the array. Having the block field > on the frame might also eliminate the Iter nonsense in JRuby currently. >
Yep. (If that wasn't obvious from my previous posting, args on the stack frame is how Lisp does it too). Sounds great. Let's do it! =) -- Ola Bini (http://ola-bini.blogspot.com) JvYAML, RbYAML, JRuby and Jatha contributor System Developer, Karolinska Institutet (http://www.ki.se) OLogix Consulting (http://www.ologix.com) "Yields falsehood when quined" yields falsehood when quined. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Jruby-devel mailing list Jruby-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jruby-devel