CosmosOS / IL2CPU

IL2CPU is a compiler for .NET IL code to compile to assembly language for direct booting.
BSD 3-Clause "New" or "Revised" License
279 stars 71 forks source link

Completely review exception handling #16

Open jp2masa opened 6 years ago

jp2masa commented 6 years ago

From @charsleysa on January 4, 2016 8:39

Exception filtering is not yet supported.

For an example of Exception filtering in C# see http://pastebin.com/URkYjsiE

Copied from original issue: CosmosOS/Cosmos#320

jp2masa commented 6 years ago

From @mterwoord on January 4, 2016 8:41

Lets also include in this issue:

jp2masa commented 5 years ago

Note from #64 (see also https://github.com/CosmosOS/IL2CPU/pull/64#discussion_r223853431): When throwing an exception, we should empty the stack (if there's no item in the stack, do nothing). I think it would be a good idea to add some common infrastructure to throw exceptions.

quajak commented 5 years ago

It would also be helpful if exceptions in using blocks are also supported. As they right now lead to crashes (CPU Exception 6). Example code: https://github.com/CosmosOS/Cosmos/blob/8b7613e2d81b004e4af72210a7afa60895818231/Tests/Kernels/Cosmos.Compiler.Tests.Exceptions/Kernel.cs#L167