annotate truffle/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/ASTProber.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 1c0f490984d5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15279
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
1 /*
18985
867058575979 Truffle: Improved support for "probing" AST nodes:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 18485
diff changeset
2 * Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
15279
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
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.
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
4 *
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
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
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
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
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation. Oracle designates this
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
8 * particular file as subject to the "Classpath" exception as provided
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
9 * by Oracle in the LICENSE file that accompanied this code.
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
10 *
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
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
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
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
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
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
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
15 * accompanied this code).
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
16 *
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
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
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
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,
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
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.
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
20 *
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
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
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
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
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
23 * questions.
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
24 */
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
25 package com.oracle.truffle.api.instrument;
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
26
22157
dc83cc1f94f2 Using fully qualified imports
Jaroslav Tulach <jaroslav.tulach@oracle.com>
parents: 21951
diff changeset
27 import com.oracle.truffle.api.nodes.Node;
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15279
diff changeset
28
15279
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
29 /**
18485
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
30 * Enables instrumentation by attaching {@linkplain Probe Probes} to some nodes in a (newly created,
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
31 * not yet executed) AST.
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
32 *
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
33 * @see Probe
18985
867058575979 Truffle: Improved support for "probing" AST nodes:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 18485
diff changeset
34 * @see Probe#addProbeListener(ProbeListener)
15279
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
35 */
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
36 public interface ASTProber {
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
37
18485
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
38 /**
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
39 * Walk the AST starting at a node and enable instrumentation at selected nodes by attaching
18985
867058575979 Truffle: Improved support for "probing" AST nodes:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 18485
diff changeset
40 * {@linkplain Probe Probes} to them. Ignore {@linkplain Node#isInstrumentable()
867058575979 Truffle: Improved support for "probing" AST nodes:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 18485
diff changeset
41 * non-instrumentable} nodes.
18485
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
42 */
e3c95cbbb50c Truffle Instrumentation: major API revision, based around the Probe and Instrument classes; add Instrumentable API for language implementors, with most details automated; reimplemented to handle AST splitting automatically; more JUnit tests.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
43 void probeAST(Node node);
15279
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
44
0c6d8a08e31b Truffle: Major cleanup and extension of the Truffle Instrumentation framework in com.oracle.truffle.api
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
45 }