请输入您要查询的百科知识:

 

词条 Project Valhalla (Java language)
释义

  1. Planned features

  2. Project activity

  3. Technical benefits and implications

  4. See also

  5. References

  6. External links

Project Valhalla is an experimental OpenJDK project to develop major new language features for Java 10 and beyond. The project was announced in July 2014 and is an experimental effort by Oracle, led by engineer Brian Goetz.[1]

Planned features

Valhalla is incubating Java language features and enhancements in these areas:[2]

  • Value Types; highly-efficient small 'objects' without inheritance.
  • Generic Specialization; List for example.
  • Reified Generics; retaining actual type at runtime.
  • improved 'volatile' support.

These features will require both syntax and VM-level changes.

Project activity

The project is organized on the OpenJDK 'Project Valhalla' mailing list. Project Valhalla has begun in the experimental stages, with an inaugural announcement & early draft initial proposals.

Published to date:

  • Project Valhalla announcement
  • 'Value Types' initial proposal
  • 'Generic Specialization' initial proposal

Experimental OpenJDK prototypes can also be built from the Mercurial repositories. These are starting to incorporate many specialization features. Note that these are Gnu Make/ C++ sources, and building the OpenJDK requires technical expertise. See OpenJDK build instructions for details.

  • Project Valhalla OpenJDK source repositories

Technical benefits and implications

Memory access performance and the efficiency of 'boxed' value access are a major area to be addressed by these features. 'Value Type' features and 'Generic specialization' (when applied to lists or collections) reduce memory usage, but more importantly avoid pointer indirection which typically causes a cache miss.[3][4]

Instead of a list or array of object references, pointing to data values scattered throughout memory, Project Valhalla enhancements will enable list or array values to potentially be laid out linearly—without indirection—as a consecutive block of memory.

Value Types are envisaged as "Codes like a class, works like an int!"[5] Synchronization and inheritance would be excluded for Value Types. These would no longer require object identity and associated memory/ pointer overheads, though would be able to assume a 'boxed' form for compatibility.[4]

See also

  • Generics in Java
  • Generic Specialization
  • Generic programming
  • Value type
  • Java

References

1. ^{{cite web|last1=Goetz|first1=Brian|title=Welcome to Valhalla!|url=http://mail.openjdk.java.net/pipermail/valhalla-dev/2014-July/000000.html|website=OpenJDK mail archive|publisher=OpenJDK|accessdate=12 August 2014}}
2. ^{{cite web|last1=Evans|first1=Ben|title=Oracle Launches Project Valhalla for Java|url=http://www.infoq.com/news/2014/07/Project-Valhalla|website=InfoQ|publisher=InfoWorld|accessdate=12 August 2014}}
3. ^{{cite web|last1=Krill|first1=Paul|title=Next generation Project Valhalla proposed; Value types, generic specialization, and enhanced volatiles top the wish-list for Project Valhalla|url=http://www.javaworld.com/article/2385002/core-java/java-incubator-to-explore-technologies-for-java-10-and-beyond.html|website=JavaWorld|publisher=InfoWorld|accessdate=12 August 2014}}
4. ^{{cite web|title=Value Types & List coming for Java 10 ?|url=http://literatejava.com/java-language/value-types-list-int-coming-java-10/|website=LiterateJava.com|accessdate=12 August 2014}}
5. ^{{cite web|last1=Rose|first1=John|last2=Goetz|first2=Brian|last3=Steele|first3=Guy|title=State of the Values|url=http://cr.openjdk.java.net/~jrose/values/values-0.html|publisher=OpenJDK|accessdate=12 August 2014}}

External links

  • Java incubator to explore technologies for Java 10 and beyond - JavaWorld
  • Value Types & List coming for Java 10? - LiterateJava.com
  • OpenJDK - Project Valhalla

1 : Java (programming language)

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/9/23 1:42:20