Skip to content

Commit be5eb54

Browse files
committed
sync with compiler suite
1 parent 95f668a commit be5eb54

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

compiler/src/jdk.graal.compiler.test/src/jdk/graal/compiler/graph/test/graphio/parsing/model/InputMethodTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ public void testGetSetBytecodes() {
6969
assertNull(m.getBytecodes().get(2).getInlined());
7070
assertNull(m.getBytecodes().get(6).getInlined());
7171

72-
m = new InputMethod(g, "name", "shortName", -1, LocationCache.createMethod(null, null, bytecode));
72+
m = new InputMethod(g, "name", "shortName", -1, LocationCache.createMethod("fakeMethod", "FakeClass", bytecode));
7373

7474
assertEquals(7, m.getBytecodes().size());
7575

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/graphio/parsing/BinaryReader.java

+2
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ public abstract static class Member implements LengthToString {
246246
public final String name;
247247

248248
private Member(Klass holder, String name, int accessFlags) {
249+
assert holder != null : "GraphElements.methodDeclaringClass must not return null!";
250+
assert name != null;
249251
this.holder = holder;
250252
this.accessFlags = accessFlags;
251253
this.name = name;

compiler/src/jdk.graal.compiler/src/jdk/graal/compiler/graphio/parsing/LocationStackFrame.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public String toString() {
4949
String sep = "";
5050
for (LocationStackFrame t = this; t != null; t = t.parent) {
5151
sb.append(sep);
52-
sb.append(methodHolderName(t)).append(".").append(t.method.name);
52+
sb.append(methodHolderName(t)).append(".").append(methodName(t));
5353
for (LocationStratum s : t.strata) {
5454
if (s.file != null) {
5555
sb.append("(").append(s.file).append(":").append(s.line).append(")");
@@ -63,6 +63,10 @@ public String toString() {
6363
return sb.toString();
6464
}
6565

66+
private static String methodName(LocationStackFrame t) {
67+
return t != null && t.method != null ? t.method.name : null;
68+
}
69+
6670
private static String methodHolderName(LocationStackFrame t) {
6771
if (t != null && t.method != null && t.method.holder != null) {
6872
return t.method.holder.name;

visualizer/IdealGraphVisualizer/Data/src/main/java/jdk/graal/compiler/graphio/parsing/LocationStackFrame.java

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ public String toString() {
6666
private static String methodName(LocationStackFrame t) {
6767
return t != null && t.method != null ? t.method.name : null;
6868
}
69+
6970
private static String methodHolderName(LocationStackFrame t) {
7071
if (t != null && t.method != null && t.method.holder != null) {
7172
return t.method.holder.name;

0 commit comments

Comments
 (0)