2023-08-18 13:12:20 -04:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2023, Dan Klishch <danilklishch@gmail.com>
|
|
|
|
|
*
|
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <AK/NonnullRefPtr.h>
|
|
|
|
|
#include <AK/RecursionDecision.h>
|
|
|
|
|
|
|
|
|
|
#include "Forward.h"
|
|
|
|
|
|
|
|
|
|
namespace JSSpecCompiler {
|
|
|
|
|
|
|
|
|
|
class CompilerPass {
|
|
|
|
|
public:
|
2023-09-19 10:29:57 -04:00
|
|
|
CompilerPass(FunctionDefinitionRef function)
|
2023-08-18 13:12:20 -04:00
|
|
|
: m_function(function)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
virtual ~CompilerPass() = default;
|
|
|
|
|
|
|
|
|
|
virtual void run() = 0;
|
|
|
|
|
|
|
|
|
|
protected:
|
2023-09-19 10:29:57 -04:00
|
|
|
FunctionDefinitionRef m_function;
|
2023-08-18 13:12:20 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
}
|