Package gnu.expr
Class CheckedTarget
java.lang.Object
gnu.expr.Target
gnu.expr.StackTarget
gnu.expr.CheckedTarget
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.
-
Field Summary
Fields inherited from class gnu.expr.StackTarget
autoTruncates
Fields inherited from class gnu.expr.Target
Ignore, pushObject
-
Constructor Summary
ConstructorsConstructorDescriptionCheckedTarget
(Type type) CheckedTarget
(Type type, LambdaExp proc, int argno) CheckedTarget
(Type type, String procname, int argno) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doCoerce
(Compilation comp) static void
emitCheckedCoerce
(Compilation comp, LambdaExp proc, int argno, Type stackType, Type type, Variable argValue) static void
emitCheckedCoerce
(Compilation comp, String procname, int argno, Type type) protected StackTarget
getClonedInstance
(Type type) static Target
getInstance
(Type type) static Target
getInstance
(Type type, LambdaExp proc, int argno) static Target
getInstance
(Type type, String procname, int argno) static Target
getInstance
(Declaration decl) Methods inherited from class gnu.expr.StackTarget
compileFromStack, compileFromStack0, convert, emitCoerceFromObject, forceLazy, forceLazyIfNeeded, getTruncatingInstance, getType
-
Constructor Details
-
CheckedTarget
-
CheckedTarget
-
CheckedTarget
-
-
Method Details
-
getInstance
-
getInstance
-
getInstance
-
getInstance
-
getClonedInstance
- Overrides:
getClonedInstance
in classStackTarget
-
doCoerce
- Overrides:
doCoerce
in classStackTarget
-
emitCheckedCoerce
-
emitCheckedCoerce
public static void emitCheckedCoerce(Compilation comp, LambdaExp proc, int argno, Type stackType, Type type, Variable argValue)
-