提交 cda5a099 编写于 作者: V VSadov

Merge pull request #5278 from VSadov/fix4103

Implementing Debug-friendly mode for local optimizer and enabling it in Debug
......@@ -100,10 +100,10 @@ private enum IndirectReturnState : byte
// This setting only affects generating PDB sequence points, it shall not affect generated IL in any way.
_emitPdbSequencePoints = emittingPdb && method.GenerateDebugInfo;
if (_optimizations == OptimizationLevel.Release)
{
_boundBody = Optimizer.Optimize(boundBody, out _stackLocals);
}
_boundBody = Optimizer.Optimize(
boundBody,
debugFriendly: _optimizations != OptimizationLevel.Release,
stackLocals: out _stackLocals);
_methodBodySyntaxOpt = (method as SourceMethodSymbol)?.BodySyntax;
}
......
......@@ -16,14 +16,16 @@ namespace Microsoft.CodeAnalysis.CSharp.CodeGen
{
internal class Optimizer
{
public static BoundStatement Optimize(BoundStatement src, out HashSet<LocalSymbol> stackLocals)
public static BoundStatement Optimize(
BoundStatement src, bool debugFriendly,
out HashSet<LocalSymbol> stackLocals)
{
//TODO: run other optimizing passes here.
// stack scheduler must be the last one.
var locals = PooledDictionary<LocalSymbol, LocalDefUseInfo>.GetInstance();
var evalStack = ArrayBuilder<ValueTuple<BoundExpression, ExprContext>>.GetInstance();
src = (BoundStatement)StackOptimizerPass1.Analyze(src, locals, evalStack);
src = (BoundStatement)StackOptimizerPass1.Analyze(src, locals, evalStack, debugFriendly);
evalStack.Free();
FilterValidStackLocals(locals);
......@@ -294,9 +296,10 @@ internal enum ExprContext
//
internal class StackOptimizerPass1 : BoundTreeRewriter
{
private int _counter;
private readonly bool _debugFriendly;
private readonly ArrayBuilder<ValueTuple<BoundExpression, ExprContext>> _evalStack;
private int _counter;
private ExprContext _context;
private BoundLocal _assignmentLocal;
......@@ -315,10 +318,12 @@ internal class StackOptimizerPass1 : BoundTreeRewriter
public static readonly DummyLocal empty = new DummyLocal();
private StackOptimizerPass1(Dictionary<LocalSymbol, LocalDefUseInfo> locals,
ArrayBuilder<ValueTuple<BoundExpression, ExprContext>> evalStack)
ArrayBuilder<ValueTuple<BoundExpression, ExprContext>> evalStack,
bool debugFriendly)
{
_locals = locals;
_evalStack = evalStack;
_debugFriendly = debugFriendly;
// this is the top of eval stack
DeclareLocal(empty, 0);
......@@ -328,9 +333,10 @@ internal class StackOptimizerPass1 : BoundTreeRewriter
public static BoundNode Analyze(
BoundNode node,
Dictionary<LocalSymbol, LocalDefUseInfo> locals,
ArrayBuilder<ValueTuple<BoundExpression, ExprContext>> evalStack)
ArrayBuilder<ValueTuple<BoundExpression, ExprContext>> evalStack,
bool debugFriendly)
{
var analyzer = new StackOptimizerPass1(locals, evalStack);
var analyzer = new StackOptimizerPass1(locals, evalStack, debugFriendly);
var rewritten = analyzer.Visit(node);
return rewritten;
......@@ -430,6 +436,13 @@ public BoundNode VisitStatement(BoundNode node)
var result = base.Visit(node);
// prevent cross-statement local optimizations
// when emitting debug-friendly code.
if (_debugFriendly)
{
EnsureOnlyEvalStack();
}
_context = prevContext;
SetStackDepth(origStack);
_counter += 1;
......@@ -795,7 +808,7 @@ public override BoundNode VisitAssignmentOperator(BoundAssignmentOperator node)
assignmentLocal.Type.IsPointerType() && right.Kind == BoundKind.Conversion &&
((BoundConversion)right).ConversionKind.IsPointerConversion())
{
_locals[localSymbol].ShouldNotSchedule();
ShouldNotSchedule(localSymbol);
}
RecordVarWrite(localSymbol);
......@@ -1190,7 +1203,7 @@ public override BoundNode VisitSwitchStatement(BoundSwitchStatement node)
var localSym = ((BoundLocal)boundExpression).LocalSymbol;
if (localSym.RefKind == RefKind.None)
{
_locals[localSym].ShouldNotSchedule();
ShouldNotSchedule(localSym);
}
}
......@@ -1422,6 +1435,15 @@ private void RecordLabel(LabelSymbol label)
}
}
private void ShouldNotSchedule(LocalSymbol localSymbol)
{
LocalDefUseInfo localDefInfo;
if (_locals.TryGetValue(localSymbol, out localDefInfo))
{
localDefInfo.ShouldNotSchedule();
}
}
private void RecordVarRef(LocalSymbol local)
{
Debug.Assert(local.RefKind == RefKind.None, "cannot take a ref of a ref");
......@@ -1432,7 +1454,7 @@ private void RecordVarRef(LocalSymbol local)
}
// if we ever take a reference of a local, it must be a real local.
_locals[local].ShouldNotSchedule();
ShouldNotSchedule(local);
}
private void RecordVarRead(LocalSymbol local)
......@@ -1525,9 +1547,10 @@ private void RecordVarWrite(LocalSymbol local)
locInfo.LocalDefs.Add(locDef);
}
private static bool CanScheduleToStack(LocalSymbol local)
private bool CanScheduleToStack(LocalSymbol local)
{
return local.CanScheduleToStack;
return local.CanScheduleToStack &&
(!this._debugFriendly || !local.SynthesizedKind.IsLongLived());
}
private void DeclareLocals(ImmutableArray<LocalSymbol> locals, int stack)
......
......@@ -600,16 +600,15 @@ public static async Task<int> F(int[] array)
v.VerifyIL("Test.<F>d__2.System.Runtime.CompilerServices.IAsyncStateMachine.MoveNext", @"
{
// Code size 308 (0x134)
// Code size 300 (0x12c)
.maxstack 5
.locals init (int V_0,
int V_1,
int& V_2,
int V_3,
int& V_4,
System.Runtime.CompilerServices.TaskAwaiter<int> V_5,
Test.<F>d__2 V_6,
System.Exception V_7)
System.Runtime.CompilerServices.TaskAwaiter<int> V_4,
Test.<F>d__2 V_5,
System.Exception V_6)
~IL_0000: ldarg.0
IL_0001: ldfld ""int Test.<F>d__2.<>1__state""
IL_0006: stloc.0
......@@ -617,132 +616,132 @@ .maxstack 5
{
~IL_0007: ldloc.0
IL_0008: brfalse.s IL_000c
IL_000a: br.s IL_0011
IL_000c: br IL_0094
-IL_0011: nop
-IL_0012: ldarg.0
IL_0013: ldfld ""int[] Test.<F>d__2.array""
IL_0018: ldc.i4.1
IL_0019: ldelema ""int""
IL_001e: stloc.2
IL_001f: ldarg.0
IL_0020: ldloc.2
IL_0021: ldloc.2
IL_0022: ldind.i4
IL_0023: ldc.i4.2
IL_0024: add
IL_0025: dup
IL_0026: stloc.3
IL_0027: stind.i4
IL_0028: ldloc.3
IL_0029: stfld ""int Test.<F>d__2.<>s__1""
IL_002e: ldarg.0
IL_002f: ldarg.0
IL_0030: ldfld ""int[] Test.<F>d__2.array""
IL_0035: stfld ""int[] Test.<F>d__2.<>s__5""
IL_003a: ldarg.0
IL_003b: ldfld ""int[] Test.<F>d__2.<>s__5""
IL_0040: ldc.i4.3
IL_0041: ldelema ""int""
IL_0046: stloc.s V_4
IL_0048: ldarg.0
IL_0049: ldarg.0
IL_004a: ldfld ""int[] Test.<F>d__2.<>s__5""
IL_004f: ldc.i4.3
IL_0050: ldelem.i4
IL_0051: stfld ""int Test.<F>d__2.<>s__2""
IL_0056: call ""System.Threading.Tasks.Task<int> Test.G()""
IL_005b: callvirt ""System.Runtime.CompilerServices.TaskAwaiter<int> System.Threading.Tasks.Task<int>.GetAwaiter()""
IL_0060: stloc.s V_5
~IL_0062: ldloca.s V_5
IL_0064: call ""bool System.Runtime.CompilerServices.TaskAwaiter<int>.IsCompleted.get""
IL_0069: brtrue.s IL_00b1
IL_006b: ldarg.0
IL_006c: ldc.i4.0
IL_006d: dup
IL_006e: stloc.0
IL_006f: stfld ""int Test.<F>d__2.<>1__state""
<IL_0074: ldarg.0
IL_0075: ldloc.s V_5
IL_0077: stfld ""System.Runtime.CompilerServices.TaskAwaiter<int> Test.<F>d__2.<>u__1""
IL_007c: ldarg.0
IL_007d: stloc.s V_6
IL_007f: ldarg.0
IL_0080: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int> Test.<F>d__2.<>t__builder""
IL_0085: ldloca.s V_5
IL_0087: ldloca.s V_6
IL_0089: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int>.AwaitUnsafeOnCompleted<System.Runtime.CompilerServices.TaskAwaiter<int>, Test.<F>d__2>(ref System.Runtime.CompilerServices.TaskAwaiter<int>, ref Test.<F>d__2)""
IL_008e: nop
IL_008f: leave IL_0133
>IL_0094: ldarg.0
IL_0095: ldfld ""System.Runtime.CompilerServices.TaskAwaiter<int> Test.<F>d__2.<>u__1""
IL_009a: stloc.s V_5
IL_009c: ldarg.0
IL_009d: ldflda ""System.Runtime.CompilerServices.TaskAwaiter<int> Test.<F>d__2.<>u__1""
IL_00a2: initobj ""System.Runtime.CompilerServices.TaskAwaiter<int>""
IL_00a8: ldarg.0
IL_00a9: ldc.i4.m1
IL_00aa: dup
IL_00ab: stloc.0
IL_00ac: stfld ""int Test.<F>d__2.<>1__state""
IL_00b1: ldloca.s V_5
IL_00b3: call ""int System.Runtime.CompilerServices.TaskAwaiter<int>.GetResult()""
IL_00b8: stloc.3
IL_00b9: ldloca.s V_5
IL_00bb: initobj ""System.Runtime.CompilerServices.TaskAwaiter<int>""
IL_000a: br.s IL_000e
IL_000c: br.s IL_008c
-IL_000e: nop
-IL_000f: ldarg.0
IL_0010: ldfld ""int[] Test.<F>d__2.array""
IL_0015: ldc.i4.1
IL_0016: ldelema ""int""
IL_001b: stloc.2
IL_001c: ldarg.0
IL_001d: ldloc.2
IL_001e: ldloc.2
IL_001f: ldind.i4
IL_0020: ldc.i4.2
IL_0021: add
IL_0022: dup
IL_0023: stloc.3
IL_0024: stind.i4
IL_0025: ldloc.3
IL_0026: stfld ""int Test.<F>d__2.<>s__1""
IL_002b: ldarg.0
IL_002c: ldarg.0
IL_002d: ldfld ""int[] Test.<F>d__2.array""
IL_0032: stfld ""int[] Test.<F>d__2.<>s__5""
IL_0037: ldarg.0
IL_0038: ldfld ""int[] Test.<F>d__2.<>s__5""
IL_003d: ldc.i4.3
IL_003e: ldelem.i4
IL_003f: pop
IL_0040: ldarg.0
IL_0041: ldarg.0
IL_0042: ldfld ""int[] Test.<F>d__2.<>s__5""
IL_0047: ldc.i4.3
IL_0048: ldelem.i4
IL_0049: stfld ""int Test.<F>d__2.<>s__2""
IL_004e: call ""System.Threading.Tasks.Task<int> Test.G()""
IL_0053: callvirt ""System.Runtime.CompilerServices.TaskAwaiter<int> System.Threading.Tasks.Task<int>.GetAwaiter()""
IL_0058: stloc.s V_4
~IL_005a: ldloca.s V_4
IL_005c: call ""bool System.Runtime.CompilerServices.TaskAwaiter<int>.IsCompleted.get""
IL_0061: brtrue.s IL_00a9
IL_0063: ldarg.0
IL_0064: ldc.i4.0
IL_0065: dup
IL_0066: stloc.0
IL_0067: stfld ""int Test.<F>d__2.<>1__state""
<IL_006c: ldarg.0
IL_006d: ldloc.s V_4
IL_006f: stfld ""System.Runtime.CompilerServices.TaskAwaiter<int> Test.<F>d__2.<>u__1""
IL_0074: ldarg.0
IL_0075: stloc.s V_5
IL_0077: ldarg.0
IL_0078: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int> Test.<F>d__2.<>t__builder""
IL_007d: ldloca.s V_4
IL_007f: ldloca.s V_5
IL_0081: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int>.AwaitUnsafeOnCompleted<System.Runtime.CompilerServices.TaskAwaiter<int>, Test.<F>d__2>(ref System.Runtime.CompilerServices.TaskAwaiter<int>, ref Test.<F>d__2)""
IL_0086: nop
IL_0087: leave IL_012b
>IL_008c: ldarg.0
IL_008d: ldfld ""System.Runtime.CompilerServices.TaskAwaiter<int> Test.<F>d__2.<>u__1""
IL_0092: stloc.s V_4
IL_0094: ldarg.0
IL_0095: ldflda ""System.Runtime.CompilerServices.TaskAwaiter<int> Test.<F>d__2.<>u__1""
IL_009a: initobj ""System.Runtime.CompilerServices.TaskAwaiter<int>""
IL_00a0: ldarg.0
IL_00a1: ldc.i4.m1
IL_00a2: dup
IL_00a3: stloc.0
IL_00a4: stfld ""int Test.<F>d__2.<>1__state""
IL_00a9: ldloca.s V_4
IL_00ab: call ""int System.Runtime.CompilerServices.TaskAwaiter<int>.GetResult()""
IL_00b0: stloc.3
IL_00b1: ldloca.s V_4
IL_00b3: initobj ""System.Runtime.CompilerServices.TaskAwaiter<int>""
IL_00b9: ldarg.0
IL_00ba: ldloc.3
IL_00bb: stfld ""int Test.<F>d__2.<>s__3""
IL_00c0: ldarg.0
IL_00c1: ldarg.0
IL_00c2: ldloc.3
IL_00c3: stfld ""int Test.<F>d__2.<>s__3""
IL_00c2: ldfld ""int[] Test.<F>d__2.<>s__5""
IL_00c7: ldc.i4.3
IL_00c8: ldarg.0
IL_00c9: ldarg.0
IL_00ca: ldfld ""int[] Test.<F>d__2.<>s__5""
IL_00cf: ldc.i4.3
IL_00d0: ldarg.0
IL_00d1: ldfld ""int Test.<F>d__2.<>s__2""
IL_00d6: ldarg.0
IL_00d7: ldfld ""int Test.<F>d__2.<>s__3""
IL_00dc: add
IL_00dd: dup
IL_00de: stloc.3
IL_00df: stelem.i4
IL_00e0: ldloc.3
IL_00e1: stfld ""int Test.<F>d__2.<>s__4""
IL_00e6: ldarg.0
IL_00e7: ldfld ""int Test.<F>d__2.<>s__1""
IL_00ec: ldarg.0
IL_00ed: ldfld ""int Test.<F>d__2.<>s__4""
IL_00f2: ldc.i4.4
IL_00f3: call ""int Test.H(int, int, int)""
IL_00f8: pop
IL_00f9: ldarg.0
IL_00fa: ldnull
IL_00fb: stfld ""int[] Test.<F>d__2.<>s__5""
-IL_0100: ldc.i4.1
IL_0101: stloc.1
IL_0102: leave.s IL_011e
IL_00c9: ldfld ""int Test.<F>d__2.<>s__2""
IL_00ce: ldarg.0
IL_00cf: ldfld ""int Test.<F>d__2.<>s__3""
IL_00d4: add
IL_00d5: dup
IL_00d6: stloc.3
IL_00d7: stelem.i4
IL_00d8: ldloc.3
IL_00d9: stfld ""int Test.<F>d__2.<>s__4""
IL_00de: ldarg.0
IL_00df: ldfld ""int Test.<F>d__2.<>s__1""
IL_00e4: ldarg.0
IL_00e5: ldfld ""int Test.<F>d__2.<>s__4""
IL_00ea: ldc.i4.4
IL_00eb: call ""int Test.H(int, int, int)""
IL_00f0: pop
IL_00f1: ldarg.0
IL_00f2: ldnull
IL_00f3: stfld ""int[] Test.<F>d__2.<>s__5""
-IL_00f8: ldc.i4.1
IL_00f9: stloc.1
IL_00fa: leave.s IL_0116
}
catch System.Exception
{
~IL_0104: stloc.s V_7
~IL_00fc: stloc.s V_6
IL_00fe: ldarg.0
IL_00ff: ldc.i4.s -2
IL_0101: stfld ""int Test.<F>d__2.<>1__state""
IL_0106: ldarg.0
IL_0107: ldc.i4.s -2
IL_0109: stfld ""int Test.<F>d__2.<>1__state""
IL_010e: ldarg.0
IL_010f: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int> Test.<F>d__2.<>t__builder""
IL_0114: ldloc.s V_7
IL_0116: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int>.SetException(System.Exception)""
IL_011b: nop
IL_011c: leave.s IL_0133
IL_0107: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int> Test.<F>d__2.<>t__builder""
IL_010c: ldloc.s V_6
IL_010e: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int>.SetException(System.Exception)""
IL_0113: nop
IL_0114: leave.s IL_012b
}
-IL_011e: ldarg.0
IL_011f: ldc.i4.s -2
IL_0121: stfld ""int Test.<F>d__2.<>1__state""
~IL_0126: ldarg.0
IL_0127: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int> Test.<F>d__2.<>t__builder""
IL_012c: ldloc.1
IL_012d: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int>.SetResult(int)""
IL_0132: nop
IL_0133: ret
-IL_0116: ldarg.0
IL_0117: ldc.i4.s -2
IL_0119: stfld ""int Test.<F>d__2.<>1__state""
~IL_011e: ldarg.0
IL_011f: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int> Test.<F>d__2.<>t__builder""
IL_0124: ldloc.1
IL_0125: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int>.SetResult(int)""
IL_012a: nop
IL_012b: ret
}", sequencePoints: "Test+<F>d__2.MoveNext");
}
......
......@@ -3178,15 +3178,14 @@ public static async Task<int> F()
v.VerifyIL("Test.<F>d__2.System.Runtime.CompilerServices.IAsyncStateMachine.MoveNext()", @"
{
// Code size 237 (0xed)
// Code size 235 (0xeb)
.maxstack 3
.locals init (int V_0,
int V_1,
S& V_2,
System.Runtime.CompilerServices.TaskAwaiter<int> V_3,
int V_4,
Test.<F>d__2 V_5,
System.Exception V_6)
System.Runtime.CompilerServices.TaskAwaiter<int> V_2,
int V_3,
Test.<F>d__2 V_4,
System.Exception V_5)
~IL_0000: ldarg.0
IL_0001: ldfld ""int Test.<F>d__2.<>1__state""
IL_0006: stloc.0
......@@ -3209,11 +3208,11 @@ .maxstack 3
IL_0029: ldfld ""S[] Test.<F>d__2.<>s__3""
IL_002e: ldc.i4.1
IL_002f: ldelema ""S""
IL_0034: stloc.2
IL_0034: pop
IL_0035: call ""System.Threading.Tasks.Task<int> Test.G()""
IL_003a: callvirt ""System.Runtime.CompilerServices.TaskAwaiter<int> System.Threading.Tasks.Task<int>.GetAwaiter()""
IL_003f: stloc.3
~IL_0040: ldloca.s V_3
IL_003f: stloc.2
~IL_0040: ldloca.s V_2
IL_0042: call ""bool System.Runtime.CompilerServices.TaskAwaiter<int>.IsCompleted.get""
IL_0047: brtrue.s IL_008a
IL_0049: ldarg.0
......@@ -3222,20 +3221,20 @@ .maxstack 3
IL_004c: stloc.0
IL_004d: stfld ""int Test.<F>d__2.<>1__state""
<IL_0052: ldarg.0
IL_0053: ldloc.3
IL_0053: ldloc.2
IL_0054: stfld ""System.Runtime.CompilerServices.TaskAwaiter<int> Test.<F>d__2.<>u__1""
IL_0059: ldarg.0
IL_005a: stloc.s V_5
IL_005a: stloc.s V_4
IL_005c: ldarg.0
IL_005d: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int> Test.<F>d__2.<>t__builder""
IL_0062: ldloca.s V_3
IL_0064: ldloca.s V_5
IL_0062: ldloca.s V_2
IL_0064: ldloca.s V_4
IL_0066: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int>.AwaitUnsafeOnCompleted<System.Runtime.CompilerServices.TaskAwaiter<int>, Test.<F>d__2>(ref System.Runtime.CompilerServices.TaskAwaiter<int>, ref Test.<F>d__2)""
IL_006b: nop
IL_006c: leave.s IL_00ec
IL_006c: leave.s IL_00ea
>IL_006e: ldarg.0
IL_006f: ldfld ""System.Runtime.CompilerServices.TaskAwaiter<int> Test.<F>d__2.<>u__1""
IL_0074: stloc.3
IL_0074: stloc.2
IL_0075: ldarg.0
IL_0076: ldflda ""System.Runtime.CompilerServices.TaskAwaiter<int> Test.<F>d__2.<>u__1""
IL_007b: initobj ""System.Runtime.CompilerServices.TaskAwaiter<int>""
......@@ -3244,46 +3243,46 @@ .maxstack 3
IL_0083: dup
IL_0084: stloc.0
IL_0085: stfld ""int Test.<F>d__2.<>1__state""
IL_008a: ldloca.s V_3
IL_008a: ldloca.s V_2
IL_008c: call ""int System.Runtime.CompilerServices.TaskAwaiter<int>.GetResult()""
IL_0091: stloc.s V_4
IL_0093: ldloca.s V_3
IL_0095: initobj ""System.Runtime.CompilerServices.TaskAwaiter<int>""
IL_009b: ldarg.0
IL_009c: ldloc.s V_4
IL_009e: stfld ""int Test.<F>d__2.<>s__2""
IL_00a3: ldarg.0
IL_00a4: ldfld ""S[] Test.<F>d__2.<>s__3""
IL_00a9: ldc.i4.1
IL_00aa: ldelema ""S""
IL_00af: ldarg.0
IL_00b0: ldfld ""int Test.<F>d__2.<>s__2""
IL_00b5: call ""int S.Mutate(int)""
IL_00ba: stloc.1
IL_00bb: leave.s IL_00d7
IL_0091: stloc.3
IL_0092: ldloca.s V_2
IL_0094: initobj ""System.Runtime.CompilerServices.TaskAwaiter<int>""
IL_009a: ldarg.0
IL_009b: ldloc.3
IL_009c: stfld ""int Test.<F>d__2.<>s__2""
IL_00a1: ldarg.0
IL_00a2: ldfld ""S[] Test.<F>d__2.<>s__3""
IL_00a7: ldc.i4.1
IL_00a8: ldelema ""S""
IL_00ad: ldarg.0
IL_00ae: ldfld ""int Test.<F>d__2.<>s__2""
IL_00b3: call ""int S.Mutate(int)""
IL_00b8: stloc.1
IL_00b9: leave.s IL_00d5
}
catch System.Exception
{
~IL_00bd: stloc.s V_6
IL_00bf: ldarg.0
IL_00c0: ldc.i4.s -2
IL_00c2: stfld ""int Test.<F>d__2.<>1__state""
IL_00c7: ldarg.0
IL_00c8: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int> Test.<F>d__2.<>t__builder""
IL_00cd: ldloc.s V_6
IL_00cf: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int>.SetException(System.Exception)""
IL_00d4: nop
IL_00d5: leave.s IL_00ec
~IL_00bb: stloc.s V_5
IL_00bd: ldarg.0
IL_00be: ldc.i4.s -2
IL_00c0: stfld ""int Test.<F>d__2.<>1__state""
IL_00c5: ldarg.0
IL_00c6: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int> Test.<F>d__2.<>t__builder""
IL_00cb: ldloc.s V_5
IL_00cd: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int>.SetException(System.Exception)""
IL_00d2: nop
IL_00d3: leave.s IL_00ea
}
-IL_00d7: ldarg.0
IL_00d8: ldc.i4.s -2
IL_00da: stfld ""int Test.<F>d__2.<>1__state""
~IL_00df: ldarg.0
IL_00e0: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int> Test.<F>d__2.<>t__builder""
IL_00e5: ldloc.1
IL_00e6: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int>.SetResult(int)""
IL_00eb: nop
IL_00ec: ret
-IL_00d5: ldarg.0
IL_00d6: ldc.i4.s -2
IL_00d8: stfld ""int Test.<F>d__2.<>1__state""
~IL_00dd: ldarg.0
IL_00de: ldflda ""System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int> Test.<F>d__2.<>t__builder""
IL_00e3: ldloc.1
IL_00e4: call ""void System.Runtime.CompilerServices.AsyncTaskMethodBuilder<int>.SetResult(int)""
IL_00e9: nop
IL_00ea: ret
}",
sequencePoints: "Test+<F>d__2.MoveNext");
}
......
......@@ -5224,16 +5224,15 @@ static void F(string[] args)
"<>f__AnonymousType1<<<>h__TransparentIdentifier0>j__TPar, <y>j__TPar>: {Equals, GetHashCode, ToString}");
diff1.VerifyLocalSignature("C.F", @"
.locals init (System.Collections.Generic.IEnumerable<<anonymous type: string Value, int Length>> V_0, //result
System.Collections.Generic.IEnumerable<string> V_1, //newArgs
<>f__AnonymousType5<dynamic, dynamic> V_2, //list
int V_3, //i
<>f__AnonymousType5<string, dynamic> V_4, //linked
object V_5, //str
<>f__AnonymousType5<string, dynamic> V_6,
object V_7,
int V_8,
bool V_9)
.locals init (System.Collections.Generic.IEnumerable<<anonymous type: string Value, int Length>> V_0, //result
System.Collections.Generic.IEnumerable<string> V_1, //newArgs
<>f__AnonymousType5<dynamic, dynamic> V_2, //list
int V_3, //i
<>f__AnonymousType5<string, dynamic> V_4, //linked
object V_5, //str
<>f__AnonymousType5<string, dynamic> V_6,
object V_7,
bool V_8)
");
}
......@@ -5531,34 +5530,30 @@ static int M()
diff1.VerifyIL("C.M", @"
{
// Code size 40 (0x28)
// Code size 32 (0x20)
.maxstack 3
.locals init (C V_0, //c
[unchanged] V_1,
[int] V_1,
[int] V_2,
[int] V_3,
C V_4,
int V_5,
int V_6)
int V_3,
int V_4)
IL_0000: nop
IL_0001: newobj ""C..ctor()""
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: stloc.s V_4
IL_000a: ldloc.s V_4
IL_000c: callvirt ""int C.P.get""
IL_0011: stloc.s V_5
IL_0013: ldloc.s V_4
IL_0015: ldloc.s V_5
IL_0017: ldc.i4.1
IL_0018: add
IL_0019: callvirt ""void C.P.set""
IL_001e: nop
IL_001f: ldloc.s V_5
IL_0021: stloc.s V_6
IL_0023: br.s IL_0025
IL_0025: ldloc.s V_6
IL_0027: ret
IL_0008: dup
IL_0009: callvirt ""int C.P.get""
IL_000e: stloc.3
IL_000f: ldloc.3
IL_0010: ldc.i4.1
IL_0011: add
IL_0012: callvirt ""void C.P.set""
IL_0017: nop
IL_0018: ldloc.3
IL_0019: stloc.s V_4
IL_001b: br.s IL_001d
IL_001d: ldloc.s V_4
IL_001f: ret
}");
}
......
......@@ -120,75 +120,67 @@ public static void M()
var v0 = CompileAndVerify(compilation0);
v0.VerifyIL("C.M", @"
{
// Code size 85 (0x55)
// Code size 75 (0x4b)
.maxstack 2
.locals init (int V_0, //j
int V_1, //i
int V_2,
bool V_3,
int V_4, //i
bool V_5,
bool V_6)
bool V_2,
int V_3, //i
bool V_4,
bool V_5)
IL_0000: nop
IL_0001: ldc.i4.1
IL_0002: stloc.1
IL_0003: br.s IL_0012
IL_0003: br.s IL_0010
IL_0005: ldc.i4.1
IL_0006: call ""void System.Console.WriteLine(int)""
IL_000b: nop
IL_000c: ldloc.1
IL_000d: stloc.2
IL_000e: ldloc.2
IL_000f: ldc.i4.1
IL_0010: add
IL_0011: stloc.1
IL_0012: ldloc.1
IL_0013: ldc.i4.1
IL_0014: clt
IL_0016: stloc.3
IL_0017: ldloc.3
IL_0018: brtrue.s IL_0005
IL_001a: ldc.i4.1
IL_001b: stloc.s V_4
IL_001d: br.s IL_002e
IL_001f: ldc.i4.2
IL_0020: call ""void System.Console.WriteLine(int)""
IL_0025: nop
IL_0026: ldloc.s V_4
IL_0028: stloc.2
IL_0029: ldloc.2
IL_002a: ldc.i4.1
IL_002b: add
IL_002c: stloc.s V_4
IL_002e: ldloc.s V_4
IL_0030: ldc.i4.2
IL_0031: clt
IL_0033: stloc.s V_5
IL_0035: ldloc.s V_5
IL_0037: brtrue.s IL_001f
IL_0039: ldc.i4.1
IL_003a: stloc.0
IL_003b: br.s IL_004a
IL_003d: ldc.i4.3
IL_003e: call ""void System.Console.WriteLine(int)""
IL_0043: nop
IL_0044: ldloc.0
IL_0045: stloc.2
IL_0046: ldloc.2
IL_0047: ldc.i4.1
IL_0048: add
IL_0049: stloc.0
IL_004a: ldloc.0
IL_004b: ldc.i4.3
IL_004c: clt
IL_004e: stloc.s V_6
IL_0050: ldloc.s V_6
IL_0052: brtrue.s IL_003d
IL_0054: ret
IL_000d: ldc.i4.1
IL_000e: add
IL_000f: stloc.1
IL_0010: ldloc.1
IL_0011: ldc.i4.1
IL_0012: clt
IL_0014: stloc.2
IL_0015: ldloc.2
IL_0016: brtrue.s IL_0005
IL_0018: ldc.i4.1
IL_0019: stloc.3
IL_001a: br.s IL_0027
IL_001c: ldc.i4.2
IL_001d: call ""void System.Console.WriteLine(int)""
IL_0022: nop
IL_0023: ldloc.3
IL_0024: ldc.i4.1
IL_0025: add
IL_0026: stloc.3
IL_0027: ldloc.3
IL_0028: ldc.i4.2
IL_0029: clt
IL_002b: stloc.s V_4
IL_002d: ldloc.s V_4
IL_002f: brtrue.s IL_001c
IL_0031: ldc.i4.1
IL_0032: stloc.0
IL_0033: br.s IL_0040
IL_0035: ldc.i4.3
IL_0036: call ""void System.Console.WriteLine(int)""
IL_003b: nop
IL_003c: ldloc.0
IL_003d: ldc.i4.1
IL_003e: add
IL_003f: stloc.0
IL_0040: ldloc.0
IL_0041: ldc.i4.3
IL_0042: clt
IL_0044: stloc.s V_5
IL_0046: ldloc.s V_5
IL_0048: brtrue.s IL_0035
IL_004a: ret
}
");
v0.VerifyPdb("C.M", @"
<symbols>
v0.VerifyPdb("C.M", @"<symbols>
<methods>
<method containingType=""C"" name=""M"">
<customDebugInfo>
......@@ -198,7 +190,6 @@ .maxstack 2
<encLocalSlotMap>
<slot kind=""0"" offset=""135"" />
<slot kind=""0"" offset=""20"" />
<slot kind=""temp"" />
<slot kind=""1"" offset=""11"" />
<slot kind=""0"" offset=""79"" />
<slot kind=""1"" offset=""70"" />
......@@ -211,36 +202,35 @@ .maxstack 2
<entry offset=""0x3"" hidden=""true"" />
<entry offset=""0x5"" startLine=""8"" startColumn=""37"" endLine=""8"" endColumn=""58"" />
<entry offset=""0xc"" startLine=""8"" startColumn=""32"" endLine=""8"" endColumn=""35"" />
<entry offset=""0x12"" startLine=""8"" startColumn=""25"" endLine=""8"" endColumn=""30"" />
<entry offset=""0x17"" hidden=""true"" />
<entry offset=""0x1a"" startLine=""9"" startColumn=""14"" endLine=""9"" endColumn=""23"" />
<entry offset=""0x1d"" hidden=""true"" />
<entry offset=""0x1f"" startLine=""9"" startColumn=""37"" endLine=""9"" endColumn=""58"" />
<entry offset=""0x26"" startLine=""9"" startColumn=""32"" endLine=""9"" endColumn=""35"" />
<entry offset=""0x2e"" startLine=""9"" startColumn=""25"" endLine=""9"" endColumn=""30"" />
<entry offset=""0x35"" hidden=""true"" />
<entry offset=""0x39"" startLine=""12"" startColumn=""14"" endLine=""12"" endColumn=""19"" />
<entry offset=""0x3b"" hidden=""true"" />
<entry offset=""0x3d"" startLine=""12"" startColumn=""33"" endLine=""12"" endColumn=""54"" />
<entry offset=""0x44"" startLine=""12"" startColumn=""28"" endLine=""12"" endColumn=""31"" />
<entry offset=""0x4a"" startLine=""12"" startColumn=""21"" endLine=""12"" endColumn=""26"" />
<entry offset=""0x50"" hidden=""true"" />
<entry offset=""0x54"" startLine=""13"" startColumn=""5"" endLine=""13"" endColumn=""6"" />
<entry offset=""0x10"" startLine=""8"" startColumn=""25"" endLine=""8"" endColumn=""30"" />
<entry offset=""0x15"" hidden=""true"" />
<entry offset=""0x18"" startLine=""9"" startColumn=""14"" endLine=""9"" endColumn=""23"" />
<entry offset=""0x1a"" hidden=""true"" />
<entry offset=""0x1c"" startLine=""9"" startColumn=""37"" endLine=""9"" endColumn=""58"" />
<entry offset=""0x23"" startLine=""9"" startColumn=""32"" endLine=""9"" endColumn=""35"" />
<entry offset=""0x27"" startLine=""9"" startColumn=""25"" endLine=""9"" endColumn=""30"" />
<entry offset=""0x2d"" hidden=""true"" />
<entry offset=""0x31"" startLine=""12"" startColumn=""14"" endLine=""12"" endColumn=""19"" />
<entry offset=""0x33"" hidden=""true"" />
<entry offset=""0x35"" startLine=""12"" startColumn=""33"" endLine=""12"" endColumn=""54"" />
<entry offset=""0x3c"" startLine=""12"" startColumn=""28"" endLine=""12"" endColumn=""31"" />
<entry offset=""0x40"" startLine=""12"" startColumn=""21"" endLine=""12"" endColumn=""26"" />
<entry offset=""0x46"" hidden=""true"" />
<entry offset=""0x4a"" startLine=""13"" startColumn=""5"" endLine=""13"" endColumn=""6"" />
</sequencePoints>
<scope startOffset=""0x0"" endOffset=""0x55"">
<scope startOffset=""0x0"" endOffset=""0x4b"">
<namespace name=""System"" />
<local name=""j"" il_index=""0"" il_start=""0x0"" il_end=""0x55"" attributes=""0"" />
<scope startOffset=""0x1"" endOffset=""0x1a"">
<local name=""i"" il_index=""1"" il_start=""0x1"" il_end=""0x1a"" attributes=""0"" />
<local name=""j"" il_index=""0"" il_start=""0x0"" il_end=""0x4b"" attributes=""0"" />
<scope startOffset=""0x1"" endOffset=""0x18"">
<local name=""i"" il_index=""1"" il_start=""0x1"" il_end=""0x18"" attributes=""0"" />
</scope>
<scope startOffset=""0x1a"" endOffset=""0x39"">
<local name=""i"" il_index=""4"" il_start=""0x1a"" il_end=""0x39"" attributes=""0"" />
<scope startOffset=""0x18"" endOffset=""0x31"">
<local name=""i"" il_index=""3"" il_start=""0x18"" il_end=""0x31"" attributes=""0"" />
</scope>
</scope>
</method>
</methods>
</symbols>
");
</symbols>");
var symReader = v0.CreateSymReader();
var testData0 = new CompilationTestData();
......@@ -257,72 +247,64 @@ .maxstack 2
// check that all user-defined and long-lived synthesized local slots are reused
diff1.VerifyIL("C.M", @"
{
// Code size 91 (0x5b)
// Code size 75 (0x4b)
.maxstack 2
.locals init (int V_0, //j
int V_1, //i
[int] V_2,
bool V_3,
int V_4, //i
bool V_5,
bool V_6,
int V_7)
bool V_2,
int V_3, //i
bool V_4,
bool V_5)
IL_0000: nop
IL_0001: ldc.i4.1
IL_0002: stloc.1
IL_0003: br.s IL_0014
IL_0003: br.s IL_0010
IL_0005: ldc.i4.1
IL_0006: call ""void System.Console.WriteLine(int)""
IL_000b: nop
IL_000c: ldloc.1
IL_000d: stloc.s V_7
IL_000f: ldloc.s V_7
IL_000d: ldc.i4.1
IL_000e: add
IL_000f: stloc.1
IL_0010: ldloc.1
IL_0011: ldc.i4.1
IL_0012: add
IL_0013: stloc.1
IL_0014: ldloc.1
IL_0015: ldc.i4.1
IL_0016: clt
IL_0018: stloc.3
IL_0019: ldloc.3
IL_001a: brtrue.s IL_0005
IL_001c: ldc.i4.1
IL_001d: stloc.s V_4
IL_001f: br.s IL_0032
IL_0021: ldc.i4.2
IL_0022: call ""void System.Console.WriteLine(int)""
IL_0027: nop
IL_0028: ldloc.s V_4
IL_002a: stloc.s V_7
IL_002c: ldloc.s V_7
IL_002e: ldc.i4.1
IL_002f: add
IL_0030: stloc.s V_4
IL_0032: ldloc.s V_4
IL_0034: ldc.i4.2
IL_0035: clt
IL_0037: stloc.s V_5
IL_0039: ldloc.s V_5
IL_003b: brtrue.s IL_0021
IL_0012: clt
IL_0014: stloc.2
IL_0015: ldloc.2
IL_0016: brtrue.s IL_0005
IL_0018: ldc.i4.1
IL_0019: stloc.3
IL_001a: br.s IL_0027
IL_001c: ldc.i4.2
IL_001d: call ""void System.Console.WriteLine(int)""
IL_0022: nop
IL_0023: ldloc.3
IL_0024: ldc.i4.1
IL_0025: add
IL_0026: stloc.3
IL_0027: ldloc.3
IL_0028: ldc.i4.2
IL_0029: clt
IL_002b: stloc.s V_4
IL_002d: ldloc.s V_4
IL_002f: brtrue.s IL_001c
IL_0031: ldc.i4.1
IL_0032: stloc.0
IL_0033: br.s IL_0040
IL_0035: ldc.i4.3
IL_0036: call ""void System.Console.WriteLine(int)""
IL_003b: nop
IL_003c: ldloc.0
IL_003d: ldc.i4.1
IL_003e: stloc.0
IL_003f: br.s IL_0050
IL_003e: add
IL_003f: stloc.0
IL_0040: ldloc.0
IL_0041: ldc.i4.3
IL_0042: call ""void System.Console.WriteLine(int)""
IL_0047: nop
IL_0048: ldloc.0
IL_0049: stloc.s V_7
IL_004b: ldloc.s V_7
IL_004d: ldc.i4.1
IL_004e: add
IL_004f: stloc.0
IL_0050: ldloc.0
IL_0051: ldc.i4.3
IL_0052: clt
IL_0054: stloc.s V_6
IL_0056: ldloc.s V_6
IL_0058: brtrue.s IL_0041
IL_005a: ret
IL_0042: clt
IL_0044: stloc.s V_5
IL_0046: ldloc.s V_5
IL_0048: brtrue.s IL_0035
IL_004a: ret
}
");
}
......@@ -1949,103 +1931,100 @@ static void M(A a)
ImmutableArray.Create(new SemanticEdit(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0), preserveLocalVariables: true)));
diff1.VerifyIL("C.M",
@"{
// Code size 145 (0x91)
@"
{
// Code size 137 (0x89)
.maxstack 4
.locals init ([unchanged] V_0,
[unchanged] V_1,
[int] V_2,
[int] V_1,
A V_2,
A V_3,
A V_4,
bool V_5,
A V_6,
object V_7, //o
A V_8,
A V_9,
int V_10)
bool V_4,
A V_5,
object V_6, //o
A V_7,
int V_8)
IL_0000: nop
IL_0001: ldarg.0
IL_0002: stloc.s V_8
IL_0004: call ""A C.F()""
IL_0009: stloc.s V_9
IL_000b: ldloc.s V_8
IL_000d: ldloc.s V_9
IL_000f: callvirt ""int A.this[A].get""
IL_0014: stloc.s V_10
IL_0016: ldloc.s V_8
IL_0018: ldloc.s V_9
IL_001a: ldloc.s V_10
IL_001c: ldc.i4.1
IL_001d: add
IL_001e: callvirt ""void A.this[A].set""
IL_0023: nop
IL_0024: call ""A C.F()""
IL_0029: stloc.3
IL_0002: call ""A C.F()""
IL_0007: stloc.s V_7
IL_0009: dup
IL_000a: ldloc.s V_7
IL_000c: callvirt ""int A.this[A].get""
IL_0011: stloc.s V_8
IL_0013: ldloc.s V_7
IL_0015: ldloc.s V_8
IL_0017: ldc.i4.1
IL_0018: add
IL_0019: callvirt ""void A.this[A].set""
IL_001e: nop
IL_001f: call ""A C.F()""
IL_0024: stloc.2
.try
{
IL_002a: nop
IL_002b: nop
IL_002c: leave.s IL_0039
IL_0025: nop
IL_0026: nop
IL_0027: leave.s IL_0034
}
finally
{
IL_002e: ldloc.3
IL_002f: brfalse.s IL_0038
IL_0031: ldloc.3
IL_0032: callvirt ""void System.IDisposable.Dispose()""
IL_0037: nop
IL_0038: endfinally
IL_0029: ldloc.2
IL_002a: brfalse.s IL_0033
IL_002c: ldloc.2
IL_002d: callvirt ""void System.IDisposable.Dispose()""
IL_0032: nop
IL_0033: endfinally
}
IL_0039: call ""A C.F()""
IL_003e: stloc.s V_4
IL_0040: ldc.i4.0
IL_0041: stloc.s V_5
IL_0034: call ""A C.F()""
IL_0039: stloc.3
IL_003a: ldc.i4.0
IL_003b: stloc.s V_4
.try
{
IL_0043: ldloc.s V_4
IL_0045: ldloca.s V_5
IL_0047: call ""void System.Threading.Monitor.Enter(object, ref bool)""
IL_004c: nop
IL_004d: nop
IL_004e: nop
IL_004f: leave.s IL_005e
IL_003d: ldloc.3
IL_003e: ldloca.s V_4
IL_0040: call ""void System.Threading.Monitor.Enter(object, ref bool)""
IL_0045: nop
IL_0046: nop
IL_0047: nop
IL_0048: leave.s IL_0056
}
finally
{
IL_0051: ldloc.s V_5
IL_0053: brfalse.s IL_005d
IL_0055: ldloc.s V_4
IL_0057: call ""void System.Threading.Monitor.Exit(object)""
IL_005c: nop
IL_005d: endfinally
IL_004a: ldloc.s V_4
IL_004c: brfalse.s IL_0055
IL_004e: ldloc.3
IL_004f: call ""void System.Threading.Monitor.Exit(object)""
IL_0054: nop
IL_0055: endfinally
}
IL_005e: nop
IL_005f: call ""B C.G()""
IL_0064: callvirt ""A B.GetEnumerator()""
IL_0069: stloc.s V_6
IL_0056: nop
IL_0057: call ""B C.G()""
IL_005c: callvirt ""A B.GetEnumerator()""
IL_0061: stloc.s V_5
.try
{
IL_006b: br.s IL_0078
IL_006d: ldloc.s V_6
IL_006f: callvirt ""object A.Current.get""
IL_0074: stloc.s V_7
IL_0076: nop
IL_0077: nop
IL_0078: ldloc.s V_6
IL_007a: callvirt ""bool A.MoveNext()""
IL_007f: brtrue.s IL_006d
IL_0081: leave.s IL_0090
IL_0063: br.s IL_0070
IL_0065: ldloc.s V_5
IL_0067: callvirt ""object A.Current.get""
IL_006c: stloc.s V_6
IL_006e: nop
IL_006f: nop
IL_0070: ldloc.s V_5
IL_0072: callvirt ""bool A.MoveNext()""
IL_0077: brtrue.s IL_0065
IL_0079: leave.s IL_0088
}
finally
{
IL_0083: ldloc.s V_6
IL_0085: brfalse.s IL_008f
IL_0087: ldloc.s V_6
IL_0089: callvirt ""void System.IDisposable.Dispose()""
IL_008e: nop
IL_008f: endfinally
IL_007b: ldloc.s V_5
IL_007d: brfalse.s IL_0087
IL_007f: ldloc.s V_5
IL_0081: callvirt ""void System.IDisposable.Dispose()""
IL_0086: nop
IL_0087: endfinally
}
IL_0090: ret
IL_0088: ret
}");
}
......
......@@ -1862,26 +1862,23 @@ public ITest28 Test()
var expected =
@"
{
// Code size 41 (0x29)
.maxstack 2
.locals init (ITest28 V_0,
ITest28 V_1)
// Code size 39 (0x27)
.maxstack 3
.locals init (ITest28 V_0)
IL_0000: nop
IL_0001: ldstr ""00000000-0000-0000-0000-000000000000""
IL_0006: newobj ""System.Guid..ctor(string)""
IL_000b: call ""System.Type System.Type.GetTypeFromCLSID(System.Guid)""
IL_0010: call ""object System.Activator.CreateInstance(System.Type)""
IL_0015: castclass ""ITest28""
IL_001a: stloc.0
IL_001b: ldloc.0
IL_001c: ldc.i4.2
IL_001d: callvirt ""void ITest28.P1.set""
IL_0022: nop
IL_0023: ldloc.0
IL_0024: stloc.1
IL_0025: br.s IL_0027
IL_0027: ldloc.1
IL_0028: ret
IL_001a: dup
IL_001b: ldc.i4.2
IL_001c: callvirt ""void ITest28.P1.set""
IL_0021: nop
IL_0022: stloc.0
IL_0023: br.s IL_0025
IL_0025: ldloc.0
IL_0026: ret
}
";
......
......@@ -58,7 +58,7 @@ static int Main()
v.VerifyIL("TestCase.<Run>d__1.System.Runtime.CompilerServices.IAsyncStateMachine.MoveNext", @"
{
// Code size 303 (0x12f)
// Code size 301 (0x12d)
.maxstack 3
.locals init (int V_0,
System.Runtime.CompilerServices.TaskAwaiter<int> V_1,
......@@ -117,7 +117,7 @@ .maxstack 3
IL_007e: ldloca.s V_3
IL_0080: call ""void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.AwaitUnsafeOnCompleted<System.Runtime.CompilerServices.TaskAwaiter<int>, TestCase.<Run>d__1>(ref System.Runtime.CompilerServices.TaskAwaiter<int>, ref TestCase.<Run>d__1)""
IL_0085: nop
IL_0086: leave IL_012e
IL_0086: leave IL_012c
>IL_008b: ldarg.0
IL_008c: ldfld ""System.Runtime.CompilerServices.TaskAwaiter<int> TestCase.<Run>d__1.<>u__1""
IL_0091: stloc.1
......@@ -147,48 +147,45 @@ .maxstack 3
IL_00d1: ceq
IL_00d3: stloc.s V_4
~IL_00d5: ldloc.s V_4
IL_00d7: brfalse.s IL_00e7
IL_00d7: brfalse.s IL_00e5
-IL_00d9: ldsfld ""int TestCase.Count""
IL_00de: stloc.2
IL_00df: ldloc.2
IL_00e0: ldc.i4.1
IL_00e1: add
IL_00e2: stsfld ""int TestCase.Count""
-IL_00e7: ldsfld ""int TestCase.Count""
IL_00ec: ldc.i4.1
IL_00ed: sub
IL_00ee: stsfld ""int Driver.Result""
-IL_00f3: ldsfld ""System.Threading.AutoResetEvent Driver.CompletedSignal""
IL_00f8: callvirt ""bool System.Threading.EventWaitHandle.Set()""
IL_00fd: pop
IL_00fe: leave.s IL_011a
IL_00de: ldc.i4.1
IL_00df: add
IL_00e0: stsfld ""int TestCase.Count""
-IL_00e5: ldsfld ""int TestCase.Count""
IL_00ea: ldc.i4.1
IL_00eb: sub
IL_00ec: stsfld ""int Driver.Result""
-IL_00f1: ldsfld ""System.Threading.AutoResetEvent Driver.CompletedSignal""
IL_00f6: callvirt ""bool System.Threading.EventWaitHandle.Set()""
IL_00fb: pop
IL_00fc: leave.s IL_0118
}
catch System.Exception
{
~$IL_0100: stloc.s V_5
IL_0102: ldarg.0
IL_0103: ldc.i4.s -2
IL_0105: stfld ""int TestCase.<Run>d__1.<>1__state""
IL_010a: ldarg.0
IL_010b: ldflda ""System.Runtime.CompilerServices.AsyncVoidMethodBuilder TestCase.<Run>d__1.<>t__builder""
IL_0110: ldloc.s V_5
IL_0112: call ""void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.SetException(System.Exception)""
IL_0117: nop
IL_0118: leave.s IL_012e
~$IL_00fe: stloc.s V_5
IL_0100: ldarg.0
IL_0101: ldc.i4.s -2
IL_0103: stfld ""int TestCase.<Run>d__1.<>1__state""
IL_0108: ldarg.0
IL_0109: ldflda ""System.Runtime.CompilerServices.AsyncVoidMethodBuilder TestCase.<Run>d__1.<>t__builder""
IL_010e: ldloc.s V_5
IL_0110: call ""void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.SetException(System.Exception)""
IL_0115: nop
IL_0116: leave.s IL_012c
}
-IL_011a: ldarg.0
IL_011b: ldc.i4.s -2
IL_011d: stfld ""int TestCase.<Run>d__1.<>1__state""
~IL_0122: ldarg.0
IL_0123: ldflda ""System.Runtime.CompilerServices.AsyncVoidMethodBuilder TestCase.<Run>d__1.<>t__builder""
IL_0128: call ""void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.SetResult()""
IL_012d: nop
IL_012e: ret
-IL_0118: ldarg.0
IL_0119: ldc.i4.s -2
IL_011b: stfld ""int TestCase.<Run>d__1.<>1__state""
~IL_0120: ldarg.0
IL_0121: ldflda ""System.Runtime.CompilerServices.AsyncVoidMethodBuilder TestCase.<Run>d__1.<>t__builder""
IL_0126: call ""void System.Runtime.CompilerServices.AsyncVoidMethodBuilder.SetResult()""
IL_012b: nop
IL_012c: ret
}",
sequencePoints: "TestCase+<Run>d__1.MoveNext");
v.VerifyPdb(@"
<symbols>
v.VerifyPdb(@"<symbols>
<methods>
<method containingType=""DynamicMembers"" name=""get_Prop"">
<sequencePoints>
......@@ -267,8 +264,8 @@ .maxstack 3
<customDebugInfo>
<forward declaringType=""TestCase"" methodName="".cctor"" />
<hoistedLocalScopes>
<slot startOffset=""0x0"" endOffset=""0x12e"" />
<slot startOffset=""0x0"" endOffset=""0x12e"" />
<slot startOffset=""0x0"" endOffset=""0x12c"" />
<slot startOffset=""0x0"" endOffset=""0x12c"" />
</hoistedLocalScopes>
<encLocalSlotMap>
<slot kind=""27"" offset=""0"" />
......@@ -290,14 +287,14 @@ .maxstack 3
<entry offset=""0xca"" startLine=""18"" startColumn=""9"" endLine=""18"" endColumn=""23"" />
<entry offset=""0xd5"" hidden=""true"" />
<entry offset=""0xd9"" startLine=""18"" startColumn=""24"" endLine=""18"" endColumn=""32"" />
<entry offset=""0xe7"" startLine=""20"" startColumn=""9"" endLine=""20"" endColumn=""44"" />
<entry offset=""0xf3"" startLine=""22"" startColumn=""9"" endLine=""22"" endColumn=""38"" />
<entry offset=""0x100"" hidden=""true"" />
<entry offset=""0x11a"" startLine=""23"" startColumn=""5"" endLine=""23"" endColumn=""6"" />
<entry offset=""0x122"" hidden=""true"" />
<entry offset=""0xe5"" startLine=""20"" startColumn=""9"" endLine=""20"" endColumn=""44"" />
<entry offset=""0xf1"" startLine=""22"" startColumn=""9"" endLine=""22"" endColumn=""38"" />
<entry offset=""0xfe"" hidden=""true"" />
<entry offset=""0x118"" startLine=""23"" startColumn=""5"" endLine=""23"" endColumn=""6"" />
<entry offset=""0x120"" hidden=""true"" />
</sequencePoints>
<asyncInfo>
<catchHandler offset=""0x100"" />
<catchHandler offset=""0xfe"" />
<kickoffMethod declaringType=""TestCase"" methodName=""Run"" />
<await yield=""0x6d"" resume=""0x8b"" declaringType=""TestCase+&lt;Run&gt;d__1"" methodName=""MoveNext"" />
</asyncInfo>
......
......@@ -1084,8 +1084,7 @@ public static void Main(string[] args)
}
}";
var c = CreateCompilationWithMscorlibAndSystemCore(source, options: TestOptions.DebugDll);
c.VerifyPdb(@"
<symbols>
c.VerifyPdb(@"<symbols>
<methods>
<method containingType=""Test"" name=""Main"" parameterNames=""args"">
<customDebugInfo>
......@@ -1098,15 +1097,15 @@ public static void Main(string[] args)
<bucket flagCount=""2"" flags=""01"" slotId=""4"" localName=""scoreQuery1"" />
<bucket flagCount=""1"" flags=""1"" slotId=""5"" localName=""scoreQuery2"" />
<bucket flagCount=""1"" flags=""1"" slotId=""6"" localName=""dInWhile"" />
<bucket flagCount=""1"" flags=""1"" slotId=""9"" localName=""dInDoWhile"" />
<bucket flagCount=""1"" flags=""1"" slotId=""14"" localName=""dInForEach"" />
<bucket flagCount=""1"" flags=""1"" slotId=""16"" localName=""dInFor"" />
<bucket flagCount=""1"" flags=""1"" slotId=""18"" localName=""d"" />
<bucket flagCount=""1"" flags=""1"" slotId=""20"" localName=""dInIf"" />
<bucket flagCount=""1"" flags=""1"" slotId=""21"" localName=""dInElse"" />
<bucket flagCount=""1"" flags=""1"" slotId=""22"" localName=""dInTry"" />
<bucket flagCount=""1"" flags=""1"" slotId=""23"" localName=""dInCatch"" />
<bucket flagCount=""1"" flags=""1"" slotId=""24"" localName=""dInFinally"" />
<bucket flagCount=""1"" flags=""1"" slotId=""8"" localName=""dInDoWhile"" />
<bucket flagCount=""1"" flags=""1"" slotId=""13"" localName=""dInForEach"" />
<bucket flagCount=""1"" flags=""1"" slotId=""15"" localName=""dInFor"" />
<bucket flagCount=""1"" flags=""1"" slotId=""17"" localName=""d"" />
<bucket flagCount=""1"" flags=""1"" slotId=""19"" localName=""dInIf"" />
<bucket flagCount=""1"" flags=""1"" slotId=""20"" localName=""dInElse"" />
<bucket flagCount=""1"" flags=""1"" slotId=""21"" localName=""dInTry"" />
<bucket flagCount=""1"" flags=""1"" slotId=""22"" localName=""dInCatch"" />
<bucket flagCount=""1"" flags=""1"" slotId=""23"" localName=""dInFinally"" />
</dynamicLocals>
<encLocalSlotMap>
<slot kind=""0"" offset=""15"" />
......@@ -1116,7 +1115,6 @@ public static void Main(string[] args)
<slot kind=""0"" offset=""1071"" />
<slot kind=""0"" offset=""1163"" />
<slot kind=""0"" offset=""261"" />
<slot kind=""temp"" />
<slot kind=""1"" offset=""214"" />
<slot kind=""0"" offset=""345"" />
<slot kind=""1"" offset=""310"" />
......@@ -1150,65 +1148,65 @@ public static void Main(string[] args)
<entry offset=""0x5b"" hidden=""true"" />
<entry offset=""0x5d"" startLine=""14"" startColumn=""9"" endLine=""14"" endColumn=""10"" />
<entry offset=""0x5e"" startLine=""16"" startColumn=""13"" endLine=""16"" endColumn=""18"" />
<entry offset=""0x66"" startLine=""17"" startColumn=""9"" endLine=""17"" endColumn=""10"" />
<entry offset=""0x67"" startLine=""13"" startColumn=""9"" endLine=""13"" endColumn=""23"" />
<entry offset=""0x6d"" hidden=""true"" />
<entry offset=""0x71"" startLine=""19"" startColumn=""9"" endLine=""19"" endColumn=""10"" />
<entry offset=""0x72"" startLine=""21"" startColumn=""13"" endLine=""21"" endColumn=""18"" />
<entry offset=""0x7a"" startLine=""22"" startColumn=""9"" endLine=""22"" endColumn=""10"" />
<entry offset=""0x7b"" startLine=""22"" startColumn=""11"" endLine=""22"" endColumn=""26"" />
<entry offset=""0x81"" hidden=""true"" />
<entry offset=""0x85"" startLine=""23"" startColumn=""9"" endLine=""23"" endColumn=""16"" />
<entry offset=""0x86"" startLine=""23"" startColumn=""27"" endLine=""23"" endColumn=""33"" />
<entry offset=""0x8c"" hidden=""true"" />
<entry offset=""0x8e"" startLine=""23"" startColumn=""18"" endLine=""23"" endColumn=""23"" />
<entry offset=""0x95"" startLine=""24"" startColumn=""9"" endLine=""24"" endColumn=""10"" />
<entry offset=""0x96"" startLine=""26"" startColumn=""9"" endLine=""26"" endColumn=""10"" />
<entry offset=""0x97"" hidden=""true"" />
<entry offset=""0x9d"" startLine=""23"" startColumn=""24"" endLine=""23"" endColumn=""26"" />
<entry offset=""0xa5"" startLine=""27"" startColumn=""14"" endLine=""27"" endColumn=""23"" />
<entry offset=""0xa8"" hidden=""true"" />
<entry offset=""0xaa"" startLine=""28"" startColumn=""9"" endLine=""28"" endColumn=""10"" />
<entry offset=""0xab"" startLine=""30"" startColumn=""9"" endLine=""30"" endColumn=""10"" />
<entry offset=""0xac"" startLine=""27"" startColumn=""32"" endLine=""27"" endColumn=""35"" />
<entry offset=""0xb6"" startLine=""27"" startColumn=""25"" endLine=""27"" endColumn=""30"" />
<entry offset=""0xbd"" hidden=""true"" />
<entry offset=""0xc1"" startLine=""31"" startColumn=""14"" endLine=""31"" endColumn=""29"" />
<entry offset=""0xc8"" hidden=""true"" />
<entry offset=""0xca"" startLine=""32"" startColumn=""9"" endLine=""32"" endColumn=""10"" />
<entry offset=""0xcb"" startLine=""34"" startColumn=""9"" endLine=""34"" endColumn=""10"" />
<entry offset=""0xcc"" hidden=""true"" />
<entry offset=""0x62"" startLine=""17"" startColumn=""9"" endLine=""17"" endColumn=""10"" />
<entry offset=""0x63"" startLine=""13"" startColumn=""9"" endLine=""13"" endColumn=""23"" />
<entry offset=""0x69"" hidden=""true"" />
<entry offset=""0x6d"" startLine=""19"" startColumn=""9"" endLine=""19"" endColumn=""10"" />
<entry offset=""0x6e"" startLine=""21"" startColumn=""13"" endLine=""21"" endColumn=""18"" />
<entry offset=""0x72"" startLine=""22"" startColumn=""9"" endLine=""22"" endColumn=""10"" />
<entry offset=""0x73"" startLine=""22"" startColumn=""11"" endLine=""22"" endColumn=""26"" />
<entry offset=""0x79"" hidden=""true"" />
<entry offset=""0x7d"" startLine=""23"" startColumn=""9"" endLine=""23"" endColumn=""16"" />
<entry offset=""0x7e"" startLine=""23"" startColumn=""27"" endLine=""23"" endColumn=""33"" />
<entry offset=""0x84"" hidden=""true"" />
<entry offset=""0x86"" startLine=""23"" startColumn=""18"" endLine=""23"" endColumn=""23"" />
<entry offset=""0x8d"" startLine=""24"" startColumn=""9"" endLine=""24"" endColumn=""10"" />
<entry offset=""0x8e"" startLine=""26"" startColumn=""9"" endLine=""26"" endColumn=""10"" />
<entry offset=""0x8f"" hidden=""true"" />
<entry offset=""0x95"" startLine=""23"" startColumn=""24"" endLine=""23"" endColumn=""26"" />
<entry offset=""0x9d"" startLine=""27"" startColumn=""14"" endLine=""27"" endColumn=""23"" />
<entry offset=""0xa0"" hidden=""true"" />
<entry offset=""0xa2"" startLine=""28"" startColumn=""9"" endLine=""28"" endColumn=""10"" />
<entry offset=""0xa3"" startLine=""30"" startColumn=""9"" endLine=""30"" endColumn=""10"" />
<entry offset=""0xa4"" startLine=""27"" startColumn=""32"" endLine=""27"" endColumn=""35"" />
<entry offset=""0xaa"" startLine=""27"" startColumn=""25"" endLine=""27"" endColumn=""30"" />
<entry offset=""0xb1"" hidden=""true"" />
<entry offset=""0xb5"" startLine=""31"" startColumn=""14"" endLine=""31"" endColumn=""29"" />
<entry offset=""0xbc"" hidden=""true"" />
<entry offset=""0xbe"" startLine=""32"" startColumn=""9"" endLine=""32"" endColumn=""10"" />
<entry offset=""0xbf"" startLine=""34"" startColumn=""9"" endLine=""34"" endColumn=""10"" />
<entry offset=""0xc0"" hidden=""true"" />
</sequencePoints>
<scope startOffset=""0x0"" endOffset=""0xce"">
<scope startOffset=""0x0"" endOffset=""0xc2"">
<namespace name=""System"" />
<namespace name=""System.Collections.Generic"" />
<namespace name=""System.Linq"" />
<local name=""d1"" il_index=""0"" il_start=""0x0"" il_end=""0xce"" attributes=""0"" />
<local name=""arrInt"" il_index=""1"" il_start=""0x0"" il_end=""0xce"" attributes=""0"" />
<local name=""scores"" il_index=""2"" il_start=""0x0"" il_end=""0xce"" attributes=""0"" />
<local name=""arrDynamic"" il_index=""3"" il_start=""0x0"" il_end=""0xce"" attributes=""0"" />
<local name=""scoreQuery1"" il_index=""4"" il_start=""0x0"" il_end=""0xce"" attributes=""0"" />
<local name=""scoreQuery2"" il_index=""5"" il_start=""0x0"" il_end=""0xce"" attributes=""0"" />
<scope startOffset=""0x5d"" endOffset=""0x67"">
<local name=""dInWhile"" il_index=""6"" il_start=""0x5d"" il_end=""0x67"" attributes=""0"" />
<local name=""d1"" il_index=""0"" il_start=""0x0"" il_end=""0xc2"" attributes=""0"" />
<local name=""arrInt"" il_index=""1"" il_start=""0x0"" il_end=""0xc2"" attributes=""0"" />
<local name=""scores"" il_index=""2"" il_start=""0x0"" il_end=""0xc2"" attributes=""0"" />
<local name=""arrDynamic"" il_index=""3"" il_start=""0x0"" il_end=""0xc2"" attributes=""0"" />
<local name=""scoreQuery1"" il_index=""4"" il_start=""0x0"" il_end=""0xc2"" attributes=""0"" />
<local name=""scoreQuery2"" il_index=""5"" il_start=""0x0"" il_end=""0xc2"" attributes=""0"" />
<scope startOffset=""0x5d"" endOffset=""0x63"">
<local name=""dInWhile"" il_index=""6"" il_start=""0x5d"" il_end=""0x63"" attributes=""0"" />
</scope>
<scope startOffset=""0x71"" endOffset=""0x7b"">
<local name=""dInDoWhile"" il_index=""9"" il_start=""0x71"" il_end=""0x7b"" attributes=""0"" />
<scope startOffset=""0x6d"" endOffset=""0x73"">
<local name=""dInDoWhile"" il_index=""8"" il_start=""0x6d"" il_end=""0x73"" attributes=""0"" />
</scope>
<scope startOffset=""0x8e"" endOffset=""0x97"">
<local name=""d"" il_index=""13"" il_start=""0x8e"" il_end=""0x97"" attributes=""0"" />
<scope startOffset=""0x95"" endOffset=""0x97"">
<local name=""dInForEach"" il_index=""14"" il_start=""0x95"" il_end=""0x97"" attributes=""0"" />
<scope startOffset=""0x86"" endOffset=""0x8f"">
<local name=""d"" il_index=""12"" il_start=""0x86"" il_end=""0x8f"" attributes=""0"" />
<scope startOffset=""0x8d"" endOffset=""0x8f"">
<local name=""dInForEach"" il_index=""13"" il_start=""0x8d"" il_end=""0x8f"" attributes=""0"" />
</scope>
</scope>
<scope startOffset=""0xa5"" endOffset=""0xc1"">
<local name=""i"" il_index=""15"" il_start=""0xa5"" il_end=""0xc1"" attributes=""0"" />
<scope startOffset=""0xaa"" endOffset=""0xac"">
<local name=""dInFor"" il_index=""16"" il_start=""0xaa"" il_end=""0xac"" attributes=""0"" />
<scope startOffset=""0x9d"" endOffset=""0xb5"">
<local name=""i"" il_index=""14"" il_start=""0x9d"" il_end=""0xb5"" attributes=""0"" />
<scope startOffset=""0xa2"" endOffset=""0xa4"">
<local name=""dInFor"" il_index=""15"" il_start=""0xa2"" il_end=""0xa4"" attributes=""0"" />
</scope>
</scope>
<scope startOffset=""0xc1"" endOffset=""0xce"">
<local name=""d"" il_index=""18"" il_start=""0xc1"" il_end=""0xce"" attributes=""0"" />
<scope startOffset=""0xb5"" endOffset=""0xc2"">
<local name=""d"" il_index=""17"" il_start=""0xb5"" il_end=""0xc2"" attributes=""0"" />
</scope>
</scope>
</method>
......@@ -1858,8 +1856,7 @@ static void nothing(dynamic localArg)
}
";
var c = CreateCompilationWithMscorlibAndSystemCore(source, options: TestOptions.DebugDll);
c.VerifyPdb(@"
<symbols>
c.VerifyPdb(@"<symbols>
<methods>
<method containingType=""Program"" name=""Main"" parameterNames=""args"">
<customDebugInfo>
......@@ -1874,7 +1871,6 @@ static void nothing(dynamic localArg)
<slot kind=""0"" offset=""19"" />
<slot kind=""0"" offset=""44"" />
<slot kind=""0"" offset=""84"" />
<slot kind=""temp"" />
<slot kind=""1"" offset=""36"" />
</encLocalSlotMap>
</customDebugInfo>
......@@ -1885,16 +1881,16 @@ static void nothing(dynamic localArg)
<entry offset=""0x5"" startLine=""10"" startColumn=""9"" endLine=""10"" endColumn=""10"" />
<entry offset=""0x6"" startLine=""10"" startColumn=""26"" endLine=""10"" endColumn=""27"" />
<entry offset=""0x7"" startLine=""9"" startColumn=""33"" endLine=""9"" endColumn=""36"" />
<entry offset=""0xd"" startLine=""9"" startColumn=""24"" endLine=""9"" endColumn=""30"" />
<entry offset=""0x14"" hidden=""true"" />
<entry offset=""0x18"" startLine=""11"" startColumn=""5"" endLine=""11"" endColumn=""6"" />
<entry offset=""0xb"" startLine=""9"" startColumn=""24"" endLine=""9"" endColumn=""30"" />
<entry offset=""0x11"" hidden=""true"" />
<entry offset=""0x14"" startLine=""11"" startColumn=""5"" endLine=""11"" endColumn=""6"" />
</sequencePoints>
<scope startOffset=""0x0"" endOffset=""0x19"">
<scope startOffset=""0x0"" endOffset=""0x15"">
<namespace name=""System"" />
<namespace name=""System.Collections.Generic"" />
<local name=""simple"" il_index=""0"" il_start=""0x0"" il_end=""0x19"" attributes=""0"" />
<scope startOffset=""0x1"" endOffset=""0x18"">
<local name=""x"" il_index=""1"" il_start=""0x1"" il_end=""0x18"" attributes=""0"" />
<local name=""simple"" il_index=""0"" il_start=""0x0"" il_end=""0x15"" attributes=""0"" />
<scope startOffset=""0x1"" endOffset=""0x14"">
<local name=""x"" il_index=""1"" il_start=""0x1"" il_end=""0x14"" attributes=""0"" />
<scope startOffset=""0x5"" endOffset=""0x7"">
<local name=""inner"" il_index=""2"" il_start=""0x5"" il_end=""0x7"" attributes=""0"" />
</scope>
......@@ -1920,8 +1916,7 @@ static void nothing(dynamic localArg)
</scope>
</method>
</methods>
</symbols>
");
</symbols>");
}
[WorkItem(637465, "DevDiv")]
......
......@@ -1453,8 +1453,7 @@ static void M()
}
}";
var c = CreateCompilationWithMscorlibAndSystemCore(source, options: TestOptions.DebugDll);
c.VerifyPdb("C.M", @"
<symbols>
c.VerifyPdb("C.M", @"<symbols>
<methods>
<method containingType=""C"" name=""M"">
<customDebugInfo>
......@@ -1463,7 +1462,6 @@ static void M()
</using>
<encLocalSlotMap>
<slot kind=""0"" offset=""15"" />
<slot kind=""temp"" />
</encLocalSlotMap>
</customDebugInfo>
<sequencePoints>
......@@ -1474,15 +1472,14 @@ static void M()
<entry offset=""0x6"" startLine=""9"" startColumn=""13"" endLine=""9"" endColumn=""41"" />
<entry offset=""0xd"" startLine=""10"" startColumn=""9"" endLine=""10"" endColumn=""10"" />
<entry offset=""0xe"" startLine=""7"" startColumn=""16"" endLine=""7"" endColumn=""19"" />
<entry offset=""0x14"" hidden=""true"" />
<entry offset=""0x12"" hidden=""true"" />
</sequencePoints>
<scope startOffset=""0x0"" endOffset=""0x16"">
<local name=""i"" il_index=""0"" il_start=""0x0"" il_end=""0x16"" attributes=""0"" />
<scope startOffset=""0x0"" endOffset=""0x14"">
<local name=""i"" il_index=""0"" il_start=""0x0"" il_end=""0x14"" attributes=""0"" />
</scope>
</method>
</methods>
</symbols>
");
</symbols>");
}
#endregion
......@@ -3747,8 +3744,7 @@ static void Main()
}
";
var c = CreateCompilationWithMscorlibAndSystemCore(source, options: TestOptions.UnsafeDebugExe);
c.VerifyPdb(@"
<symbols>
c.VerifyPdb(@"<symbols>
<entryPoint declaringType=""C"" methodName=""Main"" />
<methods>
<method containingType=""C"" name=""Main"">
......@@ -3760,8 +3756,6 @@ static void Main()
<slot kind=""0"" offset=""13"" />
<slot kind=""0"" offset=""79"" />
<slot kind=""temp"" />
<slot kind=""temp"" />
<slot kind=""temp"" />
</encLocalSlotMap>
</customDebugInfo>
<sequencePoints>
......@@ -3771,16 +3765,16 @@ static void Main()
<entry offset=""0x15"" startLine=""12"" startColumn=""16"" endLine=""12"" endColumn=""28"" />
<entry offset=""0x31"" startLine=""13"" startColumn=""9"" endLine=""13"" endColumn=""10"" />
<entry offset=""0x32"" startLine=""14"" startColumn=""13"" endLine=""14"" endColumn=""20"" />
<entry offset=""0x3f"" startLine=""15"" startColumn=""9"" endLine=""15"" endColumn=""10"" />
<entry offset=""0x40"" hidden=""true"" />
<entry offset=""0x43"" startLine=""16"" startColumn=""9"" endLine=""16"" endColumn=""31"" />
<entry offset=""0x51"" startLine=""17"" startColumn=""5"" endLine=""17"" endColumn=""6"" />
<entry offset=""0x39"" startLine=""15"" startColumn=""9"" endLine=""15"" endColumn=""10"" />
<entry offset=""0x3a"" hidden=""true"" />
<entry offset=""0x3d"" startLine=""16"" startColumn=""9"" endLine=""16"" endColumn=""31"" />
<entry offset=""0x4b"" startLine=""17"" startColumn=""5"" endLine=""17"" endColumn=""6"" />
</sequencePoints>
<scope startOffset=""0x0"" endOffset=""0x52"">
<scope startOffset=""0x0"" endOffset=""0x4c"">
<namespace name=""System"" />
<local name=""c"" il_index=""0"" il_start=""0x0"" il_end=""0x52"" attributes=""0"" />
<scope startOffset=""0x15"" endOffset=""0x43"">
<local name=""p"" il_index=""1"" il_start=""0x15"" il_end=""0x43"" attributes=""0"" />
<local name=""c"" il_index=""0"" il_start=""0x0"" il_end=""0x4c"" attributes=""0"" />
<scope startOffset=""0x15"" endOffset=""0x3d"">
<local name=""p"" il_index=""1"" il_start=""0x15"" il_end=""0x3d"" attributes=""0"" />
</scope>
</scope>
</method>
......
......@@ -81,11 +81,9 @@ void M(int[] a)
// Code size 2 (0x2)
.maxstack 1
.locals init (string V_0, //b
int& V_1,
int V_2,
C V_3,
bool V_4,
int V_5) //c
C V_1,
bool V_2,
int V_3) //c
IL_0000: ldarg.0
IL_0001: ret
}");
......@@ -94,11 +92,9 @@ .maxstack 1
// Code size 2 (0x2)
.maxstack 1
.locals init (string V_0, //b
int& V_1,
int V_2,
C V_3,
bool V_4,
int V_5) //c
C V_1,
bool V_2,
int V_3) //c
IL_0000: ldarg.1
IL_0001: ret
}");
......@@ -107,26 +103,23 @@ .maxstack 1
// Code size 2 (0x2)
.maxstack 1
.locals init (string V_0, //b
int& V_1,
int V_2,
C V_3,
bool V_4,
int V_5) //c
C V_1,
bool V_2,
int V_3) //c
IL_0000: ldloc.0
IL_0001: ret
}");
}
");
VerifyLocal(testData, typeName, locals[3], "<>m3", "c", expectedILOpt:
@"{
// Code size 3 (0x3)
// Code size 2 (0x2)
.maxstack 1
.locals init (string V_0, //b
int& V_1,
int V_2,
C V_3,
bool V_4,
int V_5) //c
IL_0000: ldloc.s V_5
IL_0002: ret
C V_1,
bool V_2,
int V_3) //c
IL_0000: ldloc.3
IL_0001: ret
}");
locals.Free();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册