Support for synchronized native methods.
This change adds support for synchronized native methods by using
calls to MonitorEnter and MonitorExit on the JNIEnv*. There is
some tidying of the assembler and a straw man JNIEnv implementation.
The JNIEnv implementation just warns when MonitorEnter/Exit are called
and doesn't adhere to the correct JNIEnv layout.
Change-Id: I90ed6ec8f85f5b01b929f16e0dbdecadd0b01359
diff --git a/src/jni_compiler.h b/src/jni_compiler.h
index 4a6b1ba..48666aa 100644
--- a/src/jni_compiler.h
+++ b/src/jni_compiler.h
@@ -3,6 +3,7 @@
#ifndef ART_SRC_JNI_COMPILER_H_
#define ART_SRC_JNI_COMPILER_H_
+#include "calling_convention.h"
#include "globals.h"
#include "macros.h"
@@ -19,7 +20,14 @@
JniCompiler();
~JniCompiler();
void Compile(Assembler* jni_asm, Method* method);
+
private:
+ // Copy a single parameter from the managed to the JNI calling convention
+ void CopyParameter(Assembler* jni_asm,
+ ManagedRuntimeCallingConvention* mr_conv,
+ JniCallingConvention* jni_conv,
+ size_t frame_size, size_t out_arg_size);
+
// A poor man's code cache
void* AllocateCode(size_t size);