private void AddToBuffer(CILInstruction inst)
{
if (tide >= buffer.Length) {
CILInstruction[] tmp = buffer;
buffer = new CILInstruction[tmp.Length * 2];
for (int i=0; i < tide; i++) {
buffer[i] = tmp[i];
}
}
//Console.WriteLine("Adding instruction at offset " + offset + " with size " + inst.size);
//inst.offset = offset;
//offset += inst.size;
inst.index = (uint)tide;
buffer[tide++] = inst;
}