Home >Technology peripherals >It Industry >JVMLS 2016: A Recap of Java Virtual Machine Language Summit
2016 Java Virtual Machine Language Summit: Looking to the Future of JVM
The 2016 Java Virtual Machine Language Summit (JVMLS) brings together language designers and JVM engineers to discuss the future development of JVM and its impact on the Java language. The summit focused on key issues such as Project Jigsaw, Project Valhalla and the future of virtual machines.
Modular: Project Jigsaw
Project Jigsaw is a core feature of Java 9, which introduces a modular mechanism for the Java language. Developers can create modules that enable reliable configuration, powerful packaging, and improved scalability, security and performance. Java 9 will allow the creation of modules (essentially a JAR package containing the new structure - module descriptor). The module descriptor describes a module by specifying the module name, listing the required modules, and exporting packages. At runtime, a module mainly sees only the module it depends on (readability), and can only access the types (accessibility) in other modules when the module is read and the module exports a package containing that type. This means that the compiler and JVM eventually abandoned the big mud ball pattern that incorporated all code and dependencies together, and replaced it with a real map closer to our understanding of software structure. Both the compiler and the JVM understand this graph, so that missing modules, multiple versions of the same module, or multiple modules export the same packages during compilation or startup, avoiding runtime errors or subtle errors that are difficult to detect.
Value type: Project Valhalla
Project Valhalla is designed to introduce value types that can be summarized as user-defined primitive types. Value types are the same as primitive types and do not incur memory overhead or indirect addressing. A custom point containing two int fields x and y will be inlined to its usage location, requiring only the memory required for two ints, and the array of points is essentially an array of x/y pairs. Like the original type, such points are not identified - although there can be two different Integer objects with a value of 5, there cannot be two different int values of 5. Like a class, a value type can have methods and fields and implement an interface. Therefore, its slogan is: "Coding like a class, working like an int". This will prevent us from having to trade off between preferred abstraction and required performance.
However, the project quickly deviated from the track. As we all know, generics do not work with primitive types - ArrayList
Therefore, we need to be able to use generics with value types—primitive types can also be used together. Ultimately, we want not only to instantiate ArrayList
If you are lucky, some or even all of them will be included in Java 10.
Virtual Machine Future
John Rose talked about several directions that attract virtual machines to the future:
A lot of content is beyond my understanding, but listening to his speeches still benefited a lot, even if it was just to feel his passion.
Consistent with Rose's outlook spirit is Project Panama (discussed by Mikel Vidstedt and Tobi Ajila in "Going Native"), which Ian Graves supplements with "Java Vector API". Christian Wimmer's demonstration of "One Compiler" is also intended to bridge the gap.
Summary
JVM is a powerful tool that many smart people are working to make it stronger while controlling its complexity.
FAQs about the 2016 JVM Language Summit (This part is the same as the original text, omitted)
The above is the detailed content of JVMLS 2016: A Recap of Java Virtual Machine Language Summit. For more information, please follow other related articles on the PHP Chinese website!