0
0
Fork 0
This repository has been archived on 2024-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
ryujinx-final/ChocolArm64/Translation/ILLabel.cs

28 lines
549 B
C#
Raw Normal View History

using System.Reflection.Emit;
namespace ChocolArm64.Translation
{
class ILLabel : IILEmit
{
private bool _hasLabel;
private Label _lbl;
public void Emit(ILMethodBuilder context)
{
context.Generator.MarkLabel(GetLabel(context));
}
public Label GetLabel(ILMethodBuilder context)
{
if (!_hasLabel)
{
_lbl = context.Generator.DefineLabel();
_hasLabel = true;
}
return _lbl;
}
}
}