On 10/13/06, Gregory Shimansky <[EMAIL PROTECTED]> wrote:
On Thursday 12 October 2006 14:06 Mikhail Fursov wrote: > On 10/12/06, Pavel Pervov <[EMAIL PROTECTED]> wrote: > > Yes, lazy (interpreter style) resolution will solve the problem - JIT > > will never ask to load classes while compiling. > > Here we have different vision. What do you think, is it possible to go into > the endless resursion with lazy resolution? AFAIK it is not a matter of endless recursion. It just the a matter of how VM class loader determines CCE condition. If a class loading requested for a class which is being loaded already somewhere up the stack, it is determined as a CCE. This method is very effective and works just fine, I think RI uses something similar. It doesn't require analyzing the whole classes tree and exception is thrown only on demand.
Gregory, I just tried to hint that it's possible to write a code in Java when to resolve a class you need to execute one of its methods :) Note, that I do not mention compilation or JIT here at all. It's more general problem. -- Mikhail Fursov
