Quote Originally Posted by CornedBee
The thing about JITting is that you usually don't have the time to do optimizations. The VM needs that compiled code, and it needs it NOW. JITters such as the (very fast) experimental Cacao JavaVM developed at my university don't even do fancy register allocation.
I guess we can't really continue the discussion because I don't know the dirty details of the JIT'ing process. However, I do know that is has been publically stated that the JIT compiler DOES do optimizations. The extent to which it does these, or what they are exactly I do not know.

Quote Originally Posted by CornedBee
Also, I very much doubt that the JITter is given runtime information. The compiled code will be reused, and by that time the reference might point to a different object. If you recompiled the code every time it is executed, you'd lose all the benefits of JITting; your VM would be considerably slower than a byte code interpreter. That's the way JITting works: you trade a slightly slower execution the first time around for considerably faster execution the next time the code is called.
Again, can't respond because I am unsure of the details. However, you do make it seem like it is a "well we cant do this resonably lets give up" type situation. From my experiance the development at MS isn't like that at all. It is more like "well we have this cool idea but it is too 'expensive' right now...so lets put the groundwork for doing it in the future in and put as much of the idea as we can into play and then think of ways to make it more affordable'. This has however been an interesting discussion, given me a lot to think about, thanks for that.