comparison truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/InstrumentationNode.java @ 22226:c896a8e70777

Truffle/Instrumentation: Redesign instrumentation node classes to reduce the public API exposure. - ProbeNode is no longer public - Public interface InstrumentationNode.TruffleEvents is now abstract class EventHandlerNode with package private constructor - Interface ProbeNode.WrapperNode is no longer inside ProbeNode and has been expanded slightly so ProbeNode can be package private
author Michael Van De Vanter <michael.van.de.vanter@oracle.com>
date Sun, 20 Sep 2015 15:51:39 -0700
parents dc83cc1f94f2
children 1348cc2e084e
comparison
equal deleted inserted replaced
22225:a0fa69e3e60e 22226:c896a8e70777
22 * or visit www.oracle.com if you need additional information or have any 22 * or visit www.oracle.com if you need additional information or have any
23 * questions. 23 * questions.
24 */ 24 */
25 package com.oracle.truffle.api.instrument; 25 package com.oracle.truffle.api.instrument;
26 26
27 import com.oracle.truffle.api.frame.VirtualFrame;
28 import com.oracle.truffle.api.nodes.Node; 27 import com.oracle.truffle.api.nodes.Node;
29 28
30 /** 29 /**
31 * A marker interface for Truffle {@linkplain Node nodes} that internally implement the 30 * A marker interface for Truffle {@linkplain Node nodes} that internally implement the
32 * <em>Instrumentation Framework</em>. Such nodes should not be part of any Guest Language execution 31 * <em>Instrumentation Framework</em>. Such nodes should not be part of any Guest Language execution
37 /** 36 /**
38 * A short description of the particular role played by the node, intended to support debugging. 37 * A short description of the particular role played by the node, intended to support debugging.
39 */ 38 */
40 String instrumentationInfo(); 39 String instrumentationInfo();
41 40
42 /**
43 * Events that propagate through the {@linkplain InstrumentationNode implementation nodes} of
44 * the Instrumentation Framework, not visible in this form to Instrumentation clients.
45 */
46 interface TruffleEvents {
47
48 /**
49 * An AST node's execute method is about to be called.
50 */
51 void enter(Node node, VirtualFrame vFrame);
52
53 /**
54 * An AST Node's {@code void}-valued execute method has just returned.
55 */
56 void returnVoid(Node node, VirtualFrame vFrame);
57
58 /**
59 * An AST Node's execute method has just returned a value (boxed if primitive).
60 */
61 void returnValue(Node node, VirtualFrame vFrame, Object result);
62
63 /**
64 * An AST Node's execute method has just thrown an exception.
65 */
66 void returnExceptional(Node node, VirtualFrame vFrame, Exception exception);
67 }
68 } 41 }