System.Exception: Error interpreting stacktypes for IL_0006:
From @fanoI on August 14, 2016 16:53
I were trying to port BigInteger to Cosmos the .NET version is too complex and will need to plug 99% of .NET so I've found this implementation that is really more simple: http://www.codeproject.com/Articles/2728/C-BigInteger-Class
SingleImpl.cs is now using BigInteger as the range of float overcome that of ulong but now the code does not compile anymore this is the error:
6:44:13.265590 Msg: Detecting fields for type 'Cosmos.Debug.Common.Method' 06:44:13.281600 Msg: Error: Exception: System.Exception: Error compiling method 'SystemBooleanSystemSingleEqualsSystemObject': System.Exception: Error interpreting stacktypes for IL_0006: Brtrue ---> System.Exception: Invalid type in PopTypes! (Type = 'System.Single, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089') 06:44:13.283602 Msg: in Cosmos.IL2CPU.ILOpCodes.OpBranch.DoInterpretStackTypes(Boolean& aSituationChanged) in C:\Users\fano\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCodes\OpBranch.cs:riga 115 06:44:13.284603 Msg: in Cosmos.IL2CPU.ILOpCode.InterpretStackTypes(IDictionary2 aOpCodes, Stack1 aStack, Boolean& aSituationChanged, Int32 aMaxRecursionDepth) in C:\Users\fano\Documents\GitHub\Cosmos\source\Cosmos.IL2CPU\ILOpCode.cs:riga 413 06:44:13.285604 Msg: --- Fine della traccia dello stack dell'eccezione interna ---
I suppose it is something done in BigInteger.cs as removing the variable declaration it compiles again.
Copied from original issue: CosmosOS/Cosmos#436
From @fanoI on August 14, 2016 21:11
The "simplified" BigInteger ad not the methods Equals with the other parameter as BigInteger... the branch that actually failed was this one: if (mantissa == 0) where 'mantissa' was a BigInteger. Adding that method the problem gone away but after I started to get Stack Overflow!