Mercurial > hg > graal-compiler
annotate graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/instrument/NodePhylum.java @ 13995:e455fc531ec2
Truffle: Added API in NodeUtil to count nodes restricted to a Kind.
Added API in NodeUtil to print the inlining tree.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Fri, 21 Feb 2014 02:25:12 +0100 |
parents | c8130737d27a |
children |
rev | line source |
---|---|
13562
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
1 /* |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
2 * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
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. |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
4 * |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
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 |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
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 |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. Oracle designates this |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
8 * particular file as subject to the "Classpath" exception as provided |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
9 * by Oracle in the LICENSE file that accompanied this code. |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
10 * |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
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 |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
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 |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
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 |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
15 * accompanied this code). |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
16 * |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
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 |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
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, |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
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. |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
20 * |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
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 |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
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 |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
23 * questions. |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
24 */ |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
25 package com.oracle.truffle.api.nodes.instrument; |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
26 |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
27 /** |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
28 * Categories of {@link InstrumentationProxyNode}s to be used for defining user-visible debugging |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
29 * and other simple tool behavior. These categories (<em>phyla</em>) should correspond to program |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
30 * structures that are meaningful to a programmer using the guest language. A Truffle node without a |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
31 * proxy carrying some phylum should be treated as an artifact of the guest language implementation |
13661
c8130737d27a
Truffle: Javadoc typo
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
13562
diff
changeset
|
32 * and should never be visible to the user of a guest language programming tool. |
13562
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
33 * <p> |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
34 * Note that phyla are not intended to represent a partition of user-visible node categories, as the |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
35 * relative categorization of nodes can change with the particular programming tasks at hand. |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
36 * <p> |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
37 * This is a somewhat language-agnostic set of phyla, suitable for conventional imperative |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
38 * languages, and is being developed incrementally. |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
39 * <p> |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
40 * The need for alternative sets of phyla is likely to arise, perhaps for other families of |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
41 * languages (for example for mostly expression-oriented languages) or even for specific languages. |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
42 * <p> |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
43 * These are listed alphabetically so that listing from some collection classes will come out in |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
44 * that order. |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
45 * <p> |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
46 * <strong>Disclaimer:</strong> this interface is under development and will change. |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
47 */ |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
48 public enum NodePhylum { |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
49 |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
50 /** |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
51 * Marker for a proxy at a variable assignment. |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
52 */ |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
53 ASSIGNMENT, |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
54 |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
55 /** |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
56 * Marker for a proxy at a call site. |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
57 */ |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
58 CALL, |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
59 |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
60 /** |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
61 * Marker for a proxy at which ordinary "stepping" should halt. |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
62 */ |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
63 STATEMENT; |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
64 |
58ca96949f2e
Truffle: introduce the notion of a node "phylum", a user-oriented categorization of nodes that is independent of implementation, to be used by tools when identifying program parts, such as "statements".
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
65 } |