From 429ea27928499f9345db36ec751bc6c4dd59a858 Mon Sep 17 00:00:00 2001 From: Friedrich von Never Date: Thu, 19 Dec 2024 21:57:23 +0100 Subject: [PATCH] (#751) Tests: update test output, log all types in CodeGenArrayTests --- Cesium.CodeGen.Tests/CodeGenArrayTests.cs | 8 +- Cesium.CodeGen.Tests/CodeGenTestBase.cs | 17 ++- ...eGenArrayTests.ArrayAddressOf.verified.txt | 55 ++++---- ...GenArrayTests.ArrayArithmetic.verified.txt | 74 ++++++----- ...GenArrayTests.ArrayAssignment.verified.txt | 67 +++++----- ...rrayTests.ArrayCharComparison.verified.txt | 90 +++++++------ ...ArrayElementIndexInComparison.verified.txt | 69 +++++----- ....ArrayElementIndexViaVariable.verified.txt | 71 +++++----- ...rrayTests.ArrayInitialization.verified.txt | 86 ++++++------ ...Tests.ArrayInitializationChar.verified.txt | 86 ++++++------ ...rrayInitializationWithoutSize.verified.txt | 108 ++++++++------- ...rayInitializerConstExpression.verified.txt | 88 ++++++------ ...enArrayTests.ArrayOverPointer.verified.txt | 125 +++++++++--------- ...ayTests.ArrayParameterPassing.verified.txt | 19 +-- ...ayTests.ArrayStringComparison.verified.txt | 90 +++++++------ ...ayTests.ComplexTypeAssignment.verified.txt | 75 ++++++----- ...ArrayTests.ConstByteArrayTest.verified.txt | 58 ++++---- ....ConstExpressionSizeArrayTest.verified.txt | 58 ++++---- ...ests.EmptyArrayInitialization.verified.txt | 67 +++++----- ...nArrayTests.EnumArraySizeTest.verified.txt | 17 ++- ...ayTests.GlobalArrayAssignment.verified.txt | 69 +++++----- ...sts.GlobalArrayInitialization.verified.txt | 88 ++++++------ ...rrayInitializationWithoutSize.verified.txt | 109 ++++++++------- ...ltidimensionalArrayAssignment.verified.txt | 89 +++++++------ ...ltidimensionalArrayAssignment.verified.txt | 87 ++++++------ ...tidimensionalArrayComplexExpr.verified.txt | 69 +++++----- ...rayTests.PointerArrayIndexing.verified.txt | 71 +++++----- ...eGenArrayTests.PointerAsArray.verified.txt | 81 ++++++------ ...rrayTests.SignedByteArrayTest.verified.txt | 84 +++++++----- ...ayTests.StaticStringArrayTest.verified.txt | 48 ++++--- ...taticStructArrayFixedSizeTest.verified.txt | 28 ++-- ...ayTests.StaticStructArrayTest.verified.txt | 12 +- ...GenArrayTests.StringArrayTest.verified.txt | 46 ++++--- ...ests.StructArrayFixedSizeTest.verified.txt | 28 ++-- ...GenArrayTests.StructArrayTest.verified.txt | 7 +- ...tructArrayTestWithInitializer.verified.txt | 26 ++-- ...ests.SymmetricArrayAssignment.verified.txt | 67 +++++----- ...yTests.UnSignedByteArrayTest2.verified.txt | 84 +++++++----- 38 files changed, 1363 insertions(+), 1058 deletions(-) diff --git a/Cesium.CodeGen.Tests/CodeGenArrayTests.cs b/Cesium.CodeGen.Tests/CodeGenArrayTests.cs index eb3f57b2..cbe973f8 100644 --- a/Cesium.CodeGen.Tests/CodeGenArrayTests.cs +++ b/Cesium.CodeGen.Tests/CodeGenArrayTests.cs @@ -9,9 +9,7 @@ public class CodeGenArrayTests : CodeGenTestBase private static Task DoTest([StringSyntax("cpp")] string source) { var assembly = GenerateAssembly(default, source); - - var moduleType = assembly.Modules.Single().GetType(""); - return VerifyMethods(moduleType); + return VerifyTypes(assembly); } [Fact] @@ -245,8 +243,8 @@ int main() { } return 1; -}"); - +}"); + [Fact] public Task ConstExpressionSizeArrayTest() => DoTest(@" int main() { diff --git a/Cesium.CodeGen.Tests/CodeGenTestBase.cs b/Cesium.CodeGen.Tests/CodeGenTestBase.cs index ab98bb7d..e124cbfe 100644 --- a/Cesium.CodeGen.Tests/CodeGenTestBase.cs +++ b/Cesium.CodeGen.Tests/CodeGenTestBase.cs @@ -3,6 +3,7 @@ using Cesium.CodeGen.Contexts; using Cesium.Core; using Cesium.Parser; +using Cesium.Runtime; using Cesium.TestFramework; using JetBrains.Annotations; using Mono.Cecil; @@ -87,7 +88,7 @@ private static AssemblyContext CreateAssembly( targetArchitectureSet, ModuleKind.Console, typeof(Math).Assembly.Location, - typeof(Runtime.RuntimeHelpers).Assembly.Location, + typeof(RuntimeHelpers).Assembly.Location, allReferences, @namespace, globalTypeFqn, @@ -212,8 +213,18 @@ private static void DumpTypes(IEnumerable types, StringBuilder r ? initialValue.Length - 1 : initialValue.Length; var value = Encoding.UTF8.GetString(initialValue, 0, length); - result.AppendLine( - $"{Indent(indent + 2)}Init with (UTF-8 x {initialValue.Length} bytes): \"{value}\""); + result.Append( + $"{Indent(indent + 2)}Init with (UTF-8 x {initialValue.Length} bytes): \""); + foreach (var c in value) + { + result.Append(c switch + { + _ when Char.IsControl(c) => $"\\{(int)c:X}", + _ => c + }); + } + + result.AppendLine("\""); } else { diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayAddressOf.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayAddressOf.verified.txt index c3cf9250..3c789381 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayAddressOf.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayAddressOf.verified.txt @@ -1,27 +1,30 @@ -System.Int32 ::main() - Locals: - System.Int32* V_0 - System.Int32* V_1 - IL_0000: ldc.i4.s 40 - IL_0002: conv.u - IL_0003: localloc - IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: ldc.i4.2 - IL_0008: conv.i - IL_0009: ldc.i4 4 - IL_000e: mul - IL_000f: add - IL_0010: stloc.1 - IL_0011: ldc.i4.0 - IL_0012: ret +Module: Primary + Type: + Methods: + System.Int32 ::main() + Locals: + System.Int32* V_0 + System.Int32* V_1 + IL_0000: ldc.i4.s 40 + IL_0002: conv.u + IL_0003: localloc + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldc.i4.2 + IL_0008: conv.i + IL_0009: ldc.i4 4 + IL_000e: mul + IL_000f: add + IL_0010: stloc.1 + IL_0011: ldc.i4.0 + IL_0012: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayArithmetic.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayArithmetic.verified.txt index 4118bf73..7b4961bb 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayArithmetic.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayArithmetic.verified.txt @@ -1,32 +1,44 @@ -System.Int32 ::main() - Locals: - System.Int32* V_0 - System.Int32* V_1 - IL_0000: ldc.i4.8 - IL_0001: conv.u - IL_0002: localloc - IL_0004: stloc.0 - IL_0005: ldsflda / ::ConstDataBuffer0 - IL_000a: ldloc V_0 - IL_000e: ldc.i4.8 - IL_000f: conv.u - IL_0010: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) - IL_0015: ldloc.0 - IL_0016: ldc.i4.4 - IL_0017: ldc.i4.1 - IL_0018: mul - IL_0019: add - IL_001a: stloc.1 - IL_001b: ldloc.1 - IL_001c: ldind.i4 - IL_001d: ret +Module: Primary + Type: + Methods: + System.Int32 ::main() + Locals: + System.Int32* V_0 + System.Int32* V_1 + IL_0000: ldc.i4.8 + IL_0001: conv.u + IL_0002: localloc + IL_0004: stloc.0 + IL_0005: ldsflda / ::ConstDataBuffer0 + IL_000a: ldloc V_0 + IL_000e: ldc.i4.8 + IL_000f: conv.u + IL_0010: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) + IL_0015: ldloc.0 + IL_0016: ldc.i4.4 + IL_0017: ldc.i4.1 + IL_0018: mul + IL_0019: add + IL_001a: stloc.1 + IL_001b: ldloc.1 + IL_001c: ldind.i4 + IL_001d: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret + + Type: + Nested types: + Type: / + Pack: 1 + Size: 8 + Fields: + / ::ConstDataBuffer0 + Init with (UTF-8 x 8 bytes): "\0\0\0\0\0\0\0" diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayAssignment.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayAssignment.verified.txt index 7034b88a..7e0cdd39 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayAssignment.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayAssignment.verified.txt @@ -1,33 +1,36 @@ -System.Int32 ::main() - Locals: - System.Int32* V_0 - IL_0000: ldc.i4.s 40 - IL_0002: conv.u - IL_0003: localloc - IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: ldc.i4.1 - IL_0008: conv.i - IL_0009: ldc.i4 4 - IL_000e: mul - IL_000f: add - IL_0010: ldc.i4.2 - IL_0011: stind.i4 - IL_0012: ldloc.0 - IL_0013: ldc.i4.1 - IL_0014: conv.i - IL_0015: ldc.i4 4 - IL_001a: mul - IL_001b: add - IL_001c: ldind.i4 - IL_001d: ret +Module: Primary + Type: + Methods: + System.Int32 ::main() + Locals: + System.Int32* V_0 + IL_0000: ldc.i4.s 40 + IL_0002: conv.u + IL_0003: localloc + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldc.i4.1 + IL_0008: conv.i + IL_0009: ldc.i4 4 + IL_000e: mul + IL_000f: add + IL_0010: ldc.i4.2 + IL_0011: stind.i4 + IL_0012: ldloc.0 + IL_0013: ldc.i4.1 + IL_0014: conv.i + IL_0015: ldc.i4 4 + IL_001a: mul + IL_001b: add + IL_001c: ldind.i4 + IL_001d: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayCharComparison.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayCharComparison.verified.txt index 3d95e9f3..0388904f 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayCharComparison.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayCharComparison.verified.txt @@ -1,40 +1,52 @@ -System.Int32 ::main() - Locals: - System.Byte* V_0 - IL_0000: ldc.i4.1 - IL_0001: conv.u - IL_0002: localloc - IL_0004: stloc.0 - IL_0005: ldsflda / ::ConstDataBuffer0 - IL_000a: ldloc V_0 - IL_000e: ldc.i4.1 - IL_000f: conv.u - IL_0010: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) - IL_0015: ldloc.0 - IL_0016: ldc.i4.0 - IL_0017: conv.i - IL_0018: ldc.i4 1 - IL_001d: mul - IL_001e: add - IL_001f: ldind.i1 - IL_0020: ldc.i4.s 68 - IL_0022: conv.u1 - IL_0023: ceq - IL_0025: ldc.i4.0 - IL_0026: ceq - IL_0028: brfalse IL_002f - IL_002d: ldc.i4.0 - IL_002e: ret - IL_002f: nop - IL_0030: ldc.i4.1 - IL_0031: ret +Module: Primary + Type: + Methods: + System.Int32 ::main() + Locals: + System.Byte* V_0 + IL_0000: ldc.i4.1 + IL_0001: conv.u + IL_0002: localloc + IL_0004: stloc.0 + IL_0005: ldsflda / ::ConstDataBuffer0 + IL_000a: ldloc V_0 + IL_000e: ldc.i4.1 + IL_000f: conv.u + IL_0010: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) + IL_0015: ldloc.0 + IL_0016: ldc.i4.0 + IL_0017: conv.i + IL_0018: ldc.i4 1 + IL_001d: mul + IL_001e: add + IL_001f: ldind.i1 + IL_0020: ldc.i4.s 68 + IL_0022: conv.u1 + IL_0023: ceq + IL_0025: ldc.i4.0 + IL_0026: ceq + IL_0028: brfalse IL_002f + IL_002d: ldc.i4.0 + IL_002e: ret + IL_002f: nop + IL_0030: ldc.i4.1 + IL_0031: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret + + Type: + Nested types: + Type: / + Pack: 1 + Size: 1 + Fields: + / ::ConstDataBuffer0 + Init with (UTF-8 x 1 bytes): "A" diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayElementIndexInComparison.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayElementIndexInComparison.verified.txt index f0351d4b..343337a4 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayElementIndexInComparison.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayElementIndexInComparison.verified.txt @@ -1,34 +1,37 @@ -System.Int32 ::main() - Locals: - System.Int32* V_0 - IL_0000: ldc.i4.s 40 - IL_0002: conv.u - IL_0003: localloc - IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: ldc.i4.1 - IL_0008: conv.i - IL_0009: ldc.i4 4 - IL_000e: mul - IL_000f: add - IL_0010: ldind.i4 - IL_0011: ldc.i4.s 13 - IL_0013: ceq - IL_0015: ldc.i4.0 - IL_0016: ceq - IL_0018: brfalse IL_001f - IL_001d: ldc.i4.m1 - IL_001e: ret - IL_001f: nop - IL_0020: ldc.i4.0 - IL_0021: ret +Module: Primary + Type: + Methods: + System.Int32 ::main() + Locals: + System.Int32* V_0 + IL_0000: ldc.i4.s 40 + IL_0002: conv.u + IL_0003: localloc + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldc.i4.1 + IL_0008: conv.i + IL_0009: ldc.i4 4 + IL_000e: mul + IL_000f: add + IL_0010: ldind.i4 + IL_0011: ldc.i4.s 13 + IL_0013: ceq + IL_0015: ldc.i4.0 + IL_0016: ceq + IL_0018: brfalse IL_001f + IL_001d: ldc.i4.m1 + IL_001e: ret + IL_001f: nop + IL_0020: ldc.i4.0 + IL_0021: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayElementIndexViaVariable.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayElementIndexViaVariable.verified.txt index 998d8da7..5f76b463 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayElementIndexViaVariable.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayElementIndexViaVariable.verified.txt @@ -1,35 +1,38 @@ -System.Int32 ::main() - Locals: - System.Int32* V_0 - System.Int32 V_1 - IL_0000: ldc.i4.s 40 - IL_0002: conv.u - IL_0003: localloc - IL_0005: stloc.0 - IL_0006: ldc.i4.0 - IL_0007: stloc.1 - IL_0008: ldloc.0 - IL_0009: ldloc.1 - IL_000a: conv.i - IL_000b: ldc.i4 40 - IL_0010: mul - IL_0011: add - IL_0012: ldc.i4.0 - IL_0013: conv.i - IL_0014: ldc.i4 4 - IL_0019: mul - IL_001a: add - IL_001b: ldc.i4.s 13 - IL_001d: stind.i4 - IL_001e: ldc.i4.0 - IL_001f: ret +Module: Primary + Type: + Methods: + System.Int32 ::main() + Locals: + System.Int32* V_0 + System.Int32 V_1 + IL_0000: ldc.i4.s 40 + IL_0002: conv.u + IL_0003: localloc + IL_0005: stloc.0 + IL_0006: ldc.i4.0 + IL_0007: stloc.1 + IL_0008: ldloc.0 + IL_0009: ldloc.1 + IL_000a: conv.i + IL_000b: ldc.i4 40 + IL_0010: mul + IL_0011: add + IL_0012: ldc.i4.0 + IL_0013: conv.i + IL_0014: ldc.i4 4 + IL_0019: mul + IL_001a: add + IL_001b: ldc.i4.s 13 + IL_001d: stind.i4 + IL_001e: ldc.i4.0 + IL_001f: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayInitialization.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayInitialization.verified.txt index 73827aa8..d96e72b8 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayInitialization.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayInitialization.verified.txt @@ -1,38 +1,50 @@ -System.Int32 ::main() - Locals: - System.Int32* V_0 - IL_0000: ldc.i4.s 16 - IL_0002: conv.u - IL_0003: localloc - IL_0005: stloc.0 - IL_0006: ldsflda / ::ConstDataBuffer0 - IL_000b: ldloc V_0 - IL_000f: ldc.i4.s 16 - IL_0011: conv.u - IL_0012: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) - IL_0017: ldloc.0 - IL_0018: ldc.i4.1 - IL_0019: conv.i - IL_001a: ldc.i4 4 - IL_001f: mul - IL_0020: add - IL_0021: ldc.i4.2 - IL_0022: stind.i4 - IL_0023: ldloc.0 - IL_0024: ldc.i4.1 - IL_0025: conv.i - IL_0026: ldc.i4 4 - IL_002b: mul - IL_002c: add - IL_002d: ldind.i4 - IL_002e: ret +Module: Primary + Type: + Methods: + System.Int32 ::main() + Locals: + System.Int32* V_0 + IL_0000: ldc.i4.s 16 + IL_0002: conv.u + IL_0003: localloc + IL_0005: stloc.0 + IL_0006: ldsflda / ::ConstDataBuffer0 + IL_000b: ldloc V_0 + IL_000f: ldc.i4.s 16 + IL_0011: conv.u + IL_0012: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) + IL_0017: ldloc.0 + IL_0018: ldc.i4.1 + IL_0019: conv.i + IL_001a: ldc.i4 4 + IL_001f: mul + IL_0020: add + IL_0021: ldc.i4.2 + IL_0022: stind.i4 + IL_0023: ldloc.0 + IL_0024: ldc.i4.1 + IL_0025: conv.i + IL_0026: ldc.i4 4 + IL_002b: mul + IL_002c: add + IL_002d: ldind.i4 + IL_002e: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret + + Type: + Nested types: + Type: / + Pack: 1 + Size: 16 + Fields: + / ::ConstDataBuffer0 + Init with (UTF-8 x 16 bytes): "\1\0\0\0\2\0\0\0\3\0\0\0\4\0\0" diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayInitializationChar.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayInitializationChar.verified.txt index 73827aa8..94ca0501 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayInitializationChar.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayInitializationChar.verified.txt @@ -1,38 +1,50 @@ -System.Int32 ::main() - Locals: - System.Int32* V_0 - IL_0000: ldc.i4.s 16 - IL_0002: conv.u - IL_0003: localloc - IL_0005: stloc.0 - IL_0006: ldsflda / ::ConstDataBuffer0 - IL_000b: ldloc V_0 - IL_000f: ldc.i4.s 16 - IL_0011: conv.u - IL_0012: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) - IL_0017: ldloc.0 - IL_0018: ldc.i4.1 - IL_0019: conv.i - IL_001a: ldc.i4 4 - IL_001f: mul - IL_0020: add - IL_0021: ldc.i4.2 - IL_0022: stind.i4 - IL_0023: ldloc.0 - IL_0024: ldc.i4.1 - IL_0025: conv.i - IL_0026: ldc.i4 4 - IL_002b: mul - IL_002c: add - IL_002d: ldind.i4 - IL_002e: ret +Module: Primary + Type: + Methods: + System.Int32 ::main() + Locals: + System.Int32* V_0 + IL_0000: ldc.i4.s 16 + IL_0002: conv.u + IL_0003: localloc + IL_0005: stloc.0 + IL_0006: ldsflda / ::ConstDataBuffer0 + IL_000b: ldloc V_0 + IL_000f: ldc.i4.s 16 + IL_0011: conv.u + IL_0012: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) + IL_0017: ldloc.0 + IL_0018: ldc.i4.1 + IL_0019: conv.i + IL_001a: ldc.i4 4 + IL_001f: mul + IL_0020: add + IL_0021: ldc.i4.2 + IL_0022: stind.i4 + IL_0023: ldloc.0 + IL_0024: ldc.i4.1 + IL_0025: conv.i + IL_0026: ldc.i4 4 + IL_002b: mul + IL_002c: add + IL_002d: ldind.i4 + IL_002e: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret + + Type: + Nested types: + Type: / + Pack: 1 + Size: 16 + Fields: + / ::ConstDataBuffer0 + Init with (UTF-8 x 16 bytes): "1\0\0\02\0\0\03\0\0\04\0\0" diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayInitializationWithoutSize.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayInitializationWithoutSize.verified.txt index 8ee79368..e952b16d 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayInitializationWithoutSize.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayInitializationWithoutSize.verified.txt @@ -1,48 +1,62 @@ -System.Int32 ::main() - Locals: - System.Int32* V_0 - System.Int32* V_1 - IL_0000: ldc.i4.s 12 - IL_0002: conv.u - IL_0003: localloc - IL_0005: stloc.0 - IL_0006: ldsflda / ::ConstDataBuffer0 - IL_000b: ldloc V_0 - IL_000f: ldc.i4.s 12 - IL_0011: conv.u - IL_0012: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) - IL_0017: ldc.i4.s 12 - IL_0019: conv.u - IL_001a: localloc - IL_001c: stloc.1 - IL_001d: ldsflda / ::ConstDataBuffer1 - IL_0022: ldloc V_1 - IL_0026: ldc.i4.s 12 - IL_0028: conv.u - IL_0029: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) - IL_002e: ldloc.0 - IL_002f: ldc.i4.0 - IL_0030: conv.i - IL_0031: ldc.i4 4 - IL_0036: mul - IL_0037: add - IL_0038: ldind.i4 - IL_0039: ldloc.1 - IL_003a: ldc.i4.2 - IL_003b: conv.i - IL_003c: ldc.i4 4 - IL_0041: mul - IL_0042: add - IL_0043: ldind.i4 - IL_0044: add - IL_0045: ret +Module: Primary + Type: + Methods: + System.Int32 ::main() + Locals: + System.Int32* V_0 + System.Int32* V_1 + IL_0000: ldc.i4.s 12 + IL_0002: conv.u + IL_0003: localloc + IL_0005: stloc.0 + IL_0006: ldsflda / ::ConstDataBuffer0 + IL_000b: ldloc V_0 + IL_000f: ldc.i4.s 12 + IL_0011: conv.u + IL_0012: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) + IL_0017: ldc.i4.s 12 + IL_0019: conv.u + IL_001a: localloc + IL_001c: stloc.1 + IL_001d: ldsflda / ::ConstDataBuffer1 + IL_0022: ldloc V_1 + IL_0026: ldc.i4.s 12 + IL_0028: conv.u + IL_0029: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) + IL_002e: ldloc.0 + IL_002f: ldc.i4.0 + IL_0030: conv.i + IL_0031: ldc.i4 4 + IL_0036: mul + IL_0037: add + IL_0038: ldind.i4 + IL_0039: ldloc.1 + IL_003a: ldc.i4.2 + IL_003b: conv.i + IL_003c: ldc.i4 4 + IL_0041: mul + IL_0042: add + IL_0043: ldind.i4 + IL_0044: add + IL_0045: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret + + Type: + Nested types: + Type: / + Pack: 1 + Size: 12 + Fields: + / ::ConstDataBuffer0 + Init with (UTF-8 x 12 bytes): "\1\0\0\0\2\0\0\0\3\0\0" + / ::ConstDataBuffer1 + Init with (UTF-8 x 12 bytes): "\1\0\0\0\2\0\0\0\1\0\0" diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayInitializerConstExpression.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayInitializerConstExpression.verified.txt index b7308373..17bfad9b 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayInitializerConstExpression.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayInitializerConstExpression.verified.txt @@ -1,39 +1,51 @@ -System.Int32 ::main() - Locals: - System.Int32* V_0 - IL_0000: ldc.i4.s 28 - IL_0002: conv.u - IL_0003: localloc - IL_0005: stloc.0 - IL_0006: ldsflda / ::ConstDataBuffer0 - IL_000b: ldloc V_0 - IL_000f: ldc.i4.s 28 - IL_0011: conv.u - IL_0012: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) - IL_0017: ldloc.0 - IL_0018: ldc.i4.1 - IL_0019: conv.i - IL_001a: ldc.i4 4 - IL_001f: mul - IL_0020: add - IL_0021: ldind.i4 - IL_0022: ldc.i4.s 99 - IL_0024: ceq - IL_0026: ldc.i4.0 - IL_0027: ceq - IL_0029: brfalse IL_0030 - IL_002e: ldc.i4.0 - IL_002f: ret - IL_0030: nop - IL_0031: ldc.i4.1 - IL_0032: ret +Module: Primary + Type: + Methods: + System.Int32 ::main() + Locals: + System.Int32* V_0 + IL_0000: ldc.i4.s 28 + IL_0002: conv.u + IL_0003: localloc + IL_0005: stloc.0 + IL_0006: ldsflda / ::ConstDataBuffer0 + IL_000b: ldloc V_0 + IL_000f: ldc.i4.s 28 + IL_0011: conv.u + IL_0012: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) + IL_0017: ldloc.0 + IL_0018: ldc.i4.1 + IL_0019: conv.i + IL_001a: ldc.i4 4 + IL_001f: mul + IL_0020: add + IL_0021: ldind.i4 + IL_0022: ldc.i4.s 99 + IL_0024: ceq + IL_0026: ldc.i4.0 + IL_0027: ceq + IL_0029: brfalse IL_0030 + IL_002e: ldc.i4.0 + IL_002f: ret + IL_0030: nop + IL_0031: ldc.i4.1 + IL_0032: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret + + Type: + Nested types: + Type: / + Pack: 1 + Size: 28 + Fields: + / ::ConstDataBuffer0 + Init with (UTF-8 x 28 bytes): "����c\0\0\0\0\0\0\0\19���\2\0\0\0\2\0\0\0\4\0\0" diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayOverPointer.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayOverPointer.verified.txt index a57d18b8..ef43fb26 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayOverPointer.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayOverPointer.verified.txt @@ -1,62 +1,65 @@ -System.Int32 ::main(System.Int32 argc, System.Byte** argv) - Locals: - System.Byte V_0 - IL_0000: ldarg.1 - IL_0001: sizeof System.Byte* - IL_0007: ldc.i4.0 - IL_0008: mul - IL_0009: add - IL_000a: ldind.i - IL_000b: ldc.i4.1 - IL_000c: ldc.i4.0 - IL_000d: mul - IL_000e: add - IL_000f: ldind.i1 - IL_0010: stloc.0 - IL_0011: ldarg.1 - IL_0012: sizeof System.Byte* - IL_0018: ldc.i4.1 - IL_0019: mul - IL_001a: add - IL_001b: ldind.i - IL_001c: ret +Module: Primary + Type: + Methods: + System.Int32 ::main(System.Int32 argc, System.Byte** argv) + Locals: + System.Byte V_0 + IL_0000: ldarg.1 + IL_0001: sizeof System.Byte* + IL_0007: ldc.i4.0 + IL_0008: mul + IL_0009: add + IL_000a: ldind.i + IL_000b: ldc.i4.1 + IL_000c: ldc.i4.0 + IL_000d: mul + IL_000e: add + IL_000f: ldind.i1 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: sizeof System.Byte* + IL_0018: ldc.i4.1 + IL_0019: mul + IL_001a: add + IL_001b: ldind.i + IL_001c: ret -System.Int32 ::(System.String[] args) - Locals: - System.Int32 V_0 - System.Byte*[] V_1 - System.Byte*[] V_2 - System.Byte*[] (pinned) V_3 - System.Int32 V_4 - IL_0000: ldarg.0 - IL_0001: ldlen - IL_0002: ldc.i4.1 - IL_0003: add - IL_0004: stloc.0 - IL_0005: ldarg.0 - IL_0006: call System.Byte*[] Cesium.Runtime.RuntimeHelpers::ArgsToArgv(System.String[]) - IL_000b: stloc.1 - IL_000c: ldloc.1 - IL_000d: ldlen - IL_000e: newarr System.Byte* - IL_0013: stloc.2 - IL_0014: ldloc.1 - IL_0015: ldloc.2 - IL_0016: ldc.i4.0 - IL_0017: call System.Void System.Array::CopyTo(System.Array,System.Int32) - IL_001c: ldloc.0 - IL_001d: ldloc.2 - IL_001e: stloc.3 - IL_001f: ldloc.3 - IL_0020: ldc.i4.0 - IL_0021: ldelema System.Byte* - IL_0026: call System.Int32 ::main(System.Int32,System.Byte**) - IL_002b: stloc.s V_4 - IL_002d: ldnull - IL_002e: stloc.3 - IL_002f: ldloc.1 - IL_0030: call System.Void Cesium.Runtime.RuntimeHelpers::FreeArgv(System.Byte*[]) - IL_0035: ldloc.s V_4 - IL_0037: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_003c: ldloc.s V_4 - IL_003e: ret + System.Int32 ::(System.String[] args) + Locals: + System.Int32 V_0 + System.Byte*[] V_1 + System.Byte*[] V_2 + System.Byte*[] (pinned) V_3 + System.Int32 V_4 + IL_0000: ldarg.0 + IL_0001: ldlen + IL_0002: ldc.i4.1 + IL_0003: add + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: call System.Byte*[] Cesium.Runtime.RuntimeHelpers::ArgsToArgv(System.String[]) + IL_000b: stloc.1 + IL_000c: ldloc.1 + IL_000d: ldlen + IL_000e: newarr System.Byte* + IL_0013: stloc.2 + IL_0014: ldloc.1 + IL_0015: ldloc.2 + IL_0016: ldc.i4.0 + IL_0017: call System.Void System.Array::CopyTo(System.Array,System.Int32) + IL_001c: ldloc.0 + IL_001d: ldloc.2 + IL_001e: stloc.3 + IL_001f: ldloc.3 + IL_0020: ldc.i4.0 + IL_0021: ldelema System.Byte* + IL_0026: call System.Int32 ::main(System.Int32,System.Byte**) + IL_002b: stloc.s V_4 + IL_002d: ldnull + IL_002e: stloc.3 + IL_002f: ldloc.1 + IL_0030: call System.Void Cesium.Runtime.RuntimeHelpers::FreeArgv(System.Byte*[]) + IL_0035: ldloc.s V_4 + IL_0037: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_003c: ldloc.s V_4 + IL_003e: ret diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayParameterPassing.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayParameterPassing.verified.txt index 2f941d7d..0e1123df 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayParameterPassing.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayParameterPassing.verified.txt @@ -1,8 +1,11 @@ -System.Int32 ::foo(System.Int32* ints) - IL_0000: ldarg.0 - IL_0001: ldc.i4.4 - IL_0002: ldc.i4.0 - IL_0003: mul - IL_0004: add - IL_0005: ldind.i4 - IL_0006: ret +Module: Primary + Type: + Methods: + System.Int32 ::foo(System.Int32* ints) + IL_0000: ldarg.0 + IL_0001: ldc.i4.4 + IL_0002: ldc.i4.0 + IL_0003: mul + IL_0004: add + IL_0005: ldind.i4 + IL_0006: ret diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayStringComparison.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayStringComparison.verified.txt index 884e9689..c9c989c0 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayStringComparison.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ArrayStringComparison.verified.txt @@ -1,40 +1,52 @@ -System.Int32 ::main() - Locals: - System.Byte** V_0 - IL_0000: sizeof System.Byte* - IL_0006: ldc.i4.1 - IL_0007: mul - IL_0008: conv.u - IL_0009: localloc - IL_000b: stloc.0 - IL_000c: ldloc.0 - IL_000d: ldc.i4.0 - IL_000e: conv.i - IL_000f: sizeof System.Byte* - IL_0015: mul - IL_0016: add - IL_0017: ldsflda / ::ConstDataBuffer0 - IL_001c: stind.i - IL_001d: ldloc.0 - IL_001e: ldc.i4.0 - IL_001f: conv.i - IL_0020: sizeof System.Byte* - IL_0026: mul - IL_0027: add - IL_0028: ldind.i - IL_0029: brfalse IL_0030 - IL_002e: ldc.i4.0 - IL_002f: ret - IL_0030: nop - IL_0031: ldc.i4.1 - IL_0032: ret +Module: Primary + Type: + Methods: + System.Int32 ::main() + Locals: + System.Byte** V_0 + IL_0000: sizeof System.Byte* + IL_0006: ldc.i4.1 + IL_0007: mul + IL_0008: conv.u + IL_0009: localloc + IL_000b: stloc.0 + IL_000c: ldloc.0 + IL_000d: ldc.i4.0 + IL_000e: conv.i + IL_000f: sizeof System.Byte* + IL_0015: mul + IL_0016: add + IL_0017: ldsflda / ::ConstDataBuffer0 + IL_001c: stind.i + IL_001d: ldloc.0 + IL_001e: ldc.i4.0 + IL_001f: conv.i + IL_0020: sizeof System.Byte* + IL_0026: mul + IL_0027: add + IL_0028: ldind.i + IL_0029: brfalse IL_0030 + IL_002e: ldc.i4.0 + IL_002f: ret + IL_0030: nop + IL_0031: ldc.i4.1 + IL_0032: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret + + Type: + Nested types: + Type: / + Pack: 1 + Size: 2 + Fields: + / ::ConstDataBuffer0 + Init with (UTF-8 x 2 bytes): "A" diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ComplexTypeAssignment.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ComplexTypeAssignment.verified.txt index 0da577f8..da35bd76 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ComplexTypeAssignment.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ComplexTypeAssignment.verified.txt @@ -1,35 +1,42 @@ -System.Int32 ::main() - Locals: - foo* V_0 - IL_0000: ldc.i4.s 40 - IL_0002: conv.u - IL_0003: localloc - IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: ldc.i4.2 - IL_0008: ldc.i4.1 - IL_0009: sub - IL_000a: conv.i - IL_000b: ldc.i4 4 - IL_0010: mul - IL_0011: add - IL_0012: ldc.i4.s 42 - IL_0014: stfld System.Int32 foo::x - IL_0019: ldloc.0 - IL_001a: ldc.i4.1 - IL_001b: conv.i - IL_001c: ldc.i4 4 - IL_0021: mul - IL_0022: add - IL_0023: ldfld System.Int32 foo::x - IL_0028: ret +Module: Primary + Type: + Methods: + System.Int32 ::main() + Locals: + foo* V_0 + IL_0000: ldc.i4.s 40 + IL_0002: conv.u + IL_0003: localloc + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldc.i4.2 + IL_0008: ldc.i4.1 + IL_0009: sub + IL_000a: conv.i + IL_000b: ldc.i4 4 + IL_0010: mul + IL_0011: add + IL_0012: ldc.i4.s 42 + IL_0014: stfld System.Int32 foo::x + IL_0019: ldloc.0 + IL_001a: ldc.i4.1 + IL_001b: conv.i + IL_001c: ldc.i4 4 + IL_0021: mul + IL_0022: add + IL_0023: ldfld System.Int32 foo::x + IL_0028: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret + + Type: foo + Fields: + System.Int32 foo::x diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ConstByteArrayTest.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ConstByteArrayTest.verified.txt index 1dd72c82..d8b5fbc6 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ConstByteArrayTest.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ConstByteArrayTest.verified.txt @@ -1,24 +1,36 @@ -System.Int32 ::main() - Locals: - System.Byte* V_0 - IL_0000: ldc.i4.1 - IL_0001: conv.u - IL_0002: localloc - IL_0004: stloc.0 - IL_0005: ldsflda / ::ConstDataBuffer0 - IL_000a: ldloc V_0 - IL_000e: ldc.i4.1 - IL_000f: conv.u - IL_0010: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) - IL_0015: ldc.i4.0 - IL_0016: ret +Module: Primary + Type: + Methods: + System.Int32 ::main() + Locals: + System.Byte* V_0 + IL_0000: ldc.i4.1 + IL_0001: conv.u + IL_0002: localloc + IL_0004: stloc.0 + IL_0005: ldsflda / ::ConstDataBuffer0 + IL_000a: ldloc V_0 + IL_000e: ldc.i4.1 + IL_000f: conv.u + IL_0010: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) + IL_0015: ldc.i4.0 + IL_0016: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret + + Type: + Nested types: + Type: / + Pack: 1 + Size: 1 + Fields: + / ::ConstDataBuffer0 + Init with (UTF-8 x 1 bytes): "�" diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ConstExpressionSizeArrayTest.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ConstExpressionSizeArrayTest.verified.txt index dca2817a..88586b82 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ConstExpressionSizeArrayTest.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.ConstExpressionSizeArrayTest.verified.txt @@ -1,24 +1,36 @@ -System.Int32 ::main() - Locals: - System.Byte* V_0 - IL_0000: ldc.i4.2 - IL_0001: conv.u - IL_0002: localloc - IL_0004: stloc.0 - IL_0005: ldsflda / ::ConstDataBuffer0 - IL_000a: ldloc V_0 - IL_000e: ldc.i4.2 - IL_000f: conv.u - IL_0010: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) - IL_0015: ldc.i4.0 - IL_0016: ret +Module: Primary + Type: + Methods: + System.Int32 ::main() + Locals: + System.Byte* V_0 + IL_0000: ldc.i4.2 + IL_0001: conv.u + IL_0002: localloc + IL_0004: stloc.0 + IL_0005: ldsflda / ::ConstDataBuffer0 + IL_000a: ldloc V_0 + IL_000e: ldc.i4.2 + IL_000f: conv.u + IL_0010: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) + IL_0015: ldc.i4.0 + IL_0016: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret + + Type: + Nested types: + Type: / + Pack: 1 + Size: 2 + Fields: + / ::ConstDataBuffer0 + Init with (UTF-8 x 2 bytes): "�" diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.EmptyArrayInitialization.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.EmptyArrayInitialization.verified.txt index 8249fe99..6a9360ed 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.EmptyArrayInitialization.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.EmptyArrayInitialization.verified.txt @@ -1,33 +1,36 @@ -System.Int32 ::main() - Locals: - System.Int32* V_0 - IL_0000: ldc.i4.s 16 - IL_0002: conv.u - IL_0003: localloc - IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: ldc.i4.1 - IL_0008: conv.i - IL_0009: ldc.i4 4 - IL_000e: mul - IL_000f: add - IL_0010: ldc.i4.2 - IL_0011: stind.i4 - IL_0012: ldloc.0 - IL_0013: ldc.i4.1 - IL_0014: conv.i - IL_0015: ldc.i4 4 - IL_001a: mul - IL_001b: add - IL_001c: ldind.i4 - IL_001d: ret +Module: Primary + Type: + Methods: + System.Int32 ::main() + Locals: + System.Int32* V_0 + IL_0000: ldc.i4.s 16 + IL_0002: conv.u + IL_0003: localloc + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldc.i4.1 + IL_0008: conv.i + IL_0009: ldc.i4 4 + IL_000e: mul + IL_000f: add + IL_0010: ldc.i4.2 + IL_0011: stind.i4 + IL_0012: ldloc.0 + IL_0013: ldc.i4.1 + IL_0014: conv.i + IL_0015: ldc.i4 4 + IL_001a: mul + IL_001b: add + IL_001c: ldind.i4 + IL_001d: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.EnumArraySizeTest.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.EnumArraySizeTest.verified.txt index cf774a24..f4dcabce 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.EnumArraySizeTest.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.EnumArraySizeTest.verified.txt @@ -1,6 +1,11 @@ -System.Void ::.cctor() - IL_0000: ldc.i4.1 - IL_0001: conv.u - IL_0002: call System.Void* Cesium.Runtime.RuntimeHelpers::AllocateGlobalField(System.UInt32) - IL_0007: stsfld System.Byte* ::a - IL_000c: ret +Module: Primary + Type: + Fields: + System.Byte* ::a + Methods: + System.Void ::.cctor() + IL_0000: ldc.i4.1 + IL_0001: conv.u + IL_0002: call System.Void* Cesium.Runtime.RuntimeHelpers::AllocateGlobalField(System.UInt32) + IL_0007: stsfld System.Byte* ::a + IL_000c: ret diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.GlobalArrayAssignment.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.GlobalArrayAssignment.verified.txt index 54f824ce..0d6e529a 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.GlobalArrayAssignment.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.GlobalArrayAssignment.verified.txt @@ -1,34 +1,39 @@ -System.Void ::.cctor() - IL_0000: ldc.i4.s 40 - IL_0002: conv.u - IL_0003: call System.Void* Cesium.Runtime.RuntimeHelpers::AllocateGlobalField(System.UInt32) - IL_0008: stsfld System.Int32* ::a - IL_000d: ret +Module: Primary + Type: + Fields: + System.Int32* ::a + Methods: + System.Void ::.cctor() + IL_0000: ldc.i4.s 40 + IL_0002: conv.u + IL_0003: call System.Void* Cesium.Runtime.RuntimeHelpers::AllocateGlobalField(System.UInt32) + IL_0008: stsfld System.Int32* ::a + IL_000d: ret -System.Int32 ::main() - IL_0000: ldsfld System.Int32* ::a - IL_0005: ldc.i4.1 - IL_0006: conv.i - IL_0007: ldc.i4 4 - IL_000c: mul - IL_000d: add - IL_000e: ldc.i4.2 - IL_000f: stind.i4 - IL_0010: ldsfld System.Int32* ::a - IL_0015: ldc.i4.1 - IL_0016: conv.i - IL_0017: ldc.i4 4 - IL_001c: mul - IL_001d: add - IL_001e: ldind.i4 - IL_001f: ret + System.Int32 ::main() + IL_0000: ldsfld System.Int32* ::a + IL_0005: ldc.i4.1 + IL_0006: conv.i + IL_0007: ldc.i4 4 + IL_000c: mul + IL_000d: add + IL_000e: ldc.i4.2 + IL_000f: stind.i4 + IL_0010: ldsfld System.Int32* ::a + IL_0015: ldc.i4.1 + IL_0016: conv.i + IL_0017: ldc.i4 4 + IL_001c: mul + IL_001d: add + IL_001e: ldind.i4 + IL_001f: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.GlobalArrayInitialization.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.GlobalArrayInitialization.verified.txt index fb4d17c5..81a12107 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.GlobalArrayInitialization.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.GlobalArrayInitialization.verified.txt @@ -1,39 +1,53 @@ -System.Void ::.cctor() - IL_0000: ldc.i4.s 16 - IL_0002: conv.u - IL_0003: call System.Void* Cesium.Runtime.RuntimeHelpers::AllocateGlobalField(System.UInt32) - IL_0008: stsfld System.Int32* ::a - IL_000d: ldsflda / ::ConstDataBuffer0 - IL_0012: ldsfld System.Int32* ::a - IL_0017: ldc.i4.s 16 - IL_0019: conv.u - IL_001a: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) - IL_001f: ret +Module: Primary + Type: + Fields: + System.Int32* ::a + Methods: + System.Void ::.cctor() + IL_0000: ldc.i4.s 16 + IL_0002: conv.u + IL_0003: call System.Void* Cesium.Runtime.RuntimeHelpers::AllocateGlobalField(System.UInt32) + IL_0008: stsfld System.Int32* ::a + IL_000d: ldsflda / ::ConstDataBuffer0 + IL_0012: ldsfld System.Int32* ::a + IL_0017: ldc.i4.s 16 + IL_0019: conv.u + IL_001a: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) + IL_001f: ret -System.Int32 ::main() - IL_0000: ldsfld System.Int32* ::a - IL_0005: ldc.i4.1 - IL_0006: conv.i - IL_0007: ldc.i4 4 - IL_000c: mul - IL_000d: add - IL_000e: ldc.i4.2 - IL_000f: stind.i4 - IL_0010: ldsfld System.Int32* ::a - IL_0015: ldc.i4.1 - IL_0016: conv.i - IL_0017: ldc.i4 4 - IL_001c: mul - IL_001d: add - IL_001e: ldind.i4 - IL_001f: ret + System.Int32 ::main() + IL_0000: ldsfld System.Int32* ::a + IL_0005: ldc.i4.1 + IL_0006: conv.i + IL_0007: ldc.i4 4 + IL_000c: mul + IL_000d: add + IL_000e: ldc.i4.2 + IL_000f: stind.i4 + IL_0010: ldsfld System.Int32* ::a + IL_0015: ldc.i4.1 + IL_0016: conv.i + IL_0017: ldc.i4 4 + IL_001c: mul + IL_001d: add + IL_001e: ldind.i4 + IL_001f: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret + + Type: + Nested types: + Type: / + Pack: 1 + Size: 16 + Fields: + / ::ConstDataBuffer0 + Init with (UTF-8 x 16 bytes): "\1\0\0\0\2\0\0\0\3\0\0\0\4\0\0" diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.GlobalArrayInitializationWithoutSize.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.GlobalArrayInitializationWithoutSize.verified.txt index 469060bf..b8ac168f 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.GlobalArrayInitializationWithoutSize.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.GlobalArrayInitializationWithoutSize.verified.txt @@ -1,48 +1,65 @@ -System.Void ::.cctor() - IL_0000: ldc.i4.s 12 - IL_0002: conv.u - IL_0003: call System.Void* Cesium.Runtime.RuntimeHelpers::AllocateGlobalField(System.UInt32) - IL_0008: stsfld System.Int32* ::ints1 - IL_000d: ldsflda / ::ConstDataBuffer0 - IL_0012: ldsfld System.Int32* ::ints1 - IL_0017: ldc.i4.s 12 - IL_0019: conv.u - IL_001a: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) - IL_001f: ldc.i4.s 12 - IL_0021: conv.u - IL_0022: call System.Void* Cesium.Runtime.RuntimeHelpers::AllocateGlobalField(System.UInt32) - IL_0027: stsfld System.Int32* ::ints2 - IL_002c: ldsflda / ::ConstDataBuffer1 - IL_0031: ldsfld System.Int32* ::ints2 - IL_0036: ldc.i4.s 12 - IL_0038: conv.u - IL_0039: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) - IL_003e: ret +Module: Primary + Type: + Fields: + System.Int32* ::ints1 + System.Int32* ::ints2 + Methods: + System.Void ::.cctor() + IL_0000: ldc.i4.s 12 + IL_0002: conv.u + IL_0003: call System.Void* Cesium.Runtime.RuntimeHelpers::AllocateGlobalField(System.UInt32) + IL_0008: stsfld System.Int32* ::ints1 + IL_000d: ldsflda / ::ConstDataBuffer0 + IL_0012: ldsfld System.Int32* ::ints1 + IL_0017: ldc.i4.s 12 + IL_0019: conv.u + IL_001a: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) + IL_001f: ldc.i4.s 12 + IL_0021: conv.u + IL_0022: call System.Void* Cesium.Runtime.RuntimeHelpers::AllocateGlobalField(System.UInt32) + IL_0027: stsfld System.Int32* ::ints2 + IL_002c: ldsflda / ::ConstDataBuffer1 + IL_0031: ldsfld System.Int32* ::ints2 + IL_0036: ldc.i4.s 12 + IL_0038: conv.u + IL_0039: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) + IL_003e: ret -System.Int32 ::main() - IL_0000: ldsfld System.Int32* ::ints1 - IL_0005: ldc.i4.0 - IL_0006: conv.i - IL_0007: ldc.i4 4 - IL_000c: mul - IL_000d: add - IL_000e: ldind.i4 - IL_000f: ldsfld System.Int32* ::ints2 - IL_0014: ldc.i4.2 - IL_0015: conv.i - IL_0016: ldc.i4 4 - IL_001b: mul - IL_001c: add - IL_001d: ldind.i4 - IL_001e: add - IL_001f: ret + System.Int32 ::main() + IL_0000: ldsfld System.Int32* ::ints1 + IL_0005: ldc.i4.0 + IL_0006: conv.i + IL_0007: ldc.i4 4 + IL_000c: mul + IL_000d: add + IL_000e: ldind.i4 + IL_000f: ldsfld System.Int32* ::ints2 + IL_0014: ldc.i4.2 + IL_0015: conv.i + IL_0016: ldc.i4 4 + IL_001b: mul + IL_001c: add + IL_001d: ldind.i4 + IL_001e: add + IL_001f: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret + + Type: + Nested types: + Type: / + Pack: 1 + Size: 12 + Fields: + / ::ConstDataBuffer0 + Init with (UTF-8 x 12 bytes): "\1\0\0\0\2\0\0\0\3\0\0" + / ::ConstDataBuffer1 + Init with (UTF-8 x 12 bytes): "\1\0\0\0\2\0\0\0\1\0\0" diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.GlobalMultidimensionalArrayAssignment.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.GlobalMultidimensionalArrayAssignment.verified.txt index 7988bd4f..418512bb 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.GlobalMultidimensionalArrayAssignment.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.GlobalMultidimensionalArrayAssignment.verified.txt @@ -1,44 +1,49 @@ -System.Void ::.cctor() - IL_0000: ldc.i4 160 - IL_0005: conv.u - IL_0006: call System.Void* Cesium.Runtime.RuntimeHelpers::AllocateGlobalField(System.UInt32) - IL_000b: stsfld System.Int32* ::a - IL_0010: ret +Module: Primary + Type: + Fields: + System.Int32* ::a + Methods: + System.Void ::.cctor() + IL_0000: ldc.i4 160 + IL_0005: conv.u + IL_0006: call System.Void* Cesium.Runtime.RuntimeHelpers::AllocateGlobalField(System.UInt32) + IL_000b: stsfld System.Int32* ::a + IL_0010: ret -System.Int32 ::main() - IL_0000: ldsfld System.Int32* ::a - IL_0005: ldc.i4.1 - IL_0006: conv.i - IL_0007: ldc.i4 40 - IL_000c: mul - IL_000d: add - IL_000e: ldc.i4.2 - IL_000f: conv.i - IL_0010: ldc.i4 4 - IL_0015: mul - IL_0016: add - IL_0017: ldc.i4.2 - IL_0018: stind.i4 - IL_0019: ldsfld System.Int32* ::a - IL_001e: ldc.i4.1 - IL_001f: conv.i - IL_0020: ldc.i4 40 - IL_0025: mul - IL_0026: add - IL_0027: ldc.i4.2 - IL_0028: conv.i - IL_0029: ldc.i4 4 - IL_002e: mul - IL_002f: add - IL_0030: ldind.i4 - IL_0031: ret + System.Int32 ::main() + IL_0000: ldsfld System.Int32* ::a + IL_0005: ldc.i4.1 + IL_0006: conv.i + IL_0007: ldc.i4 40 + IL_000c: mul + IL_000d: add + IL_000e: ldc.i4.2 + IL_000f: conv.i + IL_0010: ldc.i4 4 + IL_0015: mul + IL_0016: add + IL_0017: ldc.i4.2 + IL_0018: stind.i4 + IL_0019: ldsfld System.Int32* ::a + IL_001e: ldc.i4.1 + IL_001f: conv.i + IL_0020: ldc.i4 40 + IL_0025: mul + IL_0026: add + IL_0027: ldc.i4.2 + IL_0028: conv.i + IL_0029: ldc.i4 4 + IL_002e: mul + IL_002f: add + IL_0030: ldind.i4 + IL_0031: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.MultidimensionalArrayAssignment.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.MultidimensionalArrayAssignment.verified.txt index 69aaeb69..d52b146b 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.MultidimensionalArrayAssignment.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.MultidimensionalArrayAssignment.verified.txt @@ -1,43 +1,46 @@ -System.Int32 ::main() - Locals: - System.Int32* V_0 - IL_0000: ldc.i4 160 - IL_0005: conv.u - IL_0006: localloc - IL_0008: stloc.0 - IL_0009: ldloc.0 - IL_000a: ldc.i4.1 - IL_000b: conv.i - IL_000c: ldc.i4 40 - IL_0011: mul - IL_0012: add - IL_0013: ldc.i4.2 - IL_0014: conv.i - IL_0015: ldc.i4 4 - IL_001a: mul - IL_001b: add - IL_001c: ldc.i4.2 - IL_001d: stind.i4 - IL_001e: ldloc.0 - IL_001f: ldc.i4.1 - IL_0020: conv.i - IL_0021: ldc.i4 40 - IL_0026: mul - IL_0027: add - IL_0028: ldc.i4.2 - IL_0029: conv.i - IL_002a: ldc.i4 4 - IL_002f: mul - IL_0030: add - IL_0031: ldind.i4 - IL_0032: ret +Module: Primary + Type: + Methods: + System.Int32 ::main() + Locals: + System.Int32* V_0 + IL_0000: ldc.i4 160 + IL_0005: conv.u + IL_0006: localloc + IL_0008: stloc.0 + IL_0009: ldloc.0 + IL_000a: ldc.i4.1 + IL_000b: conv.i + IL_000c: ldc.i4 40 + IL_0011: mul + IL_0012: add + IL_0013: ldc.i4.2 + IL_0014: conv.i + IL_0015: ldc.i4 4 + IL_001a: mul + IL_001b: add + IL_001c: ldc.i4.2 + IL_001d: stind.i4 + IL_001e: ldloc.0 + IL_001f: ldc.i4.1 + IL_0020: conv.i + IL_0021: ldc.i4 40 + IL_0026: mul + IL_0027: add + IL_0028: ldc.i4.2 + IL_0029: conv.i + IL_002a: ldc.i4 4 + IL_002f: mul + IL_0030: add + IL_0031: ldind.i4 + IL_0032: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.MultidimensionalArrayComplexExpr.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.MultidimensionalArrayComplexExpr.verified.txt index 8a9a19df..1cd0316b 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.MultidimensionalArrayComplexExpr.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.MultidimensionalArrayComplexExpr.verified.txt @@ -1,34 +1,37 @@ -System.Int32 ::main() - Locals: - System.Int32* V_0 - IL_0000: ldc.i4.s 80 - IL_0002: conv.u - IL_0003: localloc - IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: ldc.i4.2 - IL_0008: ldc.i4.1 - IL_0009: sub - IL_000a: conv.i - IL_000b: ldc.i4 40 - IL_0010: mul - IL_0011: add - IL_0012: ldc.i4.1 - IL_0013: conv.i - IL_0014: ldc.i4 4 - IL_0019: mul - IL_001a: add - IL_001b: ldc.i4.s 13 - IL_001d: stind.i4 - IL_001e: ldc.i4.0 - IL_001f: ret +Module: Primary + Type: + Methods: + System.Int32 ::main() + Locals: + System.Int32* V_0 + IL_0000: ldc.i4.s 80 + IL_0002: conv.u + IL_0003: localloc + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldc.i4.2 + IL_0008: ldc.i4.1 + IL_0009: sub + IL_000a: conv.i + IL_000b: ldc.i4 40 + IL_0010: mul + IL_0011: add + IL_0012: ldc.i4.1 + IL_0013: conv.i + IL_0014: ldc.i4 4 + IL_0019: mul + IL_001a: add + IL_001b: ldc.i4.s 13 + IL_001d: stind.i4 + IL_001e: ldc.i4.0 + IL_001f: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.PointerArrayIndexing.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.PointerArrayIndexing.verified.txt index ed29c893..2bb4e59b 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.PointerArrayIndexing.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.PointerArrayIndexing.verified.txt @@ -1,36 +1,39 @@ -System.Int32 ::f(System.Byte*** t) - Locals: - System.Byte* V_0 - IL_0000: ldarg.0 - IL_0001: sizeof System.Byte** - IL_0007: ldc.i4.2 - IL_0008: mul - IL_0009: add - IL_000a: ldind.i - IL_000b: sizeof System.Byte* - IL_0011: ldc.i4.3 - IL_0012: mul - IL_0013: add - IL_0014: ldind.i - IL_0015: stloc.0 - IL_0016: ldloc.0 - IL_0017: ldc.i4.1 - IL_0018: ldc.i4.1 - IL_0019: mul - IL_001a: add - IL_001b: ldind.i1 - IL_001c: ret +Module: Primary + Type: + Methods: + System.Int32 ::f(System.Byte*** t) + Locals: + System.Byte* V_0 + IL_0000: ldarg.0 + IL_0001: sizeof System.Byte** + IL_0007: ldc.i4.2 + IL_0008: mul + IL_0009: add + IL_000a: ldind.i + IL_000b: sizeof System.Byte* + IL_0011: ldc.i4.3 + IL_0012: mul + IL_0013: add + IL_0014: ldind.i + IL_0015: stloc.0 + IL_0016: ldloc.0 + IL_0017: ldc.i4.1 + IL_0018: ldc.i4.1 + IL_0019: mul + IL_001a: add + IL_001b: ldind.i1 + IL_001c: ret -System.Int32 ::main() - IL_0000: ldc.i4.s 42 - IL_0002: ret + System.Int32 ::main() + IL_0000: ldc.i4.s 42 + IL_0002: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.PointerAsArray.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.PointerAsArray.verified.txt index 748c6a15..cc231157 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.PointerAsArray.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.PointerAsArray.verified.txt @@ -1,40 +1,43 @@ -System.Int32 ::main() - Locals: - System.Int32* V_0 - System.Int32* V_1 - IL_0000: ldc.i4.s 120 - IL_0002: conv.u - IL_0003: localloc - IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: ldc.i4.5 - IL_0008: conv.i - IL_0009: ldc.i4 4 - IL_000e: mul - IL_000f: add - IL_0010: stloc.1 - IL_0011: ldloc.1 - IL_0012: ldc.i4.4 - IL_0013: ldc.i4.4 - IL_0014: ldc.i4.5 - IL_0015: mul - IL_0016: mul - IL_0017: add - IL_0018: ldc.i4.4 - IL_0019: ldc.i4.0 - IL_001a: mul - IL_001b: add - IL_001c: ldc.i4.0 - IL_001d: stind.i4 - IL_001e: ldc.i4.0 - IL_001f: ret +Module: Primary + Type: + Methods: + System.Int32 ::main() + Locals: + System.Int32* V_0 + System.Int32* V_1 + IL_0000: ldc.i4.s 120 + IL_0002: conv.u + IL_0003: localloc + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldc.i4.5 + IL_0008: conv.i + IL_0009: ldc.i4 4 + IL_000e: mul + IL_000f: add + IL_0010: stloc.1 + IL_0011: ldloc.1 + IL_0012: ldc.i4.4 + IL_0013: ldc.i4.4 + IL_0014: ldc.i4.5 + IL_0015: mul + IL_0016: mul + IL_0017: add + IL_0018: ldc.i4.4 + IL_0019: ldc.i4.0 + IL_001a: mul + IL_001b: add + IL_001c: ldc.i4.0 + IL_001d: stind.i4 + IL_001e: ldc.i4.0 + IL_001f: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.SignedByteArrayTest.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.SignedByteArrayTest.verified.txt index 9793ad88..adef47d8 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.SignedByteArrayTest.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.SignedByteArrayTest.verified.txt @@ -1,37 +1,49 @@ -System.Int32 ::main() - Locals: - System.SByte* V_0 - System.SByte V_1 - System.Int32 V_2 - IL_0000: ldc.i4.1 - IL_0001: conv.u - IL_0002: localloc - IL_0004: stloc.0 - IL_0005: ldsflda / ::ConstDataBuffer0 - IL_000a: ldloc V_0 - IL_000e: ldc.i4.1 - IL_000f: conv.u - IL_0010: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) - IL_0015: ldloc.0 - IL_0016: ldc.i4.0 - IL_0017: conv.i - IL_0018: ldc.i4 1 - IL_001d: mul - IL_001e: add - IL_001f: ldind.i1 - IL_0020: stloc.1 - IL_0021: ldloc.1 - IL_0022: conv.i4 - IL_0023: stloc.2 - IL_0024: ldloc.2 - IL_0025: ret +Module: Primary + Type: + Methods: + System.Int32 ::main() + Locals: + System.SByte* V_0 + System.SByte V_1 + System.Int32 V_2 + IL_0000: ldc.i4.1 + IL_0001: conv.u + IL_0002: localloc + IL_0004: stloc.0 + IL_0005: ldsflda / ::ConstDataBuffer0 + IL_000a: ldloc V_0 + IL_000e: ldc.i4.1 + IL_000f: conv.u + IL_0010: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) + IL_0015: ldloc.0 + IL_0016: ldc.i4.0 + IL_0017: conv.i + IL_0018: ldc.i4 1 + IL_001d: mul + IL_001e: add + IL_001f: ldind.i1 + IL_0020: stloc.1 + IL_0021: ldloc.1 + IL_0022: conv.i4 + IL_0023: stloc.2 + IL_0024: ldloc.2 + IL_0025: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret + + Type: + Nested types: + Type: / + Pack: 1 + Size: 1 + Fields: + / ::ConstDataBuffer0 + Init with (UTF-8 x 1 bytes): "�" diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StaticStringArrayTest.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StaticStringArrayTest.verified.txt index 79a3dca3..ef8efb82 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StaticStringArrayTest.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StaticStringArrayTest.verified.txt @@ -1,16 +1,32 @@ -System.Void ::.cctor() - IL_0000: sizeof System.Byte* - IL_0006: ldc.i4.1 - IL_0007: mul - IL_0008: conv.u - IL_0009: call System.Void* Cesium.Runtime.RuntimeHelpers::AllocateGlobalField(System.UInt32) - IL_000e: stsfld System.Byte** testInput::a - IL_0013: ldsfld System.Byte** testInput::a - IL_0018: ldc.i4.0 - IL_0019: conv.i - IL_001a: sizeof System.Byte* - IL_0020: mul - IL_0021: add - IL_0022: ldsflda / ::ConstDataBuffer0 - IL_0027: stind.i - IL_0028: ret +Module: Primary + Type: + Methods: + System.Void ::.cctor() + IL_0000: sizeof System.Byte* + IL_0006: ldc.i4.1 + IL_0007: mul + IL_0008: conv.u + IL_0009: call System.Void* Cesium.Runtime.RuntimeHelpers::AllocateGlobalField(System.UInt32) + IL_000e: stsfld System.Byte** testInput::a + IL_0013: ldsfld System.Byte** testInput::a + IL_0018: ldc.i4.0 + IL_0019: conv.i + IL_001a: sizeof System.Byte* + IL_0020: mul + IL_0021: add + IL_0022: ldsflda / ::ConstDataBuffer0 + IL_0027: stind.i + IL_0028: ret + + Type: testInput + Fields: + System.Byte** testInput::a + + Type: + Nested types: + Type: / + Pack: 1 + Size: 3 + Fields: + / ::ConstDataBuffer0 + Init with (UTF-8 x 3 bytes): "13" diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StaticStructArrayFixedSizeTest.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StaticStructArrayFixedSizeTest.verified.txt index c0103323..ef588c6a 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StaticStructArrayFixedSizeTest.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StaticStructArrayFixedSizeTest.verified.txt @@ -1,8 +1,20 @@ -System.Void ::.cctor() - IL_0000: sizeof _Anon_Int_code_Pointer_name - IL_0006: ldc.i4.3 - IL_0007: mul - IL_0008: conv.u - IL_0009: call System.Void* Cesium.Runtime.RuntimeHelpers::AllocateGlobalField(System.UInt32) - IL_000e: stsfld _Anon_Int_code_Pointer_name* testInput::a - IL_0013: ret +Module: Primary + Type: + Methods: + System.Void ::.cctor() + IL_0000: sizeof _Anon_Int_code_Pointer_name + IL_0006: ldc.i4.3 + IL_0007: mul + IL_0008: conv.u + IL_0009: call System.Void* Cesium.Runtime.RuntimeHelpers::AllocateGlobalField(System.UInt32) + IL_000e: stsfld _Anon_Int_code_Pointer_name* testInput::a + IL_0013: ret + + Type: _Anon_Int_code_Pointer_name + Fields: + System.Int32 _Anon_Int_code_Pointer_name::code + System.Byte* _Anon_Int_code_Pointer_name::name + + Type: testInput + Fields: + _Anon_Int_code_Pointer_name* testInput::a diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StaticStructArrayTest.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StaticStructArrayTest.verified.txt index c1b8d743..5064bf70 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StaticStructArrayTest.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StaticStructArrayTest.verified.txt @@ -1 +1,11 @@ -emptyString \ No newline at end of file +Module: Primary + Type: + + Type: _Anon_Int_code_Pointer_name + Fields: + System.Int32 _Anon_Int_code_Pointer_name::code + System.Byte* _Anon_Int_code_Pointer_name::name + + Type: testInput + Fields: + _Anon_Int_code_Pointer_name* testInput::a diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StringArrayTest.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StringArrayTest.verified.txt index 7f50129f..e2e98b91 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StringArrayTest.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StringArrayTest.verified.txt @@ -1,16 +1,30 @@ -System.Void ::.cctor() - IL_0000: sizeof System.Byte* - IL_0006: ldc.i4.1 - IL_0007: mul - IL_0008: conv.u - IL_0009: call System.Void* Cesium.Runtime.RuntimeHelpers::AllocateGlobalField(System.UInt32) - IL_000e: stsfld System.Byte** ::a - IL_0013: ldsfld System.Byte** ::a - IL_0018: ldc.i4.0 - IL_0019: conv.i - IL_001a: sizeof System.Byte* - IL_0020: mul - IL_0021: add - IL_0022: ldsflda / ::ConstDataBuffer0 - IL_0027: stind.i - IL_0028: ret +Module: Primary + Type: + Fields: + System.Byte** ::a + Methods: + System.Void ::.cctor() + IL_0000: sizeof System.Byte* + IL_0006: ldc.i4.1 + IL_0007: mul + IL_0008: conv.u + IL_0009: call System.Void* Cesium.Runtime.RuntimeHelpers::AllocateGlobalField(System.UInt32) + IL_000e: stsfld System.Byte** ::a + IL_0013: ldsfld System.Byte** ::a + IL_0018: ldc.i4.0 + IL_0019: conv.i + IL_001a: sizeof System.Byte* + IL_0020: mul + IL_0021: add + IL_0022: ldsflda / ::ConstDataBuffer0 + IL_0027: stind.i + IL_0028: ret + + Type: + Nested types: + Type: / + Pack: 1 + Size: 3 + Fields: + / ::ConstDataBuffer0 + Init with (UTF-8 x 3 bytes): "13" diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StructArrayFixedSizeTest.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StructArrayFixedSizeTest.verified.txt index 87a302da..dcddd745 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StructArrayFixedSizeTest.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StructArrayFixedSizeTest.verified.txt @@ -1,10 +1,18 @@ -System.Void ::test() - Locals: - _Anon_Int_code_Pointer_name* V_0 - IL_0000: sizeof _Anon_Int_code_Pointer_name - IL_0006: ldc.i4.4 - IL_0007: mul - IL_0008: conv.u - IL_0009: localloc - IL_000b: stloc.0 - IL_000c: ret +Module: Primary + Type: + Methods: + System.Void ::test() + Locals: + _Anon_Int_code_Pointer_name* V_0 + IL_0000: sizeof _Anon_Int_code_Pointer_name + IL_0006: ldc.i4.4 + IL_0007: mul + IL_0008: conv.u + IL_0009: localloc + IL_000b: stloc.0 + IL_000c: ret + + Type: _Anon_Int_code_Pointer_name + Fields: + System.Int32 _Anon_Int_code_Pointer_name::code + System.Byte* _Anon_Int_code_Pointer_name::name diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StructArrayTest.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StructArrayTest.verified.txt index 406ef657..72510d2d 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StructArrayTest.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StructArrayTest.verified.txt @@ -1,2 +1,5 @@ -System.Void ::test() - IL_0000: ret +Module: Primary + Type: + Methods: + System.Void ::test() + IL_0000: ret diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StructArrayTestWithInitializer.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StructArrayTestWithInitializer.verified.txt index ae7022b3..c6db4bf5 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StructArrayTestWithInitializer.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.StructArrayTestWithInitializer.verified.txt @@ -1,8 +1,18 @@ -System.Void ::.cctor() - IL_0000: sizeof _Anon_Int_code_Pointer_name - IL_0006: ldc.i4.2 - IL_0007: mul - IL_0008: conv.u - IL_0009: call System.Void* Cesium.Runtime.RuntimeHelpers::AllocateGlobalField(System.UInt32) - IL_000e: stsfld _Anon_Int_code_Pointer_name* ::a - IL_0013: ret +Module: Primary + Type: + Fields: + _Anon_Int_code_Pointer_name* ::a + Methods: + System.Void ::.cctor() + IL_0000: sizeof _Anon_Int_code_Pointer_name + IL_0006: ldc.i4.2 + IL_0007: mul + IL_0008: conv.u + IL_0009: call System.Void* Cesium.Runtime.RuntimeHelpers::AllocateGlobalField(System.UInt32) + IL_000e: stsfld _Anon_Int_code_Pointer_name* ::a + IL_0013: ret + + Type: _Anon_Int_code_Pointer_name + Fields: + System.Int32 _Anon_Int_code_Pointer_name::code + System.Byte* _Anon_Int_code_Pointer_name::name diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.SymmetricArrayAssignment.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.SymmetricArrayAssignment.verified.txt index 7034b88a..7e0cdd39 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.SymmetricArrayAssignment.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.SymmetricArrayAssignment.verified.txt @@ -1,33 +1,36 @@ -System.Int32 ::main() - Locals: - System.Int32* V_0 - IL_0000: ldc.i4.s 40 - IL_0002: conv.u - IL_0003: localloc - IL_0005: stloc.0 - IL_0006: ldloc.0 - IL_0007: ldc.i4.1 - IL_0008: conv.i - IL_0009: ldc.i4 4 - IL_000e: mul - IL_000f: add - IL_0010: ldc.i4.2 - IL_0011: stind.i4 - IL_0012: ldloc.0 - IL_0013: ldc.i4.1 - IL_0014: conv.i - IL_0015: ldc.i4 4 - IL_001a: mul - IL_001b: add - IL_001c: ldind.i4 - IL_001d: ret +Module: Primary + Type: + Methods: + System.Int32 ::main() + Locals: + System.Int32* V_0 + IL_0000: ldc.i4.s 40 + IL_0002: conv.u + IL_0003: localloc + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldc.i4.1 + IL_0008: conv.i + IL_0009: ldc.i4 4 + IL_000e: mul + IL_000f: add + IL_0010: ldc.i4.2 + IL_0011: stind.i4 + IL_0012: ldloc.0 + IL_0013: ldc.i4.1 + IL_0014: conv.i + IL_0015: ldc.i4 4 + IL_001a: mul + IL_001b: add + IL_001c: ldind.i4 + IL_001d: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret diff --git a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.UnSignedByteArrayTest2.verified.txt b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.UnSignedByteArrayTest2.verified.txt index 8950ed17..825bcae4 100644 --- a/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.UnSignedByteArrayTest2.verified.txt +++ b/Cesium.CodeGen.Tests/verified/CodeGenArrayTests.UnSignedByteArrayTest2.verified.txt @@ -1,37 +1,49 @@ -System.Int32 ::main() - Locals: - System.Byte* V_0 - System.Byte V_1 - System.Int32 V_2 - IL_0000: ldc.i4.1 - IL_0001: conv.u - IL_0002: localloc - IL_0004: stloc.0 - IL_0005: ldsflda / ::ConstDataBuffer0 - IL_000a: ldloc V_0 - IL_000e: ldc.i4.1 - IL_000f: conv.u - IL_0010: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) - IL_0015: ldloc.0 - IL_0016: ldc.i4.0 - IL_0017: conv.i - IL_0018: ldc.i4 1 - IL_001d: mul - IL_001e: add - IL_001f: ldind.u1 - IL_0020: stloc.1 - IL_0021: ldloc.1 - IL_0022: conv.i4 - IL_0023: stloc.2 - IL_0024: ldloc.2 - IL_0025: ret +Module: Primary + Type: + Methods: + System.Int32 ::main() + Locals: + System.Byte* V_0 + System.Byte V_1 + System.Int32 V_2 + IL_0000: ldc.i4.1 + IL_0001: conv.u + IL_0002: localloc + IL_0004: stloc.0 + IL_0005: ldsflda / ::ConstDataBuffer0 + IL_000a: ldloc V_0 + IL_000e: ldc.i4.1 + IL_000f: conv.u + IL_0010: call System.Void Cesium.Runtime.RuntimeHelpers::InitializeCompound(System.Void*,System.Void*,System.UInt32) + IL_0015: ldloc.0 + IL_0016: ldc.i4.0 + IL_0017: conv.i + IL_0018: ldc.i4 1 + IL_001d: mul + IL_001e: add + IL_001f: ldind.u1 + IL_0020: stloc.1 + IL_0021: ldloc.1 + IL_0022: conv.i4 + IL_0023: stloc.2 + IL_0024: ldloc.2 + IL_0025: ret -System.Int32 ::() - Locals: - System.Int32 V_0 - IL_0000: call System.Int32 ::main() - IL_0005: stloc.s V_0 - IL_0007: ldloc.s V_0 - IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) - IL_000e: ldloc.s V_0 - IL_0010: ret + System.Int32 ::() + Locals: + System.Int32 V_0 + IL_0000: call System.Int32 ::main() + IL_0005: stloc.s V_0 + IL_0007: ldloc.s V_0 + IL_0009: call System.Void Cesium.Runtime.RuntimeHelpers::Exit(System.Int32) + IL_000e: ldloc.s V_0 + IL_0010: ret + + Type: + Nested types: + Type: / + Pack: 1 + Size: 1 + Fields: + / ::ConstDataBuffer0 + Init with (UTF-8 x 1 bytes): "�"