Compiler fix for the Isinst OpCode.

This commit is contained in:
Sentinel209_cp 2014-10-25 12:47:56 +00:00
parent 131767a55f
commit 704af021ff
2 changed files with 3 additions and 2 deletions

View file

@ -174,7 +174,8 @@ namespace Cosmos.IL2CPU.ILOpCodes {
{
return;
}
throw new Exception("Wrong Poptype encountered!");
throw new Exception("Wrong Poptype encountered! (Type = " + StackPopTypes[0].FullName + ", expected = " + expectedType.FullName + ")");
// throw new Exception("Wrong Poptype encountered!");
case Code.Stsfld:
if (StackPopTypes[0] == null)
{

View file

@ -105,7 +105,7 @@ namespace Cosmos.IL2CPU.ILOpCodes {
return;
case Code.Isinst:
StackPopTypes[0] = typeof(object);
StackPushTypes[0] = typeof(bool);
StackPushTypes[0] = Value;
return;
case Code.Castclass:
if (Value.IsGenericType &&