mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 23:17:45 +00:00
JSSpecCompiler: Adopt more C++ terminology
Let's not use strange names like `ExecutionContext`, which nobody will understand in the future.
This commit is contained in:
parent
4578004ad6
commit
567b1f6e7c
9 changed files with 51 additions and 21 deletions
|
@ -15,7 +15,7 @@ namespace JSSpecCompiler {
|
|||
|
||||
class CompilerPass {
|
||||
public:
|
||||
CompilerPass(FunctionRef function)
|
||||
CompilerPass(FunctionDefinitionRef function)
|
||||
: m_function(function)
|
||||
{
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ public:
|
|||
virtual void run() = 0;
|
||||
|
||||
protected:
|
||||
FunctionRef m_function;
|
||||
FunctionDefinitionRef m_function;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ class GenericASTPass
|
|||
: public CompilerPass
|
||||
, protected RecursiveASTVisitor {
|
||||
public:
|
||||
GenericASTPass(FunctionRef function)
|
||||
GenericASTPass(FunctionDefinitionRef function)
|
||||
: CompilerPass(function)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ RecursionDecision ReferenceResolvingPass::on_entry(Tree tree)
|
|||
|
||||
void ReferenceResolvingPass::on_leave(Tree tree)
|
||||
{
|
||||
auto& functions = m_function->m_context->m_functions;
|
||||
auto& functions = m_function->m_translation_unit->function_index;
|
||||
|
||||
if (auto reference = as<UnresolvedReference>(tree); reference) {
|
||||
auto name = reference->m_name;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue