On 8/16/06, Xiao-Feng Li <[EMAIL PROTECTED]> wrote:

On 8/16/06, Mikhail Fursov <[EMAIL PROTECTED]> wrote:
>>
>> So why can't we optimize native (JNI) calls from Java code using
annotations
>> similar to those used to annotate helper's slow call above?
>> Once developer annotates native call with information about it's
sideffects
>> we can optimize the call and reduce JNI overhead.
>> ?

>This is off-topic now. :-)  But one (crazy) idea is to compile the
>native code with JVM compiler as well so that both Java and native
>code can use same IR.


Let's skip JNI optimization on this thread, I am sorry I brought it up.

  -  So we will write the inlinable  fastpaths wherever possible in pure
  Java, using an annotated calling convention to call the slowpath ( to
  support developer freedom :-) ).
  - Where the fastpaths cannot be expressible in pure Java, we will
  first use asm to develop the helper and a custom calling convention to
  invoke and test it
  - As and when the magic classes are all available( I have not seen
  Alex and Weldon's code ), we will switch the second set  above to Java +
  magic and start inlining these as well
  - We can start with the new object allocation helper and .Jet if we
  want to, I guess
  - For folks who are interested in this, the core helpers live in
  vmcore\src\jit\jit_runtime_support.cpp and the exports in
  vmcore\include\jit_export.h.  There is platform specific stuff under
  vmcore\util\[platform]\base

Thanks,
Rana



---------------------------------------------------------------------
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