fix: remove unneeded LOAD_REGEX instruction

This commit is contained in:
2025-01-22 01:54:03 +02:00
parent 01e86b5e70
commit 582753440b
7 changed files with 9 additions and 29 deletions

View File

@@ -15,7 +15,10 @@ public class RegexNode extends Node {
}
@Override public void compile(CompileResult target, boolean pollute) {
target.add(Instruction.loadRegex(pattern, flags));
target.add(Instruction.loadIntrinsics("regex"));
target.add(Instruction.pushValue(pattern));
target.add(Instruction.pushValue(flags));
target.add(Instruction.call(2, false));
if (!pollute) target.add(Instruction.discard());
}