Mercurial > hg > graal-jvmci-8
diff jvmci/jdk.vm.ci.code/src/jdk/vm/ci/code/CompilationRequestResult.java @ 23394:7743f81f8c4a
clean up and minimize JVMCI (JDK-8156835) - part 2
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Fri, 13 May 2016 10:44:29 +0200 |
parents | 215f448ed1d7 |
children |
line wrap: on
line diff
--- a/jvmci/jdk.vm.ci.code/src/jdk/vm/ci/code/CompilationRequestResult.java Thu May 12 20:57:31 2016 +0200 +++ b/jvmci/jdk.vm.ci.code/src/jdk/vm/ci/code/CompilationRequestResult.java Fri May 13 10:44:29 2016 +0200 @@ -23,49 +23,15 @@ package jdk.vm.ci.code; /** - * Simple class to provide information about the result of a compile request. + * Provides information about the result of a {@link CompilationRequest}. */ -public final class CompilationRequestResult { - - /** - * A user readable description of the failure. - */ - private final String failureMessage; - - /** - * Whether this is a transient failure where retrying would help. - */ - private final boolean retry; +public interface CompilationRequestResult { /** - * Number of bytecodes inlined into the compilation, exclusive of the bytecodes in the root - * method. + * Determines if the compilation was successful. + * + * @return a non-null object whose {@link Object#toString()} describes the failure or null if + * compilation was successful */ - private final int inlinedBytecodes; - - private CompilationRequestResult(String failureMessage, boolean retry, int inlinedBytecodes) { - this.failureMessage = failureMessage; - this.retry = retry; - this.inlinedBytecodes = inlinedBytecodes; - } - - public static CompilationRequestResult success(int inlinedBytecodes) { - return new CompilationRequestResult(null, true, inlinedBytecodes); - } - - public static CompilationRequestResult failure(String failureMessage, boolean retry) { - return new CompilationRequestResult(failureMessage, retry, 0); - } - - public String getFailureMessage() { - return failureMessage; - } - - public boolean getRetry() { - return retry; - } - - public int getInlinedBytecodes() { - return inlinedBytecodes; - } + Object getFailure(); }