Exemple #1
0
        public void DelayCalls(AbcCode code, IList <AbcInstance> list, int arr)
        {
            int vf = arr + 1;

            code.GetLocal(arr);
            int n = list.Count;

            for (int i = 0; i < n; ++i)
            {
                var instance = list[i];

                code.PushNativeBool(false);                 //delayed
                code.SetLocal(vf);

                GetCalledFlag(code, instance);
                var called = code.IfTrue();

                SetCalledFlag(code, instance, true);

                code.PushNativeBool(true);
                code.SetLocal(vf);

                called.BranchTarget = code.Label();

                code.GetLocal(arr);
                code.GetLocal(vf);
                code.CallAS3("push", 1);
            }
        }
Exemple #2
0
        public static InlineCall Get(AbcFile abc, IMethod method)
        {
            var call = Instance.GetImplementation(abc, method);

            if (call != null)
            {
                return(call);
            }

            var code = new AbcCode(abc);

            code.CallAS3(method.Name, method.Parameters.Count);
            return(new InlineCall(method, null, null, code));
        }