Beispiel #1
0
    public S32 CalcInstanceRetbuf(int x, int acc)
    {
        if (x != -1234567)
        {
            _x = x;
        }

        if (_x == 0)
        {
            return new S32 {
                       A = acc, B = acc, C = acc, D = acc,
            }
        }
        ;

        S32 s = default;

        Program.Calc(ref _x, ref s, ref acc);

        IL.Push(this);
        IL.Push(-1234567);
        IL.Push(s);
        IL.Push(acc);
        IL.Emit.Tail();
        IL.Emit.Callvirt(new MethodRef(typeof(Instance), nameof(CalcInstanceRetbufOther)));
        return(IL.Return <S32>());
    }
Beispiel #2
0
    public S32 CalcInstanceCalliRetbuf(int x, int acc)
    {
        if (x != -1234567)
        {
            _x = x;
        }

        if (_x == 0)
        {
            return new S32 {
                       A = acc, B = acc, C = acc, D = acc,
            }
        }
        ;

        S32 s = default;

        Program.Calc(ref _x, ref s, ref acc);

        IL.Push(this);
        IL.Push(-1234567);
        IL.Push(s);
        IL.Push(acc);
        IL.Push(s_calcInstanceCalliRetbufOther);
        IL.Emit.Tail();
        IL.Emit.Calli(new StandAloneMethodSig(CallingConventions.Standard | CallingConventions.HasThis, typeof(S32), typeof(int), typeof(S32), typeof(int)));
        return(IL.Return <S32>());
    }
Beispiel #3
0
    public override S32 CalcAbstractRetbuf(int x, int acc)
    {
        if (x != -1234567)
        {
            _x = x;
        }

        if (_x == 0)
        {
            return new S32 {
                       A = acc, B = acc, C = acc, D = acc,
            }
        }
        ;

        S32 s = default;

        Program.Calc(ref _x, ref s, ref acc);

        IL.Push(Other);
        IL.Push(-1234567);
        IL.Push(s);
        IL.Push(acc);
        IL.Emit.Tail();
        IL.Emit.Callvirt(new MethodRef(typeof(ClassImpl), nameof(CalcAbstractRetbufOther)));
        return(IL.Return <S32>());
    }
Beispiel #4
0
 public S13(
     S14 s14,
     S15 s15,
     S16 s16,
     S17 s17,
     S18 s18,
     S19 s19,
     S20 s20,
     S21 s21,
     S22 s22,
     S23 s23,
     S24 s24,
     S25 s25,
     S26 s26,
     S27 s27,
     S28 s28,
     S29 s29,
     S30 s30,
     S31 s31,
     S32 s32,
     S33 s33,
     S34 s34,
     S35 s35,
     S36 s36)
 {
 }
Beispiel #5
0
    public string GC(object a, int b, object c, object d, string e, string f, object g, int h, ref int interior)
    {
        IL.Push(this);

        IL.Push(a);

        S32 s = new S32();

        IL.Push(s);

        SGC2 sgc = new SGC2
        {
            A = b,
            B =
            {
                A = c,
                B = d,
                C = e,
                D = f,
            },
            C = g,
            D = h
        };

        IL.Push(sgc);
        IL.Push(ref interior);

        IL.Emit.Tail();
        IL.Emit.Call(new MethodRef(typeof(Instance), nameof(GCOther)));
        return(IL.Return <string>());
    }
Beispiel #6
0
 public S07(
     S08 s08,
     S09 s09,
     S10 s10,
     S11 s11,
     S12 s12,
     S13 s13,
     S14 s14,
     S15 s15,
     S16 s16,
     S17 s17,
     S18 s18,
     S19 s19,
     S20 s20,
     S21 s21,
     S22 s22,
     S23 s23,
     S24 s24,
     S25 s25,
     S26 s26,
     S27 s27,
     S28 s28,
     S29 s29,
     S30 s30,
     S31 s31,
     S32 s32,
     S33 s33,
     S34 s34,
     S35 s35,
     S36 s36)
 {
 }
Beispiel #7
0
 public S31(
     S32 s32,
     S33 s33,
     S34 s34,
     S35 s35,
     S36 s36)
 {
 }
Beispiel #8
0
    private static void CalcStaticVoidOther(int x, S32 large, int acc)
    {
        Calc(ref x, ref large, ref acc);

        IL.Push(x);
        IL.Push(acc);
        IL.Emit.Tail();
        IL.Emit.Call(new MethodRef(typeof(Program), nameof(CalcStaticVoid)));
    }
Beispiel #9
0
 public IEnumerator Down()
 {
     S31.GetComponent <Rigidbody2D>().AddForce(movement * speed * 1.1F);
     S32.GetComponent <Rigidbody2D>().AddForce(movement * speed * 1.05F);
     S33.GetComponent <Rigidbody2D>().AddForce(movement * speed * 0.85F);
     S34.GetComponent <Rigidbody2D>().AddForce(movement * speed * 0.8F);
     S35.GetComponent <Rigidbody2D>().AddForce(movement * speed * 0.9F);
     yield return(new WaitForSeconds(1f));
 }
