# HG changeset patch # User Michael Van De Vanter # Date 1442790662 25200 # Node ID c9681cd54d90b013f3e8ce1e90bc3384bc7bd869 # Parent 68a0c3dcea10af9c2c024341b062183d7b2e559a Truffle/Instrumentation: remove @Deprecated Instrument factory methods, Javadoc cleanup diff -r 68a0c3dcea10 -r c9681cd54d90 truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/TruffleLanguage.java --- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/TruffleLanguage.java Sun Sep 20 15:59:09 2015 -0700 +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/TruffleLanguage.java Sun Sep 20 16:11:02 2015 -0700 @@ -43,7 +43,6 @@ import com.oracle.truffle.api.instrument.AdvancedInstrumentResultListener; import com.oracle.truffle.api.instrument.AdvancedInstrumentRoot; import com.oracle.truffle.api.instrument.AdvancedInstrumentRootFactory; -import com.oracle.truffle.api.instrument.Instrument; import com.oracle.truffle.api.instrument.Instrumenter; import com.oracle.truffle.api.instrument.ToolSupportProvider; import com.oracle.truffle.api.instrument.Visualizer; @@ -252,8 +251,8 @@ * Creates a language-specific factory to produce instances of {@link AdvancedInstrumentRoot} * that, when executed, computes the result of a textual expression in the language; used to * create an - * {@linkplain Instrument#create(AdvancedInstrumentResultListener, AdvancedInstrumentRootFactory, Class, String) - * Advanced Instrument}. + * {@linkplain Instrumenter#attach(com.oracle.truffle.api.instrument.Probe, AdvancedInstrumentResultListener, AdvancedInstrumentRootFactory, Class, String)} + * . * * @param expr a guest language expression * @param resultListener optional listener for the result of each evaluation. diff -r 68a0c3dcea10 -r c9681cd54d90 truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/DebugSupportProvider.java --- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/DebugSupportProvider.java Sun Sep 20 15:59:09 2015 -0700 +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/DebugSupportProvider.java Sun Sep 20 16:11:02 2015 -0700 @@ -28,7 +28,7 @@ import com.oracle.truffle.api.instrument.AdvancedInstrumentResultListener; import com.oracle.truffle.api.instrument.AdvancedInstrumentRoot; import com.oracle.truffle.api.instrument.AdvancedInstrumentRootFactory; -import com.oracle.truffle.api.instrument.Instrument; +import com.oracle.truffle.api.instrument.Instrumenter; import com.oracle.truffle.api.instrument.ToolSupportProvider; import com.oracle.truffle.api.nodes.Node; import com.oracle.truffle.api.source.Source; @@ -52,7 +52,7 @@ * Creates a language-specific factory to produce instances of {@link AdvancedInstrumentRoot} * that, when executed, computes the result of a textual expression in the language; used to * create an - * {@linkplain Instrument#create(AdvancedInstrumentResultListener, AdvancedInstrumentRootFactory, Class, String) + * {@linkplain Instrumenter#attach(com.oracle.truffle.api.instrument.Probe, AdvancedInstrumentResultListener, AdvancedInstrumentRootFactory, Class, String) * Advanced Instrument}. * * @param expr a guest language expression diff -r 68a0c3dcea10 -r c9681cd54d90 truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/Debugger.java --- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/Debugger.java Sun Sep 20 15:59:09 2015 -0700 +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/debug/Debugger.java Sun Sep 20 16:11:02 2015 -0700 @@ -41,7 +41,6 @@ import com.oracle.truffle.api.instrument.AdvancedInstrumentResultListener; import com.oracle.truffle.api.instrument.AdvancedInstrumentRoot; import com.oracle.truffle.api.instrument.AdvancedInstrumentRootFactory; -import com.oracle.truffle.api.instrument.Instrument; import com.oracle.truffle.api.instrument.Instrumenter; import com.oracle.truffle.api.instrument.KillException; import com.oracle.truffle.api.instrument.Probe; @@ -276,7 +275,7 @@ * Creates a language-specific factory to produce instances of {@link AdvancedInstrumentRoot} * that, when executed, computes the result of a textual expression in the language; used to * create an - * {@linkplain Instrument#create(AdvancedInstrumentResultListener, AdvancedInstrumentRootFactory, Class, String) + * {@linkplain Instrumenter#attach(Probe, AdvancedInstrumentResultListener, AdvancedInstrumentRootFactory, Class, String) * Advanced Instrument}. * * @param expr a guest language expression diff -r 68a0c3dcea10 -r c9681cd54d90 truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/AdvancedInstrumentResultListener.java --- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/AdvancedInstrumentResultListener.java Sun Sep 20 15:59:09 2015 -0700 +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/AdvancedInstrumentResultListener.java Sun Sep 20 16:11:02 2015 -0700 @@ -31,7 +31,7 @@ /** * Listener for receiving the result a client-provided {@linkplain AdvancedInstrumentRoot AST * fragment}, when executed by a - * {@linkplain Instrument#create(AdvancedInstrumentResultListener, AdvancedInstrumentRootFactory, Class, String) + * {@linkplain Instrumenter#attach(Probe, AdvancedInstrumentResultListener, AdvancedInstrumentRootFactory, Class, String) * Advanced Instrument}. * * @see Instrument @@ -43,7 +43,7 @@ /** * Notifies listener that a client-provided {@linkplain AdvancedInstrumentRoot AST fragment} has * been executed by an - * {@linkplain Instrument#create(AdvancedInstrumentResultListener, AdvancedInstrumentRootFactory, Class, String) + * {@linkplain Instrumenter#attach(Probe, AdvancedInstrumentResultListener, AdvancedInstrumentRootFactory, Class, String) * Advanced Instrument} with the specified result, possibly {@code null}. *

