hotspot/src/cpu/zero/vm/stack_zero.cpp

Print this page

        

@@ -30,10 +30,11 @@
   JavaThread *thread = (JavaThread *) THREAD;
 
   // Set up the frame anchor if it isn't already
   bool has_last_Java_frame = thread->has_last_Java_frame();
   if (!has_last_Java_frame) {
+    intptr_t *sp = thread->zero_stack()->sp();
     ZeroFrame *frame = thread->top_zero_frame();
     while (frame) {
       if (frame->is_shark_frame())
         break;
 

@@ -42,17 +43,18 @@
           frame->as_interpreter_frame()->interpreter_state();
         if (istate->self_link() == istate)
           break;
       }
 
+      sp = ((intptr_t *) frame) + 1;
       frame = frame->next();
     }
 
     if (frame == NULL)
       fatal("unrecoverable stack overflow");
 
-    thread->set_last_Java_frame(frame);
+    thread->set_last_Java_frame(frame, sp);
   }
 
   // Throw the exception
   switch (thread->thread_state()) {
   case _thread_in_Java:

@@ -69,5 +71,11 @@
 
   // Reset the frame anchor if necessary
   if (!has_last_Java_frame)
     thread->reset_last_Java_frame();
 }
+
+#ifndef PRODUCT
+void ZeroStack::zap(int c) {
+  memset(_base, c, available_words() * wordSize);
+}
+#endif // PRODUCT