README

Tue, 14 May 2013 11:11:09 -0700

author
rfield
date
Tue, 14 May 2013 11:11:09 -0700
changeset 1752
c09b7234cded
parent 277
5cdce469ea2a
child 2017
67c5110c60fe
permissions
-rw-r--r--

8012556: Implement lambda methods on interfaces as static
8006140: Javac NPE compiling Lambda expression on initialization expression of static field in interface
Summary: Lambdas occurring in static contexts or those not needing instance information should be generated into static methods. This has long been the case for classes. However, as a work-around to the lack of support for statics on interfaces, interface lambda methods have been generated into default methods. For lambdas in interface static contexts (fields and static methods) this causes an NPE in javac because there is no 'this'. MethodHandles now support static methods on interfaces. This changeset allows lambda methods to be generated as static interface methods. An existing bug in Hotspot (8013875) is exposed in a test when the "-esa" flag is used. This test and another test that already exposed this bug have been marked with @ignore.
Reviewed-by: mcimadamore

duke@1 1 Building the "langtools" workspace.
duke@1 2
duke@1 3 The "langtools" workspace can be built from the command line with Ant.
duke@1 4 The build file is make/build.xml, in conjunction with make/build.properties.
duke@1 5 Some additional user-specific properties files are also read, to allow
duke@1 6 you to customize selected properties as needed.
duke@1 7
duke@1 8 Individual tools within the workspace can also be built and worked on
duke@1 9 with NetBeans, using the projects in the make/netbeans directory.
duke@1 10
duke@1 11 The "langtools" workspace can also be built from the command line with
duke@1 12 GNU Make, although the Makefile is simply a wrapper around the Ant
duke@1 13 build file. This is provided for systems (such as the full OpenJDK build)
duke@1 14 that expect to be able to build this workspace with GNU Make.
duke@1 15
duke@1 16 System Requirements:
duke@1 17 Ant: version 1.6.5 or later
ohair@277 18 NetBeans: version 6.0 or later (optional)
duke@1 19 JDK: currently version 1.5.0, although 1.6.0 is recommended
duke@1 20 OS: any system supporting the above tools
duke@1 21
duke@1 22 For more information:
duke@1 23 Ant: http://ant.apache.org/
duke@1 24 GNU Make: http://www.gnu.org/software/make/
duke@1 25 NetBeans: http://www.netbeans.org/
duke@1 26
duke@1 27
duke@1 28 Testing the "langtools" workspace.
duke@1 29
duke@1 30 The primary set of tests for the compiler is the compiler TCK. This
duke@1 31 tests that the compiler performs according to the specifications in
duke@1 32 JLS and JVMS.
duke@1 33
duke@1 34 In addition, there is a substantial collection of regression and unit
duke@1 35 tests for all the tools in the maain langtools test/ directory.
duke@1 36
duke@1 37 Finally, there is a small set of tests to do basic validation of a build
duke@1 38 of the langtools workspace for use by JDK. These tests check the contents
duke@1 39 of the dist/ directory generated by the build, and verify that the various
duke@1 40 tools can do basic "Hello World"-style processing. These tests should be
duke@1 41 run by jtreg, with the -jdk option set a version of JDK capable of running
duke@1 42 the default output of the javac compiler in this workspace. Currently,
duke@1 43 this means JDK 6 or better.

mercurial