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" |
Brian Carlstrom | 578bbdc | 2011-07-21 14:07:47 -0700 | [diff] [blame^] | 7 | |
| 8 | #include "assembler.h" |
| 9 | #include "macros.h" |
Ian Rogers | df20fe0 | 2011-07-20 20:34:16 -0700 | [diff] [blame] | 10 | |
| 11 | namespace art { |
| 12 | |
| 13 | // TODO: This is a place holder for a true JNIEnv used to provide limited |
| 14 | // functionality for the JNI compiler |
| 15 | class JniEnvironment { |
| 16 | public: |
| 17 | explicit JniEnvironment(); |
| 18 | |
| 19 | static Offset MonitorEnterOffset() { |
| 20 | return Offset(OFFSETOF_MEMBER(JniEnvironment, monitor_enter_)); |
| 21 | } |
| 22 | |
| 23 | static Offset MonitorExitOffset() { |
| 24 | return Offset(OFFSETOF_MEMBER(JniEnvironment, monitor_exit_)); |
| 25 | } |
| 26 | |
| 27 | private: |
| 28 | void (*monitor_enter_)(JniEnvironment*, jobject); |
| 29 | void (*monitor_exit_)(JniEnvironment*, jobject); |
| 30 | }; |
| 31 | |
| 32 | } // namespace art |
| 33 | #endif // ART_SRC_JNI_INTERNAL_H_ |