mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-22 19:12:53 +00:00
This commit introduces NamedVariableDeclaration and SSAVariableDeclaration and allows storing both of them in Variable node. Also, it adds additional structures in FunctionDefinition and BasicBlock, which will be used to store SSA form related information.
73 lines
1.6 KiB
C++
73 lines
1.6 KiB
C++
/*
|
|
* Copyright (c) 2023, Dan Klishch <danilklishch@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Forward.h>
|
|
|
|
namespace JSSpecCompiler {
|
|
|
|
// AST/AST.h
|
|
class NodeSubtreePointer;
|
|
class VariableDeclaration;
|
|
using VariableDeclarationRef = NonnullRefPtr<VariableDeclaration>;
|
|
class NamedVariableDeclaration;
|
|
using NamedVariableDeclarationRef = NonnullRefPtr<NamedVariableDeclaration>;
|
|
class SSAVariableDeclaration;
|
|
using SSAVariableDeclarationRef = RefPtr<SSAVariableDeclaration>;
|
|
|
|
class Node;
|
|
using NullableTree = RefPtr<Node>;
|
|
using Tree = NonnullRefPtr<Node>;
|
|
class Statement;
|
|
class Expression;
|
|
class ErrorNode;
|
|
class ControlFlowOperator;
|
|
|
|
class ControlFlowFunctionReturn;
|
|
class ControlFlowJump;
|
|
class ControlFlowBranch;
|
|
class MathematicalConstant;
|
|
class StringLiteral;
|
|
class BinaryOperation;
|
|
class UnaryOperation;
|
|
class IsOneOfOperation;
|
|
class UnresolvedReference;
|
|
class ReturnNode;
|
|
class AssertExpression;
|
|
class IfBranch;
|
|
class ElseIfBranch;
|
|
class IfElseIfChain;
|
|
class TreeList;
|
|
class RecordDirectListInitialization;
|
|
class FunctionCall;
|
|
class SlotName;
|
|
class Variable;
|
|
using VariableRef = NonnullRefPtr<Variable>;
|
|
class FunctionPointer;
|
|
using FunctionPointerRef = NonnullRefPtr<FunctionPointer>;
|
|
|
|
// Compiler/ControlFlowGraph.h
|
|
class BasicBlock;
|
|
using BasicBlockRef = BasicBlock*;
|
|
class ControlFlowGraph;
|
|
|
|
// Compiler/GenericASTPass.h
|
|
class RecursiveASTVisitor;
|
|
|
|
// Parser/SpecParser.h
|
|
class AlgorithmStep;
|
|
class AlgorithmStepList;
|
|
class Algorithm;
|
|
class SpecFunction;
|
|
|
|
// Function.h
|
|
struct TranslationUnit;
|
|
using TranslationUnitRef = TranslationUnit*;
|
|
class FunctionDefinition;
|
|
using FunctionDefinitionRef = FunctionDefinition*;
|
|
|
|
}
|