src/share/classes/java/lang/invoke/package-info.java
Print this page
*** 41,57 ****
* <li>The JVM bytecode format supports immediate constants of
* the classes {@link java.lang.invoke.MethodHandle MethodHandle} and {@link java.lang.invoke.MethodType MethodType}.
* </li>
* </ul>
*
! * <h2><a name="jvm_mods"></a>Summary of relevant Java Virtual Machine changes</h2>
* The following low-level information summarizes relevant parts of the
* Java Virtual Machine specification. For full details, please see the
* current version of that specification.
*
* Each occurrence of an {@code invokedynamic} instruction is called a <em>dynamic call site</em>.
! * <h3><a name="indyinsn"></a>{@code invokedynamic} instructions</h3>
* A dynamic call site is originally in an unlinked state. In this state, there is
* no target method for the call site to invoke.
* <p>
* Before the JVM can execute a dynamic call site (an {@code invokedynamic} instruction),
* the call site must first be <em>linked</em>.
--- 41,57 ----
* <li>The JVM bytecode format supports immediate constants of
* the classes {@link java.lang.invoke.MethodHandle MethodHandle} and {@link java.lang.invoke.MethodType MethodType}.
* </li>
* </ul>
*
! * <h1><a name="jvm_mods"></a>Summary of relevant Java Virtual Machine changes</h1>
* The following low-level information summarizes relevant parts of the
* Java Virtual Machine specification. For full details, please see the
* current version of that specification.
*
* Each occurrence of an {@code invokedynamic} instruction is called a <em>dynamic call site</em>.
! * <h2><a name="indyinsn"></a>{@code invokedynamic} instructions</h2>
* A dynamic call site is originally in an unlinked state. In this state, there is
* no target method for the call site to invoke.
* <p>
* Before the JVM can execute a dynamic call site (an {@code invokedynamic} instruction),
* the call site must first be <em>linked</em>.
*** 95,105 ****
* which is thrown as the abnormal termination of the dynamic call
* site execution.
* If this happens, the same error will the thrown for all subsequent
* attempts to execute the dynamic call site.
*
! * <h3>timing of linkage</h3>
* A dynamic call site is linked just before its first execution.
* The bootstrap method call implementing the linkage occurs within
* a thread that is attempting a first execution.
* <p>
* If there are several such threads, the bootstrap method may be
--- 95,105 ----
* which is thrown as the abnormal termination of the dynamic call
* site execution.
* If this happens, the same error will the thrown for all subsequent
* attempts to execute the dynamic call site.
*
! * <h2>timing of linkage</h2>
* A dynamic call site is linked just before its first execution.
* The bootstrap method call implementing the linkage occurs within
* a thread that is attempting a first execution.
* <p>
* If there are several such threads, the bootstrap method may be
*** 129,139 ****
* or to issue “causeless” bootstrap method calls.
* Every dynamic call site transitions at most once from unlinked to linked,
* just before its first invocation.
* There is no way to undo the effect of a completed bootstrap method call.
*
! * <h3>types of bootstrap methods</h3>
* As long as each bootstrap method can be correctly invoked
* by {@code MethodHandle.invoke}, its detailed type is arbitrary.
* For example, the first argument could be {@code Object}
* instead of {@code MethodHandles.Lookup}, and the return type
* could also be {@code Object} instead of {@code CallSite}.
--- 129,139 ----
* or to issue “causeless” bootstrap method calls.
* Every dynamic call site transitions at most once from unlinked to linked,
* just before its first invocation.
* There is no way to undo the effect of a completed bootstrap method call.
*
! * <h2>types of bootstrap methods</h2>
* As long as each bootstrap method can be correctly invoked
* by {@code MethodHandle.invoke}, its detailed type is arbitrary.
* For example, the first argument could be {@code Object}
* instead of {@code MethodHandles.Lookup}, and the return type
* could also be {@code Object} instead of {@code CallSite}.