Boo
  1. Boo
  2. BOO-282

optimize multidimensional array handling

    Details

    • Type: Improvement Improvement
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 0.5
    • Fix Version/s: None
    • Component/s: Emitter
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Notice that the equivalent C# code does not use any boxing at all and does not need to create an array to access a position in the array:

      //000009: int[,] a = new int[2, 3];
      IL_0000: ldc.i4.2
      IL_0001: ldc.i4.3
      IL_0002: newobj instance void int32[0...,0...]::.ctor(int32,
      int32)
      IL_0007: stloc.0
      //000010: Console.WriteLine(a[0,0].ToString());
      IL_0008: ldloc.0
      IL_0009: ldc.i4.0
      IL_000a: ldc.i4.0
      IL_000b: call instance int32& int32[0...,0...]::Address(int32,
      int32)
      IL_0010: call instance string [mscorlib]System.Int32::ToString()
      IL_0015: call void [mscorlib]System.Console::WriteLine(string)

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Cedric Vivier
            Reporter:
            Rodrigo B. de Oliveira
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: