Mercurial > hg > truffle
comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/Node.java @ 19247:128586040207
Truffle/Instrumentation: TruffleEventReceiver renamed to TruffleEventListener
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Tue, 10 Feb 2015 16:44:11 -0800 |
parents | 67d9e635102f |
children | d344d76b7b6d |
comparison
equal
deleted
inserted
replaced
19246:d3e835fa6bbf | 19247:128586040207 |
---|---|
502 * <p> | 502 * <p> |
503 * Modifies the AST by inserting a {@linkplain WrapperNode wrapper node} between the node and | 503 * Modifies the AST by inserting a {@linkplain WrapperNode wrapper node} between the node and |
504 * its parent; the wrapper node must be provided by implementations of | 504 * its parent; the wrapper node must be provided by implementations of |
505 * {@link #createWrapperNode()}. | 505 * {@link #createWrapperNode()}. |
506 * <p> | 506 * <p> |
507 * Unlike {@link #probe()}, once {@link #probeLite(TruffleEventReceiver)} is called at a node, | 507 * Unlike {@link #probe()}, once {@link #probeLite(TruffleEventListener)} is called at a node, |
508 * no additional probing can be added and no additional instrumentation can be attached. | 508 * no additional probing can be added and no additional instrumentation can be attached. |
509 * <p> | 509 * <p> |
510 * This restricted form of instrumentation is intended for special cases where only one kind of | 510 * This restricted form of instrumentation is intended for special cases where only one kind of |
511 * instrumentation is desired, and for which performance is a concern | 511 * instrumentation is desired, and for which performance is a concern |
512 * | 512 * |
513 * @param eventReceiver | 513 * @param eventListener |
514 * @throws ProbeException (unchecked) when a probe cannot be created, leaving the AST unchanged | 514 * @throws ProbeException (unchecked) when a probe cannot be created, leaving the AST unchanged |
515 */ | 515 */ |
516 public final void probeLite(TruffleEventReceiver eventReceiver) { | 516 public final void probeLite(TruffleEventListener eventListener) { |
517 | 517 |
518 if (this instanceof WrapperNode) { | 518 if (this instanceof WrapperNode) { |
519 throw new ProbeException(ProbeFailure.Reason.WRAPPER_NODE, null, this, null); | 519 throw new ProbeException(ProbeFailure.Reason.WRAPPER_NODE, null, this, null); |
520 } | 520 } |
521 | 521 |
543 if (!this.isSafelyReplaceableBy(wrapperNode)) { | 543 if (!this.isSafelyReplaceableBy(wrapperNode)) { |
544 throw new ProbeException(ProbeFailure.Reason.WRAPPER_TYPE, parent, this, wrapper); | 544 throw new ProbeException(ProbeFailure.Reason.WRAPPER_TYPE, parent, this, wrapper); |
545 } | 545 } |
546 | 546 |
547 // Connect it to a Probe | 547 // Connect it to a Probe |
548 ProbeNode.insertProbeLite(wrapper, eventReceiver); | 548 ProbeNode.insertProbeLite(wrapper, eventListener); |
549 | 549 |
550 // Replace this node in the AST with the wrapper | 550 // Replace this node in the AST with the wrapper |
551 this.replace(wrapperNode); | 551 this.replace(wrapperNode); |
552 } | 552 } |
553 | 553 |