harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Etienne Gagnon <egag...@sablevm.org>
Subject Re: VMI Questions
Date Tue, 28 Mar 2006 15:50:40 GMT
>>On the other hand, I don't
>>understand why the hyluni library assumes that it will be necessarily
>>loaded by a specific VM library sitting in a particular directory.
> It doesn't.  The hyluni library code uses macros that expand out to a
> function table maintained by the VMStruct as you elude to below.
> The only functions that are exported by the VM are [3]
>   VMInterface* JNICALL VMI_GetVMIFromJNIEnv(JNIEnv* env)
>   VMInterface* JNICALL VMI_GetVMIFromJavaVM(JavaVM* vm)

Exactly.  Now, these 2 functions are global.  How does the hyluni
library resolves these two global references?  As far as I can see, in
the build/install process, the hyluni library simply assumes that the
system's dynamic linker will resolve them assuming they reside in a
specific file.  See build.xml:

<!-- Don't copy the VMI library. the one we build is a stub that is
     replaced by a concrete implementation by the VM-implementor -->
<patternset excludes="*vmi*${shlib.suffix}*" />

Unless I am missing something?

>>The problem I see, with the current approach, is that it makes it
>>impossible to provide distinct VM libraries for different purposes
>>(debugging, faster execution, profiling, ...), as they can't be all in a
>>single file.
> We want that too, and I believe that it is already possible.

I am surely missing something...


Etienne M. Gagnon, Ph.D.            http://www.info2.uqam.ca/~egagnon/
SableVM:                                       http://www.sablevm.org/
SableCC:                                       http://www.sablecc.org/

View raw message