On 25 Jun 2014, at 14:22, Marcus Denker <[email protected]> wrote:

> 
> On 25 Jun 2014, at 14:16, Tudor Girba <[email protected]> wrote:
> 
>> Very nice!
>> 
>> Next would be an example of how to specialize a slot :)
>> 
> 
> Yes, the next steps are:
> 
> - introduce abstract superclass for Slot
> 
For now there is a subclass InstanceVariableSlot, all Slot instances have been 
migrated.

> - Opal needs to delegate code generation to the Slot.
> 
This is now done. Opal now, in the semantic analysis phase, annotates slot 
accesses
as OCSlotVariable (OCInstanceVariable we can remove later).

Then when generating, it just forwards to the slot:

emitStore: methodBuilder

        slot emitStore: methodBuilder

To allow Slots subclasses to be implemented without knowledge of bytecode,
the next thing to add it the fallback:

> - The abstract slot generates by default reflective read/write access code

        Marcus

Reply via email to