public static RuntimeException shouldNotReachHere(Throwable cause) { throw new AnalysisError(cause); }
@Override public void update(BigBang bb) { throw AnalysisError.shouldNotReachHere("The VirtualInvokeTypeFlow should not be updated directly."); }
private synchronized void doParse(BigBang bb, InvokeTypeFlow reason) { if (!methodParsed) { parsingReason = reason; try { MethodTypeFlowBuilder builder = bb.createMethodTypeFlowBuilder(bb, this); builder.apply(); graphRef = builder.graph; } catch (BytecodeParserError ex) { /* Rewrite some bytecode parsing errors as unsupported features. */ if (ex.getCause() instanceof UnsupportedFeatureException) { Throwable cause = ex; if (ex.getCause().getCause() != null) { cause = ex.getCause(); } String message = cause.getMessage(); bb.getUnsupportedFeatures().addMessage(method.format("%H.%n(%p)"), method, message, ex.context(), cause.getCause()); } else { /* Wrap all other errors as parsing errors. */ throw AnalysisError.parsingError(method, ex); } } catch (Throwable t) { /* Wrap all other errors as parsing errors. */ throw AnalysisError.parsingError(method, t); } originalMethodFlows.linearizeGraph(); bb.numParsedGraphs.incrementAndGet(); returnedParameter = computeReturnedParamter(); methodParsed = true; } }
throw AnalysisError.typeNotFound(type);
@Override public int getArrayBaseOffset(JavaKind elementKind) { throw shouldNotReachHere(); } }
public static RuntimeException shouldNotReachHere(String msg) { throw new AnalysisError("should not reach here: " + msg); }
@Override public int getArrayIndexScale(JavaKind elementKind) { throw shouldNotReachHere(); }
public static RuntimeException shouldNotReachHere() { throw new AnalysisError("should not reach here"); }
@Override public boolean addState(BigBang bb, TypeState add, boolean postFlow) { throw AnalysisError.shouldNotReachHere("The VirtualInvokeTypeFlow should not be updated directly."); }
@Override public boolean addState(BigBang bb, TypeState add, boolean postFlow) { throw AnalysisError.shouldNotReachHere("The SpecialInvokeTypeFlow should not be updated directly."); }
@Override public void update(BigBang bb) { throw AnalysisError.shouldNotReachHere("The SpecialInvokeTypeFlow should not be updated directly."); }
StringBuilder backtrace = new StringBuilder(); buildObjectBacktrace(reason, backtrace); throw AnalysisError.shouldNotReachHere("Could not find field " + field.format("%H.%n") + (receiver == null ? "" : " on " + bb.getSnippetReflectionProvider().asObject(Object.class, receiver).getClass()) + System.lineSeparator() + backtrace.toString());