Gregory Shimansky wrote:
On 10 April 2008 Aleksey Shipilev wrote:
Hi Megha!

Probably you're on the right way. Modifying the String class is tough
task since it is kernel class and should be provided with appropriate

Actually it is formally not a kernel class. It is not included with other kernel classes in DRLVM. But VM uses the knowledge of field names in String that hold the data (they are count, offset and value).

That's right. It started off life as a kernel class, but we agreed there was enough common behavior in there that it made sense to share it across all implementations. However, recognizing that the VM/JIT will have some knowledge of it's shape, any changes require special consideration first (a so-called 'golden-ticket').

see: http://markmail.org/message/bdme4cylnlmltkwt

Regards,
Tim

support from the VM. vm_strings.cpp is the part of DRLVM that provides
such the support. You must be able to recompile it during the normal
build process of DRLVM then, and particularly this thing would reside
in libharmonyvm.so or harmonyvm.dll.

Thanks,
Aleksey.

On Thu, Apr 10, 2008 at 6:18 AM, Megha Chauhan <[EMAIL PROTECTED]> wrote:
Hello,

 > I am a graduate student at the university of Illinois at chicago,USA.
 > As part of my research I have modified the String class of harmony
 > JDK. I have added another character array(value_sample) to the class
 > which keeps a copy of the value array. Now the problem I am facing is
 > in the case of a string literal since no constructor for the string
 > class is called explicitly , the value of value_sample array(which was
 > added by me) is set to null. I have tried to look into creation of
 > string constants but have not found much except that it is
 > instantiated by the native code at compile time. I have looked in to
 > the vm_strings.cpp class and have seen that the VM initialises the
 > fields for String object in the init_fields method.
 > I was thinking of adding the new filed I have crested here and
 > recompiling the code.
 > Am I on the right track?
 > Also I would like to know which DLL file holds the code for
 > vm_string.cpp class and how can I recompile the DLL ?
 > Your help will be greatly appreciated as I have been struggling with
 > this issue for more than a month now.
 > Thanks and Regards
 > Megha Chauhan



Reply via email to