InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

JSR-292 Early Draft Review Announced

Posted by R.J. Lorimer on May 25, 2008

Sections
Enterprise Architecture,
Operations & Infrastructure,
Process & Practices,
Architecture & Design,
Development
Topics
Java ,
JCP Standards ,
Language Design ,
Performance & Scalability ,
Announcements ,
Dynamic Languages
Tags
Languages ,
JVM ,
JCP ,
JSR 292
As announced by John Rose, The early draft review for JSR-292 has been released on the heels of JavaOne. JSR-292 is an effort to define the specification of the invokedynamic instruction for the Java Virtual Machine.

InfoQ previously covered JSR-292 in October as part of the initial announcement for the Da Vinci Virtual Machine Project (MLVM), a test bed for technologies like invokedynamic.

John Rose, who is the specification lead for JSR-292 and primary individual behind the MLVM, has provided regular discussions on his blog with respect to making the JVM more accessible to dynamic languages. Recently, Rose described the reasons for proposing JSR-292:

Why add another invoke bytecode? The answer is that call sites (instances of invoke bytecodes) are useful, and yet the existing formulas for invocation are tied so closely to the Java language that the natural capabilities of the JVM are not fully available to languages that would benefit from them. The key restrictions are:

  • the receiver type must conform to the resolved type of the call site
  • there is no generic way to create adapters around call targets (a corollary of the previous point)
  • the call site must link, which means the resolved method always pre-exists
  • the symbolic call name is the name of an actual method (a corollary of the previous point)
  • argument matching is exact with no implicit coercions (another corollary)
  • linkage decisions cannot be reversed (although optimization decisions change, invisibly)
Dynamic languages implementors expend much time and effort working around these limitations, simulating generic calls in terms of JVM invoke bytecodes constrained by the Java language.
Later in the same entry, he describes the solution the JSR-292 team is proposing:
Our solution to these requirements is in three steps. First, we factor out method handles as a simple and generic way of managing methods (arbitrary JVM methods) as units of behavior, which are (as methods should be) directly callable. Second, we define an invokedynamic instruction with one machine word of linkage state, a handle to the call site’s target method. Third, we define a set of core Java APIs for managing linkage state and creating the target method handles for call sites, taking care they these APIs can present the right optimization opportunities to JVMs that wish to exploit them.
The announcement of the early draft review kicks off the 90-day review period of the JSR, which will conclude on August 17th, 2008. There are a number ways to stay informed and provide feedback on this JSR as the review period continues:
InfoQ will continue to track JSR-292 and will provide updates in our Java community.






No comments

Watch Thread Reply

Educational Content

New-age Transactional Systems - Not Your Grandpa's OLTP

John Hugg discusses high volume transaction processing applications with high and low frequency profiles, and how VoltDB can be used for that purpose.

Cool Code

Kevlin Henney examines code samples to see what can be learned from them starting from the premise that one won’t write great code unless he knows how to read it.

Collaboration: At the Extremities of Extreme

Jason Ayers share the observations he made watching a team of developers collaborating in real time on the same code base, pushing XP, pair programming and continuous integration to their extremes.

Yesod Web Framework

Michael Snoyman presents Yesod, a web framework written in Haskell and containing a web server, templating, ORM, libraries (templating, gravatar, etc.).

Transactions without Transactions

Richard Kreuter and Kyle Banker on how to avoid classical RDBMS transactional systems by using compensation mechanisms, transactional messaging or transactional procedures.

Attila Szegedi on JVM and GC Performance Tuning at Twitter

Attila Szegedi talks about performance tuning Java and Scala programs at Twitter: how to approach GC problems, the importance of asynchronous I/O, when to use MySQL/Cassandra/Redis, and much more.

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.