diff --git a/src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LoweredDynamicOperationFactory.cs b/src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LoweredDynamicOperationFactory.cs index 62544822281a3..99ac4ec17e483 100644 --- a/src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LoweredDynamicOperationFactory.cs +++ b/src/Compilers/CSharp/Portable/Lowering/LocalRewriter/LoweredDynamicOperationFactory.cs @@ -767,7 +767,6 @@ internal FieldSymbol DefineCallSiteStorageSymbol(NamedTypeSymbol containerDefini } } - // PROTOTYPE: RefKindVector does not support RefReadOnlyParameter. RefKindVector byRefs; if (hasByRefs) { @@ -804,7 +803,11 @@ internal FieldSymbol DefineCallSiteStorageSymbol(NamedTypeSymbol containerDefini return synthesizedType.Construct(delegateSignature); // The distinction between by-ref kinds is ignored for dynamic call-sites. - static RefKind getRefKind(RefKind refKind) => refKind == RefKind.None ? RefKind.None : RefKind.Ref; + static RefKind getRefKind(RefKind refKind) + { + Debug.Assert(refKind != RefKind.RefReadOnlyParameter); + return refKind == RefKind.None ? RefKind.None : RefKind.Ref; + } } private BoundExpression GetArgumentInfo( diff --git a/src/Compilers/CSharp/Portable/Symbols/AnonymousTypes/AnonymousTypeManager.Templates.cs b/src/Compilers/CSharp/Portable/Symbols/AnonymousTypes/AnonymousTypeManager.Templates.cs index 1ec1ccc1de5d0..81b42902a3dfe 100644 --- a/src/Compilers/CSharp/Portable/Symbols/AnonymousTypes/AnonymousTypeManager.Templates.cs +++ b/src/Compilers/CSharp/Portable/Symbols/AnonymousTypes/AnonymousTypeManager.Templates.cs @@ -323,8 +323,7 @@ static bool hasDefaultScope(bool useUpdatedEscapeRules, AnonymousTypeField field static bool isValidTypeArgument(bool useUpdatedEscapeRules, AnonymousTypeField field, ref bool needsIndexedName) { - // PROTOTYPE: Instead of using indexed name for delegates with `ref readonly` parameters, expand RefKindVector to use more bits? - needsIndexedName = needsIndexedName || field.IsParams || field.DefaultValue is not null || field.RefKind == RefKind.RefReadOnlyParameter; + needsIndexedName = needsIndexedName || field.IsParams || field.DefaultValue is not null; return hasDefaultScope(useUpdatedEscapeRules, field) && field.Type is { } type && !type.IsPointerOrFunctionPointer() && diff --git a/src/Compilers/CSharp/Portable/Symbols/Synthesized/RefKindVector.cs b/src/Compilers/CSharp/Portable/Symbols/Synthesized/RefKindVector.cs index 58838a5f6a531..81850458ef2e0 100644 --- a/src/Compilers/CSharp/Portable/Symbols/Synthesized/RefKindVector.cs +++ b/src/Compilers/CSharp/Portable/Symbols/Synthesized/RefKindVector.cs @@ -12,6 +12,7 @@ namespace Microsoft.CodeAnalysis.CSharp.Symbols { internal struct RefKindVector : IEquatable { + private const int BitsPerRefKind = 3; private BitVector _bits; internal static RefKindVector Create(int capacity) @@ -21,7 +22,7 @@ internal static RefKindVector Create(int capacity) private RefKindVector(int capacity) { - _bits = BitVector.Create(capacity * 2); + _bits = BitVector.Create(capacity * BitsPerRefKind); } private RefKindVector(BitVector bits) @@ -31,7 +32,7 @@ private RefKindVector(BitVector bits) internal bool IsNull => _bits.IsNull; - internal int Capacity => _bits.Capacity / 2; + internal int Capacity => _bits.Capacity / BitsPerRefKind; internal IEnumerable Words() => _bits.Words(); @@ -39,24 +40,27 @@ internal RefKind this[int index] { get { - index *= 2; - return (_bits[index + 1], _bits[index]) switch + index *= BitsPerRefKind; + return (_bits[index + 2], _bits[index + 1], _bits[index]) switch { - (false, false) => RefKind.None, - (false, true) => RefKind.Ref, - (true, false) => RefKind.Out, - (true, true) => RefKind.RefReadOnly, + (false, false, false) => RefKind.None, + (false, false, true) => RefKind.Ref, + (false, true, false) => RefKind.Out, + (false, true, true) => RefKind.RefReadOnly, + (true, false, false) => RefKind.RefReadOnlyParameter, + var bits => throw ExceptionUtilities.UnexpectedValue(bits) }; } set { - index *= 2; - (_bits[index + 1], _bits[index]) = value switch + index *= BitsPerRefKind; + (_bits[index + 2], _bits[index + 1], _bits[index]) = value switch { - RefKind.None => (false, false), - RefKind.Ref => (false, true), - RefKind.Out => (true, false), - RefKind.RefReadOnly => (true, true), + RefKind.None => (false, false, false), + RefKind.Ref => (false, false, true), + RefKind.Out => (false, true, false), + RefKind.RefReadOnly => (false, true, true), + RefKind.RefReadOnlyParameter => (true, false, false), _ => throw ExceptionUtilities.UnexpectedValue(value) }; } @@ -132,7 +136,7 @@ public static bool TryParse(string refKindString, int capacity, out RefKindVecto Debug.Assert(firstWord is not null); - var bitVector = BitVector.FromWords(firstWord.Value, otherWords?.ToArrayAndFree() ?? Array.Empty(), capacity * 2); + var bitVector = BitVector.FromWords(firstWord.Value, otherWords?.ToArrayAndFree() ?? Array.Empty(), capacity * BitsPerRefKind); result = new RefKindVector(bitVector); return true; } diff --git a/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenDynamicTests.cs b/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenDynamicTests.cs index 31cb5721d64f5..9851559a25534 100644 --- a/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenDynamicTests.cs +++ b/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenDynamicTests.cs @@ -820,7 +820,7 @@ public dynamic M(dynamic d) }"; var verifier = CompileAndVerifyWithCSharp(source, options: TestOptions.ReleaseDll.WithMetadataImportOptions(MetadataImportOptions.All), symbolValidator: peModule => { - var d = peModule.GlobalNamespace.GetMember("<>F{00000010}"); + var d = peModule.GlobalNamespace.GetMember("<>F{00000040}"); // the type: Assert.Equal(Accessibility.Internal, d.DeclaredAccessibility); @@ -917,7 +917,7 @@ .maxstack 7 .locals init (E V_0) //dict IL_0000: ldnull IL_0001: stloc.0 - IL_0002: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000010}, object>> C.<>o__0.<>p__0"" + IL_0002: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000040}, object>> C.<>o__0.<>p__0"" IL_0007: brtrue.s IL_003e IL_0009: ldc.i4.0 IL_000a: ldtoken ""C"" @@ -937,14 +937,14 @@ .locals init (E V_0) //dict IL_0029: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_002e: stelem.ref IL_002f: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.Invoke(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, System.Type, System.Collections.Generic.IEnumerable)"" - IL_0034: call ""System.Runtime.CompilerServices.CallSite<<>F{00000010}, object>> System.Runtime.CompilerServices.CallSite<<>F{00000010}, object>>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_0039: stsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000010}, object>> C.<>o__0.<>p__0"" - IL_003e: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000010}, object>> C.<>o__0.<>p__0"" - IL_0043: ldfld ""<>F{00000010}, object> System.Runtime.CompilerServices.CallSite<<>F{00000010}, object>>.Target"" - IL_0048: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000010}, object>> C.<>o__0.<>p__0"" + IL_0034: call ""System.Runtime.CompilerServices.CallSite<<>F{00000040}, object>> System.Runtime.CompilerServices.CallSite<<>F{00000040}, object>>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_0039: stsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000040}, object>> C.<>o__0.<>p__0"" + IL_003e: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000040}, object>> C.<>o__0.<>p__0"" + IL_0043: ldfld ""<>F{00000040}, object> System.Runtime.CompilerServices.CallSite<<>F{00000040}, object>>.Target"" + IL_0048: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000040}, object>> C.<>o__0.<>p__0"" IL_004d: ldarg.1 IL_004e: ldloca.s V_0 - IL_0050: callvirt ""object <>F{00000010}, object>.Invoke(System.Runtime.CompilerServices.CallSite, object, ref E)"" + IL_0050: callvirt ""object <>F{00000040}, object>.Invoke(System.Runtime.CompilerServices.CallSite, object, ref E)"" IL_0055: ret } "); @@ -8692,7 +8692,7 @@ public dynamic M(dynamic d) { // Code size 103 (0x67) .maxstack 9 - IL_0000: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000050}> C.<>o__0.<>p__0"" + IL_0000: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000240}> C.<>o__0.<>p__0"" IL_0005: brtrue.s IL_004d IL_0007: ldc.i4.0 IL_0008: ldstr ""m"" @@ -8720,15 +8720,15 @@ .maxstack 9 IL_0038: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_003d: stelem.ref IL_003e: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, string, System.Collections.Generic.IEnumerable, System.Type, System.Collections.Generic.IEnumerable)"" - IL_0043: call ""System.Runtime.CompilerServices.CallSite<<>F{00000050}> System.Runtime.CompilerServices.CallSite<<>F{00000050}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_0048: stsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000050}> C.<>o__0.<>p__0"" - IL_004d: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000050}> C.<>o__0.<>p__0"" - IL_0052: ldfld ""<>F{00000050} System.Runtime.CompilerServices.CallSite<<>F{00000050}>.Target"" - IL_0057: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000050}> C.<>o__0.<>p__0"" + IL_0043: call ""System.Runtime.CompilerServices.CallSite<<>F{00000240}> System.Runtime.CompilerServices.CallSite<<>F{00000240}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_0048: stsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000240}> C.<>o__0.<>p__0"" + IL_004d: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000240}> C.<>o__0.<>p__0"" + IL_0052: ldfld ""<>F{00000240} System.Runtime.CompilerServices.CallSite<<>F{00000240}>.Target"" + IL_0057: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000240}> C.<>o__0.<>p__0"" IL_005c: ldarg.1 IL_005d: ldarga.s V_1 IL_005f: ldarga.s V_1 - IL_0061: callvirt ""object <>F{00000050}.Invoke(System.Runtime.CompilerServices.CallSite, object, ref object, ref object)"" + IL_0061: callvirt ""object <>F{00000240}.Invoke(System.Runtime.CompilerServices.CallSite, object, ref object, ref object)"" IL_0066: ret } "); @@ -8817,7 +8817,7 @@ .locals init (object V_0, //lo object V_1) //ld IL_0000: ldnull IL_0001: stloc.0 - IL_0002: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000500}> C.<>o__2.<>p__0"" + IL_0002: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00009000}> C.<>o__2.<>p__0"" IL_0007: brtrue.s IL_0067 IL_0009: ldc.i4 0x102 IL_000e: ldstr ""f"" @@ -8857,11 +8857,11 @@ .locals init (object V_0, //lo IL_0052: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_0057: stelem.ref IL_0058: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, string, System.Collections.Generic.IEnumerable, System.Type, System.Collections.Generic.IEnumerable)"" - IL_005d: call ""System.Runtime.CompilerServices.CallSite<<>A{00000500}> System.Runtime.CompilerServices.CallSite<<>A{00000500}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_0062: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000500}> C.<>o__2.<>p__0"" - IL_0067: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000500}> C.<>o__2.<>p__0"" - IL_006c: ldfld ""<>A{00000500} System.Runtime.CompilerServices.CallSite<<>A{00000500}>.Target"" - IL_0071: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000500}> C.<>o__2.<>p__0"" + IL_005d: call ""System.Runtime.CompilerServices.CallSite<<>A{00009000}> System.Runtime.CompilerServices.CallSite<<>A{00009000}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_0062: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00009000}> C.<>o__2.<>p__0"" + IL_0067: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00009000}> C.<>o__2.<>p__0"" + IL_006c: ldfld ""<>A{00009000} System.Runtime.CompilerServices.CallSite<<>A{00009000}>.Target"" + IL_0071: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00009000}> C.<>o__2.<>p__0"" IL_0076: ldarg.0 IL_0077: ldarg.0 IL_0078: ldfld ""dynamic C.d"" @@ -8869,7 +8869,7 @@ .locals init (object V_0, //lo IL_007e: ldfld ""dynamic C.d"" IL_0083: ldloca.s V_0 IL_0085: ldloca.s V_1 - IL_0087: callvirt ""void <>A{00000500}.Invoke(System.Runtime.CompilerServices.CallSite, C, object, object, ref object, ref object)"" + IL_0087: callvirt ""void <>A{00009000}.Invoke(System.Runtime.CompilerServices.CallSite, C, object, object, ref object, ref object)"" IL_008c: ret } "); @@ -9069,7 +9069,7 @@ .maxstack 9 .locals init (S V_0) //s IL_0000: ldloca.s V_0 IL_0002: initobj ""S"" - IL_0008: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__0.<>p__0"" + IL_0008: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__0.<>p__0"" IL_000d: brtrue.s IL_004e IL_000f: ldc.i4 0x100 IL_0014: ldstr ""goo"" @@ -9091,14 +9091,14 @@ .locals init (S V_0) //s IL_0039: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_003e: stelem.ref IL_003f: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, string, System.Collections.Generic.IEnumerable, System.Type, System.Collections.Generic.IEnumerable)"" - IL_0044: call ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> System.Runtime.CompilerServices.CallSite<<>A{00000004}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_0049: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__0.<>p__0"" - IL_004e: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__0.<>p__0"" - IL_0053: ldfld ""<>A{00000004} System.Runtime.CompilerServices.CallSite<<>A{00000004}>.Target"" - IL_0058: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__0.<>p__0"" + IL_0044: call ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> System.Runtime.CompilerServices.CallSite<<>A{00000008}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_0049: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__0.<>p__0"" + IL_004e: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__0.<>p__0"" + IL_0053: ldfld ""<>A{00000008} System.Runtime.CompilerServices.CallSite<<>A{00000008}>.Target"" + IL_0058: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__0.<>p__0"" IL_005d: ldloca.s V_0 IL_005f: ldarg.1 - IL_0060: callvirt ""void <>A{00000004}.Invoke(System.Runtime.CompilerServices.CallSite, ref S, object)"" + IL_0060: callvirt ""void <>A{00000008}.Invoke(System.Runtime.CompilerServices.CallSite, ref S, object)"" IL_0065: ret }"); } @@ -9125,7 +9125,7 @@ public void goo(int a) {} { // Code size 94 (0x5e) .maxstack 9 - IL_0000: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__0.<>p__0"" + IL_0000: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__0.<>p__0"" IL_0005: brtrue.s IL_0046 IL_0007: ldc.i4 0x100 IL_000c: ldstr ""goo"" @@ -9147,14 +9147,14 @@ .maxstack 9 IL_0031: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_0036: stelem.ref IL_0037: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, string, System.Collections.Generic.IEnumerable, System.Type, System.Collections.Generic.IEnumerable)"" - IL_003c: call ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> System.Runtime.CompilerServices.CallSite<<>A{00000004}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_0041: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__0.<>p__0"" - IL_0046: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__0.<>p__0"" - IL_004b: ldfld ""<>A{00000004} System.Runtime.CompilerServices.CallSite<<>A{00000004}>.Target"" - IL_0050: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__0.<>p__0"" + IL_003c: call ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> System.Runtime.CompilerServices.CallSite<<>A{00000008}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_0041: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__0.<>p__0"" + IL_0046: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__0.<>p__0"" + IL_004b: ldfld ""<>A{00000008} System.Runtime.CompilerServices.CallSite<<>A{00000008}>.Target"" + IL_0050: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__0.<>p__0"" IL_0055: ldarga.s V_1 IL_0057: ldarg.2 - IL_0058: callvirt ""void <>A{00000004}.Invoke(System.Runtime.CompilerServices.CallSite, ref S, object)"" + IL_0058: callvirt ""void <>A{00000008}.Invoke(System.Runtime.CompilerServices.CallSite, ref S, object)"" IL_005d: ret } "); @@ -9178,7 +9178,7 @@ public void M(dynamic d) { // Code size 93 (0x5d) .maxstack 9 - IL_0000: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> S.<>o__1.<>p__0"" + IL_0000: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> S.<>o__1.<>p__0"" IL_0005: brtrue.s IL_0046 IL_0007: ldc.i4 0x100 IL_000c: ldstr ""Equals"" @@ -9200,14 +9200,14 @@ .maxstack 9 IL_0031: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_0036: stelem.ref IL_0037: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, string, System.Collections.Generic.IEnumerable, System.Type, System.Collections.Generic.IEnumerable)"" - IL_003c: call ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> System.Runtime.CompilerServices.CallSite<<>A{00000004}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_0041: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> S.<>o__1.<>p__0"" - IL_0046: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> S.<>o__1.<>p__0"" - IL_004b: ldfld ""<>A{00000004} System.Runtime.CompilerServices.CallSite<<>A{00000004}>.Target"" - IL_0050: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> S.<>o__1.<>p__0"" + IL_003c: call ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> System.Runtime.CompilerServices.CallSite<<>A{00000008}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_0041: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> S.<>o__1.<>p__0"" + IL_0046: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> S.<>o__1.<>p__0"" + IL_004b: ldfld ""<>A{00000008} System.Runtime.CompilerServices.CallSite<<>A{00000008}>.Target"" + IL_0050: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> S.<>o__1.<>p__0"" IL_0055: ldarg.0 IL_0056: ldarg.1 - IL_0057: callvirt ""void <>A{00000004}.Invoke(System.Runtime.CompilerServices.CallSite, ref S, object)"" + IL_0057: callvirt ""void <>A{00000008}.Invoke(System.Runtime.CompilerServices.CallSite, ref S, object)"" IL_005c: ret } "); @@ -9297,7 +9297,7 @@ public void goo(int a) {} { // Code size 104 (0x68) .maxstack 9 - IL_0000: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__1.<>p__0"" + IL_0000: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__1.<>p__0"" IL_0005: brtrue.s IL_0046 IL_0007: ldc.i4 0x100 IL_000c: ldstr ""goo"" @@ -9319,17 +9319,17 @@ .maxstack 9 IL_0031: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_0036: stelem.ref IL_0037: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, string, System.Collections.Generic.IEnumerable, System.Type, System.Collections.Generic.IEnumerable)"" - IL_003c: call ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> System.Runtime.CompilerServices.CallSite<<>A{00000004}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_0041: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__1.<>p__0"" - IL_0046: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__1.<>p__0"" - IL_004b: ldfld ""<>A{00000004} System.Runtime.CompilerServices.CallSite<<>A{00000004}>.Target"" - IL_0050: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__1.<>p__0"" + IL_003c: call ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> System.Runtime.CompilerServices.CallSite<<>A{00000008}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_0041: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__1.<>p__0"" + IL_0046: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__1.<>p__0"" + IL_004b: ldfld ""<>A{00000008} System.Runtime.CompilerServices.CallSite<<>A{00000008}>.Target"" + IL_0050: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__1.<>p__0"" IL_0055: ldarg.0 IL_0056: ldfld ""S[] C.s"" IL_005b: ldc.i4.0 IL_005c: ldelema ""S"" IL_0061: ldarg.1 - IL_0062: callvirt ""void <>A{00000004}.Invoke(System.Runtime.CompilerServices.CallSite, ref S, object)"" + IL_0062: callvirt ""void <>A{00000008}.Invoke(System.Runtime.CompilerServices.CallSite, ref S, object)"" IL_0067: ret } "); @@ -9369,7 +9369,7 @@ .locals init (S V_0, //s IL_0008: ldloca.s V_0 IL_000a: conv.u IL_000b: stloc.1 - IL_000c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__1.<>p__0"" + IL_000c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__1.<>p__0"" IL_0011: brtrue.s IL_0052 IL_0013: ldc.i4 0x100 IL_0018: ldstr ""goo"" @@ -9391,14 +9391,14 @@ .locals init (S V_0, //s IL_003d: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_0042: stelem.ref IL_0043: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, string, System.Collections.Generic.IEnumerable, System.Type, System.Collections.Generic.IEnumerable)"" - IL_0048: call ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> System.Runtime.CompilerServices.CallSite<<>A{00000004}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_004d: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__1.<>p__0"" - IL_0052: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__1.<>p__0"" - IL_0057: ldfld ""<>A{00000004} System.Runtime.CompilerServices.CallSite<<>A{00000004}>.Target"" - IL_005c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__1.<>p__0"" + IL_0048: call ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> System.Runtime.CompilerServices.CallSite<<>A{00000008}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_004d: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__1.<>p__0"" + IL_0052: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__1.<>p__0"" + IL_0057: ldfld ""<>A{00000008} System.Runtime.CompilerServices.CallSite<<>A{00000008}>.Target"" + IL_005c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__1.<>p__0"" IL_0061: ldloc.1 IL_0062: ldarg.1 - IL_0063: callvirt ""void <>A{00000004}.Invoke(System.Runtime.CompilerServices.CallSite, ref S, object)"" + IL_0063: callvirt ""void <>A{00000008}.Invoke(System.Runtime.CompilerServices.CallSite, ref S, object)"" IL_0068: ret } ", allowUnsafe: true, verify: Verification.Fails); @@ -9438,7 +9438,7 @@ .locals init (S V_0, //s IL_0008: ldloca.s V_0 IL_000a: conv.u IL_000b: stloc.1 - IL_000c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__1.<>p__0"" + IL_000c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__1.<>p__0"" IL_0011: brtrue.s IL_0052 IL_0013: ldc.i4 0x100 IL_0018: ldstr ""goo"" @@ -9460,14 +9460,14 @@ .locals init (S V_0, //s IL_003d: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_0042: stelem.ref IL_0043: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, string, System.Collections.Generic.IEnumerable, System.Type, System.Collections.Generic.IEnumerable)"" - IL_0048: call ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> System.Runtime.CompilerServices.CallSite<<>A{00000004}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_004d: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__1.<>p__0"" - IL_0052: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__1.<>p__0"" - IL_0057: ldfld ""<>A{00000004} System.Runtime.CompilerServices.CallSite<<>A{00000004}>.Target"" - IL_005c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__1.<>p__0"" + IL_0048: call ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> System.Runtime.CompilerServices.CallSite<<>A{00000008}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_004d: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__1.<>p__0"" + IL_0052: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__1.<>p__0"" + IL_0057: ldfld ""<>A{00000008} System.Runtime.CompilerServices.CallSite<<>A{00000008}>.Target"" + IL_005c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__1.<>p__0"" IL_0061: ldloc.1 IL_0062: ldarg.1 - IL_0063: callvirt ""void <>A{00000004}.Invoke(System.Runtime.CompilerServices.CallSite, ref S, object)"" + IL_0063: callvirt ""void <>A{00000008}.Invoke(System.Runtime.CompilerServices.CallSite, ref S, object)"" IL_0068: ret } ", allowUnsafe: true, verify: Verification.Fails); @@ -9506,7 +9506,7 @@ .locals init (S* V_0) //ptr IL_0008: mul.ovf.un IL_0009: localloc IL_000b: stloc.0 - IL_000c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__1.<>p__0"" + IL_000c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__1.<>p__0"" IL_0011: brtrue.s IL_0052 IL_0013: ldc.i4 0x100 IL_0018: ldstr ""goo"" @@ -9528,16 +9528,16 @@ .locals init (S* V_0) //ptr IL_003d: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_0042: stelem.ref IL_0043: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, string, System.Collections.Generic.IEnumerable, System.Type, System.Collections.Generic.IEnumerable)"" - IL_0048: call ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> System.Runtime.CompilerServices.CallSite<<>A{00000004}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_004d: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__1.<>p__0"" - IL_0052: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__1.<>p__0"" - IL_0057: ldfld ""<>A{00000004} System.Runtime.CompilerServices.CallSite<<>A{00000004}>.Target"" - IL_005c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__1.<>p__0"" + IL_0048: call ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> System.Runtime.CompilerServices.CallSite<<>A{00000008}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_004d: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__1.<>p__0"" + IL_0052: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__1.<>p__0"" + IL_0057: ldfld ""<>A{00000008} System.Runtime.CompilerServices.CallSite<<>A{00000008}>.Target"" + IL_005c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__1.<>p__0"" IL_0061: ldloc.0 IL_0062: sizeof ""S"" IL_0068: add IL_0069: ldarg.1 - IL_006a: callvirt ""void <>A{00000004}.Invoke(System.Runtime.CompilerServices.CallSite, ref S, object)"" + IL_006a: callvirt ""void <>A{00000008}.Invoke(System.Runtime.CompilerServices.CallSite, ref S, object)"" IL_006f: ret } ", allowUnsafe: true, verify: Verification.Fails); @@ -9569,7 +9569,7 @@ .locals init (int V_0, //a IL_0002: ldloca.s V_0 IL_0004: mkrefany ""int"" IL_0009: stloc.1 - IL_000a: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__0.<>p__0"" + IL_000a: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__0.<>p__0"" IL_000f: brtrue.s IL_0050 IL_0011: ldc.i4 0x100 IL_0016: ldstr ""Equals"" @@ -9591,15 +9591,15 @@ .locals init (int V_0, //a IL_003b: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_0040: stelem.ref IL_0041: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, string, System.Collections.Generic.IEnumerable, System.Type, System.Collections.Generic.IEnumerable)"" - IL_0046: call ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> System.Runtime.CompilerServices.CallSite<<>A{00000004}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_004b: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__0.<>p__0"" - IL_0050: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__0.<>p__0"" - IL_0055: ldfld ""<>A{00000004} System.Runtime.CompilerServices.CallSite<<>A{00000004}>.Target"" - IL_005a: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> C.<>o__0.<>p__0"" + IL_0046: call ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> System.Runtime.CompilerServices.CallSite<<>A{00000008}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_004b: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__0.<>p__0"" + IL_0050: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__0.<>p__0"" + IL_0055: ldfld ""<>A{00000008} System.Runtime.CompilerServices.CallSite<<>A{00000008}>.Target"" + IL_005a: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> C.<>o__0.<>p__0"" IL_005f: ldloc.1 IL_0060: refanyval ""int"" IL_0065: ldarg.1 - IL_0066: callvirt ""void <>A{00000004}.Invoke(System.Runtime.CompilerServices.CallSite, ref int, object)"" + IL_0066: callvirt ""void <>A{00000008}.Invoke(System.Runtime.CompilerServices.CallSite, ref int, object)"" IL_006b: ret } ", verify: Verification.FailsILVerify); // ILVerify doesn't support TypedReference @@ -11019,7 +11019,7 @@ public dynamic M(dynamic d) { // Code size 84 (0x54) .maxstack 7 - IL_0000: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000010}> C.<>o__0.<>p__0"" + IL_0000: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000040}> C.<>o__0.<>p__0"" IL_0005: brtrue.s IL_003c IL_0007: ldc.i4.0 IL_0008: ldtoken ""C"" @@ -11039,14 +11039,14 @@ .maxstack 7 IL_0027: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_002c: stelem.ref IL_002d: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.GetIndex(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, System.Type, System.Collections.Generic.IEnumerable)"" - IL_0032: call ""System.Runtime.CompilerServices.CallSite<<>F{00000010}> System.Runtime.CompilerServices.CallSite<<>F{00000010}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_0037: stsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000010}> C.<>o__0.<>p__0"" - IL_003c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000010}> C.<>o__0.<>p__0"" - IL_0041: ldfld ""<>F{00000010} System.Runtime.CompilerServices.CallSite<<>F{00000010}>.Target"" - IL_0046: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000010}> C.<>o__0.<>p__0"" + IL_0032: call ""System.Runtime.CompilerServices.CallSite<<>F{00000040}> System.Runtime.CompilerServices.CallSite<<>F{00000040}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_0037: stsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000040}> C.<>o__0.<>p__0"" + IL_003c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000040}> C.<>o__0.<>p__0"" + IL_0041: ldfld ""<>F{00000040} System.Runtime.CompilerServices.CallSite<<>F{00000040}>.Target"" + IL_0046: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000040}> C.<>o__0.<>p__0"" IL_004b: ldarg.1 IL_004c: ldarga.s V_1 - IL_004e: callvirt ""object <>F{00000010}.Invoke(System.Runtime.CompilerServices.CallSite, object, ref object)"" + IL_004e: callvirt ""object <>F{00000040}.Invoke(System.Runtime.CompilerServices.CallSite, object, ref object)"" IL_0053: ret } "); @@ -11067,7 +11067,7 @@ public dynamic M(dynamic d) { // Code size 133 (0x85) .maxstack 7 - IL_0000: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000400}> C.<>o__0.<>p__0"" + IL_0000: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00008000}> C.<>o__0.<>p__0"" IL_0005: brtrue.s IL_006a IL_0007: ldc.i4.0 IL_0008: ldtoken ""C"" @@ -11105,17 +11105,17 @@ .maxstack 7 IL_0055: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_005a: stelem.ref IL_005b: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.GetIndex(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, System.Type, System.Collections.Generic.IEnumerable)"" - IL_0060: call ""System.Runtime.CompilerServices.CallSite<<>F{00000400}> System.Runtime.CompilerServices.CallSite<<>F{00000400}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_0065: stsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000400}> C.<>o__0.<>p__0"" - IL_006a: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000400}> C.<>o__0.<>p__0"" - IL_006f: ldfld ""<>F{00000400} System.Runtime.CompilerServices.CallSite<<>F{00000400}>.Target"" - IL_0074: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000400}> C.<>o__0.<>p__0"" + IL_0060: call ""System.Runtime.CompilerServices.CallSite<<>F{00008000}> System.Runtime.CompilerServices.CallSite<<>F{00008000}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_0065: stsfld ""System.Runtime.CompilerServices.CallSite<<>F{00008000}> C.<>o__0.<>p__0"" + IL_006a: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00008000}> C.<>o__0.<>p__0"" + IL_006f: ldfld ""<>F{00008000} System.Runtime.CompilerServices.CallSite<<>F{00008000}>.Target"" + IL_0074: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00008000}> C.<>o__0.<>p__0"" IL_0079: ldarg.1 IL_007a: ldc.i4.1 IL_007b: ldarg.1 IL_007c: ldnull IL_007d: ldarga.s V_1 - IL_007f: callvirt ""object <>F{00000400}.Invoke(System.Runtime.CompilerServices.CallSite, object, int, object, object, ref object)"" + IL_007f: callvirt ""object <>F{00008000}.Invoke(System.Runtime.CompilerServices.CallSite, object, int, object, object, ref object)"" IL_0084: ret } "); @@ -11797,7 +11797,7 @@ public dynamic M(dynamic d) { // Code size 144 (0x90) .maxstack 8 - IL_0000: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000400}> C.<>o__0.<>p__0"" + IL_0000: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00008000}> C.<>o__0.<>p__0"" IL_0005: brtrue.s IL_0074 IL_0007: ldc.i4.0 IL_0008: ldtoken ""C"" @@ -11841,18 +11841,18 @@ .maxstack 8 IL_005f: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_0064: stelem.ref IL_0065: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.SetIndex(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, System.Type, System.Collections.Generic.IEnumerable)"" - IL_006a: call ""System.Runtime.CompilerServices.CallSite<<>F{00000400}> System.Runtime.CompilerServices.CallSite<<>F{00000400}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_006f: stsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000400}> C.<>o__0.<>p__0"" - IL_0074: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000400}> C.<>o__0.<>p__0"" - IL_0079: ldfld ""<>F{00000400} System.Runtime.CompilerServices.CallSite<<>F{00000400}>.Target"" - IL_007e: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000400}> C.<>o__0.<>p__0"" + IL_006a: call ""System.Runtime.CompilerServices.CallSite<<>F{00008000}> System.Runtime.CompilerServices.CallSite<<>F{00008000}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_006f: stsfld ""System.Runtime.CompilerServices.CallSite<<>F{00008000}> C.<>o__0.<>p__0"" + IL_0074: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00008000}> C.<>o__0.<>p__0"" + IL_0079: ldfld ""<>F{00008000} System.Runtime.CompilerServices.CallSite<<>F{00008000}>.Target"" + IL_007e: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00008000}> C.<>o__0.<>p__0"" IL_0083: ldarg.1 IL_0084: ldarg.1 IL_0085: ldc.i4.0 IL_0086: ldnull IL_0087: ldarga.s V_1 IL_0089: ldnull - IL_008a: callvirt ""object <>F{00000400}.Invoke(System.Runtime.CompilerServices.CallSite, object, object, int, object, ref object, object)"" + IL_008a: callvirt ""object <>F{00008000}.Invoke(System.Runtime.CompilerServices.CallSite, object, object, int, object, ref object, object)"" IL_008f: ret } "); @@ -11885,7 +11885,7 @@ .maxstack 7 .locals init (S V_0) //s IL_0000: ldloca.s V_0 IL_0002: initobj ""S"" - IL_0008: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000004}> C.<>o__0.<>p__0"" + IL_0008: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000008}> C.<>o__0.<>p__0"" IL_000d: brtrue.s IL_004e IL_000f: ldc.i4.0 IL_0010: ldtoken ""C"" @@ -11911,15 +11911,15 @@ .locals init (S V_0) //s IL_0039: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_003e: stelem.ref IL_003f: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.SetIndex(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, System.Type, System.Collections.Generic.IEnumerable)"" - IL_0044: call ""System.Runtime.CompilerServices.CallSite<<>F{00000004}> System.Runtime.CompilerServices.CallSite<<>F{00000004}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_0049: stsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000004}> C.<>o__0.<>p__0"" - IL_004e: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000004}> C.<>o__0.<>p__0"" - IL_0053: ldfld ""<>F{00000004} System.Runtime.CompilerServices.CallSite<<>F{00000004}>.Target"" - IL_0058: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000004}> C.<>o__0.<>p__0"" + IL_0044: call ""System.Runtime.CompilerServices.CallSite<<>F{00000008}> System.Runtime.CompilerServices.CallSite<<>F{00000008}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_0049: stsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000008}> C.<>o__0.<>p__0"" + IL_004e: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000008}> C.<>o__0.<>p__0"" + IL_0053: ldfld ""<>F{00000008} System.Runtime.CompilerServices.CallSite<<>F{00000008}>.Target"" + IL_0058: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000008}> C.<>o__0.<>p__0"" IL_005d: ldloca.s V_0 IL_005f: ldarg.1 IL_0060: ldc.i4.1 - IL_0061: callvirt ""object <>F{00000004}.Invoke(System.Runtime.CompilerServices.CallSite, ref S, object, int)"" + IL_0061: callvirt ""object <>F{00000008}.Invoke(System.Runtime.CompilerServices.CallSite, ref S, object, int)"" IL_0066: pop IL_0067: ret }"); @@ -13290,7 +13290,7 @@ .locals init (object V_0, IL_0018: ldfld ""C C.c"" IL_001d: ldfld ""C C.c"" IL_0022: stloc.3 - IL_0023: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000050}> C.<>o__3.<>p__2"" + IL_0023: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000240}> C.<>o__3.<>p__2"" IL_0028: brtrue.s IL_0082 IL_002a: ldc.i4 0x80 IL_002f: ldtoken ""C"" @@ -13328,11 +13328,11 @@ .locals init (object V_0, IL_006d: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_0072: stelem.ref IL_0073: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.SetIndex(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, System.Type, System.Collections.Generic.IEnumerable)"" - IL_0078: call ""System.Runtime.CompilerServices.CallSite<<>F{00000050}> System.Runtime.CompilerServices.CallSite<<>F{00000050}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_007d: stsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000050}> C.<>o__3.<>p__2"" - IL_0082: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000050}> C.<>o__3.<>p__2"" - IL_0087: ldfld ""<>F{00000050} System.Runtime.CompilerServices.CallSite<<>F{00000050}>.Target"" - IL_008c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000050}> C.<>o__3.<>p__2"" + IL_0078: call ""System.Runtime.CompilerServices.CallSite<<>F{00000240}> System.Runtime.CompilerServices.CallSite<<>F{00000240}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_007d: stsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000240}> C.<>o__3.<>p__2"" + IL_0082: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000240}> C.<>o__3.<>p__2"" + IL_0087: ldfld ""<>F{00000240} System.Runtime.CompilerServices.CallSite<<>F{00000240}>.Target"" + IL_008c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000240}> C.<>o__3.<>p__2"" IL_0091: ldloc.0 IL_0092: ldloc.1 IL_0093: ldloc.2 @@ -13363,7 +13363,7 @@ .locals init (object V_0, IL_00d2: ldsfld ""System.Runtime.CompilerServices.CallSite> C.<>o__3.<>p__1"" IL_00d7: ldfld ""System.Func System.Runtime.CompilerServices.CallSite>.Target"" IL_00dc: ldsfld ""System.Runtime.CompilerServices.CallSite> C.<>o__3.<>p__1"" - IL_00e1: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000050}> C.<>o__3.<>p__0"" + IL_00e1: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000240}> C.<>o__3.<>p__0"" IL_00e6: brtrue.s IL_0132 IL_00e8: ldc.i4.0 IL_00e9: ldtoken ""C"" @@ -13395,19 +13395,19 @@ .locals init (object V_0, IL_011d: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_0122: stelem.ref IL_0123: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.GetIndex(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, System.Type, System.Collections.Generic.IEnumerable)"" - IL_0128: call ""System.Runtime.CompilerServices.CallSite<<>F{00000050}> System.Runtime.CompilerServices.CallSite<<>F{00000050}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_012d: stsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000050}> C.<>o__3.<>p__0"" - IL_0132: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000050}> C.<>o__3.<>p__0"" - IL_0137: ldfld ""<>F{00000050} System.Runtime.CompilerServices.CallSite<<>F{00000050}>.Target"" - IL_013c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000050}> C.<>o__3.<>p__0"" + IL_0128: call ""System.Runtime.CompilerServices.CallSite<<>F{00000240}> System.Runtime.CompilerServices.CallSite<<>F{00000240}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_012d: stsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000240}> C.<>o__3.<>p__0"" + IL_0132: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000240}> C.<>o__3.<>p__0"" + IL_0137: ldfld ""<>F{00000240} System.Runtime.CompilerServices.CallSite<<>F{00000240}>.Target"" + IL_013c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000240}> C.<>o__3.<>p__0"" IL_0141: ldloc.0 IL_0142: ldloc.1 IL_0143: ldloc.2 IL_0144: ldloc.3 - IL_0145: callvirt ""object <>F{00000050}.Invoke(System.Runtime.CompilerServices.CallSite, object, ref object, ref int, C)"" + IL_0145: callvirt ""object <>F{00000240}.Invoke(System.Runtime.CompilerServices.CallSite, object, ref object, ref int, C)"" IL_014a: ldarg.2 IL_014b: callvirt ""object System.Func.Invoke(System.Runtime.CompilerServices.CallSite, object, object)"" - IL_0150: callvirt ""object <>F{00000050}.Invoke(System.Runtime.CompilerServices.CallSite, object, ref object, ref int, C, object)"" + IL_0150: callvirt ""object <>F{00000240}.Invoke(System.Runtime.CompilerServices.CallSite, object, ref object, ref int, C, object)"" IL_0155: ret }"); } diff --git a/src/Compilers/CSharp/Test/Emit/Emit/CompilationEmitTests.cs b/src/Compilers/CSharp/Test/Emit/Emit/CompilationEmitTests.cs index 6ace4024aefc5..f72cc8ec0077b 100644 --- a/src/Compilers/CSharp/Test/Emit/Emit/CompilationEmitTests.cs +++ b/src/Compilers/CSharp/Test/Emit/Emit/CompilationEmitTests.cs @@ -5417,10 +5417,10 @@ static int M(dynamic d, object o) var expectedNames = new[] { "", - "<>A{00000010}`3", - "<>A{00000140}`5", - "<>F{00000010}`5", + "<>A{00000040}`3", + "<>A{00001200}`5", "<>F{00000040}`5", + "<>F{00000200}`5", "C1", "C2", "C3", diff --git a/src/Compilers/CSharp/Test/Emit/Emit/EditAndContinue/EditAndContinueClosureTests.cs b/src/Compilers/CSharp/Test/Emit/Emit/EditAndContinue/EditAndContinueClosureTests.cs index aada8452c45d0..c18563bce0457 100644 --- a/src/Compilers/CSharp/Test/Emit/Emit/EditAndContinue/EditAndContinueClosureTests.cs +++ b/src/Compilers/CSharp/Test/Emit/Emit/EditAndContinue/EditAndContinueClosureTests.cs @@ -3807,7 +3807,7 @@ static void F(dynamic d, out object x, object y) // Code size 112 (0x70) .maxstack 9 IL_0000: nop - IL_0001: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000010}>> C.<>o__0.<>p__0"" + IL_0001: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000040}>> C.<>o__0.<>p__0"" IL_0006: brfalse.s IL_000a IL_0008: br.s IL_0053 IL_000a: ldc.i4 0x100 @@ -3836,15 +3836,15 @@ .maxstack 9 IL_003e: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_0043: stelem.ref IL_0044: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, string, System.Collections.Generic.IEnumerable, System.Type, System.Collections.Generic.IEnumerable)"" - IL_0049: call ""System.Runtime.CompilerServices.CallSite<<>A{00000010}>> System.Runtime.CompilerServices.CallSite<<>A{00000010}>>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_004e: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000010}>> C.<>o__0.<>p__0"" - IL_0053: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000010}>> C.<>o__0.<>p__0"" - IL_0058: ldfld ""<>A{00000010}> System.Runtime.CompilerServices.CallSite<<>A{00000010}>>.Target"" - IL_005d: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000010}>> C.<>o__0.<>p__0"" + IL_0049: call ""System.Runtime.CompilerServices.CallSite<<>A{00000040}>> System.Runtime.CompilerServices.CallSite<<>A{00000040}>>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_004e: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000040}>> C.<>o__0.<>p__0"" + IL_0053: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000040}>> C.<>o__0.<>p__0"" + IL_0058: ldfld ""<>A{00000040}> System.Runtime.CompilerServices.CallSite<<>A{00000040}>>.Target"" + IL_005d: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000040}>> C.<>o__0.<>p__0"" IL_0062: ldarg.0 IL_0063: ldarg.1 IL_0064: newobj ""<>f__AnonymousType0..ctor()"" - IL_0069: callvirt ""void <>A{00000010}>.Invoke(System.Runtime.CompilerServices.CallSite, dynamic, ref object, )"" + IL_0069: callvirt ""void <>A{00000040}>.Invoke(System.Runtime.CompilerServices.CallSite, dynamic, ref object, )"" IL_006e: nop IL_006f: ret }"); @@ -3858,7 +3858,7 @@ .maxstack 9 // Code size 113 (0x71) .maxstack 9 IL_0000: nop - IL_0001: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000010}#1>> C.<>o__0#1.<>p__0"" + IL_0001: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000040}#1>> C.<>o__0#1.<>p__0"" IL_0006: brfalse.s IL_000a IL_0008: br.s IL_0053 IL_000a: ldc.i4 0x100 @@ -3887,16 +3887,16 @@ .maxstack 9 IL_003e: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_0043: stelem.ref IL_0044: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, string, System.Collections.Generic.IEnumerable, System.Type, System.Collections.Generic.IEnumerable)"" - IL_0049: call ""System.Runtime.CompilerServices.CallSite<<>A{00000010}#1>> System.Runtime.CompilerServices.CallSite<<>A{00000010}#1>>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_004e: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000010}#1>> C.<>o__0#1.<>p__0"" - IL_0053: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000010}#1>> C.<>o__0#1.<>p__0"" - IL_0058: ldfld ""<>A{00000010}#1> System.Runtime.CompilerServices.CallSite<<>A{00000010}#1>>.Target"" - IL_005d: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000010}#1>> C.<>o__0#1.<>p__0"" + IL_0049: call ""System.Runtime.CompilerServices.CallSite<<>A{00000040}#1>> System.Runtime.CompilerServices.CallSite<<>A{00000040}#1>>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_004e: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000040}#1>> C.<>o__0#1.<>p__0"" + IL_0053: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000040}#1>> C.<>o__0#1.<>p__0"" + IL_0058: ldfld ""<>A{00000040}#1> System.Runtime.CompilerServices.CallSite<<>A{00000040}#1>>.Target"" + IL_005d: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000040}#1>> C.<>o__0#1.<>p__0"" IL_0062: ldarg.0 IL_0063: ldarg.1 IL_0064: ldarg.2 IL_0065: newobj ""<>f__AnonymousType1..ctor(object)"" - IL_006a: callvirt ""void <>A{00000010}#1>.Invoke(System.Runtime.CompilerServices.CallSite, dynamic, ref object, )"" + IL_006a: callvirt ""void <>A{00000040}#1>.Invoke(System.Runtime.CompilerServices.CallSite, dynamic, ref object, )"" IL_006f: nop IL_0070: ret }"); @@ -3910,7 +3910,7 @@ .maxstack 9 // Code size 113 (0x71) .maxstack 9 IL_0000: nop - IL_0001: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000040}#2, object>> C.<>o__0#2.<>p__0"" + IL_0001: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000200}#2, object>> C.<>o__0#2.<>p__0"" IL_0006: brfalse.s IL_000a IL_0008: br.s IL_0053 IL_000a: ldc.i4 0x100 @@ -3939,16 +3939,16 @@ .maxstack 9 IL_003e: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_0043: stelem.ref IL_0044: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, string, System.Collections.Generic.IEnumerable, System.Type, System.Collections.Generic.IEnumerable)"" - IL_0049: call ""System.Runtime.CompilerServices.CallSite<<>A{00000040}#2, object>> System.Runtime.CompilerServices.CallSite<<>A{00000040}#2, object>>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_004e: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000040}#2, object>> C.<>o__0#2.<>p__0"" - IL_0053: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000040}#2, object>> C.<>o__0#2.<>p__0"" - IL_0058: ldfld ""<>A{00000040}#2, object> System.Runtime.CompilerServices.CallSite<<>A{00000040}#2, object>>.Target"" - IL_005d: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000040}#2, object>> C.<>o__0#2.<>p__0"" + IL_0049: call ""System.Runtime.CompilerServices.CallSite<<>A{00000200}#2, object>> System.Runtime.CompilerServices.CallSite<<>A{00000200}#2, object>>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_004e: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000200}#2, object>> C.<>o__0#2.<>p__0"" + IL_0053: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000200}#2, object>> C.<>o__0#2.<>p__0"" + IL_0058: ldfld ""<>A{00000200}#2, object> System.Runtime.CompilerServices.CallSite<<>A{00000200}#2, object>>.Target"" + IL_005d: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000200}#2, object>> C.<>o__0#2.<>p__0"" IL_0062: ldarg.0 IL_0063: ldarg.2 IL_0064: newobj ""<>f__AnonymousType1..ctor(object)"" IL_0069: ldarg.1 - IL_006a: callvirt ""void <>A{00000040}#2, object>.Invoke(System.Runtime.CompilerServices.CallSite, dynamic, , ref object)"" + IL_006a: callvirt ""void <>A{00000200}#2, object>.Invoke(System.Runtime.CompilerServices.CallSite, dynamic, , ref object)"" IL_006f: nop IL_0070: ret }"); diff --git a/src/Compilers/CSharp/Test/Emit/Emit/EditAndContinue/EditAndContinueTests.cs b/src/Compilers/CSharp/Test/Emit/Emit/EditAndContinue/EditAndContinueTests.cs index 6b8ba463a5a0d..cd010df67b8ca 100644 --- a/src/Compilers/CSharp/Test/Emit/Emit/EditAndContinue/EditAndContinueTests.cs +++ b/src/Compilers/CSharp/Test/Emit/Emit/EditAndContinue/EditAndContinueTests.cs @@ -1383,7 +1383,7 @@ void F() EncValidation.VerifyModuleMvid(1, reader0, reader1); - CheckNames(readers, reader1.GetTypeDefNames(), "<>A{00001000,00000001}`33", "<>F{00000004}`3"); // new synthesized delegate for the new lambda + CheckNames(readers, reader1.GetTypeDefNames(), "<>A{00040000,100000000}`33", "<>F{00000008}`3"); // new synthesized delegate for the new lambda CheckNames(readers, reader1.GetMethodDefNames(), "F", "b__0_0", ".ctor", "Invoke", ".ctor", "Invoke", "b__0_1#1", "b__0_2#1"); diff1.VerifySynthesizedMembers( diff --git a/src/Compilers/CSharp/Test/Emit/Emit/EditAndContinue/SymbolMatcherTests.cs b/src/Compilers/CSharp/Test/Emit/Emit/EditAndContinue/SymbolMatcherTests.cs index ad2facee6eb29..585168cc0b79d 100644 --- a/src/Compilers/CSharp/Test/Emit/Emit/EditAndContinue/SymbolMatcherTests.cs +++ b/src/Compilers/CSharp/Test/Emit/Emit/EditAndContinue/SymbolMatcherTests.cs @@ -1760,9 +1760,9 @@ static void F() var decoder0 = new MetadataDecoder(peModule0); var synthesizedDelegates0 = PEDeltaAssemblyBuilder.GetAnonymousDelegateMapFromMetadata(reader0, decoder0); - Assert.Contains(new SynthesizedDelegateKey("<>F{00000004}`3"), synthesizedDelegates0); + Assert.Contains(new SynthesizedDelegateKey("<>F{00000008}`3"), synthesizedDelegates0); Assert.Contains(new SynthesizedDelegateKey("<>A{00000003}`2"), synthesizedDelegates0); - Assert.Contains(new SynthesizedDelegateKey("<>A{00000000,00000001}`33"), synthesizedDelegates0); + Assert.Contains(new SynthesizedDelegateKey("<>A{00000000,100000000}`33"), synthesizedDelegates0); Assert.Equal(3, synthesizedDelegates0.Count); var compilation1 = CreateCompilation(source1, options: TestOptions.DebugDll); diff --git a/src/Compilers/CSharp/Test/Emit2/Semantics/RefReadonlyParameterTests.cs b/src/Compilers/CSharp/Test/Emit2/Semantics/RefReadonlyParameterTests.cs index 2256cdafa5d75..5756fdc623ed1 100644 --- a/src/Compilers/CSharp/Test/Emit2/Semantics/RefReadonlyParameterTests.cs +++ b/src/Compilers/CSharp/Test/Emit2/Semantics/RefReadonlyParameterTests.cs @@ -655,7 +655,7 @@ public void Lambda() """; var verifier = CompileAndVerify(source, options: TestOptions.DebugExe.WithMetadataImportOptions(MetadataImportOptions.All), sourceSymbolValidator: verify, symbolValidator: verify, - expectedOutput: "<>f__AnonymousDelegate0`1[System.Int32]"); + expectedOutput: "<>A{00000004}`1[System.Int32]"); verifier.VerifyDiagnostics(); static void verify(ModuleSymbol m) @@ -679,7 +679,7 @@ void local(ref readonly int p) { } """; var verifier = CompileAndVerify(source, options: TestOptions.DebugExe.WithMetadataImportOptions(MetadataImportOptions.All), sourceSymbolValidator: verify, symbolValidator: verify, - expectedOutput: "<>f__AnonymousDelegate0`1[System.Int32]"); + expectedOutput: "<>A{00000004}`1[System.Int32]"); verifier.VerifyDiagnostics(); static void verify(ModuleSymbol m) @@ -704,7 +704,7 @@ public void AnonymousDelegate(string def) System.Console.WriteLine(((object)x).GetType()); """; var verifier = CompileAndVerify(source, sourceSymbolValidator: verify, symbolValidator: verify, - expectedOutput: "<>f__AnonymousDelegate0`1[System.Int32]"); + expectedOutput: "<>A{00000004}`1[System.Int32]"); verifier.VerifyDiagnostics(); static void verify(ModuleSymbol m) @@ -713,7 +713,7 @@ static void verify(ModuleSymbol m) if (m is not SourceModuleSymbol) { - var p = m.GlobalNamespace.GetMember("<>f__AnonymousDelegate0.Invoke").Parameters.Single(); + var p = m.GlobalNamespace.GetMember("<>A{00000004}.Invoke").Parameters.Single(); VerifyRefReadonlyParameter(p, // PROTOTYPE: Invoke method is virtual but no modreq is emitted. This happens for `in` parameters, as well. useSiteError: true); @@ -3452,6 +3452,102 @@ .locals init (int V_0) //x """); } + [Fact] + public void Invocation_Dynamic() + { + var source = """ + class C + { + void M(ref readonly int p) => System.Console.Write(p); + static void Main() + { + dynamic d = 1; + var c = new C(); + try + { + c.M(d); + } + catch (Microsoft.CSharp.RuntimeBinder.RuntimeBinderException) + { + System.Console.Write("exception"); + } + + int i = 2; + dynamic cd = new C(); + cd.M(ref i); + } + void M2(dynamic p) => M(p); + } + """; + var verifier = CompileAndVerify(source, targetFramework: TargetFramework.StandardAndCSharp, expectedOutput: "exception2"); + verifier.VerifyDiagnostics(); + verifier.VerifyIL("C.M2", """ + { + // Code size 92 (0x5c) + .maxstack 9 + IL_0000: ldsfld "System.Runtime.CompilerServices.CallSite> C.<>o__2.<>p__0" + IL_0005: brtrue.s IL_0045 + IL_0007: ldc.i4 0x102 + IL_000c: ldstr "M" + IL_0011: ldnull + IL_0012: ldtoken "C" + IL_0017: call "System.Type System.Type.GetTypeFromHandle(System.RuntimeTypeHandle)" + IL_001c: ldc.i4.2 + IL_001d: newarr "Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo" + IL_0022: dup + IL_0023: ldc.i4.0 + IL_0024: ldc.i4.1 + IL_0025: ldnull + IL_0026: call "Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)" + IL_002b: stelem.ref + IL_002c: dup + IL_002d: ldc.i4.1 + IL_002e: ldc.i4.0 + IL_002f: ldnull + IL_0030: call "Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)" + IL_0035: stelem.ref + IL_0036: call "System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, string, System.Collections.Generic.IEnumerable, System.Type, System.Collections.Generic.IEnumerable)" + IL_003b: call "System.Runtime.CompilerServices.CallSite> System.Runtime.CompilerServices.CallSite>.Create(System.Runtime.CompilerServices.CallSiteBinder)" + IL_0040: stsfld "System.Runtime.CompilerServices.CallSite> C.<>o__2.<>p__0" + IL_0045: ldsfld "System.Runtime.CompilerServices.CallSite> C.<>o__2.<>p__0" + IL_004a: ldfld "System.Action System.Runtime.CompilerServices.CallSite>.Target" + IL_004f: ldsfld "System.Runtime.CompilerServices.CallSite> C.<>o__2.<>p__0" + IL_0054: ldarg.0 + IL_0055: ldarg.1 + IL_0056: callvirt "void System.Action.Invoke(System.Runtime.CompilerServices.CallSite, C, dynamic)" + IL_005b: ret + } + """); + } + + [Fact] + public void Invocation_Dynamic_In() + { + var source = """ + class C + { + public void M(ref readonly int p) => System.Console.WriteLine(p); + static void Main() + { + int x = 1; + dynamic d = new C(); + d.M(in x); + + dynamic y = 2; + C c = new C(); + c.M(in y); + } + } + """; + CreateCompilation(source).VerifyDiagnostics( + // (8,16): error CS8364: Arguments with 'in' modifier cannot be used in dynamically dispatched expressions. + // d.M(in x); + Diagnostic(ErrorCode.ERR_InDynamicMethodArg, "x").WithLocation(8, 16), + // (12,16): error CS1503: Argument 1: cannot convert from 'in dynamic' to 'ref readonly int' + // c.M(in y); + Diagnostic(ErrorCode.ERR_BadArgType, "y").WithArguments("1", "in dynamic", "ref readonly int").WithLocation(12, 16)); + } + [Fact] public void Overridden_RefReadonly_RefReadonly() { diff --git a/src/Compilers/CSharp/Test/Semantic/Semantics/DelegateTypeTests.cs b/src/Compilers/CSharp/Test/Semantic/Semantics/DelegateTypeTests.cs index 337591235a3c7..d78cef15861ce 100644 --- a/src/Compilers/CSharp/Test/Semantic/Semantics/DelegateTypeTests.cs +++ b/src/Compilers/CSharp/Test/Semantic/Semantics/DelegateTypeTests.cs @@ -695,8 +695,8 @@ static void Main() yield return getData("static void F() { }", "F", "F", "System.Action"); yield return getData("static void F(int x, int y) { }", "F", "F", "System.Action"); yield return getData("static void F(out int x, int y) { x = 0; }", "F", "F", "<>A{00000002}"); - yield return getData("static void F(int x, ref int y) { }", "F", "F", "<>A{00000004}"); - yield return getData("static void F(int x, in int y) { }", "F", "F", "<>A{0000000c}"); + yield return getData("static void F(int x, ref int y) { }", "F", "F", "<>A{00000008}"); + yield return getData("static void F(int x, in int y) { }", "F", "F", "<>A{00000018}"); yield return getData("static void F(int _1, object _2, int _3, object _4, int _5, object _6, int _7, object _8, int _9, object _10, int _11, object _12, int _13, object _14, int _15, object _16) { }", "F", "F", "System.Action"); yield return getData("static void F(int _1, object _2, int _3, object _4, int _5, object _6, int _7, object _8, int _9, object _10, int _11, object _12, int _13, object _14, int _15, object _16, int _17) { }", "F", "F", "<>A"); yield return getData("static object F(int _1, object _2, int _3, object _4, int _5, object _6, int _7, object _8, int _9, object _10, int _11, object _12, int _13, object _14, int _15, object _16) => null;", "F", "F", "System.Func"); @@ -810,8 +810,8 @@ static void Main() yield return getData("() => { }", "System.Action"); yield return getData("(int x, int y) => { }", "System.Action"); yield return getData("(out int x, int y) => { x = 0; }", "<>A{00000002}", ""); - yield return getData("(int x, ref int y) => { x = 0; }", "<>A{00000004}", ""); - yield return getData("(int x, in int y) => { x = 0; }", "<>A{0000000c}", ""); + yield return getData("(int x, ref int y) => { x = 0; }", "<>A{00000008}", ""); + yield return getData("(int x, in int y) => { x = 0; }", "<>A{00000018}", ""); yield return getData("(int _1, object _2, int _3, object _4, int _5, object _6, int _7, object _8, int _9, object _10, int _11, object _12, int _13, object _14, int _15, object _16) => { }", "System.Action"); yield return getData("(int _1, object _2, int _3, object _4, int _5, object _6, int _7, object _8, int _9, object _10, int _11, object _12, int _13, object _14, int _15, object _16, int _17) => { }", "<>A", ""); yield return getData("(int _1, object _2, int _3, object _4, int _5, object _6, int _7, object _8, int _9, object _10, int _11, object _12, int _13, object _14, int _15, object _16) => _1", "System.Func"); @@ -837,8 +837,8 @@ static void Main() yield return getData("void () => { }", "System.Action"); // Distinct names for distinct signatures with > 16 parameters: https://github.com/dotnet/roslyn/issues/55570 - yield return getData("(int _1, int _2, int _3, int _4, int _5, int _6, int _7, int _8, int _9, int _10, int _11, int _12, int _13, int _14, int _15, int _16, ref int _17) => { }", "<>A{100000000}", ""); - yield return getData("(int _1, int _2, int _3, int _4, int _5, int _6, int _7, int _8, int _9, int _10, int _11, int _12, int _13, int _14, int _15, int _16, in int _17) => { }", "<>A{300000000}", ""); + yield return getData("(int _1, int _2, int _3, int _4, int _5, int _6, int _7, int _8, int _9, int _10, int _11, int _12, int _13, int _14, int _15, int _16, ref int _17) => { }", "<>A{1000000000000}", ""); + yield return getData("(int _1, int _2, int _3, int _4, int _5, int _6, int _7, int _8, int _9, int _10, int _11, int _12, int _13, int _14, int _15, int _16, in int _17) => { }", "<>A{3000000000000}", ""); static object?[] getData(string expr, string? expectedType, string? expectedDisplayString = null) => new object?[] { expr, expectedType, expectedDisplayString ?? expectedType }; @@ -852,8 +852,8 @@ static void Main() yield return getData("delegate () { }", "System.Action"); yield return getData("delegate (int x, int y) { }", "System.Action"); yield return getData("delegate (out int x, int y) { x = 0; }", "<>A{00000002}", ""); - yield return getData("delegate (int x, ref int y) { x = 0; }", "<>A{00000004}", ""); - yield return getData("delegate (int x, in int y) { x = 0; }", "<>A{0000000c}", ""); + yield return getData("delegate (int x, ref int y) { x = 0; }", "<>A{00000008}", ""); + yield return getData("delegate (int x, in int y) { x = 0; }", "<>A{00000018}", ""); yield return getData("delegate (int _1, object _2, int _3, object _4, int _5, object _6, int _7, object _8, int _9, object _10, int _11, object _12, int _13, object _14, int _15, object _16) { }", "System.Action"); yield return getData("delegate (int _1, object _2, int _3, object _4, int _5, object _6, int _7, object _8, int _9, object _10, int _11, object _12, int _13, object _14, int _15, object _16, int _17) { }", "<>A", ""); yield return getData("delegate (int _1, object _2, int _3, object _4, int _5, object _6, int _7, object _8, int _9, object _10, int _11, object _12, int _13, object _14, int _15, object _16) { return _1; }", "System.Func"); @@ -2041,7 +2041,7 @@ static Delegate F2() static void Report(Delegate d) => Console.WriteLine(d.GetType()); }"; CompileAndVerify(source, expectedOutput: -@"<>A{00000004}`2[System.String,System.Int32] +@"<>A{00000008}`2[System.String,System.Int32] <>F{00000001}`1[System.String] "); } @@ -4972,7 +4972,7 @@ static void Main() Diagnostic(ErrorCode.ERR_ImplicitlyTypedArrayNoBestType, "new[] { F2, F2 }").WithLocation(9, 18)); CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: -@"<>A{00000004}`2[System.String,System.Object] +@"<>A{00000008}`2[System.String,System.Object] <>A{00000001}`2[System.Object,System.String]"); } @@ -5086,7 +5086,7 @@ static void Main() CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @"<>A{00000001}`1[System.Object] <>A{00000001}`1[System.String] -<>A{00000004}`2[System.Object,System.String] +<>A{00000008}`2[System.Object,System.String] "); } @@ -5729,7 +5729,7 @@ static void Main() CompileAndVerify(source, options: TestOptions.ReleaseExe, expectedOutput: @"System.Func`1[System.Object] System.Func`1[System.String] -<>A{00000004}`2[System.Object,System.String] +<>A{00000008}`2[System.Object,System.String] <>A{00000001}`2[System.Object,System.String] "); } @@ -8481,9 +8481,9 @@ static void Main() var verifier = CompileAndVerify(comp, expectedOutput: @"<>A{00000001}`2[System.Int32,System.Int32] -<>A{00000004}`2[System.Int32,System.Int32] +<>A{00000008}`2[System.Int32,System.Int32] <>A{00000001}`2[System.Single,System.Int32] -<>A{00000004}`2[System.Single,System.Int32] +<>A{00000008}`2[System.Single,System.Int32] "); verifier.VerifyIL("Program.Main", @"{ @@ -8505,7 +8505,7 @@ .maxstack 2 IL_002c: pop IL_002d: ldsfld ""Program.<>c Program.<>c.<>9"" IL_0032: ldftn ""void Program.<>c.
b__0_1(int, ref int)"" - IL_0038: newobj ""<>A{00000004}..ctor(object, System.IntPtr)"" + IL_0038: newobj ""<>A{00000008}..ctor(object, System.IntPtr)"" IL_003d: dup IL_003e: stsfld "" Program.<>c.<>9__0_1"" IL_0043: call ""void Program.Report(System.Delegate)"" @@ -8525,7 +8525,7 @@ .maxstack 2 IL_0074: pop IL_0075: ldsfld ""Program.<>c Program.<>c.<>9"" IL_007a: ldftn ""void Program.<>c.
b__0_3(float, ref int)"" - IL_0080: newobj ""<>A{00000004}..ctor(object, System.IntPtr)"" + IL_0080: newobj ""<>A{00000008}..ctor(object, System.IntPtr)"" IL_0085: dup IL_0086: stsfld "" Program.<>c.<>9__0_3"" IL_008b: call ""void Program.Report(System.Delegate)"" @@ -8698,8 +8698,8 @@ static void Main() var verifier = CompileAndVerify(comp, verify: Verification.Skipped, expectedOutput: @"<>F{00000001}`2[System.Int32,System.Int32] -<>F{00000005}`2[System.Int32,System.Int32] -<>F{0000000d}`2[System.Int32,System.Int32] +<>F{00000009}`2[System.Int32,System.Int32] +<>F{00000019}`2[System.Int32,System.Int32] "); verifier.VerifyIL("Program.Main", @"{ @@ -8721,7 +8721,7 @@ .maxstack 2 IL_002c: pop IL_002d: ldsfld ""Program.<>c Program.<>c.<>9"" IL_0032: ldftn ""ref int Program.<>c.
b__0_1(ref int)"" - IL_0038: newobj ""<>F{00000005}..ctor(object, System.IntPtr)"" + IL_0038: newobj ""<>F{00000009}..ctor(object, System.IntPtr)"" IL_003d: dup IL_003e: stsfld "" Program.<>c.<>9__0_1"" IL_0043: call ""void Program.Report(System.Delegate)"" @@ -8731,7 +8731,7 @@ .maxstack 2 IL_0050: pop IL_0051: ldsfld ""Program.<>c Program.<>c.<>9"" IL_0056: ldftn ""ref readonly int Program.<>c.
b__0_2(ref int)"" - IL_005c: newobj ""<>F{0000000d}..ctor(object, System.IntPtr)"" + IL_005c: newobj ""<>F{00000019}..ctor(object, System.IntPtr)"" IL_0061: dup IL_0062: stsfld "" Program.<>c.<>9__0_2"" IL_0067: call ""void Program.Report(System.Delegate)"" @@ -9173,9 +9173,9 @@ static void Main() System.Action`1[System.ValueTuple`2[System.Int32,System.Int32]] System.Action`2[System.Object,System.Object[]] <>A{00000001}`2[System.Object,System.Object] -<>A{00000004}`2[System.IntPtr,System.IntPtr] +<>A{00000008}`2[System.IntPtr,System.IntPtr] <>A{00000001}`1[System.ValueTuple`2[System.Int32,System.Int32]] -<>A{00000004}`2[System.Object,System.Object[]] +<>A{00000008}`2[System.Object,System.Object[]] "); } @@ -9200,9 +9200,9 @@ static void Main() var comp = CreateCompilation(source, options: TestOptions.ReleaseExe); CompileAndVerify(comp, expectedOutput: @"<>F`18[System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Int32] -<>F{200000000}`18[System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Int32] -<>F{100000000}`18[System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Int32] -<>F{300000000}`18[System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Int32] +<>F{2000000000000}`18[System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Int32] +<>F{1000000000000}`18[System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Int32] +<>F{3000000000000}`18[System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Int32] "); } @@ -9231,9 +9231,9 @@ static void Main() var comp = CreateCompilation(source, options: TestOptions.ReleaseExe); CompileAndVerify(comp, expectedOutput: @"<>A{00000001}`18[System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object] -<>A{800000001}`18[System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object] -<>A{400000001}`18[System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object] -<>A{c00000001}`18[System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object] +<>A{10000000000001}`18[System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object] +<>A{8000000000001}`18[System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object] +<>A{18000000000001}`18[System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object] "); } @@ -9269,10 +9269,10 @@ static void Main() var comp = CreateCompilation(source, options: TestOptions.ReleaseExe); CompileAndVerify(comp, expectedOutput: -@"<>A{4000000000000000\,00000000}`33[System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32] -<>A{4000000000000000\,00000002}`33[System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32] -<>A{4000000000000000\,00000001}`33[System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32] -<>A{4000000000000000\,00000003}`33[System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32] +@"<>A{00000000\,20000000}`33[System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32] +<>A{00000000\,220000000}`33[System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32] +<>A{00000000\,120000000}`33[System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32] +<>A{00000000\,320000000}`33[System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32,System.Object,System.Int32] "); } @@ -9343,7 +9343,7 @@ static void Main() var verifier = CompileAndVerify(comp, validator: validator, expectedOutput: @"<>A{00000001}`2[System.Object,System.Object] D2 -<>A{00000009}`2[System.Object,System.Object] +<>A{00000011}`2[System.Object,System.Object] D4"); static void validator(PEAssembly assembly) @@ -9351,7 +9351,7 @@ static void validator(PEAssembly assembly) var reader = assembly.GetMetadataReader(); var actualTypes = reader.GetTypeDefNames().Select(h => reader.GetString(h)).ToArray(); - string[] expectedTypes = new[] { "", "<>A{00000001}`2", "<>A{00000009}`2", "D2", "D4", "Program", "<>c", }; + string[] expectedTypes = new[] { "", "<>A{00000001}`2", "<>A{00000011}`2", "D2", "D4", "Program", "<>c", }; AssertEx.Equal(expectedTypes, actualTypes); } } @@ -10915,12 +10915,12 @@ static void Main() """; var verifier = CompileAndVerify(source, targetFramework: TargetFramework.Net70, verify: Verification.Skipped, expectedOutput: """ - <>F{00000015}`3[System.Int32,System.Int32,System.Int32] + <>F{00000049}`3[System.Int32,System.Int32,System.Int32] <>f__AnonymousDelegate0 <>f__AnonymousDelegate1 <>f__AnonymousDelegate1 <>f__AnonymousDelegate0 - <>F{00000015}`3[System.Int32,System.Int32,System.Int32] + <>F{00000049}`3[System.Int32,System.Int32,System.Int32] """); } diff --git a/src/Compilers/CSharp/Test/Semantic/Semantics/InterpolationTests.cs b/src/Compilers/CSharp/Test/Semantic/Semantics/InterpolationTests.cs index 57e9ba8d211a9..bca13f8eb6704 100644 --- a/src/Compilers/CSharp/Test/Semantic/Semantics/InterpolationTests.cs +++ b/src/Compilers/CSharp/Test/Semantic/Semantics/InterpolationTests.cs @@ -14143,7 +14143,7 @@ .locals init (object V_0, //d IL_0010: ldloca.s V_1 IL_0012: ldstr ""literal"" IL_0017: call ""void CustomHandler.AppendLiteral(dynamic)"" - IL_001c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> Program.<>o__0.<>p__0"" + IL_001c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> Program.<>o__0.<>p__0"" IL_0021: brtrue.s IL_0062 IL_0023: ldc.i4 0x100 IL_0028: ldstr ""AppendFormatted"" @@ -14165,14 +14165,14 @@ .locals init (object V_0, //d IL_004d: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_0052: stelem.ref IL_0053: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, string, System.Collections.Generic.IEnumerable, System.Type, System.Collections.Generic.IEnumerable)"" - IL_0058: call ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> System.Runtime.CompilerServices.CallSite<<>A{00000004}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_005d: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> Program.<>o__0.<>p__0"" - IL_0062: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> Program.<>o__0.<>p__0"" - IL_0067: ldfld ""<>A{00000004} System.Runtime.CompilerServices.CallSite<<>A{00000004}>.Target"" - IL_006c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> Program.<>o__0.<>p__0"" + IL_0058: call ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> System.Runtime.CompilerServices.CallSite<<>A{00000008}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_005d: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> Program.<>o__0.<>p__0"" + IL_0062: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> Program.<>o__0.<>p__0"" + IL_0067: ldfld ""<>A{00000008} System.Runtime.CompilerServices.CallSite<<>A{00000008}>.Target"" + IL_006c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> Program.<>o__0.<>p__0"" IL_0071: ldloca.s V_1 IL_0073: ldloc.0 - IL_0074: callvirt ""void <>A{00000004}.Invoke(System.Runtime.CompilerServices.CallSite, ref CustomHandler, dynamic)"" + IL_0074: callvirt ""void <>A{00000008}.Invoke(System.Runtime.CompilerServices.CallSite, ref CustomHandler, dynamic)"" IL_0079: ldloc.1 IL_007a: call ""void Program.<
$>g__M|0_0(CustomHandler)"" IL_007f: ret @@ -14250,7 +14250,7 @@ .locals init (object V_0, //d IL_004c: ldsfld ""System.Runtime.CompilerServices.CallSite> Program.<>o__0.<>p__1"" IL_0051: ldfld ""System.Func System.Runtime.CompilerServices.CallSite>.Target"" IL_0056: ldsfld ""System.Runtime.CompilerServices.CallSite> Program.<>o__0.<>p__1"" - IL_005b: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000004}> Program.<>o__0.<>p__0"" + IL_005b: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000008}> Program.<>o__0.<>p__0"" IL_0060: brtrue.s IL_009d IL_0062: ldc.i4.0 IL_0063: ldstr ""AppendFormatted"" @@ -14272,14 +14272,14 @@ .locals init (object V_0, //d IL_0088: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_008d: stelem.ref IL_008e: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, string, System.Collections.Generic.IEnumerable, System.Type, System.Collections.Generic.IEnumerable)"" - IL_0093: call ""System.Runtime.CompilerServices.CallSite<<>F{00000004}> System.Runtime.CompilerServices.CallSite<<>F{00000004}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_0098: stsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000004}> Program.<>o__0.<>p__0"" - IL_009d: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000004}> Program.<>o__0.<>p__0"" - IL_00a2: ldfld ""<>F{00000004} System.Runtime.CompilerServices.CallSite<<>F{00000004}>.Target"" - IL_00a7: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000004}> Program.<>o__0.<>p__0"" + IL_0093: call ""System.Runtime.CompilerServices.CallSite<<>F{00000008}> System.Runtime.CompilerServices.CallSite<<>F{00000008}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_0098: stsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000008}> Program.<>o__0.<>p__0"" + IL_009d: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000008}> Program.<>o__0.<>p__0"" + IL_00a2: ldfld ""<>F{00000008} System.Runtime.CompilerServices.CallSite<<>F{00000008}>.Target"" + IL_00a7: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000008}> Program.<>o__0.<>p__0"" IL_00ac: ldloca.s V_1 IL_00ae: ldloc.0 - IL_00af: callvirt ""dynamic <>F{00000004}.Invoke(System.Runtime.CompilerServices.CallSite, ref CustomHandler, dynamic)"" + IL_00af: callvirt ""dynamic <>F{00000008}.Invoke(System.Runtime.CompilerServices.CallSite, ref CustomHandler, dynamic)"" IL_00b4: callvirt ""bool System.Func.Invoke(System.Runtime.CompilerServices.CallSite, dynamic)"" IL_00b9: br.s IL_00bc IL_00bb: ldc.i4.0 diff --git a/src/Compilers/CSharp/Test/Semantic/Semantics/OutVarTests.cs b/src/Compilers/CSharp/Test/Semantic/Semantics/OutVarTests.cs index 79dd439e040da..ca301af629032 100644 --- a/src/Compilers/CSharp/Test/Semantic/Semantics/OutVarTests.cs +++ b/src/Compilers/CSharp/Test/Semantic/Semantics/OutVarTests.cs @@ -20063,7 +20063,7 @@ .locals init (object V_0, //d int V_1) //z IL_0000: ldnull IL_0001: stloc.0 - IL_0002: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000010}> Cls.<>o__0.<>p__0"" + IL_0002: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000040}> Cls.<>o__0.<>p__0"" IL_0007: brtrue.s IL_003e IL_0009: ldc.i4.0 IL_000a: ldtoken ""Cls"" @@ -20083,14 +20083,14 @@ .locals init (object V_0, //d IL_0029: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_002e: stelem.ref IL_002f: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.GetIndex(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, System.Type, System.Collections.Generic.IEnumerable)"" - IL_0034: call ""System.Runtime.CompilerServices.CallSite<<>F{00000010}> System.Runtime.CompilerServices.CallSite<<>F{00000010}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_0039: stsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000010}> Cls.<>o__0.<>p__0"" - IL_003e: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000010}> Cls.<>o__0.<>p__0"" - IL_0043: ldfld ""<>F{00000010} System.Runtime.CompilerServices.CallSite<<>F{00000010}>.Target"" - IL_0048: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000010}> Cls.<>o__0.<>p__0"" + IL_0034: call ""System.Runtime.CompilerServices.CallSite<<>F{00000040}> System.Runtime.CompilerServices.CallSite<<>F{00000040}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_0039: stsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000040}> Cls.<>o__0.<>p__0"" + IL_003e: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000040}> Cls.<>o__0.<>p__0"" + IL_0043: ldfld ""<>F{00000040} System.Runtime.CompilerServices.CallSite<<>F{00000040}>.Target"" + IL_0048: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000040}> Cls.<>o__0.<>p__0"" IL_004d: ldloc.0 IL_004e: ldloca.s V_1 - IL_0050: callvirt ""dynamic <>F{00000010}.Invoke(System.Runtime.CompilerServices.CallSite, dynamic, ref int)"" + IL_0050: callvirt ""dynamic <>F{00000040}.Invoke(System.Runtime.CompilerServices.CallSite, dynamic, ref int)"" IL_0055: pop IL_0056: ret }"); @@ -20118,7 +20118,7 @@ .locals init (object V_0, //d int V_1) IL_0000: ldnull IL_0001: stloc.0 - IL_0002: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000010}> Cls.<>o__0.<>p__0"" + IL_0002: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000040}> Cls.<>o__0.<>p__0"" IL_0007: brtrue.s IL_003e IL_0009: ldc.i4.0 IL_000a: ldtoken ""Cls"" @@ -20138,14 +20138,14 @@ .locals init (object V_0, //d IL_0029: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_002e: stelem.ref IL_002f: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.GetIndex(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, System.Type, System.Collections.Generic.IEnumerable)"" - IL_0034: call ""System.Runtime.CompilerServices.CallSite<<>F{00000010}> System.Runtime.CompilerServices.CallSite<<>F{00000010}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_0039: stsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000010}> Cls.<>o__0.<>p__0"" - IL_003e: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000010}> Cls.<>o__0.<>p__0"" - IL_0043: ldfld ""<>F{00000010} System.Runtime.CompilerServices.CallSite<<>F{00000010}>.Target"" - IL_0048: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000010}> Cls.<>o__0.<>p__0"" + IL_0034: call ""System.Runtime.CompilerServices.CallSite<<>F{00000040}> System.Runtime.CompilerServices.CallSite<<>F{00000040}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_0039: stsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000040}> Cls.<>o__0.<>p__0"" + IL_003e: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000040}> Cls.<>o__0.<>p__0"" + IL_0043: ldfld ""<>F{00000040} System.Runtime.CompilerServices.CallSite<<>F{00000040}>.Target"" + IL_0048: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000040}> Cls.<>o__0.<>p__0"" IL_004d: ldloc.0 IL_004e: ldloca.s V_1 - IL_0050: callvirt ""dynamic <>F{00000010}.Invoke(System.Runtime.CompilerServices.CallSite, dynamic, ref int)"" + IL_0050: callvirt ""dynamic <>F{00000040}.Invoke(System.Runtime.CompilerServices.CallSite, dynamic, ref int)"" IL_0055: pop IL_0056: ret } diff --git a/src/Compilers/CSharp/Test/Semantic/Semantics/RawInterpolationTests_Handler.cs b/src/Compilers/CSharp/Test/Semantic/Semantics/RawInterpolationTests_Handler.cs index 1f1d68f80db0f..c6cd7ca1a6d26 100644 --- a/src/Compilers/CSharp/Test/Semantic/Semantics/RawInterpolationTests_Handler.cs +++ b/src/Compilers/CSharp/Test/Semantic/Semantics/RawInterpolationTests_Handler.cs @@ -10806,7 +10806,7 @@ .locals init (object V_0, //d IL_0010: ldloca.s V_1 IL_0012: ldstr ""literal"" IL_0017: call ""void CustomHandler.AppendLiteral(dynamic)"" - IL_001c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> Program.<>o__0.<>p__0"" + IL_001c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> Program.<>o__0.<>p__0"" IL_0021: brtrue.s IL_0062 IL_0023: ldc.i4 0x100 IL_0028: ldstr ""AppendFormatted"" @@ -10828,14 +10828,14 @@ .locals init (object V_0, //d IL_004d: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_0052: stelem.ref IL_0053: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, string, System.Collections.Generic.IEnumerable, System.Type, System.Collections.Generic.IEnumerable)"" - IL_0058: call ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> System.Runtime.CompilerServices.CallSite<<>A{00000004}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_005d: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> Program.<>o__0.<>p__0"" - IL_0062: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> Program.<>o__0.<>p__0"" - IL_0067: ldfld ""<>A{00000004} System.Runtime.CompilerServices.CallSite<<>A{00000004}>.Target"" - IL_006c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> Program.<>o__0.<>p__0"" + IL_0058: call ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> System.Runtime.CompilerServices.CallSite<<>A{00000008}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_005d: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> Program.<>o__0.<>p__0"" + IL_0062: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> Program.<>o__0.<>p__0"" + IL_0067: ldfld ""<>A{00000008} System.Runtime.CompilerServices.CallSite<<>A{00000008}>.Target"" + IL_006c: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> Program.<>o__0.<>p__0"" IL_0071: ldloca.s V_1 IL_0073: ldloc.0 - IL_0074: callvirt ""void <>A{00000004}.Invoke(System.Runtime.CompilerServices.CallSite, ref CustomHandler, dynamic)"" + IL_0074: callvirt ""void <>A{00000008}.Invoke(System.Runtime.CompilerServices.CallSite, ref CustomHandler, dynamic)"" IL_0079: ldloc.1 IL_007a: call ""void Program.<
$>g__M|0_0(CustomHandler)"" IL_007f: ret @@ -10913,7 +10913,7 @@ .locals init (object V_0, //d IL_004c: ldsfld ""System.Runtime.CompilerServices.CallSite> Program.<>o__0.<>p__1"" IL_0051: ldfld ""System.Func System.Runtime.CompilerServices.CallSite>.Target"" IL_0056: ldsfld ""System.Runtime.CompilerServices.CallSite> Program.<>o__0.<>p__1"" - IL_005b: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000004}> Program.<>o__0.<>p__0"" + IL_005b: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000008}> Program.<>o__0.<>p__0"" IL_0060: brtrue.s IL_009d IL_0062: ldc.i4.0 IL_0063: ldstr ""AppendFormatted"" @@ -10935,14 +10935,14 @@ .locals init (object V_0, //d IL_0088: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_008d: stelem.ref IL_008e: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, string, System.Collections.Generic.IEnumerable, System.Type, System.Collections.Generic.IEnumerable)"" - IL_0093: call ""System.Runtime.CompilerServices.CallSite<<>F{00000004}> System.Runtime.CompilerServices.CallSite<<>F{00000004}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_0098: stsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000004}> Program.<>o__0.<>p__0"" - IL_009d: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000004}> Program.<>o__0.<>p__0"" - IL_00a2: ldfld ""<>F{00000004} System.Runtime.CompilerServices.CallSite<<>F{00000004}>.Target"" - IL_00a7: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000004}> Program.<>o__0.<>p__0"" + IL_0093: call ""System.Runtime.CompilerServices.CallSite<<>F{00000008}> System.Runtime.CompilerServices.CallSite<<>F{00000008}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_0098: stsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000008}> Program.<>o__0.<>p__0"" + IL_009d: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000008}> Program.<>o__0.<>p__0"" + IL_00a2: ldfld ""<>F{00000008} System.Runtime.CompilerServices.CallSite<<>F{00000008}>.Target"" + IL_00a7: ldsfld ""System.Runtime.CompilerServices.CallSite<<>F{00000008}> Program.<>o__0.<>p__0"" IL_00ac: ldloca.s V_1 IL_00ae: ldloc.0 - IL_00af: callvirt ""dynamic <>F{00000004}.Invoke(System.Runtime.CompilerServices.CallSite, ref CustomHandler, dynamic)"" + IL_00af: callvirt ""dynamic <>F{00000008}.Invoke(System.Runtime.CompilerServices.CallSite, ref CustomHandler, dynamic)"" IL_00b4: callvirt ""bool System.Func.Invoke(System.Runtime.CompilerServices.CallSite, dynamic)"" IL_00b9: br.s IL_00bc IL_00bb: ldc.i4.0 diff --git a/src/Compilers/CSharp/Test/Semantic/Semantics/SemanticErrorTests.cs b/src/Compilers/CSharp/Test/Semantic/Semantics/SemanticErrorTests.cs index d56298b02f8e8..22ed34d314949 100644 --- a/src/Compilers/CSharp/Test/Semantic/Semantics/SemanticErrorTests.cs +++ b/src/Compilers/CSharp/Test/Semantic/Semantics/SemanticErrorTests.cs @@ -7110,7 +7110,7 @@ .maxstack 9 IL_0000: ldarg.0 IL_0001: ldnull IL_0002: stfld ""dynamic S.value"" - IL_0007: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> S.<>o__1.<>p__0"" + IL_0007: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> S.<>o__1.<>p__0"" IL_000c: brtrue.s IL_004d IL_000e: ldc.i4 0x102 IL_0013: ldstr ""Add"" @@ -7132,14 +7132,14 @@ .maxstack 9 IL_0038: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_003d: stelem.ref IL_003e: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, string, System.Collections.Generic.IEnumerable, System.Type, System.Collections.Generic.IEnumerable)"" - IL_0043: call ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> System.Runtime.CompilerServices.CallSite<<>A{00000004}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_0048: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> S.<>o__1.<>p__0"" - IL_004d: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> S.<>o__1.<>p__0"" - IL_0052: ldfld ""<>A{00000004} System.Runtime.CompilerServices.CallSite<<>A{00000004}>.Target"" - IL_0057: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> S.<>o__1.<>p__0"" + IL_0043: call ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> System.Runtime.CompilerServices.CallSite<<>A{00000008}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_0048: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> S.<>o__1.<>p__0"" + IL_004d: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> S.<>o__1.<>p__0"" + IL_0052: ldfld ""<>A{00000008} System.Runtime.CompilerServices.CallSite<<>A{00000008}>.Target"" + IL_0057: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> S.<>o__1.<>p__0"" IL_005c: ldarg.0 IL_005d: ldarg.1 - IL_005e: callvirt ""void <>A{00000004}.Invoke(System.Runtime.CompilerServices.CallSite, ref S, dynamic)"" + IL_005e: callvirt ""void <>A{00000008}.Invoke(System.Runtime.CompilerServices.CallSite, ref S, dynamic)"" IL_0063: newobj ""System.NotImplementedException..ctor()"" IL_0068: throw }"); @@ -7181,7 +7181,7 @@ .maxstack 9 IL_0000: ldarg.0 IL_0001: ldnull IL_0002: stfld ""dynamic S.value"" - IL_0007: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> S.<>o__1.<>p__0"" + IL_0007: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> S.<>o__1.<>p__0"" IL_000c: brtrue.s IL_004d IL_000e: ldc.i4 0x100 IL_0013: ldstr ""Add"" @@ -7203,14 +7203,14 @@ .maxstack 9 IL_0038: call ""Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfo.Create(Microsoft.CSharp.RuntimeBinder.CSharpArgumentInfoFlags, string)"" IL_003d: stelem.ref IL_003e: call ""System.Runtime.CompilerServices.CallSiteBinder Microsoft.CSharp.RuntimeBinder.Binder.InvokeMember(Microsoft.CSharp.RuntimeBinder.CSharpBinderFlags, string, System.Collections.Generic.IEnumerable, System.Type, System.Collections.Generic.IEnumerable)"" - IL_0043: call ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> System.Runtime.CompilerServices.CallSite<<>A{00000004}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" - IL_0048: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> S.<>o__1.<>p__0"" - IL_004d: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> S.<>o__1.<>p__0"" - IL_0052: ldfld ""<>A{00000004} System.Runtime.CompilerServices.CallSite<<>A{00000004}>.Target"" - IL_0057: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000004}> S.<>o__1.<>p__0"" + IL_0043: call ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> System.Runtime.CompilerServices.CallSite<<>A{00000008}>.Create(System.Runtime.CompilerServices.CallSiteBinder)"" + IL_0048: stsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> S.<>o__1.<>p__0"" + IL_004d: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> S.<>o__1.<>p__0"" + IL_0052: ldfld ""<>A{00000008} System.Runtime.CompilerServices.CallSite<<>A{00000008}>.Target"" + IL_0057: ldsfld ""System.Runtime.CompilerServices.CallSite<<>A{00000008}> S.<>o__1.<>p__0"" IL_005c: ldarg.0 IL_005d: ldarg.1 - IL_005e: callvirt ""void <>A{00000004}.Invoke(System.Runtime.CompilerServices.CallSite, ref S, dynamic)"" + IL_005e: callvirt ""void <>A{00000008}.Invoke(System.Runtime.CompilerServices.CallSite, ref S, dynamic)"" IL_0063: newobj ""System.NotImplementedException..ctor()"" IL_0068: throw }");