src/sys/dotnet/perwapi/PERWAPI.cs
/// <summary>
/// Add an instruction which puts an integer on TOS.  This method
/// selects the correct instruction based on the value of the integer.
/// </summary>
/// <param name="i">the integer value</param>
Add an instruction which puts an integer on TOS.  This method
selects the correct instruction based on the value of the integer.
Add an instruction which puts an integer on TOS . This method selects the correct instruction based on the value of the integer .
public void PushInt(int i) {
            if (i == -1) {
                AddToBuffer(new Instr(Op.ldc_i4_m1));
            } else if ((i >= 0) && (i <= 8)) {
                Op op = (Op)(Op.ldc_i4_0 + i);
                AddToBuffer(new Instr(op));
            } else if ((i >= minByteVal) && (i <= maxByteVal)) {
                AddToBuffer(new IntInstr(IntOp.ldc_i4_s,i));
            } else {
                AddToBuffer(new IntInstr(IntOp.ldc_i4,i));
            }
        }
public void PushInt ( int i ) { if ( i == - 1 ) { AddToBuffer ( new Instr ( Op . ldc_i4_m1 ) ) ; } else if ( ( i >= 0 ) && ( i <= 8 ) ) { Op op = ( Op ) ( Op . ldc_i4_0 + i ) ; AddToBuffer ( new Instr ( op ) ) ; } else if ( ( i >= minByteVal ) && ( i <= maxByteVal ) ) { AddToBuffer ( new IntInstr ( IntOp . ldc_i4_s , i ) ) ; } else { AddToBuffer ( new IntInstr ( IntOp . ldc_i4 , i ) ) ; } }
Add an instruction which puts an integer on TOS.
Add an instruction which puts an integer on TOS .
i
int
the integer value
the integer value