Re: [Pharo-dev] [Slots] Invisible Slots

2015-02-23 Thread Marcus Denker
On 19 Feb 2015, at 10:19, Marcus Denker marcus.den...@inria.fr wrote: 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

Re: [Pharo-dev] [Slots] Invisible Slots

2015-02-19 Thread Marcus Denker
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:

Re: [Pharo-dev] [Slots] Invisible Slots

2015-02-19 Thread Marcus Denker
- generate better byte code, the reflective read is of course slow. this is easy. What we need to do is to override #emitValue: and #emitStore: emitValue: methodBuilder methodBuilder pushInstVar: baseSlot index; pushLiteral:

Re: [Pharo-dev] [Slots] Invisible Slots

2015-02-19 Thread Marcus Denker
On 19 Feb 2015, at 10:45, Marcus Denker marcus.den...@inria.fr wrote: - generate better byte code, the reflective read is of course slow. this is easy. What we need to do is to override #emitValue: and #emitStore: emitValue: methodBuilder methodBuilder

Re: [Pharo-dev] [Slots] Invisible Slots

2015-02-13 Thread Marcus Denker
More progress… I will commit it after the CI is working again. - fix #usingMethods for non installed Slots - not yet completely working PropertySlot implementation (will add issue tracker entries for what is missing) - move example Slots to Slots-Examples - rename TestSlot and move it

Re: [Pharo-dev] [Slots] Invisible Slots

2015-02-13 Thread Sven Van Caekenberghe
On 13 Feb 2015, at 18:38, Marcus Denker marcus.den...@inria.fr wrote: More progress… I will commit it after the CI is working again. - fix #usingMethods for non installed Slots - not yet completely working PropertySlot implementation (will add issue tracker entries for what is

Re: [Pharo-dev] [Slots] Invisible Slots

2015-02-11 Thread Marcus Denker
On 07 Feb 2015, at 18:35, Marcus Denker marcus.den...@inria.fr wrote: On 07 Feb 2015, at 18:29, Marcus Denker marcus.den...@inria.fr mailto:marcus.den...@inria.fr wrote: On Fri, Feb 6, 2015 at 10:13 PM, stepharo steph...@free.fr mailto:steph...@free.fr wrote: I want

Re: [Pharo-dev] [Slots] Invisible Slots

2015-02-08 Thread Marcus Denker
On 07 Feb 2015, at 21:11, Eliot Miranda eliot.mira...@gmail.com wrote: On Sat, Feb 7, 2015 at 9:35 AM, Marcus Denker marcus.den...@inria.fr mailto:marcus.den...@inria.fr wrote: On 07 Feb 2015, at 18:29, Marcus Denker marcus.den...@inria.fr mailto:marcus.den...@inria.fr wrote:

Re: [Pharo-dev] [Slots] Invisible Slots

2015-02-07 Thread Ben Coman
On Sat, Feb 7, 2015 at 5:13 AM, stepharo steph...@free.fr wrote: I want relationships for certain modeling purposes What I like is that we should arrive to get a collection of useful slots with optimal implementation instead all of us reinventing the wheel. Stef In the Flexible Object

Re: [Pharo-dev] [Slots] Invisible Slots

2015-02-07 Thread Marcus Denker
On Fri, Feb 6, 2015 at 10:13 PM, stepharo steph...@free.fr wrote: I want relationships for certain modeling purposes What I like is that we should arrive to get a collection of useful slots with optimal implementation instead all of us reinventing the wheel. I have started to collect the

Re: [Pharo-dev] [Slots] Invisible Slots

2015-02-07 Thread Marcus Denker
On 07 Feb 2015, at 18:29, Marcus Denker marcus.den...@inria.fr wrote: On Fri, Feb 6, 2015 at 10:13 PM, stepharo steph...@free.fr mailto:steph...@free.fr wrote: I want relationships for certain modeling purposes What I like is that we should arrive to get a collection of useful slots

Re: [Pharo-dev] [Slots] Invisible Slots

2015-02-07 Thread Eliot Miranda
On Sat, Feb 7, 2015 at 9:35 AM, Marcus Denker marcus.den...@inria.fr wrote: On 07 Feb 2015, at 18:29, Marcus Denker marcus.den...@inria.fr wrote: On Fri, Feb 6, 2015 at 10:13 PM, stepharo steph...@free.fr wrote: I want relationships for certain modeling purposes What I like is that we

Re: [Pharo-dev] [Slots] Invisible Slots

