Changeset 582

Show
Ignore:
Timestamp:
10/19/08 17:56:15 (3 months ago)
Author:
chris
Message:

Update frame->current when catching an asynchronous exception.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • Mika/trunk/core-vm/src/vm/interpreter.c

    r524 r582  
    599599#endif 
    600600 
    601   woempa(7, "CALLING %M, dispatcher is %p\n", method, method->exec.dispatcher); 
     601  woempa(1, "CALLING %M, dispatcher is %p\n", method, method->exec.dispatcher); 
    602602  if (caller->auxstack_top - (caller->jstack_top + method->exec.stack_i) > MIN_FREE_SLOTS && caller->thread->ksize - depth > 4096) { 
    603603#ifdef JAVA_PROFILE 
     
    620620    method->exec.dispatcher(caller, method); 
    621621#endif 
    622     woempa(7, "RETURNED from %M\n", method); 
     622    woempa(1, "RETURNED from %M\n", method); 
    623623  } 
    624624  else { 
     
    16801680    if (thread->exception) { 
    16811681      frame->jstack_top = tos; 
     1682      frame->current = current; 
    16821683      current = searchHandler(frame); 
    16831684      tos = (w_Slot*)frame->jstack_top; 
     
    44014402   
    44024403  if (isSet(verbose_flags, VERBOSE_FLAG_THROW)) { 
    4403     wprintf("Thrown: %k '%w' in %M, thread %t\n", instance2clazz(thread->exception), String2string((w_instance)thread->exception[F_Throwable_detailMessage]), frame->method, thread); 
     4404    wprintf("Thrown: Seeking handler for %k '%w' in %M, thread %t\n", instance2clazz(thread->exception), String2string((w_instance)thread->exception[F_Throwable_detailMessage]), frame->method, thread); 
    44044405  } 
    44054406  woempa(7, "Seeking handler for %k in %t, current frame is running %M\n", instance2clazz(thread->exception), thread, frame->method); 
     
    44164417        cc = getClassConstant(frame->method->spec.declaring_clazz, ex->type_index, thread); 
    44174418        enterUnsafeRegion(thread); 
     4419/* [CG 20080206] This can never be executed surely? 
    44184420        if (thread->exception) { 
    44194421          pending = thread->exception; 
     
    44214423          break; 
    44224424        } 
     4425*/ 
    44234426      } 
    44244427      else { 
     
    44284431        if (cc == NULL || isSuperClass(cc, instance2object(pending)->clazz)) { 
    44294432          if (isSet(verbose_flags, VERBOSE_FLAG_THROW)) { 
    4430             wprintf("Thrown: Catching %k '%w' in %M, thread %t\n", instance2clazz(thread->exception), String2string((w_instance)thread->exception[F_Throwable_detailMessage]), frame->method, thread); 
     4433            wprintf("Thrown: Catching %k '%w' in %M, thread %t\n", instance2clazz(pending), String2string((w_instance)pending[F_Throwable_detailMessage]), frame->method, thread); 
    44314434          } 
    44324435          woempa(7, ">>>> Found a handler for %j at pc = %d <<<<\n", pending, ex->handler_pc);