示例#1
0
        private static bool HandleCalls(Instruction instruction, MetaMidRepresentationOperationFactory operationFactory,
                                        short opcodeValue, CrRuntimeLibrary crRuntime)
        {
            switch (opcodeValue)
            {
            case ObcodeIntValues.Nop:
                return(true);

            case ObcodeIntValues.Call:
                operationFactory.Call(instruction.Operand, crRuntime);
                return(true);

            case ObcodeIntValues.CallVirt:
                operationFactory.CallVirtual(instruction.Operand, crRuntime);
                return(true);

            case ObcodeIntValues.CallInterface:
                operationFactory.CallInterface(instruction.Operand, crRuntime);
                return(true);

            case ObcodeIntValues.NewObj:
            {
                var consInfo = (ConstructorInfo)instruction.Operand;
                operationFactory.NewObject(consInfo, crRuntime);
            }
                return(true);
            }
            return(false);
        }