Inference/src/CodeGeneration/Operations/CGRuntimeCheckArgumentOperation.cs
/// <summary>
/// Checks if the parameter passed (operand) matches with the proper argument.
/// In this method only processes non TypeValue parameters. 
/// </summary>
/// <param name="operand">parameter to check</param>
/// <returns></returns>
Checks if the parameter passed (operand) matches with the proper argument.
In this method only processes non TypeValue parameters.
Checks if the parameter passed ( operand ) matches with the proper argument . In this method only processes non TypeValue parameters .
public override object Exec(TypeExpression operand, object arg) {
            if (operand.IsValueType())
                return null;
            this.codeGenerator.dup(this.indent);
            this.codeGenerator.isinst(this.indent, operand);
            this.nextMethod.Add(this.codeGenerator.NewLabel);
            this.codeGenerator.brfalse(this.indent, nextMethod[nextMethod.Count - 1]);
            return null;
        }
public override object Exec ( TypeExpression operand , object arg ) { if ( operand . IsValueType ( ) ) return null ; this . codeGenerator . dup ( this . indent ) ; this . codeGenerator . isinst ( this . indent , operand ) ; this . nextMethod . Add ( this . codeGenerator . NewLabel ) ; this . codeGenerator . brfalse ( this . indent , nextMethod [ nextMethod . Count - 1 ] ) ; return null ; }
Checks if the parameter passed (operand) matches with the proper argument.
Checks if the parameter passed ( operand ) matches with the proper argument .
// if check fail then check nextMethod
None
operand
TypeExpression
parameter to check
parameter to check
arg
object