48 static inline void patch_return_address_at(intptr_t* sp, address pc);
49
50 static inline int frame_align_words(int size);
51 static inline intptr_t* frame_align_pointer(intptr_t* sp);
52
53 // Abstract helpers for describing frames in general
54 class Frame;
55 class NonInterpretedFrame;
56
57 // Concrete helpers for describing concrete types of frames
58 class InterpretedFrame;
59 class NonInterpretedUnknownFrame;
60 class CompiledFrame;
61 class NativeFrame;
62 class StubFrame;
63 };
64
65 class ContinuationHelper::Frame : public AllStatic {
66 public:
67 static const bool interpreted = false;
68 static const bool stub = false;
69 static const bool native = false;
70
71 static inline intptr_t** callee_link_address(const frame& f);
72 static Method* frame_method(const frame& f);
73 static inline address real_pc(const frame& f);
74 static inline void patch_pc(const frame& f, address pc);
75 static address* return_pc_address(const frame& f);
76 static address return_pc(const frame& f);
77 static bool is_stub(CodeBlob* cb);
78
79 #ifdef ASSERT
80 static inline intptr_t* frame_top(const frame &f);
81 static inline bool is_deopt_return(address pc, const frame& sender);
82 static bool assert_frame_laid_out(frame f);
83 #endif
84 };
85
86 class ContinuationHelper::InterpretedFrame : public ContinuationHelper::Frame {
87 public:
88 static const bool interpreted = true;
89
90 static inline intptr_t* frame_top(const frame& f, InterpreterOopMap* mask);
91 static inline intptr_t* frame_top(const frame& f);
92 static inline intptr_t* frame_top(const frame& f, int callee_argsize, bool callee_interpreted);
93 static inline intptr_t* frame_bottom(const frame& f);
94 static inline intptr_t* callers_sp(const frame& f);
110 typedef InterpreterOopMap* ExtraT;
111 };
112
113 class ContinuationHelper::NonInterpretedFrame : public ContinuationHelper::Frame {
114 public:
115 static inline intptr_t* frame_top(const frame& f, int callee_argsize, bool callee_interpreted);
116 static inline intptr_t* frame_top(const frame& f);
117 static inline intptr_t* frame_bottom(const frame& f);
118
119 static inline int size(const frame& f);
120 static inline int stack_argsize(const frame& f);
121 };
122
123 class ContinuationHelper::NonInterpretedUnknownFrame : public ContinuationHelper::NonInterpretedFrame {
124 public:
125 static bool is_instance(const frame& f);
126 };
127
128 class ContinuationHelper::CompiledFrame : public ContinuationHelper::NonInterpretedFrame {
129 public:
130 static bool is_instance(const frame& f);
131
132 #ifdef ASSERT
133 template <typename RegisterMapT>
134 static bool is_owning_locks(JavaThread* thread, RegisterMapT* map, const frame& f);
135 #endif
136 };
137
138 class ContinuationHelper::NativeFrame : public ContinuationHelper::NonInterpretedFrame {
139 public:
140 static const bool native = true;
141
142 static bool is_instance(const frame& f);
143
144 #ifdef ASSERT
145 static bool is_owning_locks(JavaThread* current, const frame& f);
146 #endif
147
148 static int stack_argsize(const frame& f) { return 0; }
149 };
|
48 static inline void patch_return_address_at(intptr_t* sp, address pc);
49
50 static inline int frame_align_words(int size);
51 static inline intptr_t* frame_align_pointer(intptr_t* sp);
52
53 // Abstract helpers for describing frames in general
54 class Frame;
55 class NonInterpretedFrame;
56
57 // Concrete helpers for describing concrete types of frames
58 class InterpretedFrame;
59 class NonInterpretedUnknownFrame;
60 class CompiledFrame;
61 class NativeFrame;
62 class StubFrame;
63 };
64
65 class ContinuationHelper::Frame : public AllStatic {
66 public:
67 static const bool interpreted = false;
68 static const bool compiled = false;
69 static const bool stub = false;
70 static const bool native = false;
71
72 static inline intptr_t** callee_link_address(const frame& f);
73 static Method* frame_method(const frame& f);
74 static inline address real_pc(const frame& f);
75 static inline void patch_pc(const frame& f, address pc, bool callee_augmented = false);
76 static address* return_pc_address(const frame& f);
77 static address return_pc(const frame& f);
78 static bool is_stub(CodeBlob* cb);
79
80 #ifdef ASSERT
81 static inline intptr_t* frame_top(const frame &f);
82 static inline bool is_deopt_return(address pc, const frame& sender);
83 static bool assert_frame_laid_out(frame f);
84 #endif
85 };
86
87 class ContinuationHelper::InterpretedFrame : public ContinuationHelper::Frame {
88 public:
89 static const bool interpreted = true;
90
91 static inline intptr_t* frame_top(const frame& f, InterpreterOopMap* mask);
92 static inline intptr_t* frame_top(const frame& f);
93 static inline intptr_t* frame_top(const frame& f, int callee_argsize, bool callee_interpreted);
94 static inline intptr_t* frame_bottom(const frame& f);
95 static inline intptr_t* callers_sp(const frame& f);
111 typedef InterpreterOopMap* ExtraT;
112 };
113
114 class ContinuationHelper::NonInterpretedFrame : public ContinuationHelper::Frame {
115 public:
116 static inline intptr_t* frame_top(const frame& f, int callee_argsize, bool callee_interpreted);
117 static inline intptr_t* frame_top(const frame& f);
118 static inline intptr_t* frame_bottom(const frame& f);
119
120 static inline int size(const frame& f);
121 static inline int stack_argsize(const frame& f);
122 };
123
124 class ContinuationHelper::NonInterpretedUnknownFrame : public ContinuationHelper::NonInterpretedFrame {
125 public:
126 static bool is_instance(const frame& f);
127 };
128
129 class ContinuationHelper::CompiledFrame : public ContinuationHelper::NonInterpretedFrame {
130 public:
131 static const bool compiled = true;
132
133 static bool is_instance(const frame& f);
134
135 #ifdef ASSERT
136 template <typename RegisterMapT>
137 static bool is_owning_locks(JavaThread* thread, RegisterMapT* map, const frame& f);
138 #endif
139 };
140
141 class ContinuationHelper::NativeFrame : public ContinuationHelper::NonInterpretedFrame {
142 public:
143 static const bool native = true;
144
145 static bool is_instance(const frame& f);
146
147 #ifdef ASSERT
148 static bool is_owning_locks(JavaThread* current, const frame& f);
149 #endif
150
151 static int stack_argsize(const frame& f) { return 0; }
152 };
|