Unable to run _ByValue example

Brian Goetz brian.goetz at oracle.com
Fri Jan 29 23:52:04 UTC 2016


Just a periodic reminder that performance of all the prototypes is going to be pathologically awful for quite a while; attempting to measure performance at this early stage counterproductive.  We’re still in the “validating that the model works” stage.  Prototype accordingly!  

On Jan 29, 2016, at 6:48 PM, Srikanth <srikanth.adayapalam at oracle.com> wrote:

> 
> 
> On Monday 28 December 2015 10:30 AM, Srikanth wrote:
>> Hello Boaz,
>> 
>> This is a known issue - ATM, the VM does not yet handle the changes to signatures
>> that embed 'Q' in them to denote value types and it may be some time before the
>> VM support for this is fully there.
>> 
>> We are exploring some interim options to allow interested early access testers to
>> experiment with the usability aspects of the value type model (knowing that attendant
>> performance improvements are yet to come)
> 
> Hello Boaz,
> 
> As of http://hg.openjdk.java.net/valhalla/valhalla/langtools/rev/659f44b99b6c, pushed on
> Jan 22nd, by using the javac option -XDGenerateValueAsReference, you can produce class
> files that can be run - the new syntax for value types will be accepted, you will not yet
> see any performance improvements - This is iput in place to enable early testers to
> get a feel for the usability model and share feedback. Please try this out.
> 
> Thanks!
> Srikanth
> 
>> 
>> Stay tuned.
>> Thanks!
>> Srikanth
>> 
>> On Friday 25 December 2015 05:56 PM, Boaz Nahum wrote:
>>> (last pull valhalla today)
>>> Trying this:
>>> 
>>> public final __ByValue class Point {
>>>     final int x;
>>>     final int y;
>>>     Point(int x, int y) {
>>>         this.x = x;
>>>         this.y = y;
>>>     }
>>> 
>>>     public static void main(String[] args) {
>>>         Point p = __Make Point(5, 6);
>>>     }
>>> }
>>> 
>>> (Compile file directly with bin/javac.exe not using IntelliJ)
>>> 
>>> When trying to run:
>>> 
>>> F:\Dev\JDKBuild\valhalla\build\windows-x86_64-normal-server-release\images\jdk\bin\java 
>>> -cp F:\Dev\IntelliJProjectsOut\LearnJDK10\production\LearnJDK10
>>> by_val.Point
>>> java.lang.ClassFormatError: Method "<vminit>" in class by_val/Point
>>> has illegal signature "(II)Qby_val/Point;"
>>>    at java.lang.ClassLoader.defineClass1(Native Method)
>>>    at java.lang.ClassLoader.defineClass(ClassLoader.java:759)
>>>    at java.lang.ClassLoader.defineClass(ClassLoader.java:835)
>>>    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:184)
>>>    at java.net.URLClassLoader.defineClass(URLClassLoader.java:547)
>>>    at java.net.URLClassLoader.access$100(URLClassLoader.java:87)
>>>    at java.net.URLClassLoader$1.run(URLClassLoader.java:413)
>>>    at java.net.URLClassLoader$1.run(URLClassLoader.java:397)
>>>    at java.security.AccessController.doPrivileged(Native Method)
>>>    at java.net.URLClassLoader.findClass(URLClassLoader.java:396)
>>>    at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
>>>    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:262)
>>>    at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
>>>    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:503)
>>> Error: A JNI error has occurred, please check your installation and try again
>>> Exception in thread "main"
>>> Process finished with exit code 1
>>> 
>>> Thx
>>> Boaz
>> 
> 



More information about the valhalla-dev mailing list