comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/AdvancedInstrumentResultListener.java @ 21354:575032310b2c

Truffle/Instrumentation: runtime failures executing an AdvancedInstrument root are now reported automatically via a new mehtod onAdvancedInstrumentResultListener.
author Michael Van De Vanter <michael.van.de.vanter@oracle.com>
date Tue, 12 May 2015 14:48:33 -0700
parents 876e710523c5
children 442b57a7f208
comparison
equal deleted inserted replaced
21353:876e710523c5 21354:575032310b2c
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.CompilerDirectives.TruffleBoundary;
27 import com.oracle.truffle.api.frame.*; 28 import com.oracle.truffle.api.frame.*;
28 import com.oracle.truffle.api.nodes.*; 29 import com.oracle.truffle.api.nodes.*;
29 30
30 /** 31 /**
31 * Listener for receiving the result a client-provided {@linkplain AdvancedInstrumentRoot AST 32 * Listener for receiving the result a client-provided {@linkplain AdvancedInstrumentRoot AST
40 41
41 /** 42 /**
42 * Notifies listener that a client-provided {@linkplain AdvancedInstrumentRoot AST fragment} has 43 * Notifies listener that a client-provided {@linkplain AdvancedInstrumentRoot AST fragment} has
43 * been executed by an {@linkplain Instrument#create(AdvancedInstrumentRootFactory, String) 44 * been executed by an {@linkplain Instrument#create(AdvancedInstrumentRootFactory, String)
44 * Advanced Instrument} with the specified result, possibly {@code null}. 45 * Advanced Instrument} with the specified result, possibly {@code null}.
45 * 46 * <p>
47 * <strong>Note: </strong> Truffle will attempt to optimize implementations through partial
48 * evaluation; annotate with {@link TruffleBoundary} if this should not be permitted.
49 *
46 * @param node the guest-language AST node to which the host Instrument's {@link Probe} is 50 * @param node the guest-language AST node to which the host Instrument's {@link Probe} is
47 * attached 51 * attached
48 * @param vFrame execution frame at the guest-language AST node 52 * @param vFrame execution frame at the guest-language AST node
49 * @param result the result of this AST fragment's execution 53 * @param result the result of this AST fragment's execution
50 */ 54 */
52 56
53 /** 57 /**
54 * Notifies listener that execution of client-provided {@linkplain AdvancedInstrumentRoot AST 58 * Notifies listener that execution of client-provided {@linkplain AdvancedInstrumentRoot AST
55 * fragment} filed during execution by a @linkplain 59 * fragment} filed during execution by a @linkplain
56 * Instrument#create(AdvancedInstrumentRootFactory, String) Advanced Instrument}. 60 * Instrument#create(AdvancedInstrumentRootFactory, String) Advanced Instrument}.
61 * <p>
62 * <strong>Note: </strong> Truffle will attempt to optimize implementations through partial
63 * evaluation; annotate with {@link TruffleBoundary} if this should not be permitted.
57 * 64 *
58 * @param node the guest-language AST node to which the host Instrument's {@link Probe} is 65 * @param node the guest-language AST node to which the host Instrument's {@link Probe} is
59 * attached 66 * attached
60 * @param vFrame execution frame at the guest-language AST node 67 * @param vFrame execution frame at the guest-language AST node
61 * @param ex the exception 68 * @param ex the exception