Beispiel #10
0
    private static string GenName1Forward <T>(T x)
    {
        S32 s = default;

        IL.Push(s);
        IL.Push(x);
        IL.Emit.Tail();
        IL.Emit.Call(new MethodRef(typeof(Program), nameof(GenName1)).MakeGenericMethod(typeof(T)));
        return(IL.Return <string>());
    }
Beispiel #11
0
 public S29(
     S30 s30,
     S31 s31,
     S32 s32,
     S33 s33,
     S34 s34,
     S35 s35,
     S36 s36)
 {
 }
Beispiel #12
0
    private static S16 CalcStaticS16Other(int x, S32 large, int acc)
    {
        Calc(ref x, ref large, ref acc);

        IL.Push(x);
        IL.Push(acc);
        IL.Emit.Tail();
        IL.Emit.Call(new MethodRef(typeof(Program), nameof(CalcStaticS16)));
        return(IL.Return <S16>());
    }
Beispiel #13
0
    public int CalcInterfaceOther(int x, S32 large, int acc)
    {
        Program.Calc(ref _x, ref large, ref acc);

        IL.Push(Other);
        IL.Push(-1234567);
        IL.Push(acc);
        IL.Emit.Tail();
        IL.Emit.Callvirt(new MethodRef(typeof(IInterface), nameof(CalcInterface)));
        return(IL.Return <int>());
    }
Beispiel #14
0
    public override S32 CalcAbstractRetbufOther(int x, S32 large, int acc)
    {
        Program.Calc(ref _x, ref large, ref acc);

        IL.Push(Other);
        IL.Push(-1234567);
        IL.Push(acc);
        IL.Emit.Tail();
        IL.Emit.Callvirt(new MethodRef(typeof(ClassImpl), nameof(CalcAbstractRetbuf)));
        return(IL.Return <S32>());
    }
Beispiel #15
0
    private static S32 CalcStaticCalliRetbufOther(int x, S32 large, int acc)
    {
        Calc(ref x, ref large, ref acc);

        IL.Push(x);
        IL.Push(acc);
        IL.Push(s_calcStaticCalliRetbuf);
        IL.Emit.Tail();
        IL.Emit.Calli(new StandAloneMethodSig(CallingConventions.Standard, typeof(S32), typeof(int), typeof(int)));
        return(IL.Return <S32>());
    }
Beispiel #16
0
    public S32 CalcInstanceRetbufOther(int x, S32 large, int acc)
    {
        Program.Calc(ref _x, ref large, ref acc);

        IL.Push(this);
        IL.Push(-1234567);
        IL.Push(acc);
        IL.Emit.Tail();
        IL.Emit.Callvirt(new MethodRef(typeof(Instance), nameof(CalcInstanceRetbuf)));
        return(IL.Return <S32>());
    }
Beispiel #17
0
    private static string GenName2ForwardNone(object x, string y)
    {
        S32 s = default;

        IL.Push(s);
        IL.Push(x);
        IL.Push(y);
        IL.Emit.Tail();
        IL.Emit.Call(new MethodRef(typeof(Program), nameof(GenName2)).MakeGenericMethod(typeof(object), typeof(string)));
        return(IL.Return <string>());
    }
Beispiel #18
0
    private static string GenName2ForwardBoth <T1, T2>(T1 x, T2 y)
    {
        S32 s = default;

        IL.Push(s);
        IL.Push(x);
        IL.Push(y);
        IL.Emit.Tail();
        IL.Emit.Call(new MethodRef(typeof(Program), nameof(GenName2)).MakeGenericMethod(typeof(T1), typeof(T2)));
        return(IL.Return <string>());
    }
Beispiel #19
0
    public S32 CalcInstanceCalliRetbufOther(int x, S32 large, int acc)
    {
        Program.Calc(ref _x, ref large, ref acc);

        IL.Push(this);
        IL.Push(-1234567);
        IL.Push(acc);
        IL.Push(s_calcInstanceCalliRetbuf);
        IL.Emit.Tail();
        IL.Emit.Calli(new StandAloneMethodSig(CallingConventions.Standard | CallingConventions.HasThis, typeof(S32), typeof(int), typeof(int)));
        return(IL.Return <S32>());
    }
Beispiel #20
0
 public S27(
     S28 s28,
     S29 s29,
     S30 s30,
     S31 s31,
     S32 s32,
     S33 s33,
     S34 s34,
     S35 s35,
     S36 s36)
 {
 }
Beispiel #21
0
    private void CountUpOther(int left, S32 s)
    {
        if (left == 0)
        {
            return;
        }

        Count++;
        IL.Push(ref this);
        IL.Push(left - 1);
        IL.Emit.Tail();
        IL.Emit.Call(new MethodRef(typeof(InstanceValueType), nameof(CountUp)));
    }
