From 77f741a1272823419b3f756ea3c16648f7209a1b Mon Sep 17 00:00:00 2001 From: David Maas Date: Mon, 20 Apr 2015 10:40:39 -0500 Subject: [PATCH 1/2] Added stobj's stack push/pop information to OpType. Re-added PCSpeaker.cs to Cosmos.HAL. --- source/Cosmos.HAL/Cosmos.HAL.csproj | 1 + source/Cosmos.IL2CPU/ILOpCodes/OpType.cs | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/source/Cosmos.HAL/Cosmos.HAL.csproj b/source/Cosmos.HAL/Cosmos.HAL.csproj index 7b6317243..b4350830d 100644 --- a/source/Cosmos.HAL/Cosmos.HAL.csproj +++ b/source/Cosmos.HAL/Cosmos.HAL.csproj @@ -116,6 +116,7 @@ + diff --git a/source/Cosmos.IL2CPU/ILOpCodes/OpType.cs b/source/Cosmos.IL2CPU/ILOpCodes/OpType.cs index 1f32963db..f1dbe0700 100644 --- a/source/Cosmos.IL2CPU/ILOpCodes/OpType.cs +++ b/source/Cosmos.IL2CPU/ILOpCodes/OpType.cs @@ -41,9 +41,11 @@ namespace Cosmos.IL2CPU.ILOpCodes { case Code.Constrained: return 0; case Code.Unbox_Any: - return 1; + return 1; case Code.Unbox: - return 1; + return 1; + case Code.Stobj: + return 2; default: throw new NotImplementedException("OpCode '" + OpCode + "' not implemented! Encountered in method " + aMethod.ToString()); } @@ -75,6 +77,8 @@ namespace Cosmos.IL2CPU.ILOpCodes { return 1; case Code.Unbox: return 1; + case Code.Stobj: + return 0; default: throw new NotImplementedException("OpCode '" + OpCode + "' not implemented!"); } From c0579322c1444c3001faa7e230cac6ca62f35b4b Mon Sep 17 00:00:00 2001 From: David Maas Date: Mon, 20 Apr 2015 10:41:58 -0500 Subject: [PATCH 2/2] Hacked in showing types in call trace outputs when a plug is missing. (Rather than seeing "Void Run()" you see "Cosmos.Kernel::Void Run()", not ideal but it works.) --- source/Cosmos.IL2CPU/ILScanner.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source/Cosmos.IL2CPU/ILScanner.cs b/source/Cosmos.IL2CPU/ILScanner.cs index 6f116c617..b7d3b229b 100644 --- a/source/Cosmos.IL2CPU/ILScanner.cs +++ b/source/Cosmos.IL2CPU/ILScanner.cs @@ -131,6 +131,12 @@ namespace Cosmos.IL2CPU mItems.Add(aItem); mItemsList.Add(aItem); + MethodBase methodBaseSource = aSrc as MethodBase; + if (methodBaseSource != null) + { + aSrc = methodBaseSource.DeclaringType.ToString() + "::" + aSrc.ToString(); + } + mQueue.Enqueue(new ScannerQueueItem() { Item = aItem, QueueReason = aSrcType, SourceItem = aSrc + Environment.NewLine + sourceItem }); } }