org.jikesrvm.compilers.opt
Class OptimizingCompilerException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.lang.RuntimeException
              extended by org.jikesrvm.compilers.opt.OptimizingCompilerException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
OperationNotImplementedException

public class OptimizingCompilerException
extends RuntimeException

Use this exception if we encounter a runtime error in the dynamic optimizing compiler. The caller can recover by calling the non-optimizing compiler instead (or by reverting to the previous version of compiled code).

See Also:
Serialized Form

Nested Class Summary
static class OptimizingCompilerException.IllegalUpcast
          Capture illegal upcasts from magic types to java.lang.Object
 
Field Summary
 boolean isFatal
          When running in the RVM, typically optimizing compiler exceptions are caught, optionally a message is printed, and we fallback to using the baseline compiler.
(package private) static long serialVersionUID
          Support for exception serialization
 
Constructor Summary
OptimizingCompilerException()
           
OptimizingCompilerException(boolean b)
           
OptimizingCompilerException(String err)
           
OptimizingCompilerException(String err, boolean b)
           
OptimizingCompilerException(String module, String err)
           
OptimizingCompilerException(String module, String err1, int val)
           
OptimizingCompilerException(String module, String err1, Object obj)
           
OptimizingCompilerException(String module, String err1, String err2)
           
OptimizingCompilerException(String module, String err1, String err2, int val)
           
OptimizingCompilerException(String module, String err1, String err2, Object obj)
           
OptimizingCompilerException(String module, String err1, String err2, String err3)
           
 
Method Summary
static void TODO()
          Incomplete function in IA32 port.
static void TODO(String module)
          Incomplete function in IA32 port.
 String trace(int level)
          Return a string that is the printout of level stackframes in the stacktrace.
static void UNREACHABLE()
          Use the UNREACHABLE methods to mark code that should never execute eg, unexpected cases of switch statments and nested if/then/else
static void UNREACHABLE(String module)
          Use the UNREACHABLE methods to mark code that should never execute e.g., unexpected cases of switch statements and nested if/then/else
static void UNREACHABLE(String module, String err1)
          Use the UNREACHABLE methods to mark code that should never execute e.g., unexpected cases of switch statements and nested if/then/else
static void UNREACHABLE(String module, String err1, String err2)
          Use the UNREACHABLE methods to mark code that should never execute e.g., unexpected cases of switch statements and nested if/then/else
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

static final long serialVersionUID
Support for exception serialization

See Also:
Constant Field Values

isFatal

public boolean isFatal
When running in the RVM, typically optimizing compiler exceptions are caught, optionally a message is printed, and we fallback to using the baseline compiler. However, this may not be desirable when running regression testing because an optimizing compiler exception may be a symptom of a serious failure. Thus, the code throwing the exception can use an optional boolean value to indicate if the exception is "normal" or if it should be treated as a fatal failure for the purpose of regression testing.

Constructor Detail

OptimizingCompilerException

public OptimizingCompilerException()

OptimizingCompilerException

public OptimizingCompilerException(boolean b)
Parameters:
b - is the exception fatal?

OptimizingCompilerException

public OptimizingCompilerException(String err)
Parameters:
err - message describing reason for exception

OptimizingCompilerException

public OptimizingCompilerException(String err,
                                   boolean b)
Parameters:
err - message describing reason for exception
b - is the exception fatal?

OptimizingCompilerException

public OptimizingCompilerException(String module,
                                   String err)
Parameters:
module - opt compiler module in which exception was raised
err - message describing reason for exception

OptimizingCompilerException

public OptimizingCompilerException(String module,
                                   String err1,
                                   String err2)
Parameters:
module - opt compiler module in which exception was raised
err1 - message describing reason for exception
err2 - message describing reason for exception

OptimizingCompilerException

public OptimizingCompilerException(String module,
                                   String err1,
                                   Object obj)
Parameters:
module - opt compiler module in which exception was raised
err1 - message describing reason for exception
obj - object to print describing reason for exception

OptimizingCompilerException

public OptimizingCompilerException(String module,
                                   String err1,
                                   int val)
Parameters:
module - opt compiler module in which exception was raised
err1 - message describing reason for exception
val - integer to print describing reason for exception

OptimizingCompilerException

public OptimizingCompilerException(String module,
                                   String err1,
                                   String err2,
                                   String err3)
Parameters:
module - opt compiler module in which exception was raised
err1 - message describing reason for exception
err2 - message describing reason for exception
err3 - message describing reason for exception

OptimizingCompilerException

public OptimizingCompilerException(String module,
                                   String err1,
                                   String err2,
                                   Object obj)
Parameters:
module - opt compiler module in which exception was raised
err1 - message describing reason for exception
err2 - message describing reason for exception
obj - object to print describing reason for exception

OptimizingCompilerException

OptimizingCompilerException(String module,
                            String err1,
                            String err2,
                            int val)
Parameters:
module - opt compiler module in which exception was raised
err1 - message describing reason for exception
err2 - message describing reason for exception
val - integer to print describing reason for exception
Method Detail

UNREACHABLE

public static void UNREACHABLE()
                        throws OptimizingCompilerException
Use the UNREACHABLE methods to mark code that should never execute eg, unexpected cases of switch statments and nested if/then/else

Throws:
OptimizingCompilerException

UNREACHABLE

public static void UNREACHABLE(String module)
                        throws OptimizingCompilerException
Use the UNREACHABLE methods to mark code that should never execute e.g., unexpected cases of switch statements and nested if/then/else

Parameters:
module - module in which exception occurred
Throws:
OptimizingCompilerException

UNREACHABLE

public static void UNREACHABLE(String module,
                               String err1)
                        throws OptimizingCompilerException
Use the UNREACHABLE methods to mark code that should never execute e.g., unexpected cases of switch statements and nested if/then/else

Parameters:
module - opt compiler module in which exception was raised
err1 - message describing reason for exception
Throws:
OptimizingCompilerException

UNREACHABLE

public static void UNREACHABLE(String module,
                               String err1,
                               String err2)
                        throws OptimizingCompilerException
Use the UNREACHABLE methods to mark code that should never execute e.g., unexpected cases of switch statements and nested if/then/else

Parameters:
module - opt compiler module in which exception was raised
err1 - message describing reason for exception
err2 - message describing reason for exception
Throws:
OptimizingCompilerException

TODO

public static void TODO()
                 throws OptimizingCompilerException
Incomplete function in IA32 port.

Throws:
OptimizingCompilerException

TODO

public static void TODO(String module)
                 throws OptimizingCompilerException
Incomplete function in IA32 port.

Parameters:
module - opt compiler module in which exception was raised
Throws:
OptimizingCompilerException

trace

public String trace(int level)
Return a string that is the printout of level stackframes in the stacktrace.

Parameters:
level - the number of levels to print
Returns:
n-level dump of stacktrace