harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Weldon Washburn <weldon...@gmail.com>
Subject [jchevm] porting harmony classlib to JCHEVM
Date Fri, 10 Feb 2006 19:53:58 GMT
Archie Cobbs,

Do you know if anyone is working on a port of Harmony Classlib to
JCHEVM?  If false, I would like to start this port.  I can't guarantee
I have time to finish the port but intend to at least sketch out what
needs to be done so that others can join the effort.

I have started looking at JCHEVM to figure out how to glue the Harmony
Classlibrary kernel classes (see
…modules/kernel/src/main/java/java/lang/*.java) to the native entry
points listed in jchevm/libjc/native_lib.c.  The goal is to make only
absolutely essential mods to JCHEVM code.  Ideally, there would be
zero changes to JCHEVM.  All the "glue" would reside in JCHEVM's
private copy of Classlib's kernel classes.

Looking at Classlib's Class.java, about 17 of 40 APIs look to be a
simple conversion of a virtual method to a static method that takes a
"this ptr" as its first parameter.  For example, the method isArray()
in Class.java would be modified to look like the code below.  This
modified Class.java file would reside somewhere in the JCHEVM tree. 
The original Class.java file in the Harmony Classlib tree would remain

//    Harmony/modules/kernel/src/main/java/java/lang/Class.java
Public boolean isArray () {

            Boolean   bb = VMClass.wrapperIsArray(this);

            Return bb;


Because the wrapper is adding a layer of identically named methods and
thus potentially really confusing the name space, I renamed
java_lang_VMClass_isArray() to java_lang_VMClass_wrapperIsArray(). 
All the enties in _jc_ilib_table[ ] would also be "decorated" with



Weldon Washburn
Intel Middleware Products Division
View raw message