Find JSRs
Submit this Search


Ad Banner
 
 
 
 

JSRs: Java Specification Requests
JSR 292: Supporting Dynamically Typed Languages on the JavaTM Platform

Updates to the Original JSR

The following information has been updated from the original request.

Specification Lead: Danny Coward

E-Mail Address: danny.coward@sun.com

Telephone Number: +1 408 276 7049

Fax Number: +1 408 276 7700


Original Java Specification Request (JSR)

Identification | Request | Contributions | Additional Information

Section 1. Identification

Submitting Member: Sun Microsystems

Name of Contact Person: Graham Hamilton

E-Mail Address: graham.hamilton@sun.com

Telephone Number: +1 408 276 7102

Fax Number: +1 408 276 7700

NOTE that this information has been updated from this original request.

Specification Lead: Gilad Bracha

E-Mail Address: gilad.bracha@sun.com

Telephone Number: +1 408 276 7025

Fax Number: +1 408 276 7700


Initial Expert Group Membership:

Sun Microsystems
Google
The Apache Foundation

Supporting this JSR:

Doug Lea
AMD
The JRuby project



Section 2: Request

2.1 Please describe the proposed Specification:

There is growing interest in running a variety of programming languages on the the Java platform, and consequently, on the Java virtual machine (JVM). This interest is increasingly focused on dynamically typed languages, in particular scripting languages.

To make it easier to produce performant, high quality implementations of such languages, we propose to add support at the virtual machine level.

Specifically, we seek to add a new JVM instruction, invokedynamic, designed to support the implementation of dynamically typed object oriented languages. We will also investigate support for hotswapping, the capability to modify the structure of classes at run time.

2.2 What is the target Java platform? (i.e., desktop, server, personal, embedded, card, etc.)

This is a change to the JVM specification, which will initially be delivered in Java SE 7.

2.3 The Executive Committees would like to ensure JSR submitters think about how their proposed technology relates to all of the Java platform editions. Please provide details here for which platform editions are being targeted by this JSR, and how this JSR has considered the relationship with the other platform editions.

This is a JVM specification change. As such, care will be taken to ensure that the changes can be implemented in a wide variety of environments.

2.4 Should this JSR be voted on by both Executive Committees?

No.

2.5 What need of the Java community will be addressed by the proposed specification?

The Java community increasingly recognizes the value of dynamically typed languages, and in particular, scripting languages. Running such languages (e.g., Python, Ruby, Perl, Javascript, Groovy, E etc.) directly on a Java virtual machine facilitates their interoperation with existing Java programming language code. It is particularly desirable to :

a. Make implementations of such languages more efficient, and

b. Make it easier to create such implementations.

The proposed specification provides JVM level mechanisms that support the needs of such languages and their implementors, thereby improving the quality and availability of dynamically typed language implementations on the Java platform.

2.6 Why isn't this need met by existing specifications?

The existing JVM instruction set is statically typed. Dynamically typed languages lack such static type information, making it hard for compilers to generate JVM instructions for them.

In addition, JVMs have very limited support for dynamically modifying existing classes and methods, an operation frequently needed in dynamically typed languages.

2.7 Please give a short description of the underlying technology or technologies:

The invokedynamic instruction is in many ways similar to the existing invokevirtual instruction. However, it is much less constrained by byte code verification rules. Instead, it relies on dynamic typechecking to ensure the integrity of the virtual machine.

Such instructions have long been present in virtual machines that support dynamically typed object oriented languages, such as Smalltalk or Self. Well known techniques exist for high performance implementation of these instructions, typically based on (polymorphic) in line caching.

Similarly, hotswapping has been part of dynamically typed programming systems for decades (e.g., APL, Lisp, Smalltalk, Self). It is much harder to provide such support for statically typed languages. To the extent that viable support can be added for the Java platform as a whole, we will capitalize on it. In cases where this is not feasible, support that applies only to dynamically typed languages running on the JVM can be added.

2.8 Is there a proposed package name for the API Specification? (i.e., javapi.something, org.something, etc.)

N/A

2.9 Does the proposed specification have any dependencies on specific operating systems, CPUs, or I/O devices that you know of?

No

2.10 Are there any security issues that cannot be addressed by the current security model?

No

2.11 Are there any internationalization or localization issues?

No

2.12 Are there any existing specifications that might be rendered obsolete, deprecated, or in need of revision as a result of this work?

This work will be a modification of the JVM specification.

2.13 Please describe the anticipated schedule for the development of this specification.

The intention is to deliver this JSR as a component of Java SE 7 (code name "Dolphin"). Early Draft Review would occur in thge second half of 2006, Public Review in the first half of 2007, and Proposed Final Draft in the second half of 2007.

2.14 Please describe the anticipated working model for the Expert Group working on developing this specification.

It is anticipated that most work will be done by e-mail, with conference calls if needed.

2.15 It is important to the success of the community and each JSR that the work of the Expert Group be handled in a manner which provides the community and the public with insight into the work the Expert Group is doing, and the decisions that the Expert Group has made. The Executive Committees would like to ensure Spec Leads understand the value of this transparency and ask that each JSR have an operating plan in place for how their JSR will address the involvement of the community and the public. Please provide your plan here, and refer to the Spec Lead Guide for a more detailed description and a set of example questions you may wish to answer in your plan.

It is expected that early access drafts will be made publicly available as the work progresses. As with Mustang (see mustang.dev.java.net) there will be weekly snapshot releases of Dolphin, allowing the community early access to both the source and binary of the RI as it is being developed.

2.16 Please describe how the RI and TCK will de delivered, i.e. as part of a profile or platform edition, or stand-alone, or both. Include version information for the profile or platform in your answer.

This JSR and its RI and TCK are intended to be part of the Java SE 7 RI and TCK, respectively.

2.17 Please state the rationale if previous versions are available stand-alone and you are now proposing in 2.13 to only deliver RI and TCK as part of a profile or platform edition (See sections 1.1.5 and 1.1.6 of the JCP 2 document).

N/A

2.18 Please provide a description of the business terms for the Specification, RI and TCK that will apply when this JSR is final.

The RI and TCK will be delivered and licensed as part of the RI and TCK for Java SE 7.





Section 3: Contributions

3.1 Please list any existing documents, specifications, or implementations that describe the technology. Please include links to the documents if they are publicly available.

Invokedynamic draft spec

Talk delivered at JAOO 2005
http://blogs.sun.com/roller/resources/gbracha/JAOO2005.pdf

3.2 Explanation of how these items might be used as a starting point for the work.

The referenced document describes one version of the semantics of the invokedynamic byte code. As such it is the basis for the JSR. Adjustments may be made, especially with respect to error handling and other details of the instructions semantics (such as autoboxing).



Section 4: Additional Information (Optional)

4.1 This section contains any additional information that the submitting Member wishes to include in the JSR.

Several parties that are not yet JCP members are endorsing this JSR, and plan on joining the JCP and the EG.