Mercurial > hg > graal-jvmci-8
annotate graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/impl/InstrumentationNode.java @ 15605:bb9473723904
Truffle/Instrumentation:
- Merge instrumentation support into the general execution context; remove separate Instrumentation interface and implementation
- Generalize the ?tagging? mechanism for extensibility: the enum PhylumTag is now an interface, and the standard tags moved to the new enum StandardTag
- A new ?trap? mechanism interrupts program execution at any probed node holding a specified PhylumTag; this replaces some other special-purpose code.
- Refine several interface by factoring out callback methods and simplifying collaboration among key implementation classes.
author | Michael Van De Vanter <michael.van.de.vanter@oracle.com> |
---|---|
date | Mon, 12 May 2014 20:17:25 -0700 |
parents | be0c151d912b |
children | 8c34e2cc4add |
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.*; |
15605
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
30 import com.oracle.truffle.api.CompilerDirectives.SlowPath; |
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.*; |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
34 |
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 * Abstract implementation of Truffle {@link Node} to be used for AST probes and instruments. |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
37 * <p> |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
38 * Coordinates propagation of Truffle AST {@link ExecutionEvents}. |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
39 */ |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
40 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
|
41 |
15605
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
42 public interface ProbeCallback { |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
43 void newTagAdded(ProbeImpl probe, PhylumTag tag); |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
44 } |
15450
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
45 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
46 /** |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
47 * Creates a new {@link Probe}, presumed to be unique to a particular {@linkplain SourceSection} |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
48 * extent of guest language source code. |
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 * @return a new probe |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
51 */ |
15605
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
52 public static ProbeImpl createProbe(SourceSection sourceSection, ProbeCallback probeCallback) { |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
53 return new ProbeImpl(sourceSection, probeCallback); |
15450
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
54 } |
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 /** |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
57 * Next in chain. |
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 @Child protected InstrumentationNode next; |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
60 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
61 protected InstrumentationNode() { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
62 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
63 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
64 /** |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
65 * @return the instance of {@link Probe} to which this instrument is attached. |
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 public Probe getProbe() { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
68 final InstrumentationNode parent = (InstrumentationNode) getParent(); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
69 return parent == null ? null : parent.getProbe(); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
70 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
71 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
72 /** |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
73 * Add a probe to the end of this probe chain. |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
74 */ |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
75 private void internalAddInstrument(Instrument newInstrument) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
76 if (next == null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
77 this.next = insert(newInstrument); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
78 } else { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
79 next.internalAddInstrument(newInstrument); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
80 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
81 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
82 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
83 private void internalRemoveInstrument(Instrument oldInstrument) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
84 if (next == null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
85 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
|
86 } else if (next == oldInstrument) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
87 if (oldInstrument.next == null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
88 this.next = null; |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
89 } else { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
90 this.next = insert(oldInstrument.next); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
91 oldInstrument.next = null; |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
92 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
93 } else { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
94 next.internalRemoveInstrument(oldInstrument); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
95 } |
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 * Reports to the instance of {@link Probe} holding this instrument that some essential state |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
100 * has changed that requires deoptimization. |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
101 */ |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
102 @CompilerDirectives.SlowPath |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
103 protected void notifyProbeChanged(Instrument instrument) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
104 final ProbeImpl probe = (ProbeImpl) getProbe(); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
105 probe.notifyProbeChanged(instrument); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
106 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
107 |
15605
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
108 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
|
109 enter(astNode, frame); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
110 if (next != null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
111 next.internalEnter(astNode, frame); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
112 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
113 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
114 |
15605
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
115 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
|
116 leave(astNode, frame); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
117 if (next != null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
118 next.internalLeave(astNode, frame); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
119 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
120 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
121 |
15605
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
122 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
|
123 leave(astNode, frame, result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
124 if (next != null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
125 next.internalLeave(astNode, frame, result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
126 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
127 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
128 |
15605
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
129 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
|
130 leave(astNode, frame, result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
131 if (next != null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
132 next.internalLeave(astNode, frame, result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
133 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
134 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
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, short result) { |
15450
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
137 leave(astNode, frame, result); |
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, result); |
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 |
15605
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
143 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
|
144 leave(astNode, frame, result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
145 if (next != null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
146 next.internalLeave(astNode, frame, result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
147 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
148 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
149 |
15605
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
150 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
|
151 leave(astNode, frame, result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
152 if (next != null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
153 next.internalLeave(astNode, frame, result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
154 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
155 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
156 |
15605
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
157 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
|
158 leave(astNode, frame, result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
159 if (next != null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
160 next.internalLeave(astNode, frame, result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
161 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
162 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
163 |
15605
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
164 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
|
165 leave(astNode, frame, result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
166 if (next != null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
167 next.internalLeave(astNode, frame, result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
168 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
169 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
170 |
15605
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
171 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
|
172 leave(astNode, frame, result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
173 if (next != null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
174 next.internalLeave(astNode, frame, result); |
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 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
177 |
15605
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
178 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
|
179 leave(astNode, frame, result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
180 if (next != null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
181 next.internalLeave(astNode, frame, result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
182 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
183 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
184 |
15605
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
185 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
|
186 leaveExceptional(astNode, frame, null); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
187 if (next != null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
188 next.internalLeaveExceptional(astNode, frame, e); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
189 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
190 } |
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 * Holder of a chain of {@linkplain InstrumentationNode instruments}: manages the |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
194 * {@link Assumption} that none of the instruments have changed since last checked. |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
195 * <p> |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
196 * 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
|
197 * 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
|
198 * <p> |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
199 * May be categorized by one or more {@linkplain PhylumTag tags}, signifying information useful |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
200 * for instrumentation about its AST location(s). |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
201 */ |
15605
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
202 public 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
|
203 |
15605
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
204 private final ProbeCallback probeCallback; |
15450
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
205 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
206 /** |
15605
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
207 * Source information about the AST node (and its clones) to which this probe is attached. |
15450
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 private final SourceSection probedSourceSection; |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
210 |
15605
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
211 // TODO (mlvdv) assumption model broken |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
212 @CompilerDirectives.CompilationFinal private Assumption probeUnchanged; |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
213 |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
214 @CompilerDirectives.CompilationFinal private PhylumTrap trap = null; |
15450
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
215 |
15605
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
216 private final ArrayList<PhylumTag> tags = new ArrayList<>(); |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
217 |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
218 private ProbeImpl(SourceSection sourceSection, ProbeCallback probeCallback) { |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
219 this.probeCallback = probeCallback; |
15450
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
220 this.probedSourceSection = sourceSection; |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
221 this.probeUnchanged = Truffle.getRuntime().createAssumption(); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
222 this.next = null; |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
223 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
224 |
15605
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
225 public SourceSection getSourceLocation() { |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
226 return probedSourceSection; |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
227 } |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
228 |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
229 @SlowPath |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
230 public void tagAs(PhylumTag tag) { |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
231 assert tag != null; |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
232 if (!tags.contains(tag)) { |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
233 tags.add(tag); |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
234 probeCallback.newTagAdded(this, tag); |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
235 } |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
236 } |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
237 |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
238 public boolean isTaggedAs(PhylumTag tag) { |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
239 assert tag != null; |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
240 return tags.contains(tag); |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
241 } |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
242 |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
243 public Iterable<PhylumTag> getPhylumTags() { |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
244 return tags; |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
245 } |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
246 |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
247 @SlowPath |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
248 public void addInstrument(Instrument instrument) { |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
249 probeUnchanged.invalidate(); |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
250 super.internalAddInstrument(instrument); |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
251 probeUnchanged = Truffle.getRuntime().createAssumption(); |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
252 } |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
253 |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
254 @SlowPath |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
255 public void removeInstrument(Instrument instrument) { |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
256 probeUnchanged.invalidate(); |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
257 super.internalRemoveInstrument(instrument); |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
258 probeUnchanged = Truffle.getRuntime().createAssumption(); |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
259 } |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
260 |
15450
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
261 @Override |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
262 public Probe getProbe() { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
263 return this; |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
264 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
265 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
266 @Override |
15605
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
267 @SlowPath |
15450
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
268 protected void notifyProbeChanged(Instrument instrument) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
269 probeUnchanged.invalidate(); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
270 probeUnchanged = Truffle.getRuntime().createAssumption(); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
271 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
272 |
15605
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
273 @SlowPath |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
274 public void setTrap(PhylumTrap trap) { |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
275 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
|
276 probeUnchanged.invalidate(); |
15605
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
277 this.trap = trap; |
15450
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
278 probeUnchanged = Truffle.getRuntime().createAssumption(); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
279 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
280 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
281 public void notifyEnter(Node astNode, VirtualFrame frame) { |
15605
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
282 if (trap != null || next != null) { |
15450
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
283 if (!probeUnchanged.isValid()) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
284 CompilerDirectives.transferToInterpreter(); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
285 } |
15605
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
286 if (trap != null) { |
bb9473723904
Truffle/Instrumentation:
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
15450
diff
changeset
|
287 trap.phylumTrappedAt(astNode, frame.materialize()); |
15450
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
288 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
289 if (next != null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
290 next.internalEnter(astNode, frame); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
291 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
292 } |
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 public void notifyLeave(Node astNode, VirtualFrame frame) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
296 if (next != null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
297 if (!probeUnchanged.isValid()) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
298 CompilerDirectives.transferToInterpreter(); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
299 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
300 next.internalLeave(astNode, frame); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
301 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
302 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
303 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
304 public void notifyLeave(Node astNode, VirtualFrame frame, boolean result) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
305 if (next != null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
306 if (!probeUnchanged.isValid()) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
307 CompilerDirectives.transferToInterpreter(); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
308 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
309 next.internalLeave(astNode, frame, result); |
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 public void notifyLeave(Node astNode, VirtualFrame frame, byte result) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
314 if (next != null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
315 if (!probeUnchanged.isValid()) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
316 CompilerDirectives.transferToInterpreter(); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
317 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
318 next.internalLeave(astNode, frame, result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
319 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
320 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
321 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
322 public void notifyLeave(Node astNode, VirtualFrame frame, short result) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
323 if (next != null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
324 if (!probeUnchanged.isValid()) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
325 CompilerDirectives.transferToInterpreter(); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
326 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
327 next.internalLeave(astNode, frame, result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
328 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
329 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
330 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
331 public void notifyLeave(Node astNode, VirtualFrame frame, int result) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
332 if (next != null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
333 if (!probeUnchanged.isValid()) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
334 CompilerDirectives.transferToInterpreter(); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
335 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
336 next.internalLeave(astNode, frame, result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
337 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
338 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
339 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
340 public void notifyLeave(Node astNode, VirtualFrame frame, long result) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
341 if (next != null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
342 if (!probeUnchanged.isValid()) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
343 CompilerDirectives.transferToInterpreter(); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
344 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
345 next.internalLeave(astNode, frame, result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
346 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
347 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
348 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
349 public void notifyLeave(Node astNode, VirtualFrame frame, char result) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
350 if (next != null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
351 if (!probeUnchanged.isValid()) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
352 CompilerDirectives.transferToInterpreter(); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
353 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
354 next.internalLeave(astNode, frame, result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
355 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
356 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
357 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
358 public void notifyLeave(Node astNode, VirtualFrame frame, float result) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
359 if (next != null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
360 if (!probeUnchanged.isValid()) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
361 CompilerDirectives.transferToInterpreter(); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
362 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
363 next.internalLeave(astNode, frame, result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
364 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
365 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
366 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
367 public void notifyLeave(Node astNode, VirtualFrame frame, double result) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
368 if (next != null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
369 if (!probeUnchanged.isValid()) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
370 CompilerDirectives.transferToInterpreter(); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
371 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
372 next.internalLeave(astNode, frame, result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
373 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
374 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
375 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
376 public void notifyLeave(Node astNode, VirtualFrame frame, Object result) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
377 if (next != null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
378 if (!probeUnchanged.isValid()) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
379 CompilerDirectives.transferToInterpreter(); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
380 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
381 next.internalLeave(astNode, frame, result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
382 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
383 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
384 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
385 public void notifyLeaveExceptional(Node astNode, VirtualFrame frame, Exception e) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
386 if (next != null) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
387 if (!probeUnchanged.isValid()) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
388 CompilerDirectives.transferToInterpreter(); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
389 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
390 next.internalLeaveExceptional(astNode, frame, e); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
391 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
392 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
393 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
394 public void enter(Node astNode, VirtualFrame frame) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
395 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
396 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
397 public void leave(Node astNode, VirtualFrame frame) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
398 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
399 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
400 public void leave(Node astNode, VirtualFrame frame, boolean result) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
401 leave(astNode, frame, (Object) result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
402 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
403 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
404 public void leave(Node astNode, VirtualFrame frame, byte result) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
405 leave(astNode, frame, (Object) result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
406 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
407 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
408 public void leave(Node astNode, VirtualFrame frame, short result) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
409 leave(astNode, frame, (Object) result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
410 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
411 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
412 public void leave(Node astNode, VirtualFrame frame, int result) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
413 leave(astNode, frame, (Object) result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
414 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
415 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
416 public void leave(Node astNode, VirtualFrame frame, long result) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
417 leave(astNode, frame, (Object) result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
418 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
419 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
420 public void leave(Node astNode, VirtualFrame frame, char result) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
421 leave(astNode, frame, (Object) result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
422 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
423 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
424 public void leave(Node astNode, VirtualFrame frame, float result) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
425 leave(astNode, frame, (Object) result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
426 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
427 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
428 public void leave(Node astNode, VirtualFrame frame, double result) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
429 leave(astNode, frame, (Object) result); |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
430 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
431 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
432 public void leave(Node astNode, VirtualFrame frame, Object result) { |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
433 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
434 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
435 public void leaveExceptional(Node astNode, VirtualFrame frame, Exception e) { |
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 } |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
439 |
be0c151d912b
Truffle/Instrumentation: API revisions
Michael Van De Vanter <michael.van.de.vanter@oracle.com>
parents:
diff
changeset
|
440 } |