On Thursday 28 September 2006 17:57, Matt Diephouse wrote: > Why not handle this like we handle subroutines? That is, why don't we > have a find_method opcode that returns a bound method? That simplifies > parsing for IMCC and makes PIR a little simpler. > obj.'abc'() # call 'abc' method of obj > obj.abc() # same as above > $P0 = find_method obj, abc # get bound method indicated by abc symbol > $P0() # actually call it
Does that make emitting PASM a lot more difficult? All of a sudden, invoking $P0 means that $P0 has to know that it stores something in the appropriate invocant PMC register. I suppose that means creating a CurriedInvocantMethodCall PMC that does all of this magic in invoke(). That's not awful, but.... -- c