Ejemplo n.º 1
0
        private void ProcessOperations(MethodBody methodBody)
        {
            List <IOperation> operations = methodBody.Operations;
            int count = methodBody.Operations.Count;

            ILGenerator generator = new ILGenerator(this.host, methodBody.MethodDefinition);

            var methodName = MemberHelper.GetMemberSignature(methodBody.MethodDefinition, NameFormattingOptions.SmartTypeName);



            #endregion Pass 2: Emit each operation, along with labels

            #region Retrieve the operations (and the exception information) from the generator
            generator.AdjustBranchSizesToBestFit();
            methodBody.OperationExceptionInformation = new List <IOperationExceptionInformation>(generator.GetOperationExceptionInformation());
            methodBody.Operations = new List <IOperation>(generator.GetOperations());
            #endregion Retrieve the operations (and the exception information) from the generator
            methodBody.MaxStack++;
        }