Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed generation of PrivateImplementationDetails to append module name... #1546

Merged
merged 2 commits into from
Mar 25, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ public void AssignTemplatesNamesAndCompile(MethodCompiler compiler, PEModuleBuil
moduleId = moduleId.Substring(0, moduleId.Length - extension.Length);
}

moduleId = moduleId.Replace('.', '_');
moduleId = MetadataHelpers.MangleForTypeNameIfNeeded(moduleId);
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ .locals init (double[,] V_0,
IL_0001: ldc.i4.4
IL_0002: newobj ""double[*,*]..ctor""
IL_0007: dup
IL_0008: ldtoken ""<PrivateImplementationDetails><MODULE>.__StaticArrayInitTypeSize=64 <PrivateImplementationDetails><MODULE>.E19C080DB8DAB85AF7CA3EF40FFB01B0778F9D25""
IL_0008: ldtoken ""<PrivateImplementationDetails>.__StaticArrayInitTypeSize=64 <PrivateImplementationDetails>.E19C080DB8DAB85AF7CA3EF40FFB01B0778F9D25""
IL_000d: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_0012: stloc.0
IL_0013: ldloc.0
Expand Down
38 changes: 19 additions & 19 deletions src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3241,7 +3241,7 @@ .locals init (int[] V_0) //arr
IL_0000: ldc.i4.4
IL_0001: newarr ""int""
IL_0006: dup
IL_0007: ldtoken ""<PrivateImplementationDetails><MODULE>.__StaticArrayInitTypeSize=16 <PrivateImplementationDetails><MODULE>.42F1B77334EDFA917032CCF8353020C73F8C62E1""
IL_0007: ldtoken ""<PrivateImplementationDetails>.__StaticArrayInitTypeSize=16 <PrivateImplementationDetails>.42F1B77334EDFA917032CCF8353020C73F8C62E1""
IL_000c: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_0011: stloc.0
IL_0012: ldloc.0
Expand Down Expand Up @@ -3560,7 +3560,7 @@ static void Main()
");

#region IL
// Can NOT compare IL because the Guid is different every time - <PrivateImplementationDetails><MODULE>{a6c2d596-042b-4294-99ab-d34a2758ec15}
// Can NOT compare IL because the Guid is different every time - <PrivateImplementationDetails>{a6c2d596-042b-4294-99ab-d34a2758ec15}
#if false
compilation.VerifyIL("MyArray.Main",
@"{
Expand Down Expand Up @@ -3594,7 +3594,7 @@ .locals init (sbyte[] V_0, //a1
IL_0028: ldc.i4.3
IL_0029: newarr ""byte""
IL_002e: dup
IL_002f: ldtoken ""<PrivateImplementationDetails><MODULE>{a6c2d596-042b-4294-99ab-d34a2758ec15}.__StaticArrayInitTypeSize=3 <PrivateImplementationDetails><MODULE>{a6c2d596-042b-4294-99ab-d34a2758ec15}.0""
IL_002f: ldtoken ""<PrivateImplementationDetails>{a6c2d596-042b-4294-99ab-d34a2758ec15}.__StaticArrayInitTypeSize=3 <PrivateImplementationDetails>{a6c2d596-042b-4294-99ab-d34a2758ec15}.0""
IL_0034: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_0039: ldc.i4.0
IL_003a: ldelem.u1
Expand All @@ -3620,7 +3620,7 @@ .locals init (sbyte[] V_0, //a1
IL_005f: ldc.i4.3
IL_0060: newarr ""short""
IL_0065: dup
IL_0066: ldtoken ""<PrivateImplementationDetails><MODULE>{a6c2d596-042b-4294-99ab-d34a2758ec15}.__StaticArrayInitTypeSize=6 <PrivateImplementationDetails><MODULE>{a6c2d596-042b-4294-99ab-d34a2758ec15}.1""
IL_0066: ldtoken ""<PrivateImplementationDetails>{a6c2d596-042b-4294-99ab-d34a2758ec15}.__StaticArrayInitTypeSize=6 <PrivateImplementationDetails>{a6c2d596-042b-4294-99ab-d34a2758ec15}.1""
IL_006b: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_0070: stelem.ref
IL_0071: ldc.i4.1
Expand Down Expand Up @@ -6406,7 +6406,7 @@ .maxstack 3
IL_0000: ldc.i4.5
IL_0001: newarr ""int""
IL_0006: dup
IL_0007: ldtoken ""<PrivateImplementationDetails><MODULE>.__StaticArrayInitTypeSize=20 <PrivateImplementationDetails><MODULE>.56C14CB445C628421AC674599E302B0879FB496F""
IL_0007: ldtoken ""<PrivateImplementationDetails>.__StaticArrayInitTypeSize=20 <PrivateImplementationDetails>.56C14CB445C628421AC674599E302B0879FB496F""
IL_000c: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_0011: dup
IL_0012: ldc.i4.2
Expand All @@ -6418,7 +6418,7 @@ .maxstack 3
IL_0020: ldc.i4.5
IL_0021: newarr ""bool""
IL_0026: dup
IL_0027: ldtoken ""<PrivateImplementationDetails><MODULE>.__StaticArrayInitTypeSize=5 <PrivateImplementationDetails><MODULE>.4E724558F6B816715597A51663AD8F05247E2C4A""
IL_0027: ldtoken ""<PrivateImplementationDetails>.__StaticArrayInitTypeSize=5 <PrivateImplementationDetails>.4E724558F6B816715597A51663AD8F05247E2C4A""
IL_002c: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_0031: dup
IL_0032: ldc.i4.2
Expand All @@ -6430,7 +6430,7 @@ .maxstack 3
IL_0040: ldc.i4.5
IL_0041: newarr ""byte""
IL_0046: dup
IL_0047: ldtoken ""<PrivateImplementationDetails><MODULE>.__StaticArrayInitTypeSize=5 <PrivateImplementationDetails><MODULE>.9755240DD0C4C1AD226DEBD40C6D2EBD408250CB""
IL_0047: ldtoken ""<PrivateImplementationDetails>.__StaticArrayInitTypeSize=5 <PrivateImplementationDetails>.9755240DD0C4C1AD226DEBD40C6D2EBD408250CB""
IL_004c: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_0051: dup
IL_0052: ldc.i4.2
Expand All @@ -6442,7 +6442,7 @@ .maxstack 3
IL_0060: ldc.i4.5
IL_0061: newarr ""char""
IL_0066: dup
IL_0067: ldtoken ""<PrivateImplementationDetails><MODULE>.__StaticArrayInitTypeSize=10 <PrivateImplementationDetails><MODULE>.E313A2813013780396D58750DC5D62221C86F42F""
IL_0067: ldtoken ""<PrivateImplementationDetails>.__StaticArrayInitTypeSize=10 <PrivateImplementationDetails>.E313A2813013780396D58750DC5D62221C86F42F""
IL_006c: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_0071: dup
IL_0072: ldc.i4.2
Expand All @@ -6454,7 +6454,7 @@ .maxstack 3
IL_0080: ldc.i4.5
IL_0081: newarr ""float""
IL_0086: dup
IL_0087: ldtoken ""<PrivateImplementationDetails><MODULE>.__StaticArrayInitTypeSize=20 <PrivateImplementationDetails><MODULE>.2F3DD953DBFB23217E7CE0E76630EBD31267E237""
IL_0087: ldtoken ""<PrivateImplementationDetails>.__StaticArrayInitTypeSize=20 <PrivateImplementationDetails>.2F3DD953DBFB23217E7CE0E76630EBD31267E237""
IL_008c: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_0091: dup
IL_0092: ldc.i4.2
Expand All @@ -6466,7 +6466,7 @@ .maxstack 3
IL_00a0: ldc.i4.5
IL_00a1: newarr ""double""
IL_00a6: dup
IL_00a7: ldtoken ""<PrivateImplementationDetails><MODULE>.__StaticArrayInitTypeSize=40 <PrivateImplementationDetails><MODULE>.11F3436B917FFBA0FAB0FAD5563AF18FA24AC16A""
IL_00a7: ldtoken ""<PrivateImplementationDetails>.__StaticArrayInitTypeSize=40 <PrivateImplementationDetails>.11F3436B917FFBA0FAB0FAD5563AF18FA24AC16A""
IL_00ac: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_00b1: dup
IL_00b2: ldc.i4.2
Expand Down Expand Up @@ -6500,7 +6500,7 @@ public static void Main()
}
";
var compilation = CompileAndVerify(source, options: TestOptions.ReleaseExe.WithModuleName("MODULE"), expectedOutput: @"3-5");
//string pid = "<PrivateImplementationDetails><MODULE>" + compilation.Compilation.SourceModule.Pers
//string pid = "<PrivateImplementationDetails>" + compilation.Compilation.SourceModule.Pers
compilation.VerifyIL("D.Main",
@"{
// Code size 73 (0x49)
Expand All @@ -6509,7 +6509,7 @@ .locals init (int[] V_0) //x
IL_0000: ldc.i4.5
IL_0001: newarr ""int""
IL_0006: dup
IL_0007: ldtoken ""<PrivateImplementationDetails><MODULE>.__StaticArrayInitTypeSize=20 <PrivateImplementationDetails><MODULE>.FF942E5F620FC460CF9424D564C73AD8A99C74EE""
IL_0007: ldtoken ""<PrivateImplementationDetails>.__StaticArrayInitTypeSize=20 <PrivateImplementationDetails>.FF942E5F620FC460CF9424D564C73AD8A99C74EE""
IL_000c: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_0011: dup
IL_0012: ldc.i4.2
Expand All @@ -6524,7 +6524,7 @@ .locals init (int[] V_0) //x
IL_0027: ldc.i4.5
IL_0028: newarr ""int""
IL_002d: dup
IL_002e: ldtoken ""<PrivateImplementationDetails><MODULE>.__StaticArrayInitTypeSize=20 <PrivateImplementationDetails><MODULE>.89E37886EEEDC70AEF61138E037CC60EFC35535F""
IL_002e: ldtoken ""<PrivateImplementationDetails>.__StaticArrayInitTypeSize=20 <PrivateImplementationDetails>.89E37886EEEDC70AEF61138E037CC60EFC35535F""
IL_0033: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_0038: dup
IL_0039: ldc.i4.4
Expand Down Expand Up @@ -6562,7 +6562,7 @@ public static void Main()
}
";
var compilation = CompileAndVerify(source, options: TestOptions.ReleaseExe.WithModuleName("MODULE"), expectedOutput: @"30");
//string pid = "<PrivateImplementationDetails><MODULE>" + compilation.Compilation.SourceModule.Pers
//string pid = "<PrivateImplementationDetails>" + compilation.Compilation.SourceModule.Pers
compilation.VerifyIL("D.Main",
@"{
// Code size 82 (0x52)
Expand Down Expand Up @@ -6592,7 +6592,7 @@ .locals init (int[] V_0) //x
IL_002e: ldc.i4.s 15
IL_0030: newarr ""int""
IL_0035: dup
IL_0036: ldtoken ""<PrivateImplementationDetails><MODULE>.__StaticArrayInitTypeSize=60 <PrivateImplementationDetails><MODULE>.49608711F905702F9F227AA782F8B408777D5DF9""
IL_0036: ldtoken ""<PrivateImplementationDetails>.__StaticArrayInitTypeSize=60 <PrivateImplementationDetails>.49608711F905702F9F227AA782F8B408777D5DF9""
IL_003b: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_0040: dup
IL_0041: ldc.i4.s 12
Expand Down Expand Up @@ -6728,7 +6728,7 @@ .maxstack 3
IL_0000: ldc.i4.5
IL_0001: newarr ""System.TypeCode""
IL_0006: dup
IL_0007: ldtoken ""<PrivateImplementationDetails><MODULE>.__StaticArrayInitTypeSize=20 <PrivateImplementationDetails><MODULE>.3191FF614021ADF3122AC274EA5B6097C21BEB81""
IL_0007: ldtoken ""<PrivateImplementationDetails>.__StaticArrayInitTypeSize=20 <PrivateImplementationDetails>.3191FF614021ADF3122AC274EA5B6097C21BEB81""
IL_000c: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_0011: dup
IL_0012: ldc.i4.1
Expand Down Expand Up @@ -7301,7 +7301,7 @@ .locals init (Program.C V_0, //obj
IL_0085: ldc.i4.4
IL_0086: newarr ""ushort""
IL_008b: dup
IL_008c: ldtoken ""long <PrivateImplementationDetails><MODULE>.E9E8A66A117598333ABACF5B65971C2366E19B6C""
IL_008c: ldtoken ""long <PrivateImplementationDetails>.E9E8A66A117598333ABACF5B65971C2366E19B6C""
IL_0091: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_0096: callvirt ""uint Program.C.Foo(out short, params ushort[])""
IL_009b: call ""void System.Console.WriteLine(uint)""
Expand Down Expand Up @@ -7534,7 +7534,7 @@ .locals init (int[] V_0) //arr
IL_0001: ldc.i4.5
IL_0002: newarr ""int""
IL_0007: dup
IL_0008: ldtoken ""<PrivateImplementationDetails><MODULE>.__StaticArrayInitTypeSize=20 <PrivateImplementationDetails><MODULE>.1036C5F8EF306104BD582D73E555F4DAE8EECB24""
IL_0008: ldtoken ""<PrivateImplementationDetails>.__StaticArrayInitTypeSize=20 <PrivateImplementationDetails>.1036C5F8EF306104BD582D73E555F4DAE8EECB24""
IL_000d: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_0012: stloc.0
IL_0013: ret
Expand Down Expand Up @@ -13047,7 +13047,7 @@ .maxstack 4
IL_0040: ldc.i4.4
IL_0041: newarr ""bool""
IL_0046: dup
IL_0047: ldtoken ""int <PrivateImplementationDetails><MODULE>.35CCB1599F52363510686EF38B7DB5E7998DB108""
IL_0047: ldtoken ""int <PrivateImplementationDetails>.35CCB1599F52363510686EF38B7DB5E7998DB108""
IL_004c: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_0051: ldc.i4.2
IL_0052: ldelem.u1
Expand Down
16 changes: 8 additions & 8 deletions src/Compilers/CSharp/Test/Emit/CodeGen/IndexerTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -458,15 +458,15 @@ .locals init (C V_0) //c
IL_003f: ldc.i4.3
IL_0040: newarr ""int""
IL_0045: dup
IL_0046: ldtoken ""<PrivateImplementationDetails><MODULE>.__StaticArrayInitTypeSize=12 <PrivateImplementationDetails><MODULE>.E429CCA3F703A39CC5954A6572FEC9086135B34E""
IL_0046: ldtoken ""<PrivateImplementationDetails>.__StaticArrayInitTypeSize=12 <PrivateImplementationDetails>.E429CCA3F703A39CC5954A6572FEC9086135B34E""
IL_004b: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_0050: callvirt ""int C.this[params int[]].get""
IL_0055: pop
IL_0056: ldloc.0
IL_0057: ldc.i4.3
IL_0058: newarr ""int""
IL_005d: dup
IL_005e: ldtoken ""<PrivateImplementationDetails><MODULE>.__StaticArrayInitTypeSize=12 <PrivateImplementationDetails><MODULE>.E429CCA3F703A39CC5954A6572FEC9086135B34E""
IL_005e: ldtoken ""<PrivateImplementationDetails>.__StaticArrayInitTypeSize=12 <PrivateImplementationDetails>.E429CCA3F703A39CC5954A6572FEC9086135B34E""
IL_0063: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_0068: callvirt ""int C.this[params int[]].get""
IL_006d: pop
Expand Down Expand Up @@ -606,15 +606,15 @@ .locals init (C V_0) //c
IL_003f: ldc.i4.3
IL_0040: newarr ""int""
IL_0045: dup
IL_0046: ldtoken ""<PrivateImplementationDetails><MODULE>.__StaticArrayInitTypeSize=12 <PrivateImplementationDetails><MODULE>.E429CCA3F703A39CC5954A6572FEC9086135B34E""
IL_0046: ldtoken ""<PrivateImplementationDetails>.__StaticArrayInitTypeSize=12 <PrivateImplementationDetails>.E429CCA3F703A39CC5954A6572FEC9086135B34E""
IL_004b: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_0050: ldc.i4.4
IL_0051: callvirt ""void C.this[params int[]].set""
IL_0056: ldloc.0
IL_0057: ldc.i4.3
IL_0058: newarr ""int""
IL_005d: dup
IL_005e: ldtoken ""<PrivateImplementationDetails><MODULE>.__StaticArrayInitTypeSize=12 <PrivateImplementationDetails><MODULE>.E429CCA3F703A39CC5954A6572FEC9086135B34E""
IL_005e: ldtoken ""<PrivateImplementationDetails>.__StaticArrayInitTypeSize=12 <PrivateImplementationDetails>.E429CCA3F703A39CC5954A6572FEC9086135B34E""
IL_0063: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_0068: ldc.i4.4
IL_0069: callvirt ""void C.this[params int[]].set""
Expand Down Expand Up @@ -800,7 +800,7 @@ .locals init (C V_0, //c
IL_0084: ldc.i4.3
IL_0085: newarr ""int""
IL_008a: dup
IL_008b: ldtoken ""<PrivateImplementationDetails><MODULE>.__StaticArrayInitTypeSize=12 <PrivateImplementationDetails><MODULE>.E429CCA3F703A39CC5954A6572FEC9086135B34E""
IL_008b: ldtoken ""<PrivateImplementationDetails>.__StaticArrayInitTypeSize=12 <PrivateImplementationDetails>.E429CCA3F703A39CC5954A6572FEC9086135B34E""
IL_0090: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_0095: stloc.3
IL_0096: ldloc.2
Expand All @@ -818,7 +818,7 @@ .locals init (C V_0, //c
IL_00aa: ldc.i4.3
IL_00ab: newarr ""int""
IL_00b0: dup
IL_00b1: ldtoken ""<PrivateImplementationDetails><MODULE>.__StaticArrayInitTypeSize=12 <PrivateImplementationDetails><MODULE>.E429CCA3F703A39CC5954A6572FEC9086135B34E""
IL_00b1: ldtoken ""<PrivateImplementationDetails>.__StaticArrayInitTypeSize=12 <PrivateImplementationDetails>.E429CCA3F703A39CC5954A6572FEC9086135B34E""
IL_00b6: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_00bb: stloc.3
IL_00bc: ldloc.2
Expand Down Expand Up @@ -1030,7 +1030,7 @@ .locals init (C V_0, //c
IL_00a2: ldc.i4.3
IL_00a3: newarr ""int""
IL_00a8: dup
IL_00a9: ldtoken ""<PrivateImplementationDetails><MODULE>.__StaticArrayInitTypeSize=12 <PrivateImplementationDetails><MODULE>.E429CCA3F703A39CC5954A6572FEC9086135B34E""
IL_00a9: ldtoken ""<PrivateImplementationDetails>.__StaticArrayInitTypeSize=12 <PrivateImplementationDetails>.E429CCA3F703A39CC5954A6572FEC9086135B34E""
IL_00ae: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_00b3: stloc.2
IL_00b4: ldloc.1
Expand All @@ -1047,7 +1047,7 @@ .locals init (C V_0, //c
IL_00cb: ldc.i4.3
IL_00cc: newarr ""int""
IL_00d1: dup
IL_00d2: ldtoken ""<PrivateImplementationDetails><MODULE>.__StaticArrayInitTypeSize=12 <PrivateImplementationDetails><MODULE>.E429CCA3F703A39CC5954A6572FEC9086135B34E""
IL_00d2: ldtoken ""<PrivateImplementationDetails>.__StaticArrayInitTypeSize=12 <PrivateImplementationDetails>.E429CCA3F703A39CC5954A6572FEC9086135B34E""
IL_00d7: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_00dc: stloc.2
IL_00dd: ldloc.1
Expand Down
2 changes: 1 addition & 1 deletion src/Compilers/CSharp/Test/Emit/CodeGen/SwitchTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2283,7 +2283,7 @@ .locals init (string V_0, //value
var reference = compVerifier.Compilation.EmitToImageReference();
var comp = CSharpCompilation.Create("Name", references: new[] { reference }, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.Internal));

var pid = ((NamedTypeSymbol)comp.GlobalNamespace.GetMembers().Single(s => s.Name.StartsWith("<PrivateImplementationDetails><MODULE>", StringComparison.Ordinal)));
var pid = ((NamedTypeSymbol)comp.GlobalNamespace.GetMembers().Single(s => s.Name.StartsWith("<PrivateImplementationDetails>", StringComparison.Ordinal)));
var member = pid.GetMembers(PrivateImplementationDetails.SynthesizedStringHashFunctionName).Single();
Assert.Equal(Accessibility.Internal, member.DeclaredAccessibility);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2519,7 +2519,7 @@ .locals init (int[] V_0) //a
IL_0001: ldc.i4.3
IL_0002: newarr ""int""
IL_0007: dup
IL_0008: ldtoken ""<PrivateImplementationDetails><MODULE>.__StaticArrayInitTypeSize=12 <PrivateImplementationDetails><MODULE>.E429CCA3F703A39CC5954A6572FEC9086135B34E""
IL_0008: ldtoken ""<PrivateImplementationDetails>.__StaticArrayInitTypeSize=12 <PrivateImplementationDetails>.E429CCA3F703A39CC5954A6572FEC9086135B34E""
IL_000d: call ""void System.Runtime.CompilerServices.RuntimeHelpers.InitializeArray(System.Array, System.RuntimeFieldHandle)""
IL_0012: stloc.0
IL_0013: ldloc.0
Expand Down Expand Up @@ -2828,7 +2828,7 @@ static int F(string s)
var generation0 = EmitBaseline.CreateInitialBaseline(ModuleMetadata.CreateFromImage(bytes0), methodData0.EncDebugInfoProvider());

// Should have generated call to ComputeStringHash and
// added the method to <PrivateImplementationDetails><MODULE>.
// added the method to <PrivateImplementationDetails>.
var actualIL0 = methodData0.GetMethodIL();
Assert.True(actualIL0.Contains(ComputeStringHashName));

Expand All @@ -2843,7 +2843,7 @@ static int F(string s)
ImmutableArray.Create(new SemanticEdit(SemanticEditKind.Update, method0, method1, GetEquivalentNodesMap(method1, method0), preserveLocalVariables: true)));

// Should not have generated call to ComputeStringHash nor
// added the method to <PrivateImplementationDetails><MODULE>.
// added the method to <PrivateImplementationDetails>.
var actualIL1 = diff1.GetMethodIL("C.F");
Assert.False(actualIL1.Contains(ComputeStringHashName));

Expand Down
Loading