203
204 // Jump into the OSR method
205 Interpreter::invoke_osr(
206 method, istate->osr_entry(), istate->osr_buf(), THREAD);
207 return;
208 }
209 else {
210 ShouldNotReachHere();
211 }
212 }
213
214 // Unwind the current frame
215 thread->pop_zero_frame();
216
217 // Pop our local variables
218 stack->set_sp(stack->sp() + method->max_locals());
219
220 // Push our result
221 for (int i = 0; i < result_slots; i++) {
222 // Adjust result to smaller
223 intptr_t res = result[-i];
224 if (result_slots == 1) {
225 res = narrow(method->result_type(), res);
226 }
227 stack->push(res);
228 }
229 }
230
231 int CppInterpreter::native_entry(Method* method, intptr_t UNUSED, TRAPS) {
232 // Make sure method is native and not abstract
233 assert(method->is_native() && !method->is_abstract(), "should be");
234
235 JavaThread *thread = (JavaThread *) THREAD;
236 ZeroStack *stack = thread->zero_stack();
237
238 // Allocate and initialize our frame
239 InterpreterFrame *frame = InterpreterFrame::build(method, CHECK_0);
240 thread->push_zero_frame(frame);
241 interpreterState istate = frame->interpreter_state();
242 intptr_t *locals = istate->locals();
243
244 // Update the invocation counter
245 if ((UseCompiler || CountCompiledCalls) && !method->is_synchronized()) {
|
203
204 // Jump into the OSR method
205 Interpreter::invoke_osr(
206 method, istate->osr_entry(), istate->osr_buf(), THREAD);
207 return;
208 }
209 else {
210 ShouldNotReachHere();
211 }
212 }
213
214 // Unwind the current frame
215 thread->pop_zero_frame();
216
217 // Pop our local variables
218 stack->set_sp(stack->sp() + method->max_locals());
219
220 // Push our result
221 for (int i = 0; i < result_slots; i++) {
222 // Adjust result to smaller
223 union {
224 intptr_t res;
225 jint res_jint;
226 };
227 res = result[-i];
228 if (result_slots == 1) {
229 BasicType t = method->result_type();
230 if (is_subword_type(t)) {
231 res_jint = (jint)narrow(t, res_jint);
232 }
233 }
234 stack->push(res);
235 }
236 }
237
238 int CppInterpreter::native_entry(Method* method, intptr_t UNUSED, TRAPS) {
239 // Make sure method is native and not abstract
240 assert(method->is_native() && !method->is_abstract(), "should be");
241
242 JavaThread *thread = (JavaThread *) THREAD;
243 ZeroStack *stack = thread->zero_stack();
244
245 // Allocate and initialize our frame
246 InterpreterFrame *frame = InterpreterFrame::build(method, CHECK_0);
247 thread->push_zero_frame(frame);
248 interpreterState istate = frame->interpreter_state();
249 intptr_t *locals = istate->locals();
250
251 // Update the invocation counter
252 if ((UseCompiler || CountCompiledCalls) && !method->is_synchronized()) {
|