Compiler bug fixed.

This commit is contained in:
Matthijs ter Woord 2015-11-06 09:03:00 +01:00
parent 535d3d136e
commit 4ffeeae278
2 changed files with 15 additions and 7 deletions

View file

@ -21,23 +21,23 @@ namespace Cosmos.TestRunner.Core
// If you're working on the compiler (or other lower parts), you can choose to run the compiler in process
// one thing to keep in mind though, is that this only works with 1 kernel at a time!
engine.RunIL2CPUInProcess = true;
//engine.RunIL2CPUInProcess = true;
engine.EnableStackCorruptionChecks = true;
//engine.RunWithGDB = true;
// Select kernels to be tested by adding them to the engine
//engine.AddKernel(typeof(Cosmos.Compiler.Tests.Bcl.Kernel).Assembly.Location);
//engine.AddKernel(typeof(Cosmos.Compiler.Tests.SingleEchoTest.Kernel).Assembly.Location);
//engine.AddKernel(typeof(Cosmos.Compiler.Tests.SimpleWriteLine.Kernel.Kernel).Assembly.Location);
//engine.AddKernel(typeof(SimpleStructsAndArraysTest.Kernel).Assembly.Location);
//engine.AddKernel(typeof(VGACompilerCrash.Kernel).Assembly.Location);
engine.AddKernel(typeof(Cosmos.Compiler.Tests.Bcl.Kernel).Assembly.Location);
engine.AddKernel(typeof(Cosmos.Compiler.Tests.SingleEchoTest.Kernel).Assembly.Location);
engine.AddKernel(typeof(Cosmos.Compiler.Tests.SimpleWriteLine.Kernel.Kernel).Assembly.Location);
engine.AddKernel(typeof(SimpleStructsAndArraysTest.Kernel).Assembly.Location);
engine.AddKernel(typeof(VGACompilerCrash.Kernel).Assembly.Location);
// Known bugs, therefore disabled for now:
//engine.AddKernel(typeof(BoxingTests.Kernel).Assembly.Location);
// Experimental stuff:
engine.AddKernel(typeof(Cosmos.Kernel.Tests.Fat.Kernel).Assembly.Location);
//engine.AddKernel(typeof(Cosmos.Kernel.Tests.Fat.Kernel).Assembly.Location);
// end of known bugs

View file

@ -673,6 +673,14 @@ namespace Cosmos.IL2CPU.ILOpCodes {
return;
}
if (StackPopTypes[0] == typeof(int) && StackPopTypes[1] == typeof(int))
{
StackPushTypes[0] = typeof(int);
aSituationChanged = true;
return;
}
if ((StackPopTypes[0] == typeof(int) && StackPopTypes[1] == typeof(bool))
|| (StackPopTypes[0] == typeof(bool) && StackPopTypes[1] == typeof(int)))
{
StackPushTypes[0] = typeof(int);
aSituationChanged = true;