On 6/28/06, Pavel Afremov <[EMAIL PROTECTED]> wrote:
You can see my comments inline.



I think it's impossible to find max amount of stack that is required for
complex components, like JIT. But it's possible to put constraints for some
functions, which does simple compilation tasks.

hmmm... you may be right.  But I still think its worth asking the
question anyway.  Some observations.  It might be possible to build a
simple JIT that emits code and forward branch patch locations in one
pass.  The jit would do a "malloc()" for the code and patch records
thus conserving the stack.  A second pass would fixup the branch
patches. Given the constraints on *.class structure, it might be
possible to do a limit study on how big the JIT data structs could
become.  For example, the class file contains a struct called,
"Code_attribute".   This struct contains start_pc and end_pc that are
16-bit integers which point into the bytecode.  Does this limit the
size of the bytecode array to 64KB?  max_locals and max_stack are
limited to 64K.  It is understood that even if a limit study could  be
done on max jit hardware stack, the size might still be too big for a
practical JVM.  In any case, it would be nice to know.



--
Weldon Washburn
Intel Middleware Products Division

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to