Hi Will,<br><br><div class="gmail_quote">On Thu, Dec 1, 2011 at 11:30 PM, Will Dietz <span dir="ltr"><<a href="mailto:wdietz2@illinois.edu">wdietz2@illinois.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Thanks for the heads-up and description.<br>
<br>
Looking at classpath's implementation (String.java, VMString.java) I<br>
don't see why we couldn't do exactly the same thing for the OpenJDK<br>
port.<br>
<br>
Only issue is that there is no equivalent of VMString.java in OpenJDK,<br>
perhaps we could just pull it in (the file I mean) and use it in both<br>
ports?  That would be the simplest and fine with me.<br>
<br>
An alternative is to basically duplicate the equivalent code into<br>
VMKit somewhere?  The code would create a WeakHashMap early on and<br>
would have a method that does exactly what VMString::intern does in<br>
VMString.java, which would be straightforward.<br></blockquote><div><br></div><div>Yes, I believe that's possible. Depends if openjdk needs fancy things when creating a WeakHashMap. </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
Engineering details aside your change sounds fine and if the above<br>
ideas don't immediately sound good then just do what you were going to<br>
do and I'll sort out the OpenJDK version when I get a chance :).<br></blockquote><div><br></div><div>Great! I'll submit the change then, and let you deal with the breakage :) </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<br>
In related news, last night I successfully got eclipse running! :D<br>
Was a nice milestone, and wanted to share.  Still can't run all the<br>
dacapo codes yet, though :).<br></blockquote><div><br></div><div>This is great news! Does that mean precompilation and GC work on the openjdk port? That's awesome. Can't wait to try it out!</div><div><br></div><div>
Nicolas</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<span class="HOEnZb"><font color="#888888"><br>
~Will<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Thu, Dec 1, 2011 at 3:15 PM, Nicolas Geoffray<br>
<<a href="mailto:nicolas.geoffray@gmail.com">nicolas.geoffray@gmail.com</a>> wrote:<br>
> Will,<br>
> I plan on submitting this patch that I know will break openjdk. Basically,<br>
> I'm changing the way we intern strings to call a Java method defined in the<br>
> classlib. For GNU Classpath, it's easy, it just calls VMString::intern. I<br>
> don't know if OpenJDK has a Java implementation that can be called directly.<br>
> Note that calling VMString::intern comes pretty early in the game: the first<br>
> time a string is created in J3, it will call it.<br>
> An easy fix for the openjdk port is to set JavaUpcalls::internString to<br>
> NULL. The Jnjvm::constructString method will then not attempt to intern the<br>
> string and call a Java  method. Of course that is not spec compliant,<br>
> because some strings must be interned, but at least it should not crash on<br>
> you.<br>
> The rationale behind that change is that the current implementation did not<br>
> really work and was adding unneeded complexity on top of vmkit (more or less<br>
> adding C++ weak references). It was also storing Java objects into a<br>
> std::map, and I'd like to avoid that.<br>
> Will, let me know if the change and my intermediate fix proposal is ok with<br>
> you.<br>
> Cheers,<br>
> Nicolas<br>
</div></div></blockquote></div><br>