annotate truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/AdvancedInstrumentResultListener.java @ 22157:dc83cc1f94f2

Using fully qualified imports
author Jaroslav Tulach <jaroslav.tulach@oracle.com>
date Wed, 16 Sep 2015 11:33:22 +0200
parents 9c8c0937da41
children c9681cd54d90
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
21181
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
1 /*
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
4 *
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation. Oracle designates this
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
8 * particular file as subject to the "Classpath" exception as provided
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
9 * by Oracle in the LICENSE file that accompanied this code.
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
10 *
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
11 * This code is distributed in the hope that it will be useful, but WITHOUT
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
14 * version 2 for more details (a copy is included in the LICENSE file that
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
15 * accompanied this code).
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
16 *
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License version
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
18 * 2 along with this work; if not, write to the Free Software Foundation,
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
20 *
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
22 * or visit www.oracle.com if you need additional information or have any
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
23 * questions.
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
24 */
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
25 package com.oracle.truffle.api.instrument;
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
26
21354
575032310b2c Truffle/Instrumentation: runtime failures executing an AdvancedInstrument root are now reported automatically via a new mehtod onAdvancedInstrumentResultListener.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21353
diff changeset
27 import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
22157
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 21951
diff changeset
28 import com.oracle.truffle.api.frame.VirtualFrame;
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 21951
diff changeset
29 import com.oracle.truffle.api.nodes.Node;
21181
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
30
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
31 /**
21353
876e710523c5 Truffle/Instrumentation: rename "Tool Eval" Instrument kind to "Advanced" Instrument kind
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21181
diff changeset
32 * Listener for receiving the result a client-provided {@linkplain AdvancedInstrumentRoot AST
876e710523c5 Truffle/Instrumentation: rename "Tool Eval" Instrument kind to "Advanced" Instrument kind
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21181
diff changeset
33 * fragment}, when executed by a
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
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21355
diff changeset
34 * {@linkplain Instrument#create(AdvancedInstrumentResultListener, AdvancedInstrumentRootFactory, Class, String)
21355
442b57a7f208 Truffle/Instrumentation: change the signature for creation of Advanced instruments, refactor how the callback listener is managed.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21354
diff changeset
35 * Advanced Instrument}.
21181
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
36 *
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
37 * @see Instrument
21353
876e710523c5 Truffle/Instrumentation: rename "Tool Eval" Instrument kind to "Advanced" Instrument kind
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21181
diff changeset
38 * @see AdvancedInstrumentRoot
876e710523c5 Truffle/Instrumentation: rename "Tool Eval" Instrument kind to "Advanced" Instrument kind
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21181
diff changeset
39 * @see AdvancedInstrumentRootFactory
21181
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
40 */
21353
876e710523c5 Truffle/Instrumentation: rename "Tool Eval" Instrument kind to "Advanced" Instrument kind
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21181
diff changeset
41 public interface AdvancedInstrumentResultListener {
21181
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
42
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
43 /**
21353
876e710523c5 Truffle/Instrumentation: rename "Tool Eval" Instrument kind to "Advanced" Instrument kind
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21181
diff changeset
44 * Notifies listener that a client-provided {@linkplain AdvancedInstrumentRoot AST fragment} has
21355
442b57a7f208 Truffle/Instrumentation: change the signature for creation of Advanced instruments, refactor how the callback listener is managed.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21354
diff changeset
45 * been executed by an
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
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21355
diff changeset
46 * {@linkplain Instrument#create(AdvancedInstrumentResultListener, AdvancedInstrumentRootFactory, Class, String)
21353
876e710523c5 Truffle/Instrumentation: rename "Tool Eval" Instrument kind to "Advanced" Instrument kind
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21181
diff changeset
47 * Advanced Instrument} with the specified result, possibly {@code null}.
21354
575032310b2c Truffle/Instrumentation: runtime failures executing an AdvancedInstrument root are now reported automatically via a new mehtod onAdvancedInstrumentResultListener.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21353
diff changeset
48 * <p>
575032310b2c Truffle/Instrumentation: runtime failures executing an AdvancedInstrument root are now reported automatically via a new mehtod onAdvancedInstrumentResultListener.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21353
diff changeset
49 * <strong>Note: </strong> Truffle will attempt to optimize implementations through partial
575032310b2c Truffle/Instrumentation: runtime failures executing an AdvancedInstrument root are now reported automatically via a new mehtod onAdvancedInstrumentResultListener.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21353
diff changeset
50 * evaluation; annotate with {@link TruffleBoundary} if this should not be permitted.
21355
442b57a7f208 Truffle/Instrumentation: change the signature for creation of Advanced instruments, refactor how the callback listener is managed.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21354
diff changeset
51 *
21181
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
52 * @param node the guest-language AST node to which the host Instrument's {@link Probe} is
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
53 * attached
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
54 * @param vFrame execution frame at the guest-language AST node
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
55 * @param result the result of this AST fragment's execution
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
56 */
21353
876e710523c5 Truffle/Instrumentation: rename "Tool Eval" Instrument kind to "Advanced" Instrument kind
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21181
diff changeset
57 void notifyResult(Node node, VirtualFrame vFrame, Object result);
21181
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
58
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
59 /**
21353
876e710523c5 Truffle/Instrumentation: rename "Tool Eval" Instrument kind to "Advanced" Instrument kind
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21181
diff changeset
60 * Notifies listener that execution of client-provided {@linkplain AdvancedInstrumentRoot AST
876e710523c5 Truffle/Instrumentation: rename "Tool Eval" Instrument kind to "Advanced" Instrument kind
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21181
diff changeset
61 * fragment} filed during execution by a @linkplain
876e710523c5 Truffle/Instrumentation: rename "Tool Eval" Instrument kind to "Advanced" Instrument kind
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21181
diff changeset
62 * Instrument#create(AdvancedInstrumentRootFactory, String) Advanced Instrument}.
21354
575032310b2c Truffle/Instrumentation: runtime failures executing an AdvancedInstrument root are now reported automatically via a new mehtod onAdvancedInstrumentResultListener.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21353
diff changeset
63 * <p>
575032310b2c Truffle/Instrumentation: runtime failures executing an AdvancedInstrument root are now reported automatically via a new mehtod onAdvancedInstrumentResultListener.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21353
diff changeset
64 * <strong>Note: </strong> Truffle will attempt to optimize implementations through partial
575032310b2c Truffle/Instrumentation: runtime failures executing an AdvancedInstrument root are now reported automatically via a new mehtod onAdvancedInstrumentResultListener.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21353
diff changeset
65 * evaluation; annotate with {@link TruffleBoundary} if this should not be permitted.
21181
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
66 *
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
67 * @param node the guest-language AST node to which the host Instrument's {@link Probe} is
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
68 * attached
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
69 * @param vFrame execution frame at the guest-language AST node
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
70 * @param ex the exception
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
71 */
21353
876e710523c5 Truffle/Instrumentation: rename "Tool Eval" Instrument kind to "Advanced" Instrument kind
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 21181
diff changeset
72 void notifyFailure(Node node, VirtualFrame vFrame, RuntimeException ex);
21181
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
73
78a4b44420cf Truffle/Instrumentation: rename the "SplicedNode" Instrument kind to the "ToolEval" instrument kind, along with some redesign based on earlier feedback.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
74 }