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; 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: case Code.Stsfld:
if (StackPopTypes[0] == null) if (StackPopTypes[0] == null)
{ {

View file

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