Skip to content

Commit d8a6edb

Browse files
committed
remove AnalysisError.shouldNotReachHere() without message
1 parent e9ee08d commit d8a6edb

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/flow/ProxyTypeFlow.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,17 @@ public TypeFlow<?> getInput() {
6060

6161
@Override
6262
public boolean addState(PointsToAnalysis bb, TypeState add) {
63-
throw AnalysisError.shouldNotReachHere();
63+
throw AnalysisError.shouldNotReachHere("should not be reached during analysis");
6464
}
6565

6666
@Override
6767
public void update(PointsToAnalysis bb) {
68-
throw AnalysisError.shouldNotReachHere();
68+
throw AnalysisError.shouldNotReachHere("should not be reached during analysis");
6969
}
7070

7171
@Override
7272
public TypeState getState() {
73-
throw AnalysisError.shouldNotReachHere();
73+
throw AnalysisError.shouldNotReachHere("should not be reached during analysis");
7474
}
7575

7676
@Override

substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/flow/context/bytecode/TypesObjectsIterator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ private static AnalysisObject[] objectsArray(TypeState state) {
8484
if (state instanceof ContextSensitiveMultiTypeState) {
8585
return ((ContextSensitiveMultiTypeState) state).objects;
8686
}
87-
throw AnalysisError.shouldNotReachHere();
87+
throw AnalysisError.shouldNotReachHereUnexpectedInput(state);
8888
}
8989

9090
/**

substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/meta/AnalysisMetaAccess.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,12 @@ public AnalysisField lookupJavaField(Field reflectionField) {
9090

9191
@Override
9292
public int getArrayIndexScale(JavaKind elementKind) {
93-
throw shouldNotReachHere();
93+
throw shouldNotReachHere("should not be reached during analysis");
9494
}
9595

9696
@Override
9797
public int getArrayBaseOffset(JavaKind elementKind) {
98-
throw shouldNotReachHere();
98+
throw shouldNotReachHere("should not be reached during analysis");
9999
}
100100

101101
@Override

substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/meta/UninitializedStaticFieldValueReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ public static JavaConstant readUninitializedStaticValue(ResolvedJavaField field,
119119
assert value == null || value instanceof String : "String is currently the only specified object type for the ConstantValue class file attribute";
120120
return function.apply(value);
121121
default:
122-
throw AnalysisError.shouldNotReachHere();
122+
throw AnalysisError.shouldNotReachHereUnexpectedInput(kind);
123123
}
124124
}
125125
}

substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/typestate/DefaultAnalysisPolicy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ public MethodFlowsGraphInfo staticRootMethodGraph(PointsToAnalysis bb, PointsToA
201201

202202
@Override
203203
public AnalysisContext allocationContext(PointsToAnalysis bb, MethodFlowsGraph callerGraph) {
204-
throw AnalysisError.shouldNotReachHere();
204+
throw AnalysisError.shouldNotReachHere("should be overwritten");
205205
}
206206

207207
@Override

substratevm/src/com.oracle.graal.pointsto/src/com/oracle/graal/pointsto/util/AnalysisError.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,8 @@ public static FieldNotPresentError fieldNotPresentError(PointsToAnalysis bb, Typ
157157
throw new FieldNotPresentError(bb, objectFlow, context, field, type);
158158
}
159159

160-
public static RuntimeException shouldNotReachHere() {
161-
throw new AnalysisError("should not reach here");
160+
public static RuntimeException shouldNotReachHereUnexpectedInput(Object input) {
161+
throw new AnalysisError("should not reach here: unexpected input: " + input);
162162
}
163163

164164
public static RuntimeException shouldNotReachHere(String msg) {

0 commit comments

Comments
 (0)