Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches
BranchLabel.cs
Go to the documentation of this file.
2
4
5internal sealed class BranchLabel
6{
7 private int _targetIndex = int.MinValue;
8
9 private int _stackDepth = int.MinValue;
10
11 private int _continuationStackDepth = int.MinValue;
12
14
15 internal int LabelIndex { get; set; } = int.MinValue;
16
17
18 internal bool HasRuntimeLabel => LabelIndex != int.MinValue;
19
20 internal int TargetIndex => _targetIndex;
21
26
28 {
29 _stackDepth = instructions.CurrentStackDepth;
30 _continuationStackDepth = instructions.CurrentContinuationsDepth;
32 if (_forwardBranchFixups == null)
33 {
34 return;
35 }
37 {
39 }
41 }
42
44 {
45 if (_targetIndex == int.MinValue)
46 {
47 if (_forwardBranchFixups == null)
48 {
50 }
52 }
53 else
54 {
56 }
57 }
58
63}
void FixupBranch(InstructionList instructions, int branchIndex)
void Mark(InstructionList instructions)
void AddBranch(InstructionList instructions, int branchIndex)