Beispiel #22
0
    private static void CountUpRefOther(int left, S32 s, ref int counter)
    {
        if (left == 0)
        {
            return;
        }

        counter++;
        IL.Push(left - 1);
        IL.Push(ref counter);
        IL.Emit.Tail();
        IL.Emit.Call(new MethodRef(typeof(Program), nameof(CountUpRef)));
    }
Beispiel #23
0
    private static int CountUpHeapOther(int left, S32 s, HeapInt counter)
    {
        if (left == 0)
        {
            return(counter.Value);
        }

        IL.Push(left - 1);
        IL.Push(new HeapInt(counter.Value + 1));
        IL.Emit.Tail();
        IL.Emit.Call(new MethodRef(typeof(Program), nameof(CountUpHeap)));
        return(IL.Return <int>());
    }
Beispiel #24
0
 public S24(
     S25 s25,
     S26 s26,
     S27 s27,
     S28 s28,
     S29 s29,
     S30 s30,
     S31 s31,
     S32 s32,
     S33 s33,
     S34 s34,
     S35 s35,
     S36 s36)
 {
 }
Beispiel #25
0
        public int ResolveInt(S32 value)
        {
            for (int i = 1; i < _intTable.Count; ++i)
            {
                if (value.Value == ((S32)_intTable[i]).Value)
                {
                    return(i);
                }
            }

            int j = _intTable.Count;

            _intTable.Add(value);

            return(j);
        }
Beispiel #26
0
 /// <summary>
 ///
 /// </summary>
 /// <returns>
 /// 0 = Magnitudes, 1 = Phases
 /// </returns>
 public double[][][] GetS4pFile()
 {
     double[][] sParamMagnitudes =
     {
         S11.ToArray(), S12.ToArray(), S13.ToArray(), S14.ToArray(), S21.ToArray(), S22.ToArray(), S23.ToArray(),
         S24.ToArray(), S31.ToArray(), S32.ToArray(), S33.ToArray(), S34.ToArray(), S41.ToArray(), S42.ToArray(),
         S43.ToArray(), S44.ToArray()
     };
     double[][] sParamPhase =
     {
         F11.ToArray(), F12.ToArray(), F13.ToArray(), F14.ToArray(), F21.ToArray(), F22.ToArray(), F23.ToArray(),
         F24.ToArray(), F31.ToArray(), F32.ToArray(), F33.ToArray(), F34.ToArray(), F41.ToArray(), F42.ToArray(),
         F43.ToArray(), F44.ToArray()
     };
     double[][][] sParams = { sParamMagnitudes, sParamPhase };
     return(sParams);
 }
Beispiel #27
0
    public static void Calc(ref int x, ref S32 s, ref int acc)
    {
        if (x % 2 == 0)
        {
            acc += (int)(x * 3 + s.A * 7 + s.B * 9 + s.C * -3 + s.D * 4);
        }
        else
        {
            acc += (int)(x * 1 + s.A * 9 + s.B * 3 + s.C * -4 + s.D * 5);
        }

        x--;
        s.A = 11 * x;
        s.B = 14 * x;
        s.C = -14 * x;
        s.D = 3 * x;
    }
Beispiel #28
0
    private static unsafe byte CalcStaticSmall(int x, int acc)
    {
        if (x == 0)
        {
            return((byte)acc);
        }

        S32 s = default;

        Calc(ref x, ref s, ref acc);

        IL.Push(x);
        IL.Push(s);
        IL.Push(acc);
        IL.Emit.Tail();
        IL.Emit.Call(new MethodRef(typeof(Program), nameof(CalcStaticSmallOther)));
        return(IL.Return <byte>());
    }
Beispiel #29
0
    private static long CalcStaticLong(int x, int acc)
    {
        if (x == 0)
        {
            return((long)(((ulong)(uint)acc << 32) | (uint)acc));
        }

        S32 s = default;

        Calc(ref x, ref s, ref acc);

        IL.Push(x);
        IL.Push(s);
        IL.Push(acc);
        IL.Emit.Tail();
        IL.Emit.Call(new MethodRef(typeof(Program), nameof(CalcStaticLongOther)));
        return(IL.Return <long>());
    }
Beispiel #30
0
    private static void CalcStaticVoid(int x, int acc)
    {
        if (x == 0)
        {
            s_result = acc;

            return;
        }

        S32 s = default;

        Calc(ref x, ref s, ref acc);

        IL.Push(x);
        IL.Push(s);
        IL.Push(acc);
        IL.Emit.Tail();
        IL.Emit.Call(new MethodRef(typeof(Program), nameof(CalcStaticVoidOther)));
    }
Beispiel #31
0
        public int ResolveInt(S32 value)
        {
            for (int i = 1; i < _intTable.Count; ++i)
            {
                if (value.Value == ((S32)_intTable[i]).Value)
                    return i;
            }

            int j = _intTable.Count;

            _intTable.Add(value);

            return j;
        }