At 11:00 AM +0100 11/17/04, Leopold Toetsch wrote:
We should create some syntax to access the object in methods.

Well, there are two issues here.

First is in pasm/bytecode. For that, fetching things explicitly with interpinfo is just fine, so the code sequence:

     interpinfo P16, .INTERPINFO_CURRENT_OBJECT

works.

At the PIR level, self is just a special-case .local, so I don't see much reason to do anything special there either -- the method tag on the .sub declaration should be enough to tell the pir compiler that it ought to go fetch the object into a register for use later on.

If you wanted to use this as a time to tie named .local declarations to lexical pad slots and global names so the spilling code can refetch spilled things from the pad/namespace rather than from a private backing array, that'd be fine too. self would just spill in from the interpreter info rather than a pad or namespace.
--
Dan


--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to