Skip to content

Commit

Permalink
Tweak comment and fix two tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jcouv committed Jun 27, 2017
1 parent 11f2783 commit 127f65a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ private BoundExpression RewriteDeconstruction(BoundTupleExpression left, Convers
var last = effects.PopLast();
if (last is null)
{
// Deconstructions with no effects lower to nothing. For example, `(_, _) = (1, 2);`
result = null;
}
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8311,7 +8311,7 @@ .maxstack 2

diff2.VerifyIL("C.G", @"
{
// Code size 63 (0x3f)
// Code size 61 (0x3d)
.maxstack 2
.locals init ([unchanged] V_0,
[int] V_1,
Expand All @@ -8331,32 +8331,30 @@ .maxstack 2
IL_0007: stloc.s V_9
IL_0009: ldc.i4.0
IL_000a: stloc.s V_10
IL_000c: br.s IL_0036
IL_000c: br.s IL_0034
IL_000e: ldloc.s V_9
IL_0010: ldloc.s V_10
IL_0012: ldelem ""System.ValueTuple<int, (bool, double)>""
IL_0017: dup
IL_0018: ldfld ""int System.ValueTuple<int, (bool, double)>.Item1""
IL_001d: stloc.2
IL_001e: dup
IL_001f: ldfld ""(bool, double) System.ValueTuple<int, (bool, double)>.Item2""
IL_0024: stloc.s V_11
IL_0026: pop
IL_0027: nop
IL_0028: ldloc.2
IL_0029: call ""void System.Console.WriteLine(int)""
IL_002e: nop
IL_002f: nop
IL_0030: ldloc.s V_10
IL_0032: ldc.i4.1
IL_0033: add
IL_0034: stloc.s V_10
IL_0036: ldloc.s V_10
IL_0038: ldloc.s V_9
IL_003a: ldlen
IL_003b: conv.i4
IL_003c: blt.s IL_000e
IL_003e: ret
IL_001e: ldfld ""(bool, double) System.ValueTuple<int, (bool, double)>.Item2""
IL_0023: stloc.s V_11
IL_0025: nop
IL_0026: ldloc.2
IL_0027: call ""void System.Console.WriteLine(int)""
IL_002c: nop
IL_002d: nop
IL_002e: ldloc.s V_10
IL_0030: ldc.i4.1
IL_0031: add
IL_0032: stloc.s V_10
IL_0034: ldloc.s V_10
IL_0036: ldloc.s V_9
IL_0038: ldlen
IL_0039: conv.i4
IL_003a: blt.s IL_000e
IL_003c: ret
}
");
}
Expand Down
20 changes: 10 additions & 10 deletions src/Compilers/CSharp/Test/Emit/PDB/PDBTupleTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,17 +246,17 @@ static void F(System.Collections.Generic.IEnumerable<(int a, int b)> ie)
<entry offset=""0x2"" startLine=""8"" startColumn=""13"" endLine=""8"" endColumn=""15"" />
<entry offset=""0x9"" hidden=""true"" />
<entry offset=""0xb"" startLine=""6"" startColumn=""13"" endLine=""6"" endColumn=""23"" />
<entry offset=""0x20"" startLine=""9"" startColumn=""9"" endLine=""9"" endColumn=""10"" />
<entry offset=""0x21"" startLine=""10"" startColumn=""9"" endLine=""10"" endColumn=""10"" />
<entry offset=""0x22"" startLine=""7"" startColumn=""13"" endLine=""7"" endColumn=""15"" />
<entry offset=""0x2c"" hidden=""true"" />
<entry offset=""0x36"" hidden=""true"" />
<entry offset=""0x37"" startLine=""11"" startColumn=""5"" endLine=""11"" endColumn=""6"" />
<entry offset=""0x1e"" startLine=""9"" startColumn=""9"" endLine=""9"" endColumn=""10"" />
<entry offset=""0x1f"" startLine=""10"" startColumn=""9"" endLine=""10"" endColumn=""10"" />
<entry offset=""0x20"" startLine=""7"" startColumn=""13"" endLine=""7"" endColumn=""15"" />
<entry offset=""0x2a"" hidden=""true"" />
<entry offset=""0x34"" hidden=""true"" />
<entry offset=""0x35"" startLine=""11"" startColumn=""5"" endLine=""11"" endColumn=""6"" />
</sequencePoints>
<scope startOffset=""0x0"" endOffset=""0x38"">
<scope startOffset=""0xb"" endOffset=""0x22"">
<local name=""a"" il_index=""1"" il_start=""0xb"" il_end=""0x22"" attributes=""0"" />
<local name=""b"" il_index=""2"" il_start=""0xb"" il_end=""0x22"" attributes=""0"" />
<scope startOffset=""0x0"" endOffset=""0x36"">
<scope startOffset=""0xb"" endOffset=""0x20"">
<local name=""a"" il_index=""1"" il_start=""0xb"" il_end=""0x20"" attributes=""0"" />
<local name=""b"" il_index=""2"" il_start=""0xb"" il_end=""0x20"" attributes=""0"" />
</scope>
</scope>
</method>
Expand Down

0 comments on commit 127f65a

Please sign in to comment.