Merge pull request #77 from PathogenDavid/master

Added stobj stack push/pop information to OpType and some other smaller changes.
This commit is contained in:
Matthijs ter Woord 2015-04-20 18:49:51 +02:00
commit e99e9ffad9
3 changed files with 13 additions and 2 deletions

View file

@ -116,6 +116,7 @@
<Compile Include="PCIDeviceBridge.cs" />
<Compile Include="PCIDeviceCardbus.cs" />
<Compile Include="PCIDeviceNormal.cs" />
<Compile Include="PCSpeaker.cs" />
<Compile Include="PIT.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="RTC.cs" />

View file

@ -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!");
}

View file

@ -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 });
}
}