Le 30/3/15 09:10, Marcus Denker a écrit :
On 29 Mar 2015, at 10:32, stepharo <steph...@free.fr> wrote:

Before that I would like that the compiler outputs classes definition in an 
environment (that can be the default one) but that can be the one
I want and specified from the outside of the compiler.
For installing, it is the ClassInstaller that does that (and yes, it has an 
environment).

What the compiler does not have is to look up references e.g. to symbols 
regarding to an environment, but that is because we
don’t have that concept right now in the system in general. globals/class vars 
are requested from the class (which defines its environment).

So in general, we first need a use case, else it is not clear what to do…

Sc1:
Imagine that Max wants to load code that if the code is incomplete or contains Undefined the code is not loaded at all. To do so we need to be able to compile the code in a separate namespace. Then on success copy/install to another one.

sd := SystemDictionary new.
OpalCompiler
    inputEnvironment: Smalltalk globals
    outputEnvironment: sd.

This shows that probably sd should be linked to Smalltalk globals to be able to find new added class (that will not be found in sd).

Sc2:
We should be able to compile Opal beside Opal in a sister environment, modify it by compiling method there.

Sc3:
    Guillermo's Tornado Infrastructure.
    Instead of installing, copying manually and hacking, probably that
    guillermo needs a compiling infrastructure were we can say
        - look for literals in this special array or environemtn
        - look for globals in this one
        - put the returns in the other literalas environment and globals.

Stef








Reply via email to