To optimize stack allocation. Maybe even better would be to take value first. If the self or value argument is calculated as a result of try-catch/try-finally block (something like @x = begin 1; rescue; end, we need to save previous parameters to locals and enter the try-block with an empty IL stack. The less parameters before the less allocated variables on stack.
Tomas -----Original Message----- From: John Lam (IRONRUBY) Sent: Tuesday, May 20, 2008 10:05 PM To: Tomas Matousek; IronRuby External Code Reviewers Cc: [email protected] Subject: RE: Code Review: Accessors I'm wondering why SetInstanceVariable() has the funny signature: public static object SetInstanceVariable(object self, object value, CodeContext/*!*/ context, SymbolId name) { which is quite unlike other method signatures that we're used to seeing. Otherwise, looks good! -John > -----Original Message----- > From: Tomas Matousek > Sent: Tuesday, May 20, 2008 7:14 PM > To: IronRuby External Code Reviewers > Cc: [email protected] > Subject: Code Review: Accessors > > tfpt review /shelveset:Accessors;REDMOND\tomat > > Fixes bug #20242: send attr_accessor. > Uses rule generators to implement attribute accessors. Previously both > used RubyMethodGroupInfo that was hacked to make them work. The hack is > not needed anymore. > > Tomas _______________________________________________ Ironruby-core mailing list [email protected] http://rubyforge.org/mailman/listinfo/ironruby-core
