Пример #1
0
        public override void Emit(SRE.OpCode opcode, Label label)
        {
            LabelInfo   info = _(label);
            Instruction ins  = IL.Create(_(opcode), _(label).Instruction);

            info.Branches.Add(ins);
            Emit(ProcessLabels(ins));
        }
Пример #2
0
        public override void Emit(SRE.OpCode opcode, Label[] labels)
        {
            IEnumerable <LabelInfo> labelInfos = labels.Distinct().Select(_);
            Instruction             ins        = IL.Create(_(opcode), labelInfos.Select(labelInfo => labelInfo.Instruction).ToArray());

            foreach (LabelInfo labelInfo in labelInfos)
            {
                labelInfo.Branches.Add(ins);
            }
            Emit(ProcessLabels(ins));
        }
Пример #3
0
 public override void Emit(SRE.OpCode opcode, short arg)
 {
     if (opcode.OperandType == SRE.OperandType.ShortInlineVar ||
         opcode.OperandType == SRE.OperandType.InlineVar)
     {
         _EmitInlineVar(_(opcode), arg);
     }
     else
     {
         Emit(IL.Create(_(opcode), arg));
     }
 }
Пример #4
0
 public override void Emit(SRE.OpCode opcode, int arg)
 {
     if (opcode.OperandType == SRE.OperandType.ShortInlineVar ||
         opcode.OperandType == SRE.OperandType.InlineVar)
     {
         _EmitInlineVar(_(opcode), arg);
     }
     else if (opcode.Name.EndsWith(".s"))
     {
         Emit(IL.Create(_(opcode), (sbyte)arg));
     }
     else
     {
         Emit(IL.Create(_(opcode), arg));
     }
 }
Пример #5
0
 public override void EmitCalli(SRE.OpCode opcode, CallingConventions callingConvention, Type returnType,
                                Type[] parameterTypes, Type[] optionalParameterTypes) => throw new NotSupportedException();
Пример #6
0
 public override void EmitCall(SRE.OpCode opcode, MethodInfo methodInfo, Type[] optionalParameterTypes) =>
 Emit(IL.Create(_(opcode), _(methodInfo)));
Пример #7
0
 public void Emit(SRE.OpCode opcode, ICallSiteGenerator signature) => Emit(IL.Create(_(opcode), IL.Body.Method.Module.ImportCallSite(signature)));
Пример #8
0
 public override void Emit(SRE.OpCode opcode, SignatureHelper signature) => Emit(IL.Create(_(opcode), IL.Body.Method.Module.ImportCallSite(signature)));
Пример #9
0
 public override void Emit(SRE.OpCode opcode, LocalBuilder local) => Emit(IL.Create(_(opcode), _(local)));
Пример #10
0
 public override void Emit(SRE.OpCode opcode) => Emit(IL.Create(_(opcode)));
Пример #11
0
 public override void Emit(SRE.OpCode opcode, MethodInfo arg) => Emit(IL.Create(_(opcode), _(arg)));
Пример #12
0
 public override void Emit(SRE.OpCode opcode, ConstructorInfo arg) => Emit(IL.Create(_(opcode), _(arg)));
Пример #13
0
 public override void Emit(SRE.OpCode opcode, Type arg) => Emit(IL.Create(_(opcode), _(arg)));
Пример #14
0
 public override void Emit(SRE.OpCode opcode, string arg) => Emit(IL.Create(_(opcode), arg));
Пример #15
0
 public override void EmitCalli(SRE.OpCode opcode, CallingConvention unmanagedCallConv, Type returnType,
                                Type[] parameterTypes) => throw new NotSupportedException();
Пример #16
0
 private OpCode _(SRE.OpCode opcode) => _MCCOpCodes[opcode.Value];
Пример #17
0
 public override void Emit(SRE.OpCode opcode, SignatureHelper signature) => throw new NotSupportedException();