Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/AdvancedInstrumentResultListener.java @ 21522:28cbfacd0518
Merge
author | Gilles Duboscq <gilles.m.duboscq@oracle.com> |
---|---|
date | Thu, 28 May 2015 17:44:05 +0200 |
parents | graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/ToolEvalResultListener.java@78a4b44420cf graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/ToolEvalResultListener.java@e34bc00733d1 |
children |
comparison
equal
deleted
inserted
replaced
21521:107300758a4e | 21522:28cbfacd0518 |
---|---|
1 /* | |
2 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved. | |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | |
4 * | |
5 * This code is free software; you can redistribute it and/or modify it | |
6 * under the terms of the GNU General Public License version 2 only, as | |
7 * published by the Free Software Foundation. Oracle designates this | |
8 * particular file as subject to the "Classpath" exception as provided | |
9 * by Oracle in the LICENSE file that accompanied this code. | |
10 * | |
11 * This code is distributed in the hope that it will be useful, but WITHOUT | |
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
14 * version 2 for more details (a copy is included in the LICENSE file that | |
15 * accompanied this code). | |
16 * | |
17 * You should have received a copy of the GNU General Public License version | |
18 * 2 along with this work; if not, write to the Free Software Foundation, | |
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. | |
20 * | |
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA | |
22 * or visit www.oracle.com if you need additional information or have any | |
23 * questions. | |
24 */ | |
25 package com.oracle.truffle.api.instrument; | |
26 | |
27 import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary; | |
28 import com.oracle.truffle.api.frame.*; | |
29 import com.oracle.truffle.api.nodes.*; | |
30 | |
31 /** | |
32 * Listener for receiving the result a client-provided {@linkplain AdvancedInstrumentRoot AST | |
33 * fragment}, when executed by a | |
34 * {@linkplain Instrument#create(AdvancedInstrumentResultListener, AdvancedInstrumentRootFactory, Class, String) | |
35 * Advanced Instrument}. | |
36 * | |
37 * @see Instrument | |
38 * @see AdvancedInstrumentRoot | |
39 * @see AdvancedInstrumentRootFactory | |
40 */ | |
41 public interface AdvancedInstrumentResultListener { | |
42 | |
43 /** | |
44 * Notifies listener that a client-provided {@linkplain AdvancedInstrumentRoot AST fragment} has | |
45 * been executed by an | |
46 * {@linkplain Instrument#create(AdvancedInstrumentResultListener, AdvancedInstrumentRootFactory, Class, String) | |
47 * Advanced Instrument} with the specified result, possibly {@code null}. | |
48 * <p> | |
49 * <strong>Note: </strong> Truffle will attempt to optimize implementations through partial | |
50 * evaluation; annotate with {@link TruffleBoundary} if this should not be permitted. | |
51 * | |
52 * @param node the guest-language AST node to which the host Instrument's {@link Probe} is | |
53 * attached | |
54 * @param vFrame execution frame at the guest-language AST node | |
55 * @param result the result of this AST fragment's execution | |
56 */ | |
57 void notifyResult(Node node, VirtualFrame vFrame, Object result); | |
58 | |
59 /** | |
60 * Notifies listener that execution of client-provided {@linkplain AdvancedInstrumentRoot AST | |
61 * fragment} filed during execution by a @linkplain | |
62 * Instrument#create(AdvancedInstrumentRootFactory, String) Advanced Instrument}. | |
63 * <p> | |
64 * <strong>Note: </strong> Truffle will attempt to optimize implementations through partial | |
65 * evaluation; annotate with {@link TruffleBoundary} if this should not be permitted. | |
66 * | |
67 * @param node the guest-language AST node to which the host Instrument's {@link Probe} is | |
68 * attached | |
69 * @param vFrame execution frame at the guest-language AST node | |
70 * @param ex the exception | |
71 */ | |
72 void notifyFailure(Node node, VirtualFrame vFrame, RuntimeException ex); | |
73 | |
74 } |