29 #include "oops/method.hpp"
30 #include "runtime/handles.hpp"
31 #include "runtime/javaFrameAnchor.hpp"
32 #include "runtime/thread.inline.hpp"
33 #include "runtime/vmThread.hpp"
34 #ifdef TARGET_ARCH_x86
35 # include "jniTypes_x86.hpp"
36 #endif
37 #ifdef TARGET_ARCH_sparc
38 # include "jniTypes_sparc.hpp"
39 #endif
40 #ifdef TARGET_ARCH_zero
41 # include "jniTypes_zero.hpp"
42 #endif
43 #ifdef TARGET_ARCH_arm
44 # include "jniTypes_arm.hpp"
45 #endif
46 #ifdef TARGET_ARCH_ppc
47 # include "jniTypes_ppc.hpp"
48 #endif
49
50 // A JavaCallWrapper is constructed before each JavaCall and destructed after the call.
51 // Its purpose is to allocate/deallocate a new handle block and to save/restore the last
52 // Java fp/sp. A pointer to the JavaCallWrapper is stored on the stack.
53
54 class JavaCallWrapper: StackObj {
55 friend class VMStructs;
56 private:
57 JavaThread* _thread; // the thread to which this call belongs
58 JNIHandleBlock* _handles; // the saved handle block
59 Method* _callee_method; // to be able to collect arguments if entry frame is top frame
60 oop _receiver; // the receiver of the call (if a non-static call)
61
62 JavaFrameAnchor _anchor; // last thread anchor state that we must restore
63
64 JavaValue* _result; // result value
65
66 public:
67 // Construction/destruction
68 JavaCallWrapper(methodHandle callee_method, Handle receiver, JavaValue* result, TRAPS);
|
29 #include "oops/method.hpp"
30 #include "runtime/handles.hpp"
31 #include "runtime/javaFrameAnchor.hpp"
32 #include "runtime/thread.inline.hpp"
33 #include "runtime/vmThread.hpp"
34 #ifdef TARGET_ARCH_x86
35 # include "jniTypes_x86.hpp"
36 #endif
37 #ifdef TARGET_ARCH_sparc
38 # include "jniTypes_sparc.hpp"
39 #endif
40 #ifdef TARGET_ARCH_zero
41 # include "jniTypes_zero.hpp"
42 #endif
43 #ifdef TARGET_ARCH_arm
44 # include "jniTypes_arm.hpp"
45 #endif
46 #ifdef TARGET_ARCH_ppc
47 # include "jniTypes_ppc.hpp"
48 #endif
49 #ifdef TARGET_ARCH_aarch64
50 # include "jniTypes_aarch64.hpp"
51 #endif
52
53 // A JavaCallWrapper is constructed before each JavaCall and destructed after the call.
54 // Its purpose is to allocate/deallocate a new handle block and to save/restore the last
55 // Java fp/sp. A pointer to the JavaCallWrapper is stored on the stack.
56
57 class JavaCallWrapper: StackObj {
58 friend class VMStructs;
59 private:
60 JavaThread* _thread; // the thread to which this call belongs
61 JNIHandleBlock* _handles; // the saved handle block
62 Method* _callee_method; // to be able to collect arguments if entry frame is top frame
63 oop _receiver; // the receiver of the call (if a non-static call)
64
65 JavaFrameAnchor _anchor; // last thread anchor state that we must restore
66
67 JavaValue* _result; // result value
68
69 public:
70 // Construction/destruction
71 JavaCallWrapper(methodHandle callee_method, Handle receiver, JavaValue* result, TRAPS);
|