On Nov 16, 2012, at 8:02 PM, Marcus Denker <[email protected]> wrote:

> 
> On Nov 16, 2012, at 6:55 PM, Stéphane Ducasse <[email protected]> 
> wrote:
> 
>> While I love the idea of sharing the systemDictionary class binding in the 
>> method to gain immediate update in case of
>> change I was questioning myself if we could not gain from not having (for 
>> example to get parametrized modules).
>> 
>> The point is that we are not constantly changing classes especially when not 
>> programming but running program.
>> 
> 
> 
> The alternative to the current scheme would be to not hard-code the class at 
> all in the method at compile time.
> 
> Instead of looking up the class and compiling the shared literal association, 
> we could compile a message send
> to the current environment.
> 
> self class environment at: #NameOfClass
> 
> And it should be noted that this could be evaluated at Jit-compile time... 
> the same is true for ivar offsets. There
> is no reason why these should be visible at the image level. The image could 
> talk about names and let the runtime
> translator infrastucture do the lookups needed for making a static version 
> that is fast.
> 

And it should be noted that we don't loose anything:

 -> Undeclareds would disappear. Using non-existing classes leads to a runtime 
error, like sending
      non-existing messages.
->  It would be slower in the pure-interpreter case. But anyone who knows me 
knows that I want to get
      rid of bytecode as a user-visible artefact... this means, the interpreter 
would either be an AST interpreter
      or it would "JIT" the AST into the virtual processor instructions before 
running.

So: the way to go.

        Marcus


--
Marcus Denker -- http://marcusdenker.de


Reply via email to