* Note: Truffle will attempt to optimize implementations through partial diff -r 68a0c3dcea10 -r c9681cd54d90 truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/AdvancedInstrumentRoot.java --- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/AdvancedInstrumentRoot.java Sun Sep 20 15:59:09 2015 -0700 +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/AdvancedInstrumentRoot.java Sun Sep 20 16:11:02 2015 -0700 @@ -30,7 +30,7 @@ /** * Root of a client-provided AST fragment that can be executed efficiently, subject to full Truffle * optimization, by an - * {@linkplain Instrument#create(AdvancedInstrumentResultListener, AdvancedInstrumentRootFactory, Class, String) + * {@linkplain Instrumenter#attach(Probe, AdvancedInstrumentResultListener, AdvancedInstrumentRootFactory, Class, String) * Advanced Instrument}. * * @see Instrument diff -r 68a0c3dcea10 -r c9681cd54d90 truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/AdvancedInstrumentRootFactory.java --- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/AdvancedInstrumentRootFactory.java Sun Sep 20 15:59:09 2015 -0700 +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/AdvancedInstrumentRootFactory.java Sun Sep 20 16:11:02 2015 -0700 @@ -29,7 +29,7 @@ /** * Creator of {@linkplain AdvancedInstrumentRoot AST fragments} suitable for efficient execution, * subject to full Truffle optimization, by an - * {@linkplain Instrument#create(AdvancedInstrumentResultListener, AdvancedInstrumentRootFactory, Class, String) + * {@linkplain Instrumenter#attach(Probe, AdvancedInstrumentResultListener, AdvancedInstrumentRootFactory, Class, String) * Advanced Instrument}. * * @see Instrument diff -r 68a0c3dcea10 -r c9681cd54d90 truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/Instrument.java --- a/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/Instrument.java Sun Sep 20 15:59:09 2015 -0700 +++ b/truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/Instrument.java Sun Sep 20 16:11:02 2015 -0700 @@ -49,44 +49,6 @@ */ public abstract class Instrument { - @Deprecated - public static Instrument create(SimpleInstrumentListener listener, String instrumentInfo) { - return new SimpleInstrument(listener, instrumentInfo); - } - - /** - * Creates a Standard Instrument: this Instrument routes execution events, together - * with access to Truffle execution state, to a client-provided listener. - * - * @param standardListener a listener for execution events and execution state - * @param instrumentInfo optional description of the instrument's role, intended for debugging. - * @return a new instrument, ready for attachment at a probe - */ - @Deprecated - public static Instrument create(StandardInstrumentListener standardListener, String instrumentInfo) { - return new StandardInstrument(standardListener, instrumentInfo); - } - - /** - * Creates an Advanced Instrument: this Instrument executes efficiently, subject to - * full Truffle optimization, a client-provided AST fragment every time the Probed node is - * entered. - *

- * Any {@link RuntimeException} thrown by execution of the fragment is caught by the framework - * and reported to the listener; there is no other notification. - * - * @param resultListener optional client callback for results/failure notification - * @param rootFactory provider of AST fragments on behalf of the client - * @param requiredResultType optional requirement, any non-assignable result is reported to the - * the listener, if any, as a failure - * @param instrumentInfo optional description of the instrument's role, intended for debugging. - * @return a new instrument, ready for attachment at a probe - */ - @Deprecated - public static Instrument create(AdvancedInstrumentResultListener resultListener, AdvancedInstrumentRootFactory rootFactory, Class requiredResultType, String instrumentInfo) { - return new AdvancedInstrument(resultListener, rootFactory, requiredResultType, instrumentInfo); - } - /** * Has this instrument been disposed? stays true once set. */