< prev index next >

src/hotspot/share/interpreter/interpreterRuntime.cpp

Print this page

        

@@ -724,10 +724,13 @@
       bytecode == Bytecodes::_invokespecial) {
     ResourceMark rm(thread);
     methodHandle m (thread, method(thread));
     Bytecode_invoke call(m, bci(thread));
     Symbol* signature = call.signature();
+
+    thread->check_frame(thread->last_frame());
+
     receiver = Handle(thread,
                   thread->last_frame().interpreter_callee_receiver(signature));
     assert(Universe::heap()->is_in_reserved_or_null(receiver()),
            "sanity check");
     assert(receiver.is_null() ||

@@ -1062,10 +1065,40 @@
     // then we may have JVMTI work to do.
     JvmtiExport::at_single_stepping_point(thread, method(thread), bcp(thread));
   }
 IRT_END
 
+IRT_ENTRY(void, InterpreterRuntime::enter_continuation(JavaThread* thread, oopDesc* cont))
+  tty->print_cr(" --- cont enter ---");
+  thread->_continuation = cont;
+
+  Handle receiver(thread, cont);
+  JavaValue result(T_VOID);
+  JavaCalls::call_virtual(&result, receiver, SystemDictionary::Continuation_klass(), vmSymbols::enter_name(), vmSymbols::continuationEnter_signature(), thread);
+  
+  thread->_continuation = NULL;
+  tty->print_cr(" --- cont exit ---");
+IRT_END
+
+IRT_ENTRY(void, InterpreterRuntime::get_continuation_stack(JavaThread* thread, oopDesc* obj, long offset, long size))
+  tty->print_cr(" --- get_stack enter offset: %ld size: %ld ---", offset, size);
+  oopDesc* cont = thread->_continuation;
+  assert(cont == obj, "sanity check");
+  thread->_continuation = NULL; // prevent recursive calls to getStack
+
+  Handle conth(thread, cont);
+  JavaCallArguments args;
+  args.push_oop(conth);
+  args.push_int(offset);
+  args.push_int(size);
+  JavaValue result(T_VOID);
+  JavaCalls::call_virtual(&result, SystemDictionary::Continuation_klass(), vmSymbols::getStack_name(), vmSymbols::continuationGetStack_signature(), &args, thread);
+  
+  thread->_continuation = cont;
+  tty->print_cr(" --- get_stack exit ---");
+IRT_END
+
 IRT_ENTRY(void, InterpreterRuntime::post_field_access(JavaThread *thread, oopDesc* obj,
 ConstantPoolCacheEntry *cp_entry))
 
   // check the access_flags for the field in the klass
 
< prev index next >