public PEAPI.HandlerBlock Resolve(CodeGen code_gen, MethodDef method)
        {
            PEAPI.CILLabel from     = handler_block.GetFromLabel(code_gen, method);
            PEAPI.CILLabel to       = handler_block.GetToLabel(code_gen, method);
            PEAPI.Finally  phinally = new PEAPI.Finally(from, to);

            return(phinally);
        }
        public PEAPI.HandlerBlock Resolve(CodeGen code_gen, MethodDef method)
        {
            PEAPI.CILLabel from  = handler_block.GetFromLabel(code_gen, method);
            PEAPI.CILLabel to    = handler_block.GetToLabel(code_gen, method);
            PEAPI.Fault    fault = new PEAPI.Fault(from, to);

            return(fault);
        }
Example #3
0
        public PEAPI.HandlerBlock Resolve(CodeGen code_gen, MethodDef method)
        {
            PEAPI.CILLabel label  = this_block.GetFromLabel(code_gen, method);
            PEAPI.CILLabel from   = handler_block.GetFromLabel(code_gen, method);
            PEAPI.CILLabel to     = handler_block.GetToLabel(code_gen, method);
            PEAPI.Filter   filter = new PEAPI.Filter(label, from, to);

            return(filter);
        }
        public PEAPI.HandlerBlock Resolve(CodeGen code_gen, MethodDef method)
        {
            PEAPI.CILLabel from = handler_block.GetFromLabel(code_gen, method);
            PEAPI.CILLabel to   = handler_block.GetToLabel(code_gen, method);
            PEAPI.Catch    katch;

            type_ref.Resolve(code_gen);

            katch = new PEAPI.Catch(type_ref.PeapiType, from, to);

            return(katch);
        }
Example #5
0
        public override void Emit(CodeGen code_gen, MethodDef meth,
                                  PEAPI.CILInstructions cil)
        {
            PEAPI.CILLabel from      = block.GetFromLabel(code_gen, meth);
            PEAPI.CILLabel to        = block.GetToLabel(code_gen, meth);
            PEAPI.TryBlock try_block = new PEAPI.TryBlock(from, to);

            foreach (ISehClause clause in clause_list)
            {
                try_block.AddHandler(clause.Resolve(code_gen, meth));
            }

            cil.AddTryBlock(try_block);
        }