comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/AdvancedInstrumentResultListener.java @ 21356:e34bc00733d1

Truffle/Instrumentation: an Advanced Instrument can now be created that requires the evaluation result be of a specified type, reporting a failure if not
author Michael Van De Vanter <michael.van.de.vanter@oracle.com>
date Tue, 12 May 2015 17:29:49 -0700
parents 442b57a7f208
children 28cbfacd0518
comparison
equal deleted inserted replaced
21355:442b57a7f208 21356:e34bc00733d1
29 import com.oracle.truffle.api.nodes.*; 29 import com.oracle.truffle.api.nodes.*;
30 30
31 /** 31 /**
32 * Listener for receiving the result a client-provided {@linkplain AdvancedInstrumentRoot AST 32 * Listener for receiving the result a client-provided {@linkplain AdvancedInstrumentRoot AST
33 * fragment}, when executed by a 33 * fragment}, when executed by a
34 * {@linkplain Instrument#create(AdvancedInstrumentResultListener, AdvancedInstrumentRootFactory, String) 34 * {@linkplain Instrument#create(AdvancedInstrumentResultListener, AdvancedInstrumentRootFactory, Class, String)
35 * Advanced Instrument}. 35 * Advanced Instrument}.
36 * 36 *
37 * @see Instrument 37 * @see Instrument
38 * @see AdvancedInstrumentRoot 38 * @see AdvancedInstrumentRoot
39 * @see AdvancedInstrumentRootFactory 39 * @see AdvancedInstrumentRootFactory
41 public interface AdvancedInstrumentResultListener { 41 public interface AdvancedInstrumentResultListener {
42 42
43 /** 43 /**
44 * Notifies listener that a client-provided {@linkplain AdvancedInstrumentRoot AST fragment} has 44 * Notifies listener that a client-provided {@linkplain AdvancedInstrumentRoot AST fragment} has
45 * been executed by an 45 * been executed by an
46 * {@linkplain Instrument#create(AdvancedInstrumentResultListener, AdvancedInstrumentRootFactory, String) 46 * {@linkplain Instrument#create(AdvancedInstrumentResultListener, AdvancedInstrumentRootFactory, Class, String)
47 * Advanced Instrument} with the specified result, possibly {@code null}. 47 * Advanced Instrument} with the specified result, possibly {@code null}.
48 * <p> 48 * <p>
49 * <strong>Note: </strong> Truffle will attempt to optimize implementations through partial 49 * <strong>Note: </strong> Truffle will attempt to optimize implementations through partial
50 * evaluation; annotate with {@link TruffleBoundary} if this should not be permitted. 50 * evaluation; annotate with {@link TruffleBoundary} if this should not be permitted.
51 * 51 *