ladybird/Userland/Libraries/LibRegex/RegexBytecodeStreamOptimizer.h
Ali Mohammad Pur 246ab432ff LibRegex: Add a basic optimization pass
This currently tries to convert forking loops to atomic groups, and
unify the left side of alternations.
2021-09-13 14:38:53 +04:30

18 lines
290 B
C++

/*
* Copyright (c) 2021, Ali Mohammad Pur <mpfard@serenityos.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include "Forward.h"
namespace regex {
class Optimizer {
public:
static void append_alternation(ByteCode& target, ByteCode& left, ByteCode& right);
};
}