new image format

Anthony Hannan ajh18 at cornell.edu
Fri Oct 21 16:37:40 UTC 2005


 > Are you there AJH?

Hi guys, I'm here, but now just a lurker. I'm now a PhD student at 
Georgia Tech, pursuing secure but open distributed programming systems 
(imagine a single distributed Squeak image shared by everyone). I am 
starting from a clean slate but hope to interoperate with Squeak someday.

My philosophy is to expose everything in the same language, or put 
another way, to have objects all the way down to the hardware. If you 
want security (to prevent novices from manipulating the stack, for 
instance) use security constructs such as object-capabilities instead of 
an arbitrary virtual machine or kernel boundary. In other words, don't 
have a VM. For portability, I would exchange code and data in a neutral 
format then convert/compile it to native format upon receipt (instead of 
everytime you execute it as with a JIT compiler or implicitly with an 
interpreter).

I guess this philosophy caused me to exposed the stack in the image in 
my VI4 project. I agree now that frames/contexts are a better model than 
a stack and Squeak should keep the context model. I let my desire for 
speed to pollute the model. If I had to do it over I would try to 
implement the contexts model more efficiently, by passing arguments in 
registers and making allocation (including context allocation) really 
fast. Allocation should simply be a pointer advance and pointer test for 
overflow and this could be inlined. Instead today we dynamically 
construct the header and identity hash and initialize all the slots to 
nil, consuming much more time. The header could be preconstructed for 
each class and the identity hash can be constructed on demand, since 
most objects don't use it anyway. Initializing slots can be done 
out-of-band by a thread that simply initializes all slots in free space, 
advancing the end of free space as it goes along. With this scheme, an 
overflow would first finish initializing slots and grow free space, and 
then if still not enough space, garbage collect.

Anyway, I know all this is too ambitious for version 4, but it's 
something to think about. Also, I want to thank Marcus Denker for taking 
up my compiler project. I will be here if you have any questions.

Cheers,
Anthony




More information about the Squeak-dev mailing list