Ian Rogers | df20fe0 | 2011-07-20 20:34:16 -0700 | [diff] [blame^] | 1 | // Copyright 2011 Google Inc. All Rights Reserved. |
| 2 | |
| 3 | #ifndef ART_SRC_JNI_INTERNAL_H_ |
| 4 | #define ART_SRC_JNI_INTERNAL_H_ |
| 5 | |
| 6 | #include "jni.h" |
| 7 | #include "src/assembler.h" |
| 8 | #include "src/macros.h" |
| 9 | |
| 10 | namespace art { |
| 11 | |
| 12 | // TODO: This is a place holder for a true JNIEnv used to provide limited |
| 13 | // functionality for the JNI compiler |
| 14 | class JniEnvironment { |
| 15 | public: |
| 16 | explicit JniEnvironment(); |
| 17 | |
| 18 | static Offset MonitorEnterOffset() { |
| 19 | return Offset(OFFSETOF_MEMBER(JniEnvironment, monitor_enter_)); |
| 20 | } |
| 21 | |
| 22 | static Offset MonitorExitOffset() { |
| 23 | return Offset(OFFSETOF_MEMBER(JniEnvironment, monitor_exit_)); |
| 24 | } |
| 25 | |
| 26 | private: |
| 27 | void (*monitor_enter_)(JniEnvironment*, jobject); |
| 28 | void (*monitor_exit_)(JniEnvironment*, jobject); |
| 29 | }; |
| 30 | |
| 31 | } // namespace art |
| 32 | #endif // ART_SRC_JNI_INTERNAL_H_ |