Megha Chauhan said the following on 10.04.2008 16:39:
Hello everyone,

Thanks a lot for the response. Now, since I have a very small change in the
String class is it possible for me to just add that extra field in the
init_fields method of vm_string.cpp and somehow recompile the DLL?
Basically I am not sure what kind of setup I need to do this change?
I am still not very clear as to what classes are involved in a String
Literal creation.
As far as I understand there are no Java methods involved. For example when
we write something like :
String str ="Test String" ;
The VM automatically calls the native methods and instantiates a String
object at compile time itself.
The String.intern() method can be called on already existing String objects
and not during string literal creation.

AFAIK when a string is created in Java no VM code is executed, all of the stuff is done in Java only. The vm_strings.cpp code is used for creating string objects from native code. If you grep for "string_create" you will see that it is used only in JNI and in VM initialization code.

The String.intern is also implemented in Java code since HARMONY-1016 was integrated.

Can someone point me to any documentation that tells about the sequence of
methods that are called for a string literal creation?
And what sort of setup would I need to make the changes to vm_strings.cpp
class and recompile the DLL.

For recompiling the VM you need the standard setup for building DRLVM. See the URL that Aleksey Shipilev gave in his reply.

--
Gregory

Reply via email to