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)); }
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)); }
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)); } }
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)); } }
public override void EmitCalli(SRE.OpCode opcode, CallingConventions callingConvention, Type returnType, Type[] parameterTypes, Type[] optionalParameterTypes) => throw new NotSupportedException();
public override void EmitCall(SRE.OpCode opcode, MethodInfo methodInfo, Type[] optionalParameterTypes) => Emit(IL.Create(_(opcode), _(methodInfo)));
public void Emit(SRE.OpCode opcode, ICallSiteGenerator signature) => Emit(IL.Create(_(opcode), IL.Body.Method.Module.ImportCallSite(signature)));
public override void Emit(SRE.OpCode opcode, SignatureHelper signature) => Emit(IL.Create(_(opcode), IL.Body.Method.Module.ImportCallSite(signature)));
public override void Emit(SRE.OpCode opcode, LocalBuilder local) => Emit(IL.Create(_(opcode), _(local)));
public override void Emit(SRE.OpCode opcode) => Emit(IL.Create(_(opcode)));
public override void Emit(SRE.OpCode opcode, MethodInfo arg) => Emit(IL.Create(_(opcode), _(arg)));
public override void Emit(SRE.OpCode opcode, ConstructorInfo arg) => Emit(IL.Create(_(opcode), _(arg)));
public override void Emit(SRE.OpCode opcode, Type arg) => Emit(IL.Create(_(opcode), _(arg)));
public override void Emit(SRE.OpCode opcode, string arg) => Emit(IL.Create(_(opcode), arg));
public override void EmitCalli(SRE.OpCode opcode, CallingConvention unmanagedCallConv, Type returnType, Type[] parameterTypes) => throw new NotSupportedException();
private OpCode _(SRE.OpCode opcode) => _MCCOpCodes[opcode.Value];
public override void Emit(SRE.OpCode opcode, SignatureHelper signature) => throw new NotSupportedException();