Package | Description |
---|---|
org.jikesrvm.compilers.common | |
org.jikesrvm.jni.ia32 |
Modifier and Type | Method and Description |
---|---|
static CompiledMethod |
RuntimeCompiler.compile(NativeMethod method)
Compile the stub for a native method when it is first invoked.
|
static CompiledMethod |
BootImageCompiler.compile(NativeMethod method)
Compile a native method.
|
static void |
RuntimeCompiler.record(byte compiler,
NativeMethod method,
CompiledMethod compiledMethod)
This method records the time and sizes (bytecode and machine code) for
a compilation
|
Modifier and Type | Method and Description |
---|---|
static CompiledMethod |
JNICompiler.compile(NativeMethod method)
Compiles a method to handle the Java to C transition and back
Transitioning from Java to C then back:
Set up stack frame and save non-volatile registers
Set up jniEnv - set up a register to hold JNIEnv and store
the Processor in the JNIEnv for easy access
Move all native method arguments on to stack (NB at this point all
non-volatile state is saved)
Record the frame pointer of the last Java frame (this) in the jniEnv
Call out to convert reference arguments to IDs
Set processor as being "in native"
Set up stack frame and registers for transition to C
Call out to C
Save result to stack
Transition back from "in native" to "in Java", take care that the
Processor isn't "blocked in native", ie other processors have decided to
start a GC and we're not permitted to execute Java code whilst this
occurs
Convert a reference result (currently a JNI ref) into a true reference
Release JNI refs
Restore stack and place result in register
|