On Sun, Apr 5, 2015 at 12:01 AM, stepharo <stepharo@free.fr> wrote:
Le 30/3/15 09:10, Marcus Denker a écrit :
On 29 Mar 2015, at 10:32, stepharo <stepharo@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
What would be exciting is in a "host-image" being able to generate an empty special-object Root-Object (like is held by the VM) as a guest-image inside the host-image, so you can push core elements into it until the guest is a running minimal-image, but standard tools can be used to debug it. I guess this might be like the simulator (which I haven't used) - but maybe that just simulates the VM so there are differences. </dreaming> btw (and just for interest), are there any tutorials for running the simulator. A quick google didn't bring up anything useful. cheers -ben