On Saturday, July 20, 2002, at 02:51 AM, Marcus Denker wrote:
Tim's approach allows to wait with translation until there is time to do it. He suggested to have a single flag in each method, but you could actually do more: 1) do profiling to find the hotspots and 2) get some typeinformation.
The nice thing about having the compiler in the image is that it is in the image, which means it is very accessible, improvable, able to make full use of decent language facilities, reflection etc. In fact it is my observation that it is always nice to have as much as possible in the image and as little as possible in the vm. I really dislike seeing prims that allocate objects (aside from the ones really needed) since they then tend to get involved in messing with GC policy. This should be deferred to the image, not messed up in the vm. As peripherally mentioned before, anothe nice thing about a deferred translator is that it may very well be able to decide that there is nothing worth doing for many cases, particularly those involved in image startup. Doing nothing is often much much quicker than any alternative. (My favourite TECO instruction, of which I remember nothing but the comment, said - ' this instruction does nothing, but does it very fast')
tim@sumeru.stanford.edu