Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
EnterExceptionHandlerInstruction.cs
Go to the documentation of this file.
2
4
6{
7 internal static readonly EnterExceptionHandlerInstruction Void = new EnterExceptionHandlerInstruction(hasValue: false);
8
9 internal static readonly EnterExceptionHandlerInstruction NonVoid = new EnterExceptionHandlerInstruction(hasValue: true);
10
11 private readonly bool _hasValue;
12
13 public override string InstructionName => "EnterExceptionHandler";
14
15 public override int ConsumedStack
16 {
17 get
18 {
19 if (!_hasValue)
20 {
21 return 0;
22 }
23 return 1;
24 }
25 }
26
27 public override int ProducedStack => 1;
28
29 private EnterExceptionHandlerInstruction(bool hasValue)
30 {
31 _hasValue = hasValue;
32 }
33
34 [ExcludeFromCodeCoverage(Justification = "Known to be a no-op, this instruction is skipped on execution")]
35 public override int Run(InterpretedFrame frame)
36 {
37 return 1;
38 }
39}