src/sys/dotnet/perwapi/PERWAPI.cs
/// <summary>
/// This method should only be used to insert instructions into a buffer which
/// already contains some instructions.
/// Start inserting instructions into the instruction buffer ie. set the buffer
/// to "insert" mode.  The position of the insertion will be directly after
/// the "current instruction" as used be GetNextInstruction().  The
/// instructions to be inserted are any calls to the instruction specific
/// methods - Inst, TypeInst, MethodInst, etc.
/// This method cannot be called if already in "insert" mode.
/// </summary>
This method should only be used to insert instructions into a buffer which
already contains some instructions.
Start inserting instructions into the instruction buffer ie. set the buffer
to "insert" mode.  The position of the insertion will be directly after
the "current instruction" as used be GetNextInstruction().  The
instructions to be inserted are any calls to the instruction specific
methods - Inst, TypeInst, MethodInst, etc.
This method cannot be called if already in "insert" mode.
This method should only be used to insert instructions into a buffer which already contains some instructions . Start inserting instructions into the instruction buffer ie . set the buffer to " insert " mode . The position of the insertion will be directly after the " current instruction " as used be GetNextInstruction () . The instructions to be inserted are any calls to the instruction specific methods - Inst TypeInst MethodInst etc . This method cannot be called if already in " insert " mode .
public void StartInsert() {
            if (inserting)
                throw new Exception("Cannot insert into an instruction buffer already in insert mode");
            inserting = true;
            saveTide = tide;
            saveBuffer = buffer;
            tide = 0;
            buffer = new CILInstruction[INITSIZE];
        }
public void StartInsert ( ) { if ( inserting ) throw new Exception ( " " ) ; inserting = true ; saveTide = tide ; saveBuffer = buffer ; tide = 0 ; buffer = new CILInstruction [ INITSIZE ] ; }
This method should only be used to insert instructions into a buffer which
already contains some instructions.
This method should only be used to insert instructions into a buffer which already contains some instructions .