Package org.mozilla.javascript.optimizer
Class Bootstrapper
java.lang.Object
org.mozilla.javascript.optimizer.Bootstrapper
The Bootstrapper contains the method that is called by invokedynamic instructions in the bytecode
to map a call site to a method. The "bootstrap" method here is called the first time the runtime
encounters a particular "invokedynamic" call site, and it is responsible for setting up method
handles that may be used to invoke code. To learn more about this entire sequence, read up on the
"jdk.dynalink" package.
We will never go down this entire code path on Android because we do not support bytecode generation there.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final ClassFileWriter.MHandle
This is the method handle that's wired in to the bytecode for every dynamic call site in the bytecode. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic CallSite
bootstrap
(MethodHandles.Lookup lookup, String name, MethodType mType) This is the method called by every call site in the bytecode to map it to a method handle.
-
Field Details
-
BOOTSTRAP_HANDLE
This is the method handle that's wired in to the bytecode for every dynamic call site in the bytecode.
-
-
Constructor Details
-
Bootstrapper
public Bootstrapper()
-
-
Method Details
-
bootstrap
public static CallSite bootstrap(MethodHandles.Lookup lookup, String name, MethodType mType) throws NoSuchMethodException This is the method called by every call site in the bytecode to map it to a method handle.- Throws:
NoSuchMethodException
-