From f9b89c3e806af05e37ec04f55c1b040b4b994da1 Mon Sep 17 00:00:00 2001 From: kudzu_cp <6d05c8c8ef5431987001abfdb2eadc9593ac9498> Date: Sun, 26 Jul 2009 00:17:49 +0000 Subject: [PATCH] Scans additional types again. --- source2/IL2PCU/Cosmos.IL2CPU/ILScanner.cs | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/source2/IL2PCU/Cosmos.IL2CPU/ILScanner.cs b/source2/IL2PCU/Cosmos.IL2CPU/ILScanner.cs index 89c1c6d7c..ffbf69807 100644 --- a/source2/IL2PCU/Cosmos.IL2CPU/ILScanner.cs +++ b/source2/IL2PCU/Cosmos.IL2CPU/ILScanner.cs @@ -107,6 +107,7 @@ namespace Cosmos.IL2CPU { if (xOpCode is ILOpCodes.OpMethod) { QueueMethod(((ILOpCodes.OpMethod)xOpCode).Value); } else if (xOpCode is ILOpCodes.OpType) { + QueueType(((ILOpCodes.OpType)xOpCode).Value); } ConstructorInfo xCtor; @@ -116,18 +117,15 @@ namespace Cosmos.IL2CPU { } else { xCtor = mILOpsHi[xOpCodeVal & 0xFF]; } - // TODO: Remove this if when all shortcut expansions are completed - if (xCtor != null) { - var xILOp = xCtor.Invoke(new object[] { xOpCode }); - // What to pass to Execute method? Passing whole scanner is inappropriate - // Op needs info about branch targets for example - // are all branches within method? - //inherited execute in ILOpX6 for example can emit this label - // MethodLabel + offset since we will need method labels anyways. Method label - // can be based on a UID generated by our compiler. ie 32 bits of UID + 32 bits offset - // UInt64 xUID = xMethodID << 32 | xOffset - //xILOp.Execute(xUID); - } + var xILOp = xCtor.Invoke(new object[] { xOpCode }); + // What to pass to Execute method? Passing whole scanner is inappropriate + // Op needs info about branch targets for example + // are all branches within method? + //inherited execute in ILOpX6 for example can emit this label + // MethodLabel + offset since we will need method labels anyways. Method label + // can be based on a UID generated by our compiler. ie 32 bits of UID + 32 bits offset + // UInt64 xUID = xMethodID << 32 | xOffset + //xILOp.Execute(xUID); } } }