harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Garner" <robin.gar...@anu.edu.au>
Subject Re: [drlvm][magic] New Magic features proposal.
Date Tue, 23 Jan 2007 02:00:39 GMT
> On 1/22/07, Robin Garner <robin.garner@anu.edu.au> wrote:
>>
>> Couldn't you achieve exactly the same effect by using an annotation to
>> mark the called native method ?
>>
>> Such as
>>
>>   @FastNative
>>   public native fastNativeMethod(args...);
>>
>
> Robin,
> I think such an annotation is a good idea for native methods without GC.
> If GC enumeration is possible from within a native method call (arbitrary
> 3rd party JNI method), we have to create m2n stub.

Of course.  I am implicitly assuming that fast native calls are a feature
that only the VM will ever use (Magic is not something a user application
should be allowed to call).

I still don't see why there would be a problem generating a specific
calling sequence automatically (eg inserting the m2n stub) based on an
annotation on the target method, rather than encoding it directly in new
Magic calls.  I guess I'm assuming that whether GC is possible or not
depends on whether the callee method is marked @Uninterruptible, and that
the compiler can generate the method call accordingly.

Regards,
Robin

> --
> Mikhail Fursov
>



Mime
View raw message