Esempio n. 1
0
 final void onDispose(EventContext context, VirtualFrame frame) {
   try {
     innerOnDispose(context, frame);
   } catch (Throwable t) {
     if (!seenException) {
       CompilerDirectives.transferToInterpreterAndInvalidate();
       seenException = true;
     }
     if (binding.isLanguageBinding()) {
       throw t;
     } else {
       CompilerDirectives.transferToInterpreter();
       failEventForInstrumentation(binding, "onEnter", t);
     }
   }
   if (next != null) {
     next.onDispose(context, frame);
   }
 }
Esempio n. 2
0
 final void onReturnExceptional(EventContext context, VirtualFrame frame, Throwable exception) {
   try {
     innerOnReturnExceptional(context, frame, exception);
   } catch (Throwable t) {
     if (!seenException) {
       CompilerDirectives.transferToInterpreterAndInvalidate();
       seenException = true;
     }
     if (binding.isLanguageBinding()) {
       exception.addSuppressed(t);
     } else {
       CompilerDirectives.transferToInterpreter();
       failEventForInstrumentation(binding, "onReturnExceptional", t);
     }
   }
   if (next != null) {
     next.onReturnExceptional(context, frame, exception);
   }
 }
Esempio n. 3
0
 /**
  * Should get invoked after the node is invoked sucessfuly.
  *
  * @param result the result value of the operation
  * @param frame the current frame of the execution.
  */
 public void onReturnValue(VirtualFrame frame, Object result) {
   if (lazyUpdate(frame)) {
     chain.onReturnValue(context, frame, result);
   }
 }
Esempio n. 4
0
 /**
  * Should get invoked before the node is invoked.
  *
  * @param frame the current frame of the execution.
  */
 public void onEnter(VirtualFrame frame) {
   if (lazyUpdate(frame)) {
     chain.onEnter(context, frame);
   }
 }
Esempio n. 5
0
 /**
  * Should get invoked if the node did not complete sucessfully.
  *
  * @param exception the exception that occured during the execution
  * @param frame the current frame of the execution.
  */
 public void onReturnExceptional(VirtualFrame frame, Throwable exception) {
   if (lazyUpdate(frame)) {
     chain.onReturnExceptional(context, frame, exception);
   }
 }