mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-27 14:02:19 +00:00
71 lines
2.4 KiB
C#
71 lines
2.4 KiB
C#
using System;
|
|
|
|
namespace Cosmos.IL2CPU.X86.IL
|
|
{
|
|
[Cosmos.IL2CPU.OpCode(ILOpCode.Code.Ldfld)]
|
|
public class Ldfld: ILOp
|
|
{
|
|
public Ldfld(Cosmos.IL2CPU.Assembler aAsmblr):base(aAsmblr)
|
|
{
|
|
}
|
|
|
|
public override void Execute(uint aMethodUID, ILOpCode aOpCode) {
|
|
//TODO: Implement this Op
|
|
}
|
|
|
|
|
|
// using System;
|
|
// using System.Collections.Generic;
|
|
// using System.IO;
|
|
//
|
|
//
|
|
// using CPU = Indy.IL2CPU.Assembler;
|
|
// using System.Reflection;
|
|
// using Indy.IL2CPU.Compiler;
|
|
//
|
|
// namespace Indy.IL2CPU.IL.X86 {
|
|
// [OpCode(OpCodeEnum.Ldfld)]
|
|
// public class Ldfld: Op {
|
|
// private Type mDeclaringType;
|
|
// private TypeInformation.Field mFieldInfo;
|
|
// private readonly TypeInformation mTypeInfo;
|
|
// private string mFieldId;
|
|
//
|
|
// //public static void ScanOp(ILReader aReader, MethodInformation aMethodInfo, SortedList<string, object> aMethodData) {
|
|
// // FieldInfo xField = aReader.OperandValueField;
|
|
// // if (xField == null)
|
|
// // {
|
|
// // throw new Exception("Field not found!");
|
|
// // }
|
|
// // Engine.RegisterType(xField.DeclaringType);
|
|
// // Engine.RegisterType(xField.FieldType);
|
|
// //}
|
|
//
|
|
// public Ldfld(ILReader aReader, MethodInformation aMethodInfo)
|
|
// : base(aReader, aMethodInfo) {
|
|
// FieldInfo xField = aReader.OperandValueField;
|
|
// if (xField == null) {
|
|
// throw new Exception("Field not found!");
|
|
// }
|
|
// mFieldId = xField.GetFullName();
|
|
// mDeclaringType = xField.DeclaringType;
|
|
// }
|
|
//
|
|
// public override void DoAssemble() {
|
|
// var xType = GetService<IMetaDataInfoService>().GetTypeInfo(mDeclaringType);
|
|
// if (!xType.Fields.ContainsKey(mFieldId))
|
|
// {
|
|
// Console.Write("");
|
|
// xType = GetService<IMetaDataInfoService>().GetTypeInfo(mDeclaringType);
|
|
// xType = GetService<IMetaDataInfoService>().GetTypeInfo(mDeclaringType);
|
|
// xType = GetService<IMetaDataInfoService>().GetTypeInfo(mDeclaringType);
|
|
// xType = GetService<IMetaDataInfoService>().GetTypeInfo(mDeclaringType);
|
|
// }
|
|
// mFieldInfo = xType.Fields[mFieldId];
|
|
// Ldfld(Assembler, xType, mFieldId);
|
|
// }
|
|
// }
|
|
// }
|
|
|
|
}
|
|
}
|