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: #436

Closed
fanoI opened this issue Aug 14, 2016 · 2 comments
Closed

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

fanoI opened this issue Aug 14, 2016 · 2 comments

Comments

@fanoI
Copy link
Contributor

fanoI commented Aug 14, 2016

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.

@fanoI
Copy link
Contributor Author

fanoI commented Aug 14, 2016

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!

@jp2masa
Copy link
Member

jp2masa commented Oct 21, 2017

This issue was moved to CosmosOS/IL2CPU#17

@jp2masa jp2masa closed this as completed Oct 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants