You've already forked linux-packaging-mono
Imported Upstream version 6.12.0.86
Former-commit-id: 7a84ce7d08c42c458ac8e74b27186ca863315d79
This commit is contained in:
parent
92747312ea
commit
0b380204a4
27
external/cecil/Mono.Cecil.Cil/ILProcessor.cs
vendored
27
external/cecil/Mono.Cecil.Cil/ILProcessor.cs
vendored
@@ -229,6 +229,16 @@ namespace Mono.Cecil.Cil {
|
||||
instructions.Insert (index + 1, instruction);
|
||||
}
|
||||
|
||||
public void InsertAfter (int index, Instruction instruction)
|
||||
{
|
||||
if (index < 0 || index >= instructions.Count)
|
||||
throw new ArgumentOutOfRangeException ("index");
|
||||
if (instruction == null)
|
||||
throw new ArgumentNullException ("instruction");
|
||||
|
||||
instructions.Insert (index + 1, instruction);
|
||||
}
|
||||
|
||||
public void Append (Instruction instruction)
|
||||
{
|
||||
if (instruction == null)
|
||||
@@ -248,6 +258,15 @@ namespace Mono.Cecil.Cil {
|
||||
Remove (target);
|
||||
}
|
||||
|
||||
public void Replace (int index, Instruction instruction)
|
||||
{
|
||||
if (instruction == null)
|
||||
throw new ArgumentNullException ("instruction");
|
||||
|
||||
InsertAfter (index, instruction);
|
||||
RemoveAt (index);
|
||||
}
|
||||
|
||||
public void Remove (Instruction instruction)
|
||||
{
|
||||
if (instruction == null)
|
||||
@@ -256,5 +275,13 @@ namespace Mono.Cecil.Cil {
|
||||
if (!instructions.Remove (instruction))
|
||||
throw new ArgumentOutOfRangeException ("instruction");
|
||||
}
|
||||
|
||||
public void RemoveAt (int index)
|
||||
{
|
||||
if (index < 0 || index >= instructions.Count)
|
||||
throw new ArgumentOutOfRangeException ("index");
|
||||
|
||||
instructions.RemoveAt (index);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
2
external/cecil/Mono.Cecil.Cil/MethodBody.cs
vendored
2
external/cecil/Mono.Cecil.Cil/MethodBody.cs
vendored
@@ -92,7 +92,7 @@ namespace Mono.Cecil.Cil {
|
||||
var parameter_type = method.DeclaringType as TypeReference;
|
||||
|
||||
if (parameter_type.HasGenericParameters) {
|
||||
var instance = new GenericInstanceType (parameter_type);
|
||||
var instance = new GenericInstanceType (parameter_type, parameter_type.GenericParameters.Count);
|
||||
for (int i = 0; i < parameter_type.GenericParameters.Count; i++)
|
||||
instance.GenericArguments.Add (parameter_type.GenericParameters [i]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user