Proposal: Squeak-E = Squeak x Kernel-E

Stephen Pair spair at acm.org
Tue Jan 28 17:35:50 UTC 2003


> > Why the compiler? With the whole, err, 'war' on dynamic 
> scoping raging 
> > on in the other thread between Stephen and Avi ;), I think there's 
> > enough complexity already. Can we leave out the compiler for now?
> If I'm understanding the above correctly then the compiler 
> _already_ does this. The scope for compiling in instance 
> variables, class variable (both inheritd up the class chain 
> of course) and each classes environment, plus Undeclared. And 
> maybe some more details I forget atte moment. It just happens 
> that Smalltalk is the default environment for all the classes 
> currently in the sytem.

With runtime binding, you have to do the lookup at runtime.  You could
make the VM actually send #value to bindings, and have a binding attempt
locate a runtime definition (by looking up the stack) before answering
the value of the static (compile time) binding.  Performance wise, this
might not be so good (every access to a global binding would access
thisContext), but it would be an interesting experiment.  At runtime,
you could override the global (or static environment) definition of any
variable.  Alternatively, instead of using globals directly, you could
always go through some construct like:

	Env at: #Object

...which would bubble up to the Smalltalk dictionary if not overridden
by an interposing runtime environment.

- Stephen



More information about the Squeak-dev mailing list