[ANN] Chuck type inferencer
cputney at wiresong.ca
Mon Jun 7 01:32:55 UTC 2004
On Jun 5, 2004, at 9:17 PM, Lex Spoon wrote:
>> The first step would be to create a binary format for distributing
>> Squeak code that would be faster to load than fileOuts - ie,
>> the AST and generate byte code without having to do any parsing.
>> that would be modifying the interpreter to execute the binary format
> Note that there are differences between compressing for distribution
> compressing to save space in an image. In the former case you need to
> go all the way down to bytes, but in the latter you can choose to use
> object pointers in some places. One place this would likely help is in
> encoding symbols; you can store #nextPut: as a 4-byte object pointer
> instead of an 8+ byte string "n e x t P u t :".
Agreed. The paper I cited earlier mentions replacing strings in the AST
with indexes into a string table, as the same strings tend to appear in
several places in the tree. So the only real difference would be the
table used to intern symbols - for distribution a local symbol table
would be included in the file; within the image, we'd just use the
regular symbol table.
I suppose there would be some processing required to load a slim binary
method from a file into the equivalent of a CompiledMethod. References
to shared variables would be resolved, literals converted to objects,
symbols re-interned etc.
More information about the Squeak-dev