mirror of
https://github.com/danbulant/Cosmos
synced 2026-05-24 12:35:31 +00:00
Compiler fix for the Isinst OpCode.
This commit is contained in:
parent
131767a55f
commit
704af021ff
2 changed files with 3 additions and 2 deletions
|
|
@ -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)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -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 &&
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue