mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-08 12:29:00 +00:00
28 lines
537 B
C#
28 lines
537 B
C#
|
using System.Reflection.Emit;
|
||
|
|
||
|
namespace ChocolArm64.Translation
|
||
|
{
|
||
|
class ILLabel : IILEmit
|
||
|
{
|
||
|
private bool _hasLabel;
|
||
|
|
||
|
private Label _lbl;
|
||
|
|
||
|
public void Emit(ILEmitter context)
|
||
|
{
|
||
|
context.Generator.MarkLabel(GetLabel(context));
|
||
|
}
|
||
|
|
||
|
public Label GetLabel(ILEmitter context)
|
||
|
{
|
||
|
if (!_hasLabel)
|
||
|
{
|
||
|
_lbl = context.Generator.DefineLabel();
|
||
|
|
||
|
_hasLabel = true;
|
||
|
}
|
||
|
|
||
|
return _lbl;
|
||
|
}
|
||
|
}
|
||
|
}
|