Imported Upstream version 5.2.0.175

Former-commit-id: bb0468d0f257ff100aa895eb5fe583fb5dfbf900
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-06-07 13:16:24 +00:00
parent 4bdbaf4a88
commit 966bba02bb
8776 changed files with 346420 additions and 149650 deletions

View File

@@ -160,12 +160,12 @@ namespace Mono.Cecil.Cil {
void ReadScope (ScopeDebugInformation scope)
{
var start_instruction = GetInstruction (scope.Start.Offset);
if (start_instruction != null)
scope.Start = new InstructionOffset (start_instruction);
scope.Start = new InstructionOffset (start_instruction);
var end_instruction = GetInstruction (scope.End.Offset);
if (end_instruction != null)
scope.End = new InstructionOffset (end_instruction);
scope.End = end_instruction != null
? new InstructionOffset (end_instruction)
: new InstructionOffset ();
if (!scope.variables.IsNullOrEmpty ()) {
for (int i = 0; i < scope.variables.Count; i++) {
@@ -318,9 +318,7 @@ namespace Mono.Cecil.Cil {
switch (instruction.opcode.OperandType) {
case OperandType.ShortInlineBrTarget:
case OperandType.InlineBrTarget:
var targetInstruction = GetInstruction ((int) instruction.operand);
if (targetInstruction != null)
instruction.operand = targetInstruction;
instruction.operand = GetInstruction ((int) instruction.operand);
break;
case OperandType.InlineSwitch:
var offsets = (int []) instruction.operand;
@@ -438,13 +436,6 @@ namespace Mono.Cecil.Cil {
}
}
void Align (int align)
{
align--;
var position = Position;
Advance (((position + align) & ~align) - position);
}
public MetadataToken ReadToken ()
{
return new MetadataToken (ReadUInt32 ());