blob: e1474abae3e86f9911c068f77563c630c5562f2c [file] [log] [blame]
Ian Rogersdf20fe02011-07-20 20:34:16 -07001// 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 Carlstrom578bbdc2011-07-21 14:07:47 -07007
8#include "assembler.h"
9#include "macros.h"
Ian Rogersdf20fe02011-07-20 20:34:16 -070010
11namespace art {
12
13// TODO: This is a place holder for a true JNIEnv used to provide limited
14// functionality for the JNI compiler
15class 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_