comparison truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/LineBreakpointFactory.java @ 22230:3f2052afcb6d

Truffle/Instrumentation: rename the methods in the Instrument listener classes to use the "on" convention, e.g. onEnter(), add Javadoc
author Michael Van De Vanter <michael.van.de.vanter@oracle.com>
date Sun, 20 Sep 2015 16:48:50 -0700
parents a0fa69e3e60e
children 1f19e3cada3d
comparison
equal deleted inserted replaced
22229:a4ac9f2ff2bf 22230:3f2052afcb6d
444 } 444 }
445 LineBreakpointImpl.this.doBreak(astNode, vFrame); 445 LineBreakpointImpl.this.doBreak(astNode, vFrame);
446 } 446 }
447 } 447 }
448 448
449 public void notifyResult(Node node, VirtualFrame vFrame, Object result) { 449 public void onExecution(Node node, VirtualFrame vFrame, Object result) {
450 final boolean condition = (Boolean) result; 450 final boolean condition = (Boolean) result;
451 if (TRACE) { 451 if (TRACE) {
452 trace("breakpoint condition = %b %s", condition, getShortDescription()); 452 trace("breakpoint condition = %b %s", condition, getShortDescription());
453 } 453 }
454 if (condition) { 454 if (condition) {
455 nodeEnter(node, vFrame); 455 nodeEnter(node, vFrame);
456 } 456 }
457 } 457 }
458 458
459 public void notifyFailure(Node node, VirtualFrame vFrame, RuntimeException ex) { 459 public void onFailure(Node node, VirtualFrame vFrame, RuntimeException ex) {
460 addExceptionWarning(ex); 460 addExceptionWarning(ex);
461 if (TRACE) { 461 if (TRACE) {
462 trace("breakpoint failure = %s %s", ex, getShortDescription()); 462 trace("breakpoint failure = %s %s", ex, getShortDescription());
463 } 463 }
464 // Take the breakpoint if evaluation fails. 464 // Take the breakpoint if evaluation fails.
481 } 481 }
482 482
483 private final class UnconditionalLineBreakInstrumentListener extends DefaultStandardInstrumentListener { 483 private final class UnconditionalLineBreakInstrumentListener extends DefaultStandardInstrumentListener {
484 484
485 @Override 485 @Override
486 public void enter(Probe probe, Node node, VirtualFrame vFrame) { 486 public void onEnter(Probe probe, Node node, VirtualFrame vFrame) {
487 LineBreakpointImpl.this.nodeEnter(node, vFrame); 487 LineBreakpointImpl.this.nodeEnter(node, vFrame);
488 } 488 }
489 } 489 }
490 } 490 }
491 491