Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[dotnet] Start to stub in the bits we'll need to implement .leave.
- Loading branch information
Showing
3 changed files
with
55 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
dotnet/runtime/Runtime/Exceptions/LeaveStackUnwinderException.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| using System; | ||
| using System.Collections.Generic; | ||
| using System.Linq; | ||
| using System.Text; | ||
| using Rakudo.Metamodel; | ||
| using Rakudo.Metamodel.Representations; | ||
|
|
||
| namespace Rakudo.Runtime.Exceptions | ||
| { | ||
| /// <summary> | ||
| /// This exception is thrown to actually unwind the (dotnet) stack after | ||
| /// we run an exception handler. | ||
| /// </summary> | ||
| public class LeaveStackUnwinderException : Exception | ||
| { | ||
| /// <summary> | ||
| /// The block we're looking for. | ||
| /// </summary> | ||
| public RakudoCodeRef.Instance TargetBlock; | ||
|
|
||
| /// <summary> | ||
| /// The value to exit with. | ||
| /// </summary> | ||
| public RakudoObject PayLoad; | ||
|
|
||
| /// <summary> | ||
| /// Creates a LeaveStackUnwinderException to | ||
| /// </summary> | ||
| /// <param name="TargetBlock"></param> | ||
| public LeaveStackUnwinderException(RakudoCodeRef.Instance TargetBlock, RakudoObject PayLoad) | ||
| { | ||
| this.TargetBlock = TargetBlock; | ||
| this.PayLoad = PayLoad; | ||
| } | ||
| } | ||
| } |