Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.Exception: Error interpreting stacktypes for IL_0006: #17

Open
jp2masa opened this issue Oct 21, 2017 · 1 comment
Open

System.Exception: Error interpreting stacktypes for IL_0006: #17

jp2masa opened this issue Oct 21, 2017 · 1 comment

Comments

@jp2masa
Copy link
Member

jp2masa commented Oct 21, 2017

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

@jp2masa
Copy link
Member Author

jp2masa commented Oct 21, 2017

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant