src/sys/dotnet/perwapi/PERWAPI.cs
/// <summary>
/// Add an IL instruction with an integer parameter
/// </summary>
/// <param name="inst">the IL instruction</param>
/// <param name="val">the integer parameter value</param>
Add an IL instruction with an integer parameter
Add an IL instruction with an integer parameter
public void IntInst(IntOp inst, int val) {
            if ((inst == IntOp.ldc_i4_s) || (inst == IntOp.ldc_i4)) {
                if ((val < 9) && (val >= -1)) {
                    AddToBuffer(new Instr((Op)((int)Op.ldc_i4_0 + val)));
                } else {
                    AddToBuffer(new IntInstr(inst, val));
                }
            } else
                AddToBuffer(new UIntInstr(inst,(uint)val));
        }
public void IntInst ( IntOp inst , int val ) { if ( ( inst == IntOp . ldc_i4_s ) || ( inst == IntOp . ldc_i4 ) ) { if ( ( val < 9 ) && ( val >= - 1 ) ) { AddToBuffer ( new Instr ( ( Op ) ( ( int ) Op . ldc_i4_0 + val ) ) ) ; } else { AddToBuffer ( new IntInstr ( inst , val ) ) ; } } else AddToBuffer ( new UIntInstr ( inst , ( uint ) val ) ) ; }
Add an IL instruction with an integer parameter
Add an IL instruction with an integer parameter
inst
IntOp
the IL instruction
the IL instruction
val
int
the integer parameter value
the integer parameter value