Cosmos/source/Indy.IL2CPU.IL.X86/X86CustomMethodImplementationProxyOp.cs
2007-11-24 15:19:05 +00:00

35 lines
1,020 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Indy.IL2CPU.Assembler;
using CPUx86 = Indy.IL2CPU.Assembler.X86;
using Instruction = Mono.Cecil.Cil.Instruction;
namespace Indy.IL2CPU.IL.X86 {
public class X86CustomMethodImplementationProxyOp: CustomMethodImplementationProxyOp {
public X86CustomMethodImplementationProxyOp(Instruction aInstruction, MethodInformation aMethodInfo)
: base(aInstruction, aMethodInfo) {
}
protected override void Ldarg(int aIndex) {
Op.Ldarg(Assembler, MethodInfo.Arguments[aIndex]);
}
protected override void Ldflda(TypeInformation aType, TypeInformation.Field aField) {
Op.Ldflda(Assembler, aType, aField);
}
protected override void CallProxiedMethod() {
Op x = new Call(ProxiedMethod);
x.Assembler = Assembler;
x.Assemble();
}
protected override void Ldloc(int index) {
Op x = new Ldloc(MethodInfo, index);
x.Assembler = Assembler;
x.Assemble();
}
}
}