gnu.kawa.functions

Class Convert

public class Convert extends Procedure2 implements CanInline, Inlineable

Field Summary
static Convertas
Method Summary
Objectapply2(Object arg1, Object arg2)
voidcompile(ApplyExp exp, Compilation comp, Target target)
static ConvertgetInstance()
TypegetReturnType(Expression[] args)
Expressioninline(ApplyExp exp, ExpWalker walker)
static ExpressionmakeCoercion(Expression value, Expression type)
Convenience method to make an Expression that coerces a value.
static ExpressionmakeCoercion(Expression value, Type type)
Convenience method to make an Expression that coerces a value.
static voidsetCoercedReturnValue(LambdaExp lexp, Expression type, Language language)
Modify LambdaExp so result is coerced to given type.

Field Detail

as

public static final Convert as

Method Detail

apply2

public Object apply2(Object arg1, Object arg2)

compile

public void compile(ApplyExp exp, Compilation comp, Target target)

getInstance

public static Convert getInstance()

getReturnType

public Type getReturnType(Expression[] args)

inline

public Expression inline(ApplyExp exp, ExpWalker walker)

makeCoercion

public static Expression makeCoercion(Expression value, Expression type)
Convenience method to make an Expression that coerces a value.

Parameters: value to be coerced type to coerce value to

Returns: expression that coerces value to type

makeCoercion

public static Expression makeCoercion(Expression value, Type type)
Convenience method to make an Expression that coerces a value.

Parameters: value to be coerced type to coerce value to

Returns: expression that coerces value to type

setCoercedReturnValue

public static void setCoercedReturnValue(LambdaExp lexp, Expression type, Language language)
Modify LambdaExp so result is coerced to given type.