for review (M): 7001423: JSR 292 bytecode enhancements need unit tests

John Rose john.r.rose at oracle.com
Sun Nov 21 00:40:12 PST 2010


This webrev has a small jtreg test for the hotspot repository.

http://cr.openjdk.java.net/~jrose/7001423/webrev.00/

It exercises the invokedynamic instruction, making the the bootstrap method parameters are made available to the BSM, and ensuring that the resulting call site can be invoked as expected.

(Not included, to be done later:  Multiple invocation of dynamic call sites, additional bootstrap method parameters, "ldc" of MethodHandle and MethodType constants.)

In order to introduce an invokedynamic instruction (without help from the compiler), this unit test comes with a medium-sized script (single-file Java program) called "Indify" which generates the instruction in the test file.

The Indify script is described here:  http://blogs.sun.com/jrose/entry/a_modest_tool_for_writing

In later pushes, Indify will be re-used for additional unit tests (such as those mentioned above to be done later).

Thanks,
-- John


More information about the mlvm-dev mailing list