I started to implement PropertySlot, this uses hidden slots, initialisation (to set the empty dictionary of the base slot), virtual slots (the proper slots), reflectively changing the class both when adding and removing (to add the base slot and remove it as needed).
Next tiny step: 14914 #initializeSlots: should not skip hidden slots https://pharo.fogbugz.com/f/cases/14914/initializeSlots-should-not-skip-hidd... Now the slots get correctly called when initialising an object. To test: Object subclass: #TT slots: { #tt => PropertySlot } classVariables: { } category: âPlayground' The slot will add an #initialize methods to the class when it gets installed. When you inspect TT new you can see just the tt slot (you can change it in the inspector). Adding an accessor for tt will show what the compiler does: 21 <20> pushConstant: #tt => PropertySlot 22 <70> self 23 <E1> send: read: 24 <7C> returnTop this means that it compiles a reflective read for that slot. next: -> remove the hidden slot when removing the last property slot -> add a GTInspector view that shows the *real* object layout -> when adding a propertySlot higher up in the hierarchy where there are already some down, we need to move the base slot up. -> generate better byte code, the reflective read is of course slow. Tiny steps⦠Marcus