2015-02-06 Thread stepharo
I want relationships for certain modeling purposes What I like is that we should arrive to get a collection of useful slots with optimal implementation instead all of us reinventing the wheel. Stef Le 6/2/15 18:15, Marcus Denker a écrit : On 06 Feb 2015, at 11:50, Marcus Denker

Re: [Pharo-dev] [Slots] Invisible Slots

2015-02-06 Thread Marcus Denker
On 06 Feb 2015, at 11:50, Marcus Denker marcus.den...@inria.fr wrote: Next: When building classes with Slots, the class builder need to call back on the slot and hand the class to each. Then the slot can reflectively change the class, e.g. the PropertySlot will check if there is

Re: [Pharo-dev] [Slots] Invisible Slots

2015-02-06 Thread Marcus Denker
Next: When building classes with Slots, the class builder need to call back on the slot and hand the class to each. Then the slot can reflectively change the class, e.g. the PropertySlot will check if there is already a hidden property base slot and if not, add it reflectively). This is

Re: [Pharo-dev] [Slots] Invisible Slots

2015-02-05 Thread Marcus Denker
On 05 Feb 2015, at 21:51, Clément Bera bera.clem...@gmail.com wrote: I also can't wait to have a slot to automatically add instance variables in the additional method state for CompiledMethod subclasses. This shouldn't be tricky for you any more, should it ? I'm bored of not being able to

Re: [Pharo-dev] [Slots] Invisible Slots

2015-02-05 Thread Marcus Denker
On Mon, Jan 26, 2015 at 6:03 PM, Marcus Denker marcus.den...@inria.fr wrote: Next: Hidden ivar This is now finally in #478. This is for notch just a subclass to have a normal InstanceVariable in a hidden version, later we will use the wrapping machism that we use already for MetaLinks to

Re: [Pharo-dev] [Slots] Invisible Slots

2015-02-05 Thread Clément Bera
I also can't wait to have a slot to automatically add instance variables in the additional method state for CompiledMethod subclasses. This shouldn't be tricky for you any more, should it ? I'm bored of not being able to add instance variables to compiledMethod subclasses :-). Having

Re: [Pharo-dev] [Slots] Invisible Slots

2015-01-26 Thread Marcus Denker
On 24 Jan 2015, at 14:24, Marcus Denker marcus.den...@inria.fr wrote: On 24 Jan 2015, at 11:24, Marcus Denker marcus.den...@inria.fr mailto:marcus.den...@inria.fr wrote: Hi, One of the power of slots is the concept of Virtual Slots that do not have an ivar to store their state.

Re: [Pharo-dev] [Slots] Invisible Slots

2015-01-26 Thread Marcus Denker
On 27 Jan 2015, at 07:43, Tudor Girba tu...@tudorgirba.com wrote: The use case is to offer first-class support for objects that would otherwise store instance variables in opaque dictionaries. Yes, another way to put it: we move just code that is at the base level now to an “opened up”

Re: [Pharo-dev] [Slots] Invisible Slots

2015-01-26 Thread Marcus Denker
On 26 Jan 2015, at 23:28, Ben Coman b...@openinworld.com wrote: hidden ivar sounds like it would make understanding the system more complicated. What is its use-case? It will never be used for cases where it needs to be understood. Imagine a PropertySlot. This is like an ivar, but all

Re: [Pharo-dev] [Slots] Invisible Slots

2015-01-26 Thread Tudor Girba
The use case is to offer first-class support for objects that would otherwise store instance variables in opaque dictionaries. Doru On Mon, Jan 26, 2015 at 11:28 PM, Ben Coman b...@openinworld.com wrote: hidden ivar sounds like it would make understanding the system more complicated. What is

Re: [Pharo-dev] [Slots] Invisible Slots

2015-01-26 Thread Ben Coman
hidden ivar sounds like it would make understanding the system more complicated. What is its use-case? On Tue, Jan 27, 2015 at 1:03 AM, Marcus Denker marcus.den...@inria.fr wrote: On 24 Jan 2015, at 14:24, Marcus Denker marcus.den...@inria.fr wrote: On 24 Jan 2015, at 11:24, Marcus Denker

Re: [Pharo-dev] [Slots] Invisible Slots

2015-01-24 Thread Marcus Denker
On 24 Jan 2015, at 11:24, Marcus Denker marcus.den...@inria.fr wrote: Hi, One of the power of slots is the concept of Virtual Slots that do not have an ivar to store their state. But of course, some uses fo this concept want to store state in the object. (e.g. imagine a property slot,