annotate graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/impl/InstrumentationNode.java @ 18163:c88ab4f1f04a

re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
author Doug Simon <doug.simon@oracle.com>
date Fri, 24 Oct 2014 16:18:10 +0200
parents b4e38f4ca414
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
1 /*
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
2 * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
be0c151d912b Truffle/Instrumentation: API revisions
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.
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
4 *
be0c151d912b Truffle/Instrumentation: API revisions
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
be0c151d912b Truffle/Instrumentation: API revisions
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
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation. Oracle designates this
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
8 * particular file as subject to the "Classpath" exception as provided
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
9 * by Oracle in the LICENSE file that accompanied this code.
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
10 *
be0c151d912b Truffle/Instrumentation: API revisions
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
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
be0c151d912b Truffle/Instrumentation: API revisions
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
be0c151d912b Truffle/Instrumentation: API revisions
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
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
15 * accompanied this code).
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
16 *
be0c151d912b Truffle/Instrumentation: API revisions
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
be0c151d912b Truffle/Instrumentation: API revisions
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,
be0c151d912b Truffle/Instrumentation: API revisions
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.
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
20 *
be0c151d912b Truffle/Instrumentation: API revisions
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
be0c151d912b Truffle/Instrumentation: API revisions
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
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
23 * questions.
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
24 */
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
25 package com.oracle.truffle.api.instrument.impl;
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
26
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
27 import java.util.*;
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
28
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
29 import com.oracle.truffle.api.*;
18130
b4e38f4ca414 Truffle: rename @SlowPath to @TruffleBoundary.
Christian Humer <christian.humer@gmail.com>
parents: 16963
diff changeset
30 import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
31 import com.oracle.truffle.api.frame.*;
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
32 import com.oracle.truffle.api.instrument.*;
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
33 import com.oracle.truffle.api.nodes.*;
16067
915ebb306fcc Truffle/Source: major API revision
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15943
diff changeset
34 import com.oracle.truffle.api.source.*;
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
35
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
36 /**
16857
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
37 * Abstract implementation of Truffle {@link Node}s used as AST {@link Probe}s and
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
38 * {@link Instrument}s. A {@link Probe} manages its attached {@link Instrument}s by appending them
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
39 * to a chain through which {@link ExecutionEvents} are propagated.
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
40 */
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
41 public abstract class InstrumentationNode extends Node implements ExecutionEvents {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
42
15779
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
43 interface ProbeCallback {
16391
50d79ad439f1 Truffle/Instrumentation: rename PhylumTag to SyntaxTag (along with related classes/methods)
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16067
diff changeset
44 void newTagAdded(ProbeImpl probe, SyntaxTag tag);
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
45 }
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
46
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
47 static ProbeImpl createProbe(SourceSection source, ProbeCallback probeCallback) {
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
48 return new ProbeImpl(source, probeCallback);
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
49 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
50
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
51 /**
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
52 * Next instrumentation node in chain.
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
53 */
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
54 @Child protected InstrumentationNode next;
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
55
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
56 protected InstrumentationNode() {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
57 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
58
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
59 /**
15943
14ac87c56a27 Truffle: NPE guard in InstrumentationNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15779
diff changeset
60 * Gets the {@link Probe} to which this instrument is attached; {@code null} if not attached.
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
61 */
15779
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
62 protected Probe getProbe() {
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
63 final InstrumentationNode parent = (InstrumentationNode) getParent();
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
64 return parent == null ? null : parent.getProbe();
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
65 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
66
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
67 /**
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
68 * Add an instrument to the end of this instrument chain.
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
69 */
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
70 private void internalAddInstrument(Instrument newInstrument) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
71 if (next == null) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
72 this.next = insert(newInstrument);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
73 } else {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
74 next.internalAddInstrument(newInstrument);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
75 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
76 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
77
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
78 /**
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
79 * Remove an instrument from this instrument chain. If no matching instrument is found, a
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
80 * {@link RuntimeException} is thrown.
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
81 *
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
82 * @param oldInstrument The {@link Instrument} to remove.
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
83 */
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
84 private void internalRemoveInstrument(Instrument oldInstrument) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
85 if (next == null) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
86 throw new RuntimeException("Couldn't find probe to remove: " + oldInstrument);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
87 } else if (next == oldInstrument) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
88 if (oldInstrument.next == null) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
89 this.next = null;
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
90 } else {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
91 this.next = insert(oldInstrument.next);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
92 oldInstrument.next = null;
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
93 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
94 } else {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
95 next.internalRemoveInstrument(oldInstrument);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
96 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
97 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
98
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
99 /**
15943
14ac87c56a27 Truffle: NPE guard in InstrumentationNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15779
diff changeset
100 * Reports to the instance of {@link Probe} holding this instrument, if any, that some essential
14ac87c56a27 Truffle: NPE guard in InstrumentationNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15779
diff changeset
101 * state has changed that requires deoptimization.
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
102 */
18130
b4e38f4ca414 Truffle: rename @SlowPath to @TruffleBoundary.
Christian Humer <christian.humer@gmail.com>
parents: 16963
diff changeset
103 @CompilerDirectives.TruffleBoundary
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
104 protected void notifyProbeChanged(Instrument instrument) {
15943
14ac87c56a27 Truffle: NPE guard in InstrumentationNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15779
diff changeset
105 Probe probe = getProbe();
14ac87c56a27 Truffle: NPE guard in InstrumentationNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15779
diff changeset
106 if (probe != null) {
14ac87c56a27 Truffle: NPE guard in InstrumentationNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15779
diff changeset
107 final ProbeImpl probeImpl = (ProbeImpl) probe;
14ac87c56a27 Truffle: NPE guard in InstrumentationNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15779
diff changeset
108 probeImpl.notifyProbeChanged(instrument);
14ac87c56a27 Truffle: NPE guard in InstrumentationNode
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15779
diff changeset
109 }
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
110 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
111
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
112 /**
16857
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
113 * Informs the instrument that execution is just about to enter an AST node with which this
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
114 * instrumentation node is associated. This will continue to call
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
115 * {@link #internalEnter(Node, VirtualFrame)} to inform all instruments in the chain.
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
116 *
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
117 * @param astNode The {@link Node} that was entered
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
118 * @param frame The {@link VirtualFrame} at the time of entry
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
119 */
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
120 protected void internalEnter(Node astNode, VirtualFrame frame) {
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
121 enter(astNode, frame);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
122 if (next != null) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
123 next.internalEnter(astNode, frame);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
124 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
125 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
126
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
127 /**
16857
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
128 * Informs the instrument that execution has just returned from an AST node with which this
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
129 * instrumentation node is associated. This will continue to call
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
130 * {@link #internalEnter(Node, VirtualFrame)} to inform all instruments in the chain. In this
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
131 * case, there is no return value.
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
132 *
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
133 * @param astNode The {@link Node} that was entered
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
134 * @param frame The {@link VirtualFrame} at the time of exit
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
135 */
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
136 protected void internalLeave(Node astNode, VirtualFrame frame) {
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
137 leave(astNode, frame);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
138 if (next != null) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
139 next.internalLeave(astNode, frame);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
140 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
141 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
142
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
143 /**
16857
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
144 * Informs the instrument that execution has just returned from an AST node with which this
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
145 * instrumentation node is associated. This will continue to call
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
146 * {@link #internalLeave(Node, VirtualFrame, boolean)} to inform all instruments in the chain.
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
147 * In this case, a boolean value was returned.
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
148 *
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
149 * @param astNode The {@link Node} that was entered
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
150 * @param frame The {@link VirtualFrame} at the time of exit
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
151 * @param result The boolean result
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
152 */
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
153 protected void internalLeave(Node astNode, VirtualFrame frame, boolean result) {
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
154 leave(astNode, frame, result);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
155 if (next != null) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
156 next.internalLeave(astNode, frame, result);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
157 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
158 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
159
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
160 /**
16857
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
161 * Informs the instrument that execution has just returned from an AST node with which this
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
162 * instrumentation node is associated. This will continue to call
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
163 * {@link #internalLeave(Node, VirtualFrame, byte)} to inform all instruments in the chain. In
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
164 * this case, a byte value was returned.
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
165 *
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
166 * @param astNode The {@link Node} that was entered
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
167 * @param frame The {@link VirtualFrame} at the time of exit
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
168 * @param result The byte result
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
169 */
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
170 protected void internalLeave(Node astNode, VirtualFrame frame, byte result) {
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
171 leave(astNode, frame, result);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
172 if (next != null) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
173 next.internalLeave(astNode, frame, result);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
174 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
175 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
176
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
177 /**
16857
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
178 * Informs the instrument that execution has just returned from an AST node with which this
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
179 * instrumentation node is associated. This will continue to call
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
180 * {@link #internalLeave(Node, VirtualFrame, short)} to inform all instruments in the chain. In
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
181 * this case, a short value was returned.
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
182 *
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
183 * @param astNode The {@link Node} that was entered
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
184 * @param frame The {@link VirtualFrame} at the time of exit
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
185 * @param result The short result
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
186 */
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
187 protected void internalLeave(Node astNode, VirtualFrame frame, short result) {
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
188 leave(astNode, frame, result);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
189 if (next != null) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
190 next.internalLeave(astNode, frame, result);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
191 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
192 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
193
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
194 /**
16857
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
195 * Informs the instrument that execution has just returned from an AST node with which this
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
196 * instrumentation node is associated. This will continue to call
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
197 * {@link #internalLeave(Node, VirtualFrame, int)} to inform all instruments in the chain. In
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
198 * this case, a int value was returned.
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
199 *
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
200 * @param astNode The {@link Node} that was entered
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
201 * @param frame The {@link VirtualFrame} at the time of exit
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
202 * @param result The int result
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
203 */
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
204 protected void internalLeave(Node astNode, VirtualFrame frame, int result) {
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
205 leave(astNode, frame, result);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
206 if (next != null) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
207 next.internalLeave(astNode, frame, result);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
208 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
209 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
210
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
211 /**
16857
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
212 * Informs the instrument that execution has just returned from an AST node with which this
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
213 * instrumentation node is associated. This will continue to call
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
214 * {@link #internalLeave(Node, VirtualFrame, long)} to inform all instruments in the chain. In
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
215 * this case, a long value was returned.
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
216 *
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
217 * @param astNode The {@link Node} that was entered
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
218 * @param frame The {@link VirtualFrame} at the time of exit
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
219 * @param result The long result
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
220 */
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
221 protected void internalLeave(Node astNode, VirtualFrame frame, long result) {
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
222 leave(astNode, frame, result);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
223 if (next != null) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
224 next.internalLeave(astNode, frame, result);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
225 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
226 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
227
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
228 /**
16857
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
229 * Informs the instrument that execution has just returned from an AST node with which this
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
230 * instrumentation node is associated. This will continue to call
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
231 * {@link #internalLeave(Node, VirtualFrame, char)} to inform all instruments in the chain. In
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
232 * this case, a char value was returned.
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
233 *
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
234 * @param astNode The {@link Node} that was entered
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
235 * @param frame The {@link VirtualFrame} at the time of exit
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
236 * @param result The char result
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
237 */
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
238 protected void internalLeave(Node astNode, VirtualFrame frame, char result) {
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
239 leave(astNode, frame, result);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
240 if (next != null) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
241 next.internalLeave(astNode, frame, result);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
242 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
243 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
244
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
245 /**
16857
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
246 * Informs the instrument that execution has just returned from an AST node with which this
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
247 * instrumentation node is associated. This will continue to call
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
248 * {@link #internalLeave(Node, VirtualFrame, float)} to inform all instruments in the chain. In
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
249 * this case, a float value was returned.
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
250 *
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
251 * @param astNode The {@link Node} that was entered
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
252 * @param frame The {@link VirtualFrame} at the time of exit
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
253 * @param result The float result
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
254 */
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
255 protected void internalLeave(Node astNode, VirtualFrame frame, float result) {
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
256 leave(astNode, frame, result);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
257 if (next != null) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
258 next.internalLeave(astNode, frame, result);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
259 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
260 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
261
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
262 /**
16857
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
263 * Informs the instrument that execution has just returned from an AST node with which this
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
264 * instrumentation node is associated. This will continue to call
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
265 * {@link #internalLeave(Node, VirtualFrame, double)} to inform all instruments in the chain. In
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
266 * this case, a double value was returned.
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
267 *
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
268 * @param astNode The {@link Node} that was entered
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
269 * @param frame The {@link VirtualFrame} at the time of exit
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
270 * @param result The double result
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
271 */
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
272 protected void internalLeave(Node astNode, VirtualFrame frame, double result) {
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
273 leave(astNode, frame, result);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
274 if (next != null) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
275 next.internalLeave(astNode, frame, result);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
276 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
277 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
278
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
279 /**
16857
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
280 * Informs the instrument that execution has just returned from an AST node with which this
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
281 * instrumentation node is associated. This will continue to call
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
282 * {@link #internalLeave(Node, VirtualFrame, Object)} to inform all instruments in the chain. In
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
283 * this case, an Object was returned.
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
284 *
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
285 * @param astNode The {@link Node} that was entered
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
286 * @param frame The {@link VirtualFrame} at the time of exit
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
287 * @param result The Object result
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
288 */
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
289 protected void internalLeave(Node astNode, VirtualFrame frame, Object result) {
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
290 leave(astNode, frame, result);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
291 if (next != null) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
292 next.internalLeave(astNode, frame, result);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
293 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
294 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
295
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
296 /**
16857
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
297 * Informs the instrument that execution has just returned from an AST node with which this
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
298 * instrumentation node is associated. This will continue to call
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
299 * {@link #internalLeaveExceptional(Node, VirtualFrame, Exception)} to inform all instruments in
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
300 * the chain. In this case, a exception (sometimes containing a value) was thrown.
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
301 *
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
302 * @param astNode The {@link Node} that was entered
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
303 * @param frame The {@link VirtualFrame} at the time of exit
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
304 * @param e The exception
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
305 */
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
306 protected void internalLeaveExceptional(Node astNode, VirtualFrame frame, Exception e) {
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
307 leaveExceptional(astNode, frame, null);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
308 if (next != null) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
309 next.internalLeaveExceptional(astNode, frame, e);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
310 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
311 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
312
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
313 /**
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
314 * Holder of a chain of {@linkplain InstrumentationNode instruments}: manages the
16857
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
315 * {@link Assumption} that no {@link Instrument}s have been added or removed and that none of
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
316 * the attached instruments have changed state in a way that would require deopt.
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
317 * <p>
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
318 * An instance is intended to be shared by every clone of the AST node with which it is
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
319 * originally attached, so it holds no parent pointer.
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
320 * <p>
16857
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
321 * Each probe is associated with a {@link SourceSection}, not necessarily uniquely, although
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
322 * such a policy could be enforced for some uses.
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
323 * <p>
16857
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
324 * Each {@link Probe} be categorized by one or more {@linkplain SyntaxTag tags}, signifying
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
325 * information useful for instrumentation about its AST location(s).
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
326 */
15779
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
327 static final class ProbeImpl extends InstrumentationNode implements Probe {
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
328
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
329 private final ProbeCallback probeCallback;
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
330
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
331 // TODO (mlvdv) assumption model broken
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
332 @CompilerDirectives.CompilationFinal private Assumption probeUnchanged;
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
333
16391
50d79ad439f1 Truffle/Instrumentation: rename PhylumTag to SyntaxTag (along with related classes/methods)
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16067
diff changeset
334 @CompilerDirectives.CompilationFinal private SyntaxTagTrap trap = null;
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
335
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
336 /**
18163
c88ab4f1f04a re-enabled Checkstyle with the release of 6.0 that supports Java 8; fixed existing Checkstyle warnings
Doug Simon <doug.simon@oracle.com>
parents: 18130
diff changeset
337 * The collection of tags for this instrumentation node.
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
338 */
16391
50d79ad439f1 Truffle/Instrumentation: rename PhylumTag to SyntaxTag (along with related classes/methods)
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16067
diff changeset
339 private final ArrayList<SyntaxTag> tags = new ArrayList<>();
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
340
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
341 /**
16857
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
342 * The region of source code associated with this probe. Note that this is distinct from
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
343 * {@link Node#getSourceSection()}, which is {@code null} for all instances of
7bfbad29d331 Truffle/Instrumentation: Javadoc cleanups and minor corrections.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16856
diff changeset
344 * {@link InstrumentationNode} since they have no corresponding source of their own.
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
345 */
16963
80fb94b07db2 Truffle/Instrumentation: rename misleading field name in ProbeImpl
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16859
diff changeset
346 private final SourceSection probedSourceSection;
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
347
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
348 /**
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
349 * Constructor.
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
350 *
16963
80fb94b07db2 Truffle/Instrumentation: rename misleading field name in ProbeImpl
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16859
diff changeset
351 * @param probedSourceSection The {@link SourceSection} associated with this probe.
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
352 * @param probeCallback The {@link ProbeCallback} to inform when tags have been added to
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
353 * this probe.
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
354 */
16963
80fb94b07db2 Truffle/Instrumentation: rename misleading field name in ProbeImpl
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16859
diff changeset
355 private ProbeImpl(SourceSection probedSourceSection, ProbeCallback probeCallback) {
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
356 this.probeCallback = probeCallback;
16963
80fb94b07db2 Truffle/Instrumentation: rename misleading field name in ProbeImpl
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16859
diff changeset
357 this.probedSourceSection = probedSourceSection;
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
358 this.probeUnchanged = Truffle.getRuntime().createAssumption();
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
359 this.next = null;
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
360 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
361
16859
1051d6e4b61b truffle api: update comments
Bernhard Urban <bernhard.urban@jku.at>
parents: 16857
diff changeset
362 /**
1051d6e4b61b truffle api: update comments
Bernhard Urban <bernhard.urban@jku.at>
parents: 16857
diff changeset
363 * Returns the {@link SourceSection} associated with this probe.
1051d6e4b61b truffle api: update comments
Bernhard Urban <bernhard.urban@jku.at>
parents: 16857
diff changeset
364 */
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
365 public SourceSection getSourceLocation() {
16963
80fb94b07db2 Truffle/Instrumentation: rename misleading field name in ProbeImpl
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16859
diff changeset
366 return probedSourceSection;
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
367 }
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
368
16859
1051d6e4b61b truffle api: update comments
Bernhard Urban <bernhard.urban@jku.at>
parents: 16857
diff changeset
369 /**
1051d6e4b61b truffle api: update comments
Bernhard Urban <bernhard.urban@jku.at>
parents: 16857
diff changeset
370 * Tags this probe with the given {@link SyntaxTag}. If the tag already exists, the tag is
1051d6e4b61b truffle api: update comments
Bernhard Urban <bernhard.urban@jku.at>
parents: 16857
diff changeset
371 * not added.
1051d6e4b61b truffle api: update comments
Bernhard Urban <bernhard.urban@jku.at>
parents: 16857
diff changeset
372 *
1051d6e4b61b truffle api: update comments
Bernhard Urban <bernhard.urban@jku.at>
parents: 16857
diff changeset
373 * @param tag The tag to add to this probe.
1051d6e4b61b truffle api: update comments
Bernhard Urban <bernhard.urban@jku.at>
parents: 16857
diff changeset
374 */
18130
b4e38f4ca414 Truffle: rename @SlowPath to @TruffleBoundary.
Christian Humer <christian.humer@gmail.com>
parents: 16963
diff changeset
375 @TruffleBoundary
16391
50d79ad439f1 Truffle/Instrumentation: rename PhylumTag to SyntaxTag (along with related classes/methods)
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16067
diff changeset
376 public void tagAs(SyntaxTag tag) {
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
377 assert tag != null;
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
378 if (!tags.contains(tag)) {
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
379 tags.add(tag);
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
380 probeCallback.newTagAdded(this, tag);
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
381 }
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
382 }
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
383
16859
1051d6e4b61b truffle api: update comments
Bernhard Urban <bernhard.urban@jku.at>
parents: 16857
diff changeset
384 /**
1051d6e4b61b truffle api: update comments
Bernhard Urban <bernhard.urban@jku.at>
parents: 16857
diff changeset
385 * Checks if this probe has been tagged with the given tag.
1051d6e4b61b truffle api: update comments
Bernhard Urban <bernhard.urban@jku.at>
parents: 16857
diff changeset
386 *
1051d6e4b61b truffle api: update comments
Bernhard Urban <bernhard.urban@jku.at>
parents: 16857
diff changeset
387 * @param tag The {@link SyntaxTag} to check for.
1051d6e4b61b truffle api: update comments
Bernhard Urban <bernhard.urban@jku.at>
parents: 16857
diff changeset
388 * @return True if this probe has the given tag, false otherwise.
1051d6e4b61b truffle api: update comments
Bernhard Urban <bernhard.urban@jku.at>
parents: 16857
diff changeset
389 */
16391
50d79ad439f1 Truffle/Instrumentation: rename PhylumTag to SyntaxTag (along with related classes/methods)
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16067
diff changeset
390 public boolean isTaggedAs(SyntaxTag tag) {
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
391 assert tag != null;
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
392 return tags.contains(tag);
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
393 }
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
394
16859
1051d6e4b61b truffle api: update comments
Bernhard Urban <bernhard.urban@jku.at>
parents: 16857
diff changeset
395 /**
1051d6e4b61b truffle api: update comments
Bernhard Urban <bernhard.urban@jku.at>
parents: 16857
diff changeset
396 * Returns an iterable collection of all syntax tags on this probe.
1051d6e4b61b truffle api: update comments
Bernhard Urban <bernhard.urban@jku.at>
parents: 16857
diff changeset
397 *
1051d6e4b61b truffle api: update comments
Bernhard Urban <bernhard.urban@jku.at>
parents: 16857
diff changeset
398 * @return A collection of {@link SyntaxTag}s.
1051d6e4b61b truffle api: update comments
Bernhard Urban <bernhard.urban@jku.at>
parents: 16857
diff changeset
399 */
16391
50d79ad439f1 Truffle/Instrumentation: rename PhylumTag to SyntaxTag (along with related classes/methods)
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16067
diff changeset
400 public Iterable<SyntaxTag> getSyntaxTags() {
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
401 return tags;
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
402 }
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
403
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
404 /**
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
405 * Adds the given {@link Instrument} to this probe's chain of instruments. This method does
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
406 * not check to see if the same instrument has already been added.
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
407 *
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
408 * @param instrument The instrument to add to this probe.
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
409 */
18130
b4e38f4ca414 Truffle: rename @SlowPath to @TruffleBoundary.
Christian Humer <christian.humer@gmail.com>
parents: 16963
diff changeset
410 @TruffleBoundary
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
411 public void addInstrument(Instrument instrument) {
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
412 probeUnchanged.invalidate();
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
413 super.internalAddInstrument(instrument);
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
414 probeUnchanged = Truffle.getRuntime().createAssumption();
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
415 }
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
416
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
417 /**
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
418 * Removes the given instrument from the chain of instruments. If no matching instrument is
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
419 * found, a {@link RuntimeException} is thrown.
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
420 *
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
421 * @param instrument The instrument to remove from this probe.
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
422 */
18130
b4e38f4ca414 Truffle: rename @SlowPath to @TruffleBoundary.
Christian Humer <christian.humer@gmail.com>
parents: 16963
diff changeset
423 @TruffleBoundary
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
424 public void removeInstrument(Instrument instrument) {
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
425 probeUnchanged.invalidate();
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
426 super.internalRemoveInstrument(instrument);
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
427 probeUnchanged = Truffle.getRuntime().createAssumption();
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
428 }
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
429
16856
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
430 /**
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
431 * Returns this probe.
7833417c8172 Changes to Instrumentation
David Piorkowski <david.piorkowski@oracle.com>
parents: 16391
diff changeset
432 */
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
433 @Override
15779
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
434 protected Probe getProbe() {
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
435 return this;
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
436 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
437
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
438 @Override
18130
b4e38f4ca414 Truffle: rename @SlowPath to @TruffleBoundary.
Christian Humer <christian.humer@gmail.com>
parents: 16963
diff changeset
439 @TruffleBoundary
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
440 protected void notifyProbeChanged(Instrument instrument) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
441 probeUnchanged.invalidate();
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
442 probeUnchanged = Truffle.getRuntime().createAssumption();
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
443 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
444
18130
b4e38f4ca414 Truffle: rename @SlowPath to @TruffleBoundary.
Christian Humer <christian.humer@gmail.com>
parents: 16963
diff changeset
445 @TruffleBoundary
16391
50d79ad439f1 Truffle/Instrumentation: rename PhylumTag to SyntaxTag (along with related classes/methods)
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16067
diff changeset
446 void setTrap(SyntaxTagTrap trap) {
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
447 assert trap == null || isTaggedAs(trap.getTag());
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
448 probeUnchanged.invalidate();
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
449 this.trap = trap;
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
450 probeUnchanged = Truffle.getRuntime().createAssumption();
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
451 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
452
15779
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
453 public void enter(Node astNode, VirtualFrame frame) {
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
454 if (trap != null || next != null) {
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
455 if (!probeUnchanged.isValid()) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
456 CompilerDirectives.transferToInterpreter();
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
457 }
15605
bb9473723904 Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15450
diff changeset
458 if (trap != null) {
16391
50d79ad439f1 Truffle/Instrumentation: rename PhylumTag to SyntaxTag (along with related classes/methods)
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 16067
diff changeset
459 trap.tagTrappedAt(astNode, frame.materialize());
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
460 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
461 if (next != null) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
462 next.internalEnter(astNode, frame);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
463 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
464 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
465 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
466
15779
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
467 public void leave(Node astNode, VirtualFrame frame) {
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
468 if (next != null) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
469 if (!probeUnchanged.isValid()) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
470 CompilerDirectives.transferToInterpreter();
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
471 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
472 next.internalLeave(astNode, frame);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
473 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
474 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
475
15779
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
476 public void leave(Node astNode, VirtualFrame frame, boolean result) {
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
477 if (next != null) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
478 if (!probeUnchanged.isValid()) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
479 CompilerDirectives.transferToInterpreter();
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
480 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
481 next.internalLeave(astNode, frame, result);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
482 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
483 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
484
15779
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
485 public void leave(Node astNode, VirtualFrame frame, byte result) {
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
486 if (next != null) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
487 if (!probeUnchanged.isValid()) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
488 CompilerDirectives.transferToInterpreter();
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
489 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
490 next.internalLeave(astNode, frame, result);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
491 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
492 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
493
15779
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
494 public void leave(Node astNode, VirtualFrame frame, short result) {
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
495 if (next != null) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
496 if (!probeUnchanged.isValid()) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
497 CompilerDirectives.transferToInterpreter();
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
498 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
499 next.internalLeave(astNode, frame, result);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
500 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
501 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
502
15779
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
503 public void leave(Node astNode, VirtualFrame frame, int result) {
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
504 if (next != null) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
505 if (!probeUnchanged.isValid()) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
506 CompilerDirectives.transferToInterpreter();
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
507 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
508 next.internalLeave(astNode, frame, result);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
509 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
510 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
511
15779
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
512 public void leave(Node astNode, VirtualFrame frame, long result) {
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
513 if (next != null) {
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
514 if (!probeUnchanged.isValid()) {
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
515 CompilerDirectives.transferToInterpreter();
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
516 }
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
517 next.internalLeave(astNode, frame, result);
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
518 }
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
519 }
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
520
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
521 public void leave(Node astNode, VirtualFrame frame, char result) {
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
522 if (next != null) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
523 if (!probeUnchanged.isValid()) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
524 CompilerDirectives.transferToInterpreter();
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
525 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
526 next.internalLeave(astNode, frame, result);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
527 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
528 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
529
15779
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
530 public void leave(Node astNode, VirtualFrame frame, float result) {
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
531 if (next != null) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
532 if (!probeUnchanged.isValid()) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
533 CompilerDirectives.transferToInterpreter();
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
534 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
535 next.internalLeave(astNode, frame, result);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
536 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
537 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
538
15779
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
539 public void leave(Node astNode, VirtualFrame frame, double result) {
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
540 if (next != null) {
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
541 if (!probeUnchanged.isValid()) {
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
542 CompilerDirectives.transferToInterpreter();
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
543 }
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
544 next.internalLeave(astNode, frame, result);
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
545 }
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
546 }
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
547
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
548 public void leave(Node astNode, VirtualFrame frame, Object result) {
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
549 if (next != null) {
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
550 if (!probeUnchanged.isValid()) {
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
551 CompilerDirectives.transferToInterpreter();
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
552 }
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
553 next.internalLeave(astNode, frame, result);
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
554 }
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
555 }
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
556
8c34e2cc4add Truffle/Instrumentation: significant reorganization of the instrumentation framework's implementation and connection to the runtime ExecutionContext, with some new features, including a Tag-based "trap" mechanisms.
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents: 15605
diff changeset
557 public void leaveExceptional(Node astNode, VirtualFrame frame, Exception e) {
15450
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
558 if (next != null) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
559 if (!probeUnchanged.isValid()) {
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
560 CompilerDirectives.transferToInterpreter();
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
561 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
562 next.internalLeaveExceptional(astNode, frame, e);
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
563 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
564 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
565
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
566 }
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
567
be0c151d912b Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff changeset
568 }