regex ir opt code rewrite gen2, window scanning

This commit is contained in:
Youmu Liu
2026-06-26 19:07:16 +08:00
parent 13fcfe4a4c
commit 359dd67287
+23
View File
@@ -47,6 +47,8 @@ namespace StgSharp.RegularAnalysis.Text
Pop = 1 << 7,
Pack = 1 << 8,
Find_Seq = 1 << 9,
Find_Set = 1 << 10,
Find_Complex = 1 << 11,
Match = Match_Seq | Match_Set,
Count = Count_Seq | Count_Set | Count_Complex,
@@ -68,6 +70,27 @@ namespace StgSharp.RegularAnalysis.Text
}
internal sealed class RegexFindComplexIR(
bool nearest,
int count
) : RegexIR
{
internal override RegexIRCommand Command => RegexIRCommand.Find_Complex;
private bool IsNearest { get; } = nearest;
private int CommandCount { get; } = count;
internal override string AsCommand(
int lineNum
)
{
return $"[{lineNum}]\t FIND_COMPLEX {(IsNearest ? "NEAREST" : "FURTHEST")} COUNT: {CommandCount}";
}
}
internal abstract class RegexIR
{