mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-27 14:02:19 +00:00
53 lines
1.5 KiB
C#
53 lines
1.5 KiB
C#
using System;
|
|
|
|
namespace Cosmos.IL2CPU.X86.IL
|
|
{
|
|
[Cosmos.IL2CPU.OpCode(ILOpCode.Code.Ldloc)]
|
|
public class Ldloc: ILOp
|
|
{
|
|
public Ldloc(Cosmos.IL2CPU.Assembler aAsmblr):base(aAsmblr)
|
|
{
|
|
}
|
|
|
|
public override void Execute(uint aMethodUID, ILOpCode aOpCode) {
|
|
//TODO: Implement this Op
|
|
}
|
|
|
|
|
|
// using System;
|
|
// using System.IO;
|
|
// using Indy.IL2CPU.Assembler;
|
|
//
|
|
//
|
|
// using CPU = Indy.IL2CPU.Assembler.X86;
|
|
// using Indy.IL2CPU.Compiler;
|
|
//
|
|
// namespace Indy.IL2CPU.IL.X86 {
|
|
// [OpCode(OpCodeEnum.Ldloc)]
|
|
// public class Ldloc: Op {
|
|
// private MethodInformation.Variable mLocal;
|
|
// protected void SetLocalIndex(int aIndex, MethodInformation aMethodInfo) {
|
|
// mLocal = aMethodInfo.Locals[aIndex];
|
|
// }
|
|
// public Ldloc(MethodInformation aMethodInfo, int aIndex)
|
|
// : base(null, aMethodInfo) {
|
|
// SetLocalIndex(aIndex, aMethodInfo);
|
|
// }
|
|
//
|
|
// public Ldloc(ILReader aReader, MethodInformation aMethodInfo)
|
|
// : base(aReader, aMethodInfo) {
|
|
// SetLocalIndex(aReader.OperandValueInt32, aMethodInfo);
|
|
// //VariableDefinition xVarDef = aReader.Operand as VariableDefinition;
|
|
// //if (xVarDef != null) {
|
|
// // SetLocalIndex(xVarDef.Index, aMethodInfo);
|
|
// //}
|
|
// }
|
|
//
|
|
// public sealed override void DoAssemble() {
|
|
// Ldloc(Assembler, mLocal, GetService<IMetaDataInfoService>().GetFieldStorageSize(mLocal.VariableType));
|
|
// }
|
|
// }
|
|
// }
|
|
|
|
}
|
|
}
|