gnu.expr
Class CheckedTarget
java.lang.Object
gnu.expr.Target
gnu.expr.StackTarget
gnu.expr.CheckedTarget
public class CheckedTarget
- extends StackTarget
Same as StackTarget, but catch ClassCastException.
Generate code so that if coercion fails, catch ClassCastException,
and re-throw a WrongType. This gives better error messages.
Method Summary |
void |
compileFromStack(Compilation comp,
Type stackType)
|
static void |
emitCheckedCoerce(Compilation comp,
LambdaExp proc,
int argno,
Type type)
|
static void |
emitCheckedCoerce(Compilation comp,
LambdaExp proc,
int argno,
Type type,
Variable argValue)
|
static void |
emitCheckedCoerce(Compilation comp,
java.lang.String procname,
int argno,
Type type)
|
static Target |
getInstance(Type type)
|
static Target |
getInstance(Type type,
LambdaExp proc,
int argno)
|
static Target |
getInstance(Type type,
java.lang.String procname,
int argno)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CheckedTarget
public CheckedTarget(Type type)
CheckedTarget
public CheckedTarget(Type type,
LambdaExp proc,
int argno)
CheckedTarget
public CheckedTarget(Type type,
java.lang.String procname,
int argno)
getInstance
public static Target getInstance(Type type,
java.lang.String procname,
int argno)
getInstance
public static Target getInstance(Type type,
LambdaExp proc,
int argno)
getInstance
public static Target getInstance(Type type)
compileFromStack
public void compileFromStack(Compilation comp,
Type stackType)
- Overrides:
compileFromStack
in class StackTarget
emitCheckedCoerce
public static void emitCheckedCoerce(Compilation comp,
java.lang.String procname,
int argno,
Type type)
emitCheckedCoerce
public static void emitCheckedCoerce(Compilation comp,
LambdaExp proc,
int argno,
Type type)
emitCheckedCoerce
public static void emitCheckedCoerce(Compilation comp,
LambdaExp proc,
int argno,
Type type,
Variable argValue)