Example #1
0
 public static void RunTest()
 {
     for (int i = 0; i < 100000; i++)
     {
         CLRBindingTestClass.DoSomeTest(i, i);
     }
 }
        static StackObject *Ctor_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *__ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new CLRBindingTestClass();

            return(ILIntepreter.PushObject(__ret, __mStack, result_of_this_method));
        }
 public static void RunTest()
 {
     //int
     Debug.Log("F**k Start Realse");
     for (int i = 0; i < 100000; i++)
     {
         CLRBindingTestClass.DoSomeTest(i, i + 1);
         //for (int j = 0; j < 1000; j++)
         //{
         //     CLRBindingTestClass.DoSomeTest(i, i);
         //}
     }
 }
        static StackObject *DoSomeTest_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Single b = *(float *)&ptr_of_this_method->Value;
            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Int32 a = ptr_of_this_method->Value;

            var result_of_this_method = CLRBindingTestClass.DoSomeTest(a, b);

            __ret->ObjectType       = ObjectTypes.Float;
            *(float *)&__ret->Value = result_of_this_method;
            return(__ret + 1);
        }
        static int __CreateInstance(RealStatePtr L)
        {
            try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
                if (LuaAPI.lua_gettop(L) == 1)
                {
                    var gen_ret = new CLRBindingTestClass();
                    translator.Push(L, gen_ret);

                    return(1);
                }
            }
            catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
            return(LuaAPI.luaL_error(L, "invalid arguments to CLRBindingTestClass constructor!"));
        }
        static int _m_DoSomeTest_xlua_st_(RealStatePtr L)
        {
            try {
                {
                    int   _a = LuaAPI.xlua_tointeger(L, 1);
                    float _b = (float)LuaAPI.lua_tonumber(L, 2);

                    var gen_ret = CLRBindingTestClass.DoSomeTest(_a, _b);
                    LuaAPI.lua_pushnumber(L, gen_ret);



                    return(1);
                }
            } catch (System.Exception gen_e) {
                return(LuaAPI.luaL_error(L, "c# exception:" + gen_e));
            }
        }