diff --git a/Libraries/LibJS/AST.h b/Libraries/LibJS/AST.h index 450351644c7..2c0b878a31a 100644 --- a/Libraries/LibJS/AST.h +++ b/Libraries/LibJS/AST.h @@ -51,7 +51,7 @@ create_ast_node(SourceRange range, Args&&... args) return adopt_ref(*new T(move(range), forward(args)...)); } -class ASTNode : public RefCounted { +class JS_API ASTNode : public RefCounted { public: virtual ~ASTNode() = default; @@ -167,7 +167,7 @@ enum class DeclarationKind { Const, }; -class Statement : public ASTNode { +class JS_API Statement : public ASTNode { public: explicit Statement(SourceRange source_range) : ASTNode(move(source_range)) @@ -182,7 +182,7 @@ private: }; // 14.13 Labelled Statements, https://tc39.es/ecma262/#sec-labelled-statements -class LabelledStatement final : public Statement { +class JS_API LabelledStatement final : public Statement { public: LabelledStatement(SourceRange source_range, FlyString label, NonnullRefPtr labelled_item) : Statement(move(source_range)) @@ -206,7 +206,7 @@ private: NonnullRefPtr m_labelled_item; }; -class LabelableStatement : public Statement { +class JS_API LabelableStatement : public Statement { public: using Statement::Statement; @@ -217,7 +217,7 @@ protected: Vector m_labels; }; -class IterationStatement : public Statement { +class JS_API IterationStatement : public Statement { public: using Statement::Statement; @@ -227,7 +227,7 @@ private: virtual bool is_iteration_statement() const final { return true; } }; -class EmptyStatement final : public Statement { +class JS_API EmptyStatement final : public Statement { public: explicit EmptyStatement(SourceRange source_range) : Statement(move(source_range)) @@ -236,7 +236,7 @@ public: virtual Bytecode::CodeGenerationErrorOr> generate_bytecode(Bytecode::Generator&, Optional preferred_dst = {}) const override; }; -class ErrorStatement final : public Statement { +class JS_API ErrorStatement final : public Statement { public: explicit ErrorStatement(SourceRange source_range) : Statement(move(source_range)) @@ -244,7 +244,7 @@ public: } }; -class ExpressionStatement final : public Statement { +class JS_API ExpressionStatement final : public Statement { public: ExpressionStatement(SourceRange source_range, NonnullRefPtr expression) : Statement(move(source_range)) @@ -292,7 +292,7 @@ public: } }; -class ScopeNode : public Statement { +class JS_API ScopeNode : public Statement { public: template T& append(SourceRange range, Args&&... args) @@ -368,7 +368,7 @@ private: }; // ImportEntry Record, https://tc39.es/ecma262/#table-importentry-record-fields -struct ImportEntry { +struct JS_API ImportEntry { Optional import_name; // [[ImportName]]: stored string if Optional is not empty, NAMESPACE-OBJECT otherwise FlyString local_name; // [[LocalName]] @@ -391,7 +391,7 @@ private: ModuleRequest* m_module_request = nullptr; // [[ModuleRequest]] }; -class ImportStatement final : public Statement { +class JS_API ImportStatement final : public Statement { public: explicit ImportStatement(SourceRange source_range, ModuleRequest from_module, Vector entries = {}) : Statement(move(source_range)) @@ -482,7 +482,7 @@ public: } }; -class ExportStatement final : public Statement { +class JS_API ExportStatement final : public Statement { public: static FlyString local_name_for_default; @@ -528,7 +528,7 @@ private: Optional m_module_request; }; -class Program final : public ScopeNode { +class JS_API Program final : public ScopeNode { public: enum class Type { Script, @@ -580,7 +580,7 @@ private: bool m_has_top_level_await { false }; }; -class BlockStatement final : public ScopeNode { +class JS_API BlockStatement final : public ScopeNode { public: explicit BlockStatement(SourceRange source_range) : ScopeNode(move(source_range)) @@ -591,7 +591,7 @@ private: virtual bool is_block_statement() const override { return true; } }; -class FunctionBody final : public ScopeNode { +class JS_API FunctionBody final : public ScopeNode { public: explicit FunctionBody(SourceRange source_range) : ScopeNode(move(source_range)) @@ -608,7 +608,7 @@ private: bool m_in_strict_mode { false }; }; -class Expression : public ASTNode { +class JS_API Expression : public ASTNode { public: explicit Expression(SourceRange source_range) : ASTNode(move(source_range)) @@ -616,7 +616,7 @@ public: } }; -class Declaration : public Statement { +class JS_API Declaration : public Statement { public: explicit Declaration(SourceRange source_range) : Statement(move(source_range)) @@ -631,7 +631,7 @@ public: virtual bool is_lexical_declaration() const { return false; } }; -class ErrorDeclaration final : public Declaration { +class JS_API ErrorDeclaration final : public Declaration { public: explicit ErrorDeclaration(SourceRange source_range) : Declaration(move(source_range)) @@ -644,7 +644,7 @@ public: } }; -struct BindingPattern : RefCounted { +struct JS_API BindingPattern : RefCounted { // This covers both BindingProperty and BindingElement, hence the more generic name struct BindingEntry { // If this entry represents a BindingElement, then name will be Empty @@ -673,7 +673,7 @@ struct BindingPattern : RefCounted { Kind kind { Kind::Object }; }; -class Identifier final : public Expression { +class JS_API Identifier final : public Expression { public: explicit Identifier(SourceRange source_range, FlyString string) : Expression(move(source_range)) @@ -777,7 +777,7 @@ struct FunctionParsingInsights { bool might_need_arguments_object { false }; }; -class FunctionNode { +class JS_API FunctionNode { public: FlyString name() const { return m_name ? m_name->string() : ""_fly_string; } RefPtr name_identifier() const { return m_name; } @@ -824,7 +824,7 @@ private: mutable RefPtr m_shared_data; }; -class FunctionDeclaration final +class JS_API FunctionDeclaration final : public Declaration , public FunctionNode { public: @@ -854,7 +854,7 @@ private: bool m_is_hoisted { false }; }; -class FunctionExpression final +class JS_API FunctionExpression final : public Expression , public FunctionNode { public: @@ -881,7 +881,7 @@ private: virtual bool is_function_expression() const override { return true; } }; -class ErrorExpression final : public Expression { +class JS_API ErrorExpression final : public Expression { public: explicit ErrorExpression(SourceRange source_range) : Expression(move(source_range)) @@ -909,7 +909,7 @@ private: bool m_is_yield_from { false }; }; -class AwaitExpression final : public Expression { +class JS_API AwaitExpression final : public Expression { public: explicit AwaitExpression(SourceRange source_range, NonnullRefPtr argument) : Expression(move(source_range)) @@ -924,7 +924,7 @@ private: NonnullRefPtr m_argument; }; -class ReturnStatement final : public Statement { +class JS_API ReturnStatement final : public Statement { public: explicit ReturnStatement(SourceRange source_range, RefPtr argument) : Statement(move(source_range)) @@ -941,7 +941,7 @@ private: RefPtr m_argument; }; -class IfStatement final : public Statement { +class JS_API IfStatement final : public Statement { public: IfStatement(SourceRange source_range, NonnullRefPtr predicate, NonnullRefPtr consequent, RefPtr alternate) : Statement(move(source_range)) @@ -964,7 +964,7 @@ private: RefPtr m_alternate; }; -class WhileStatement final : public IterationStatement { +class JS_API WhileStatement final : public IterationStatement { public: WhileStatement(SourceRange source_range, NonnullRefPtr test, NonnullRefPtr body) : IterationStatement(move(source_range)) @@ -985,7 +985,7 @@ private: NonnullRefPtr m_body; }; -class DoWhileStatement final : public IterationStatement { +class JS_API DoWhileStatement final : public IterationStatement { public: DoWhileStatement(SourceRange source_range, NonnullRefPtr test, NonnullRefPtr body) : IterationStatement(move(source_range)) @@ -1006,7 +1006,7 @@ private: NonnullRefPtr m_body; }; -class WithStatement final : public Statement { +class JS_API WithStatement final : public Statement { public: WithStatement(SourceRange source_range, NonnullRefPtr object, NonnullRefPtr body) : Statement(move(source_range)) @@ -1026,7 +1026,7 @@ private: NonnullRefPtr m_body; }; -class ForStatement final : public IterationStatement { +class JS_API ForStatement final : public IterationStatement { public: ForStatement(SourceRange source_range, RefPtr init, RefPtr test, RefPtr update, NonnullRefPtr body) : IterationStatement(move(source_range)) @@ -1053,7 +1053,7 @@ private: NonnullRefPtr m_body; }; -class ForInStatement final : public IterationStatement { +class JS_API ForInStatement final : public IterationStatement { public: ForInStatement(SourceRange source_range, Variant, NonnullRefPtr> lhs, NonnullRefPtr rhs, NonnullRefPtr body) : IterationStatement(move(source_range)) @@ -1077,7 +1077,7 @@ private: NonnullRefPtr m_body; }; -class ForOfStatement final : public IterationStatement { +class JS_API ForOfStatement final : public IterationStatement { public: ForOfStatement(SourceRange source_range, Variant, NonnullRefPtr> lhs, NonnullRefPtr rhs, NonnullRefPtr body) : IterationStatement(move(source_range)) @@ -1101,7 +1101,7 @@ private: NonnullRefPtr m_body; }; -class ForAwaitOfStatement final : public IterationStatement { +class JS_API ForAwaitOfStatement final : public IterationStatement { public: ForAwaitOfStatement(SourceRange source_range, Variant, NonnullRefPtr> lhs, NonnullRefPtr rhs, NonnullRefPtr body) : IterationStatement(move(source_range)) @@ -1146,7 +1146,7 @@ enum class BinaryOp { InstanceOf, }; -class BinaryExpression final : public Expression { +class JS_API BinaryExpression final : public Expression { public: BinaryExpression(SourceRange source_range, BinaryOp op, NonnullRefPtr lhs, NonnullRefPtr rhs) : Expression(move(source_range)) @@ -1171,7 +1171,7 @@ enum class LogicalOp { NullishCoalescing, }; -class LogicalExpression final : public Expression { +class JS_API LogicalExpression final : public Expression { public: LogicalExpression(SourceRange source_range, LogicalOp op, NonnullRefPtr lhs, NonnullRefPtr rhs) : Expression(move(source_range)) @@ -1200,7 +1200,7 @@ enum class UnaryOp { Delete, }; -class UnaryExpression final : public Expression { +class JS_API UnaryExpression final : public Expression { public: UnaryExpression(SourceRange source_range, UnaryOp op, NonnullRefPtr lhs) : Expression(move(source_range)) @@ -1217,7 +1217,7 @@ private: NonnullRefPtr m_lhs; }; -class SequenceExpression final : public Expression { +class JS_API SequenceExpression final : public Expression { public: SequenceExpression(SourceRange source_range, Vector> expressions) : Expression(move(source_range)) @@ -1233,7 +1233,7 @@ private: Vector> m_expressions; }; -class PrimitiveLiteral : public Expression { +class JS_API PrimitiveLiteral : public Expression { public: virtual Value value() const = 0; @@ -1247,7 +1247,7 @@ private: virtual bool is_primitive_literal() const override { return true; } }; -class BooleanLiteral final : public PrimitiveLiteral { +class JS_API BooleanLiteral final : public PrimitiveLiteral { public: explicit BooleanLiteral(SourceRange source_range, bool value) : PrimitiveLiteral(move(source_range)) @@ -1266,7 +1266,7 @@ private: bool m_value { false }; }; -class NumericLiteral final : public PrimitiveLiteral { +class JS_API NumericLiteral final : public PrimitiveLiteral { public: explicit NumericLiteral(SourceRange source_range, double value) : PrimitiveLiteral(move(source_range)) @@ -1285,7 +1285,7 @@ private: Value m_value; }; -class BigIntLiteral final : public Expression { +class JS_API BigIntLiteral final : public Expression { public: explicit BigIntLiteral(SourceRange source_range, ByteString value) : Expression(move(source_range)) @@ -1300,7 +1300,7 @@ private: ByteString m_value; }; -class StringLiteral final : public Expression { +class JS_API StringLiteral final : public Expression { public: explicit StringLiteral(SourceRange source_range, String value) : Expression(move(source_range)) @@ -1319,7 +1319,7 @@ private: String m_value; }; -class NullLiteral final : public PrimitiveLiteral { +class JS_API NullLiteral final : public PrimitiveLiteral { public: explicit NullLiteral(SourceRange source_range) : PrimitiveLiteral(move(source_range)) @@ -1335,7 +1335,7 @@ private: virtual bool is_null_literal() const override { return true; } }; -class RegExpLiteral final : public Expression { +class JS_API RegExpLiteral final : public Expression { public: RegExpLiteral(SourceRange source_range, regex::Parser::Result parsed_regex, String parsed_pattern, regex::RegexOptions parsed_flags, String pattern, String flags) : Expression(move(source_range)) @@ -1364,7 +1364,7 @@ private: String m_flags; }; -class PrivateIdentifier final : public Expression { +class JS_API PrivateIdentifier final : public Expression { public: explicit PrivateIdentifier(SourceRange source_range, FlyString string) : Expression(move(source_range)) @@ -1382,7 +1382,7 @@ private: FlyString m_string; }; -class ClassElement : public ASTNode { +class JS_API ClassElement : public ASTNode { public: ClassElement(SourceRange source_range, bool is_static) : ASTNode(move(source_range)) @@ -1409,7 +1409,7 @@ private: bool m_is_static { false }; }; -class ClassMethod final : public ClassElement { +class JS_API ClassMethod final : public ClassElement { public: enum class Kind { Method, @@ -1440,7 +1440,7 @@ private: Kind m_kind; }; -class ClassField final : public ClassElement { +class JS_API ClassField final : public ClassElement { public: ClassField(SourceRange source_range, NonnullRefPtr key, RefPtr init, bool is_static) : ClassElement(move(source_range), is_static) @@ -1464,7 +1464,7 @@ private: RefPtr m_initializer; }; -class StaticInitializer final : public ClassElement { +class JS_API StaticInitializer final : public ClassElement { public: StaticInitializer(SourceRange source_range, NonnullRefPtr function_body) : ClassElement(move(source_range), true) @@ -1481,7 +1481,7 @@ private: NonnullRefPtr m_function_body; }; -class SuperExpression final : public Expression { +class JS_API SuperExpression final : public Expression { public: explicit SuperExpression(SourceRange source_range) : Expression(move(source_range)) @@ -1494,7 +1494,7 @@ public: virtual bool is_super_expression() const override { return true; } }; -class ClassExpression final : public Expression { +class JS_API ClassExpression final : public Expression { public: ClassExpression(SourceRange source_range, RefPtr name, ByteString source_text, RefPtr constructor, RefPtr super_class, Vector> elements) : Expression(move(source_range)) @@ -1531,7 +1531,7 @@ private: Vector> m_elements; }; -class ClassDeclaration final : public Declaration { +class JS_API ClassDeclaration final : public Declaration { public: ClassDeclaration(SourceRange source_range, NonnullRefPtr class_expression) : Declaration(move(source_range)) @@ -1558,7 +1558,7 @@ private: // We use this class to mimic Initializer : = AssignmentExpression of // 10.2.1.3 Runtime Semantics: EvaluateBody, https://tc39.es/ecma262/#sec-runtime-semantics-evaluatebody -class ClassFieldInitializerStatement final : public Statement { +class JS_API ClassFieldInitializerStatement final : public Statement { public: ClassFieldInitializerStatement(SourceRange source_range, NonnullRefPtr expression, FlyString field_name) : Statement(move(source_range)) @@ -1575,7 +1575,7 @@ private: FlyString m_class_field_identifier_name; // [[ClassFieldIdentifierName]] }; -class SpreadExpression final : public Expression { +class JS_API SpreadExpression final : public Expression { public: explicit SpreadExpression(SourceRange source_range, NonnullRefPtr target) : Expression(move(source_range)) @@ -1592,7 +1592,7 @@ private: NonnullRefPtr m_target; }; -class ThisExpression final : public Expression { +class JS_API ThisExpression final : public Expression { public: explicit ThisExpression(SourceRange source_range) : Expression(move(source_range)) @@ -1617,7 +1617,7 @@ enum InsideParenthesesEnum { NotInsideParentheses, }; -class CallExpression : public ASTNodeWithTailArray { +class JS_API CallExpression : public ASTNodeWithTailArray { friend class ASTNodeWithTailArray; InvocationStyleEnum m_invocation_style; @@ -1655,7 +1655,7 @@ protected: NonnullRefPtr m_callee; }; -class NewExpression final : public CallExpression { +class JS_API NewExpression final : public CallExpression { friend class ASTNodeWithTailArray; public: @@ -1672,7 +1672,7 @@ private: static_assert(sizeof(NewExpression) == sizeof(CallExpression), "Adding members to NewExpression will break CallExpression memory layout"); -class SuperCall final : public Expression { +class JS_API SuperCall final : public Expression { public: // This is here to be able to make a constructor like // constructor(...args) { super(...args); } which does not use @@iterator of %Array.prototype%. @@ -1723,7 +1723,7 @@ enum class AssignmentOp { NullishAssignment, }; -class AssignmentExpression final : public Expression { +class JS_API AssignmentExpression final : public Expression { public: AssignmentExpression(SourceRange source_range, AssignmentOp op, NonnullRefPtr lhs, NonnullRefPtr rhs) : Expression(move(source_range)) @@ -1755,7 +1755,7 @@ enum class UpdateOp { Decrement, }; -class UpdateExpression final : public Expression { +class JS_API UpdateExpression final : public Expression { public: UpdateExpression(SourceRange source_range, UpdateOp op, NonnullRefPtr argument, bool prefixed = false) : Expression(move(source_range)) @@ -1776,7 +1776,7 @@ private: bool m_prefixed; }; -class VariableDeclarator final : public ASTNode { +class JS_API VariableDeclarator final : public ASTNode { public: VariableDeclarator(SourceRange source_range, NonnullRefPtr id) : ASTNode(move(source_range)) @@ -1808,7 +1808,7 @@ private: RefPtr m_init; }; -class VariableDeclaration final : public Declaration { +class JS_API VariableDeclaration final : public Declaration { public: VariableDeclaration(SourceRange source_range, DeclarationKind declaration_kind, Vector> declarations) : Declaration(move(source_range)) @@ -1837,7 +1837,7 @@ private: Vector> m_declarations; }; -class UsingDeclaration final : public Declaration { +class JS_API UsingDeclaration final : public Declaration { public: UsingDeclaration(SourceRange source_range, Vector> declarations) : Declaration(move(source_range)) @@ -1859,7 +1859,7 @@ private: Vector> m_declarations; }; -class ObjectProperty final : public ASTNode { +class JS_API ObjectProperty final : public ASTNode { public: enum class Type : u8 { KeyValue, @@ -1897,7 +1897,7 @@ private: RefPtr m_value; }; -class ObjectExpression final : public Expression { +class JS_API ObjectExpression final : public Expression { public: explicit ObjectExpression(SourceRange source_range, Vector> properties = {}) : Expression(move(source_range)) @@ -1914,7 +1914,7 @@ private: Vector> m_properties; }; -class ArrayExpression final : public Expression { +class JS_API ArrayExpression final : public Expression { public: ArrayExpression(SourceRange source_range, Vector> elements) : Expression(move(source_range)) @@ -1933,7 +1933,7 @@ private: Vector> m_elements; }; -class TemplateLiteral final : public Expression { +class JS_API TemplateLiteral final : public Expression { public: TemplateLiteral(SourceRange source_range, Vector> expressions) : Expression(move(source_range)) @@ -1959,7 +1959,7 @@ private: Vector> const m_raw_strings; }; -class TaggedTemplateLiteral final : public Expression { +class JS_API TaggedTemplateLiteral final : public Expression { public: TaggedTemplateLiteral(SourceRange source_range, NonnullRefPtr tag, NonnullRefPtr template_literal) : Expression(move(source_range)) @@ -1976,7 +1976,7 @@ private: NonnullRefPtr const m_template_literal; }; -class MemberExpression final : public Expression { +class JS_API MemberExpression final : public Expression { public: MemberExpression(SourceRange source_range, NonnullRefPtr object, NonnullRefPtr property, bool computed = false) : Expression(move(source_range)) @@ -2005,7 +2005,7 @@ private: NonnullRefPtr m_property; }; -class OptionalChain final : public Expression { +class JS_API OptionalChain final : public Expression { public: enum class Mode { Optional, @@ -2051,7 +2051,7 @@ private: Vector m_references; }; -class MetaProperty final : public Expression { +class JS_API MetaProperty final : public Expression { public: enum class Type { NewTarget, @@ -2071,7 +2071,7 @@ private: Type m_type; }; -class ImportCall final : public Expression { +class JS_API ImportCall final : public Expression { public: ImportCall(SourceRange source_range, NonnullRefPtr specifier, RefPtr options) : Expression(move(source_range)) @@ -2090,7 +2090,7 @@ private: RefPtr m_options; }; -class ConditionalExpression final : public Expression { +class JS_API ConditionalExpression final : public Expression { public: ConditionalExpression(SourceRange source_range, NonnullRefPtr test, NonnullRefPtr consequent, NonnullRefPtr alternate) : Expression(move(source_range)) @@ -2109,7 +2109,7 @@ private: NonnullRefPtr m_alternate; }; -class CatchClause final : public ASTNode { +class JS_API CatchClause final : public ASTNode { public: CatchClause(SourceRange source_range, NonnullRefPtr parameter, NonnullRefPtr body) : ASTNode(move(source_range)) @@ -2142,7 +2142,7 @@ private: NonnullRefPtr m_body; }; -class TryStatement final : public Statement { +class JS_API TryStatement final : public Statement { public: TryStatement(SourceRange source_range, NonnullRefPtr block, RefPtr handler, RefPtr finalizer) : Statement(move(source_range)) @@ -2165,7 +2165,7 @@ private: RefPtr m_finalizer; }; -class ThrowStatement final : public Statement { +class JS_API ThrowStatement final : public Statement { public: explicit ThrowStatement(SourceRange source_range, NonnullRefPtr argument) : Statement(move(source_range)) @@ -2182,7 +2182,7 @@ private: NonnullRefPtr m_argument; }; -class SwitchCase final : public ScopeNode { +class JS_API SwitchCase final : public ScopeNode { public: SwitchCase(SourceRange source_range, RefPtr test) : ScopeNode(move(source_range)) @@ -2198,7 +2198,7 @@ private: RefPtr m_test; }; -class SwitchStatement final : public ScopeNode { +class JS_API SwitchStatement final : public ScopeNode { public: SwitchStatement(SourceRange source_range, NonnullRefPtr discriminant) : ScopeNode(move(source_range)) @@ -2217,7 +2217,7 @@ private: Vector> m_cases; }; -class BreakStatement final : public Statement { +class JS_API BreakStatement final : public Statement { public: BreakStatement(SourceRange source_range, Optional target_label) : Statement(move(source_range)) @@ -2232,7 +2232,7 @@ private: Optional m_target_label; }; -class ContinueStatement final : public Statement { +class JS_API ContinueStatement final : public Statement { public: ContinueStatement(SourceRange source_range, Optional target_label) : Statement(move(source_range)) @@ -2248,7 +2248,7 @@ private: Optional m_target_label; }; -class DebuggerStatement final : public Statement { +class JS_API DebuggerStatement final : public Statement { public: explicit DebuggerStatement(SourceRange source_range) : Statement(move(source_range)) @@ -2258,7 +2258,7 @@ public: virtual Bytecode::CodeGenerationErrorOr> generate_bytecode(Bytecode::Generator&, Optional preferred_dst = {}) const override; }; -class SyntheticReferenceExpression final : public Expression { +class JS_API SyntheticReferenceExpression final : public Expression { public: explicit SyntheticReferenceExpression(SourceRange source_range, Reference reference, Value value) : Expression(move(source_range)) diff --git a/Libraries/LibJS/Bytecode/BasicBlock.h b/Libraries/LibJS/Bytecode/BasicBlock.h index d9e0ff4bf87..4315aa65ee9 100644 --- a/Libraries/LibJS/Bytecode/BasicBlock.h +++ b/Libraries/LibJS/Bytecode/BasicBlock.h @@ -22,7 +22,7 @@ struct UnwindInfo { bool handler_called { false }; }; -class BasicBlock { +class JS_API BasicBlock { AK_MAKE_NONCOPYABLE(BasicBlock); public: diff --git a/Libraries/LibJS/Bytecode/CodeGenerationError.h b/Libraries/LibJS/Bytecode/CodeGenerationError.h index 5e23d71e09c..1f6e77080c6 100644 --- a/Libraries/LibJS/Bytecode/CodeGenerationError.h +++ b/Libraries/LibJS/Bytecode/CodeGenerationError.h @@ -13,7 +13,7 @@ namespace JS::Bytecode { -struct CodeGenerationError { +struct JS_API CodeGenerationError { ASTNode const* failing_node { nullptr }; StringView reason_literal; diff --git a/Libraries/LibJS/Bytecode/Executable.h b/Libraries/LibJS/Bytecode/Executable.h index ecffacf1df4..327f5ae5526 100644 --- a/Libraries/LibJS/Bytecode/Executable.h +++ b/Libraries/LibJS/Bytecode/Executable.h @@ -47,7 +47,7 @@ struct SourceRecord { u32 source_end_offset {}; }; -class Executable final : public Cell { +class JS_API Executable final : public Cell { GC_CELL(Executable, Cell); GC_DECLARE_ALLOCATOR(Executable); diff --git a/Libraries/LibJS/Bytecode/Generator.h b/Libraries/LibJS/Bytecode/Generator.h index e0cb070ac7d..a0d37b5daa6 100644 --- a/Libraries/LibJS/Bytecode/Generator.h +++ b/Libraries/LibJS/Bytecode/Generator.h @@ -23,7 +23,7 @@ namespace JS::Bytecode { -class Generator { +class JS_API Generator { public: VM& vm() { return m_vm; } @@ -55,7 +55,7 @@ public: [[nodiscard]] bool is_local_initialized(Identifier::Local const&) const; [[nodiscard]] bool is_local_lexically_declared(Identifier::Local const& local) const; - class SourceLocationScope { + class JS_API SourceLocationScope { public: SourceLocationScope(Generator&, ASTNode const& node); ~SourceLocationScope(); @@ -65,7 +65,7 @@ public: ASTNode const* m_previous_node { nullptr }; }; - class UnwindContext { + class JS_API UnwindContext { public: UnwindContext(Generator&, Optional