Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/instrument/ProbeFailure.java @ 20129:5b7db8941fd7
Truffle: make NodeClass and NodeField a top-level class.
author | Christian Humer <christian.humer@gmail.com> |
---|---|
date | Thu, 02 Apr 2015 01:22:41 +0200 |
parents | 1d6a7ea5de59 |
children |
comparison
equal
deleted
inserted
replaced
20128:7ad60a16bbb0 | 20129:5b7db8941fd7 |
---|---|
24 */ | 24 */ |
25 package com.oracle.truffle.api.instrument; | 25 package com.oracle.truffle.api.instrument; |
26 | 26 |
27 import com.oracle.truffle.api.instrument.ProbeNode.WrapperNode; | 27 import com.oracle.truffle.api.instrument.ProbeNode.WrapperNode; |
28 import com.oracle.truffle.api.nodes.*; | 28 import com.oracle.truffle.api.nodes.*; |
29 import com.oracle.truffle.api.nodes.NodeUtil.NodeField; | |
30 | 29 |
31 /** | 30 /** |
32 * Description of a failed attempt to instrument an AST node. | 31 * Description of a failed attempt to instrument an AST node. |
33 */ | 32 */ |
34 public final class ProbeFailure { | 33 public final class ProbeFailure { |
123 final StringBuilder sb = new StringBuilder(reason.message + ": "); | 122 final StringBuilder sb = new StringBuilder(reason.message + ": "); |
124 if (parent != null) { | 123 if (parent != null) { |
125 sb.append("parent=" + parent.getClass().getSimpleName() + " "); | 124 sb.append("parent=" + parent.getClass().getSimpleName() + " "); |
126 if (child != null) { | 125 if (child != null) { |
127 sb.append("child=" + child.getClass().getSimpleName() + " "); | 126 sb.append("child=" + child.getClass().getSimpleName() + " "); |
128 final NodeField field = NodeUtil.findChildField(parent, child); | 127 final NodeFieldAccessor field = NodeUtil.findChildField(parent, child); |
129 if (field != null) { | 128 if (field != null) { |
130 sb.append("field=" + field.getName() + " "); | 129 sb.append("field=" + field.getName() + " "); |
131 } | 130 } |
132 } | 131 } |
133 } | 132 } |