mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-08 10:01:53 +00:00
LibJS: Enable EXPLICIT_SYMBOL_EXPORT
This commit is contained in:
parent
83846b3861
commit
c14173f651
Notes:
github-actions[bot]
2025-06-30 16:51:52 +00:00
Author: https://github.com/ayeteadoe
Commit: c14173f651
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5215
Reviewed-by: https://github.com/ADKaster ✅
258 changed files with 952 additions and 941 deletions
|
@ -51,7 +51,7 @@ create_ast_node(SourceRange range, Args&&... args)
|
||||||
return adopt_ref(*new T(move(range), forward<Args>(args)...));
|
return adopt_ref(*new T(move(range), forward<Args>(args)...));
|
||||||
}
|
}
|
||||||
|
|
||||||
class ASTNode : public RefCounted<ASTNode> {
|
class JS_API ASTNode : public RefCounted<ASTNode> {
|
||||||
public:
|
public:
|
||||||
virtual ~ASTNode() = default;
|
virtual ~ASTNode() = default;
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ enum class DeclarationKind {
|
||||||
Const,
|
Const,
|
||||||
};
|
};
|
||||||
|
|
||||||
class Statement : public ASTNode {
|
class JS_API Statement : public ASTNode {
|
||||||
public:
|
public:
|
||||||
explicit Statement(SourceRange source_range)
|
explicit Statement(SourceRange source_range)
|
||||||
: ASTNode(move(source_range))
|
: ASTNode(move(source_range))
|
||||||
|
@ -182,7 +182,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
// 14.13 Labelled Statements, https://tc39.es/ecma262/#sec-labelled-statements
|
// 14.13 Labelled Statements, https://tc39.es/ecma262/#sec-labelled-statements
|
||||||
class LabelledStatement final : public Statement {
|
class JS_API LabelledStatement final : public Statement {
|
||||||
public:
|
public:
|
||||||
LabelledStatement(SourceRange source_range, FlyString label, NonnullRefPtr<Statement const> labelled_item)
|
LabelledStatement(SourceRange source_range, FlyString label, NonnullRefPtr<Statement const> labelled_item)
|
||||||
: Statement(move(source_range))
|
: Statement(move(source_range))
|
||||||
|
@ -206,7 +206,7 @@ private:
|
||||||
NonnullRefPtr<Statement const> m_labelled_item;
|
NonnullRefPtr<Statement const> m_labelled_item;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LabelableStatement : public Statement {
|
class JS_API LabelableStatement : public Statement {
|
||||||
public:
|
public:
|
||||||
using Statement::Statement;
|
using Statement::Statement;
|
||||||
|
|
||||||
|
@ -217,7 +217,7 @@ protected:
|
||||||
Vector<FlyString> m_labels;
|
Vector<FlyString> m_labels;
|
||||||
};
|
};
|
||||||
|
|
||||||
class IterationStatement : public Statement {
|
class JS_API IterationStatement : public Statement {
|
||||||
public:
|
public:
|
||||||
using Statement::Statement;
|
using Statement::Statement;
|
||||||
|
|
||||||
|
@ -227,7 +227,7 @@ private:
|
||||||
virtual bool is_iteration_statement() const final { return true; }
|
virtual bool is_iteration_statement() const final { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class EmptyStatement final : public Statement {
|
class JS_API EmptyStatement final : public Statement {
|
||||||
public:
|
public:
|
||||||
explicit EmptyStatement(SourceRange source_range)
|
explicit EmptyStatement(SourceRange source_range)
|
||||||
: Statement(move(source_range))
|
: Statement(move(source_range))
|
||||||
|
@ -236,7 +236,7 @@ public:
|
||||||
virtual Bytecode::CodeGenerationErrorOr<Optional<Bytecode::ScopedOperand>> generate_bytecode(Bytecode::Generator&, Optional<Bytecode::ScopedOperand> preferred_dst = {}) const override;
|
virtual Bytecode::CodeGenerationErrorOr<Optional<Bytecode::ScopedOperand>> generate_bytecode(Bytecode::Generator&, Optional<Bytecode::ScopedOperand> preferred_dst = {}) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ErrorStatement final : public Statement {
|
class JS_API ErrorStatement final : public Statement {
|
||||||
public:
|
public:
|
||||||
explicit ErrorStatement(SourceRange source_range)
|
explicit ErrorStatement(SourceRange source_range)
|
||||||
: Statement(move(source_range))
|
: Statement(move(source_range))
|
||||||
|
@ -244,7 +244,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class ExpressionStatement final : public Statement {
|
class JS_API ExpressionStatement final : public Statement {
|
||||||
public:
|
public:
|
||||||
ExpressionStatement(SourceRange source_range, NonnullRefPtr<Expression const> expression)
|
ExpressionStatement(SourceRange source_range, NonnullRefPtr<Expression const> expression)
|
||||||
: Statement(move(source_range))
|
: Statement(move(source_range))
|
||||||
|
@ -292,7 +292,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class ScopeNode : public Statement {
|
class JS_API ScopeNode : public Statement {
|
||||||
public:
|
public:
|
||||||
template<typename T, typename... Args>
|
template<typename T, typename... Args>
|
||||||
T& append(SourceRange range, Args&&... args)
|
T& append(SourceRange range, Args&&... args)
|
||||||
|
@ -368,7 +368,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
// ImportEntry Record, https://tc39.es/ecma262/#table-importentry-record-fields
|
// ImportEntry Record, https://tc39.es/ecma262/#table-importentry-record-fields
|
||||||
struct ImportEntry {
|
struct JS_API ImportEntry {
|
||||||
Optional<FlyString> import_name; // [[ImportName]]: stored string if Optional is not empty, NAMESPACE-OBJECT otherwise
|
Optional<FlyString> import_name; // [[ImportName]]: stored string if Optional is not empty, NAMESPACE-OBJECT otherwise
|
||||||
FlyString local_name; // [[LocalName]]
|
FlyString local_name; // [[LocalName]]
|
||||||
|
|
||||||
|
@ -391,7 +391,7 @@ private:
|
||||||
ModuleRequest* m_module_request = nullptr; // [[ModuleRequest]]
|
ModuleRequest* m_module_request = nullptr; // [[ModuleRequest]]
|
||||||
};
|
};
|
||||||
|
|
||||||
class ImportStatement final : public Statement {
|
class JS_API ImportStatement final : public Statement {
|
||||||
public:
|
public:
|
||||||
explicit ImportStatement(SourceRange source_range, ModuleRequest from_module, Vector<ImportEntry> entries = {})
|
explicit ImportStatement(SourceRange source_range, ModuleRequest from_module, Vector<ImportEntry> entries = {})
|
||||||
: Statement(move(source_range))
|
: Statement(move(source_range))
|
||||||
|
@ -482,7 +482,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class ExportStatement final : public Statement {
|
class JS_API ExportStatement final : public Statement {
|
||||||
public:
|
public:
|
||||||
static FlyString local_name_for_default;
|
static FlyString local_name_for_default;
|
||||||
|
|
||||||
|
@ -528,7 +528,7 @@ private:
|
||||||
Optional<ModuleRequest> m_module_request;
|
Optional<ModuleRequest> m_module_request;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Program final : public ScopeNode {
|
class JS_API Program final : public ScopeNode {
|
||||||
public:
|
public:
|
||||||
enum class Type {
|
enum class Type {
|
||||||
Script,
|
Script,
|
||||||
|
@ -580,7 +580,7 @@ private:
|
||||||
bool m_has_top_level_await { false };
|
bool m_has_top_level_await { false };
|
||||||
};
|
};
|
||||||
|
|
||||||
class BlockStatement final : public ScopeNode {
|
class JS_API BlockStatement final : public ScopeNode {
|
||||||
public:
|
public:
|
||||||
explicit BlockStatement(SourceRange source_range)
|
explicit BlockStatement(SourceRange source_range)
|
||||||
: ScopeNode(move(source_range))
|
: ScopeNode(move(source_range))
|
||||||
|
@ -591,7 +591,7 @@ private:
|
||||||
virtual bool is_block_statement() const override { return true; }
|
virtual bool is_block_statement() const override { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class FunctionBody final : public ScopeNode {
|
class JS_API FunctionBody final : public ScopeNode {
|
||||||
public:
|
public:
|
||||||
explicit FunctionBody(SourceRange source_range)
|
explicit FunctionBody(SourceRange source_range)
|
||||||
: ScopeNode(move(source_range))
|
: ScopeNode(move(source_range))
|
||||||
|
@ -608,7 +608,7 @@ private:
|
||||||
bool m_in_strict_mode { false };
|
bool m_in_strict_mode { false };
|
||||||
};
|
};
|
||||||
|
|
||||||
class Expression : public ASTNode {
|
class JS_API Expression : public ASTNode {
|
||||||
public:
|
public:
|
||||||
explicit Expression(SourceRange source_range)
|
explicit Expression(SourceRange source_range)
|
||||||
: ASTNode(move(source_range))
|
: ASTNode(move(source_range))
|
||||||
|
@ -616,7 +616,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class Declaration : public Statement {
|
class JS_API Declaration : public Statement {
|
||||||
public:
|
public:
|
||||||
explicit Declaration(SourceRange source_range)
|
explicit Declaration(SourceRange source_range)
|
||||||
: Statement(move(source_range))
|
: Statement(move(source_range))
|
||||||
|
@ -631,7 +631,7 @@ public:
|
||||||
virtual bool is_lexical_declaration() const { return false; }
|
virtual bool is_lexical_declaration() const { return false; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class ErrorDeclaration final : public Declaration {
|
class JS_API ErrorDeclaration final : public Declaration {
|
||||||
public:
|
public:
|
||||||
explicit ErrorDeclaration(SourceRange source_range)
|
explicit ErrorDeclaration(SourceRange source_range)
|
||||||
: Declaration(move(source_range))
|
: Declaration(move(source_range))
|
||||||
|
@ -644,7 +644,7 @@ public:
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct BindingPattern : RefCounted<BindingPattern> {
|
struct JS_API BindingPattern : RefCounted<BindingPattern> {
|
||||||
// This covers both BindingProperty and BindingElement, hence the more generic name
|
// This covers both BindingProperty and BindingElement, hence the more generic name
|
||||||
struct BindingEntry {
|
struct BindingEntry {
|
||||||
// If this entry represents a BindingElement, then name will be Empty
|
// If this entry represents a BindingElement, then name will be Empty
|
||||||
|
@ -673,7 +673,7 @@ struct BindingPattern : RefCounted<BindingPattern> {
|
||||||
Kind kind { Kind::Object };
|
Kind kind { Kind::Object };
|
||||||
};
|
};
|
||||||
|
|
||||||
class Identifier final : public Expression {
|
class JS_API Identifier final : public Expression {
|
||||||
public:
|
public:
|
||||||
explicit Identifier(SourceRange source_range, FlyString string)
|
explicit Identifier(SourceRange source_range, FlyString string)
|
||||||
: Expression(move(source_range))
|
: Expression(move(source_range))
|
||||||
|
@ -777,7 +777,7 @@ struct FunctionParsingInsights {
|
||||||
bool might_need_arguments_object { false };
|
bool might_need_arguments_object { false };
|
||||||
};
|
};
|
||||||
|
|
||||||
class FunctionNode {
|
class JS_API FunctionNode {
|
||||||
public:
|
public:
|
||||||
FlyString name() const { return m_name ? m_name->string() : ""_fly_string; }
|
FlyString name() const { return m_name ? m_name->string() : ""_fly_string; }
|
||||||
RefPtr<Identifier const> name_identifier() const { return m_name; }
|
RefPtr<Identifier const> name_identifier() const { return m_name; }
|
||||||
|
@ -824,7 +824,7 @@ private:
|
||||||
mutable RefPtr<SharedFunctionInstanceData> m_shared_data;
|
mutable RefPtr<SharedFunctionInstanceData> m_shared_data;
|
||||||
};
|
};
|
||||||
|
|
||||||
class FunctionDeclaration final
|
class JS_API FunctionDeclaration final
|
||||||
: public Declaration
|
: public Declaration
|
||||||
, public FunctionNode {
|
, public FunctionNode {
|
||||||
public:
|
public:
|
||||||
|
@ -854,7 +854,7 @@ private:
|
||||||
bool m_is_hoisted { false };
|
bool m_is_hoisted { false };
|
||||||
};
|
};
|
||||||
|
|
||||||
class FunctionExpression final
|
class JS_API FunctionExpression final
|
||||||
: public Expression
|
: public Expression
|
||||||
, public FunctionNode {
|
, public FunctionNode {
|
||||||
public:
|
public:
|
||||||
|
@ -881,7 +881,7 @@ private:
|
||||||
virtual bool is_function_expression() const override { return true; }
|
virtual bool is_function_expression() const override { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class ErrorExpression final : public Expression {
|
class JS_API ErrorExpression final : public Expression {
|
||||||
public:
|
public:
|
||||||
explicit ErrorExpression(SourceRange source_range)
|
explicit ErrorExpression(SourceRange source_range)
|
||||||
: Expression(move(source_range))
|
: Expression(move(source_range))
|
||||||
|
@ -909,7 +909,7 @@ private:
|
||||||
bool m_is_yield_from { false };
|
bool m_is_yield_from { false };
|
||||||
};
|
};
|
||||||
|
|
||||||
class AwaitExpression final : public Expression {
|
class JS_API AwaitExpression final : public Expression {
|
||||||
public:
|
public:
|
||||||
explicit AwaitExpression(SourceRange source_range, NonnullRefPtr<Expression const> argument)
|
explicit AwaitExpression(SourceRange source_range, NonnullRefPtr<Expression const> argument)
|
||||||
: Expression(move(source_range))
|
: Expression(move(source_range))
|
||||||
|
@ -924,7 +924,7 @@ private:
|
||||||
NonnullRefPtr<Expression const> m_argument;
|
NonnullRefPtr<Expression const> m_argument;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ReturnStatement final : public Statement {
|
class JS_API ReturnStatement final : public Statement {
|
||||||
public:
|
public:
|
||||||
explicit ReturnStatement(SourceRange source_range, RefPtr<Expression const> argument)
|
explicit ReturnStatement(SourceRange source_range, RefPtr<Expression const> argument)
|
||||||
: Statement(move(source_range))
|
: Statement(move(source_range))
|
||||||
|
@ -941,7 +941,7 @@ private:
|
||||||
RefPtr<Expression const> m_argument;
|
RefPtr<Expression const> m_argument;
|
||||||
};
|
};
|
||||||
|
|
||||||
class IfStatement final : public Statement {
|
class JS_API IfStatement final : public Statement {
|
||||||
public:
|
public:
|
||||||
IfStatement(SourceRange source_range, NonnullRefPtr<Expression const> predicate, NonnullRefPtr<Statement const> consequent, RefPtr<Statement const> alternate)
|
IfStatement(SourceRange source_range, NonnullRefPtr<Expression const> predicate, NonnullRefPtr<Statement const> consequent, RefPtr<Statement const> alternate)
|
||||||
: Statement(move(source_range))
|
: Statement(move(source_range))
|
||||||
|
@ -964,7 +964,7 @@ private:
|
||||||
RefPtr<Statement const> m_alternate;
|
RefPtr<Statement const> m_alternate;
|
||||||
};
|
};
|
||||||
|
|
||||||
class WhileStatement final : public IterationStatement {
|
class JS_API WhileStatement final : public IterationStatement {
|
||||||
public:
|
public:
|
||||||
WhileStatement(SourceRange source_range, NonnullRefPtr<Expression const> test, NonnullRefPtr<Statement const> body)
|
WhileStatement(SourceRange source_range, NonnullRefPtr<Expression const> test, NonnullRefPtr<Statement const> body)
|
||||||
: IterationStatement(move(source_range))
|
: IterationStatement(move(source_range))
|
||||||
|
@ -985,7 +985,7 @@ private:
|
||||||
NonnullRefPtr<Statement const> m_body;
|
NonnullRefPtr<Statement const> m_body;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DoWhileStatement final : public IterationStatement {
|
class JS_API DoWhileStatement final : public IterationStatement {
|
||||||
public:
|
public:
|
||||||
DoWhileStatement(SourceRange source_range, NonnullRefPtr<Expression const> test, NonnullRefPtr<Statement const> body)
|
DoWhileStatement(SourceRange source_range, NonnullRefPtr<Expression const> test, NonnullRefPtr<Statement const> body)
|
||||||
: IterationStatement(move(source_range))
|
: IterationStatement(move(source_range))
|
||||||
|
@ -1006,7 +1006,7 @@ private:
|
||||||
NonnullRefPtr<Statement const> m_body;
|
NonnullRefPtr<Statement const> m_body;
|
||||||
};
|
};
|
||||||
|
|
||||||
class WithStatement final : public Statement {
|
class JS_API WithStatement final : public Statement {
|
||||||
public:
|
public:
|
||||||
WithStatement(SourceRange source_range, NonnullRefPtr<Expression const> object, NonnullRefPtr<Statement const> body)
|
WithStatement(SourceRange source_range, NonnullRefPtr<Expression const> object, NonnullRefPtr<Statement const> body)
|
||||||
: Statement(move(source_range))
|
: Statement(move(source_range))
|
||||||
|
@ -1026,7 +1026,7 @@ private:
|
||||||
NonnullRefPtr<Statement const> m_body;
|
NonnullRefPtr<Statement const> m_body;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ForStatement final : public IterationStatement {
|
class JS_API ForStatement final : public IterationStatement {
|
||||||
public:
|
public:
|
||||||
ForStatement(SourceRange source_range, RefPtr<ASTNode const> init, RefPtr<Expression const> test, RefPtr<Expression const> update, NonnullRefPtr<Statement const> body)
|
ForStatement(SourceRange source_range, RefPtr<ASTNode const> init, RefPtr<Expression const> test, RefPtr<Expression const> update, NonnullRefPtr<Statement const> body)
|
||||||
: IterationStatement(move(source_range))
|
: IterationStatement(move(source_range))
|
||||||
|
@ -1053,7 +1053,7 @@ private:
|
||||||
NonnullRefPtr<Statement const> m_body;
|
NonnullRefPtr<Statement const> m_body;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ForInStatement final : public IterationStatement {
|
class JS_API ForInStatement final : public IterationStatement {
|
||||||
public:
|
public:
|
||||||
ForInStatement(SourceRange source_range, Variant<NonnullRefPtr<ASTNode const>, NonnullRefPtr<BindingPattern const>> lhs, NonnullRefPtr<Expression const> rhs, NonnullRefPtr<Statement const> body)
|
ForInStatement(SourceRange source_range, Variant<NonnullRefPtr<ASTNode const>, NonnullRefPtr<BindingPattern const>> lhs, NonnullRefPtr<Expression const> rhs, NonnullRefPtr<Statement const> body)
|
||||||
: IterationStatement(move(source_range))
|
: IterationStatement(move(source_range))
|
||||||
|
@ -1077,7 +1077,7 @@ private:
|
||||||
NonnullRefPtr<Statement const> m_body;
|
NonnullRefPtr<Statement const> m_body;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ForOfStatement final : public IterationStatement {
|
class JS_API ForOfStatement final : public IterationStatement {
|
||||||
public:
|
public:
|
||||||
ForOfStatement(SourceRange source_range, Variant<NonnullRefPtr<ASTNode const>, NonnullRefPtr<BindingPattern const>> lhs, NonnullRefPtr<Expression const> rhs, NonnullRefPtr<Statement const> body)
|
ForOfStatement(SourceRange source_range, Variant<NonnullRefPtr<ASTNode const>, NonnullRefPtr<BindingPattern const>> lhs, NonnullRefPtr<Expression const> rhs, NonnullRefPtr<Statement const> body)
|
||||||
: IterationStatement(move(source_range))
|
: IterationStatement(move(source_range))
|
||||||
|
@ -1101,7 +1101,7 @@ private:
|
||||||
NonnullRefPtr<Statement const> m_body;
|
NonnullRefPtr<Statement const> m_body;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ForAwaitOfStatement final : public IterationStatement {
|
class JS_API ForAwaitOfStatement final : public IterationStatement {
|
||||||
public:
|
public:
|
||||||
ForAwaitOfStatement(SourceRange source_range, Variant<NonnullRefPtr<ASTNode const>, NonnullRefPtr<BindingPattern const>> lhs, NonnullRefPtr<Expression const> rhs, NonnullRefPtr<Statement const> body)
|
ForAwaitOfStatement(SourceRange source_range, Variant<NonnullRefPtr<ASTNode const>, NonnullRefPtr<BindingPattern const>> lhs, NonnullRefPtr<Expression const> rhs, NonnullRefPtr<Statement const> body)
|
||||||
: IterationStatement(move(source_range))
|
: IterationStatement(move(source_range))
|
||||||
|
@ -1146,7 +1146,7 @@ enum class BinaryOp {
|
||||||
InstanceOf,
|
InstanceOf,
|
||||||
};
|
};
|
||||||
|
|
||||||
class BinaryExpression final : public Expression {
|
class JS_API BinaryExpression final : public Expression {
|
||||||
public:
|
public:
|
||||||
BinaryExpression(SourceRange source_range, BinaryOp op, NonnullRefPtr<Expression const> lhs, NonnullRefPtr<Expression const> rhs)
|
BinaryExpression(SourceRange source_range, BinaryOp op, NonnullRefPtr<Expression const> lhs, NonnullRefPtr<Expression const> rhs)
|
||||||
: Expression(move(source_range))
|
: Expression(move(source_range))
|
||||||
|
@ -1171,7 +1171,7 @@ enum class LogicalOp {
|
||||||
NullishCoalescing,
|
NullishCoalescing,
|
||||||
};
|
};
|
||||||
|
|
||||||
class LogicalExpression final : public Expression {
|
class JS_API LogicalExpression final : public Expression {
|
||||||
public:
|
public:
|
||||||
LogicalExpression(SourceRange source_range, LogicalOp op, NonnullRefPtr<Expression const> lhs, NonnullRefPtr<Expression const> rhs)
|
LogicalExpression(SourceRange source_range, LogicalOp op, NonnullRefPtr<Expression const> lhs, NonnullRefPtr<Expression const> rhs)
|
||||||
: Expression(move(source_range))
|
: Expression(move(source_range))
|
||||||
|
@ -1200,7 +1200,7 @@ enum class UnaryOp {
|
||||||
Delete,
|
Delete,
|
||||||
};
|
};
|
||||||
|
|
||||||
class UnaryExpression final : public Expression {
|
class JS_API UnaryExpression final : public Expression {
|
||||||
public:
|
public:
|
||||||
UnaryExpression(SourceRange source_range, UnaryOp op, NonnullRefPtr<Expression const> lhs)
|
UnaryExpression(SourceRange source_range, UnaryOp op, NonnullRefPtr<Expression const> lhs)
|
||||||
: Expression(move(source_range))
|
: Expression(move(source_range))
|
||||||
|
@ -1217,7 +1217,7 @@ private:
|
||||||
NonnullRefPtr<Expression const> m_lhs;
|
NonnullRefPtr<Expression const> m_lhs;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SequenceExpression final : public Expression {
|
class JS_API SequenceExpression final : public Expression {
|
||||||
public:
|
public:
|
||||||
SequenceExpression(SourceRange source_range, Vector<NonnullRefPtr<Expression const>> expressions)
|
SequenceExpression(SourceRange source_range, Vector<NonnullRefPtr<Expression const>> expressions)
|
||||||
: Expression(move(source_range))
|
: Expression(move(source_range))
|
||||||
|
@ -1233,7 +1233,7 @@ private:
|
||||||
Vector<NonnullRefPtr<Expression const>> m_expressions;
|
Vector<NonnullRefPtr<Expression const>> m_expressions;
|
||||||
};
|
};
|
||||||
|
|
||||||
class PrimitiveLiteral : public Expression {
|
class JS_API PrimitiveLiteral : public Expression {
|
||||||
public:
|
public:
|
||||||
virtual Value value() const = 0;
|
virtual Value value() const = 0;
|
||||||
|
|
||||||
|
@ -1247,7 +1247,7 @@ private:
|
||||||
virtual bool is_primitive_literal() const override { return true; }
|
virtual bool is_primitive_literal() const override { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class BooleanLiteral final : public PrimitiveLiteral {
|
class JS_API BooleanLiteral final : public PrimitiveLiteral {
|
||||||
public:
|
public:
|
||||||
explicit BooleanLiteral(SourceRange source_range, bool value)
|
explicit BooleanLiteral(SourceRange source_range, bool value)
|
||||||
: PrimitiveLiteral(move(source_range))
|
: PrimitiveLiteral(move(source_range))
|
||||||
|
@ -1266,7 +1266,7 @@ private:
|
||||||
bool m_value { false };
|
bool m_value { false };
|
||||||
};
|
};
|
||||||
|
|
||||||
class NumericLiteral final : public PrimitiveLiteral {
|
class JS_API NumericLiteral final : public PrimitiveLiteral {
|
||||||
public:
|
public:
|
||||||
explicit NumericLiteral(SourceRange source_range, double value)
|
explicit NumericLiteral(SourceRange source_range, double value)
|
||||||
: PrimitiveLiteral(move(source_range))
|
: PrimitiveLiteral(move(source_range))
|
||||||
|
@ -1285,7 +1285,7 @@ private:
|
||||||
Value m_value;
|
Value m_value;
|
||||||
};
|
};
|
||||||
|
|
||||||
class BigIntLiteral final : public Expression {
|
class JS_API BigIntLiteral final : public Expression {
|
||||||
public:
|
public:
|
||||||
explicit BigIntLiteral(SourceRange source_range, ByteString value)
|
explicit BigIntLiteral(SourceRange source_range, ByteString value)
|
||||||
: Expression(move(source_range))
|
: Expression(move(source_range))
|
||||||
|
@ -1300,7 +1300,7 @@ private:
|
||||||
ByteString m_value;
|
ByteString m_value;
|
||||||
};
|
};
|
||||||
|
|
||||||
class StringLiteral final : public Expression {
|
class JS_API StringLiteral final : public Expression {
|
||||||
public:
|
public:
|
||||||
explicit StringLiteral(SourceRange source_range, String value)
|
explicit StringLiteral(SourceRange source_range, String value)
|
||||||
: Expression(move(source_range))
|
: Expression(move(source_range))
|
||||||
|
@ -1319,7 +1319,7 @@ private:
|
||||||
String m_value;
|
String m_value;
|
||||||
};
|
};
|
||||||
|
|
||||||
class NullLiteral final : public PrimitiveLiteral {
|
class JS_API NullLiteral final : public PrimitiveLiteral {
|
||||||
public:
|
public:
|
||||||
explicit NullLiteral(SourceRange source_range)
|
explicit NullLiteral(SourceRange source_range)
|
||||||
: PrimitiveLiteral(move(source_range))
|
: PrimitiveLiteral(move(source_range))
|
||||||
|
@ -1335,7 +1335,7 @@ private:
|
||||||
virtual bool is_null_literal() const override { return true; }
|
virtual bool is_null_literal() const override { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class RegExpLiteral final : public Expression {
|
class JS_API RegExpLiteral final : public Expression {
|
||||||
public:
|
public:
|
||||||
RegExpLiteral(SourceRange source_range, regex::Parser::Result parsed_regex, String parsed_pattern, regex::RegexOptions<ECMAScriptFlags> parsed_flags, String pattern, String flags)
|
RegExpLiteral(SourceRange source_range, regex::Parser::Result parsed_regex, String parsed_pattern, regex::RegexOptions<ECMAScriptFlags> parsed_flags, String pattern, String flags)
|
||||||
: Expression(move(source_range))
|
: Expression(move(source_range))
|
||||||
|
@ -1364,7 +1364,7 @@ private:
|
||||||
String m_flags;
|
String m_flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
class PrivateIdentifier final : public Expression {
|
class JS_API PrivateIdentifier final : public Expression {
|
||||||
public:
|
public:
|
||||||
explicit PrivateIdentifier(SourceRange source_range, FlyString string)
|
explicit PrivateIdentifier(SourceRange source_range, FlyString string)
|
||||||
: Expression(move(source_range))
|
: Expression(move(source_range))
|
||||||
|
@ -1382,7 +1382,7 @@ private:
|
||||||
FlyString m_string;
|
FlyString m_string;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ClassElement : public ASTNode {
|
class JS_API ClassElement : public ASTNode {
|
||||||
public:
|
public:
|
||||||
ClassElement(SourceRange source_range, bool is_static)
|
ClassElement(SourceRange source_range, bool is_static)
|
||||||
: ASTNode(move(source_range))
|
: ASTNode(move(source_range))
|
||||||
|
@ -1409,7 +1409,7 @@ private:
|
||||||
bool m_is_static { false };
|
bool m_is_static { false };
|
||||||
};
|
};
|
||||||
|
|
||||||
class ClassMethod final : public ClassElement {
|
class JS_API ClassMethod final : public ClassElement {
|
||||||
public:
|
public:
|
||||||
enum class Kind {
|
enum class Kind {
|
||||||
Method,
|
Method,
|
||||||
|
@ -1440,7 +1440,7 @@ private:
|
||||||
Kind m_kind;
|
Kind m_kind;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ClassField final : public ClassElement {
|
class JS_API ClassField final : public ClassElement {
|
||||||
public:
|
public:
|
||||||
ClassField(SourceRange source_range, NonnullRefPtr<Expression const> key, RefPtr<Expression const> init, bool is_static)
|
ClassField(SourceRange source_range, NonnullRefPtr<Expression const> key, RefPtr<Expression const> init, bool is_static)
|
||||||
: ClassElement(move(source_range), is_static)
|
: ClassElement(move(source_range), is_static)
|
||||||
|
@ -1464,7 +1464,7 @@ private:
|
||||||
RefPtr<Expression const> m_initializer;
|
RefPtr<Expression const> m_initializer;
|
||||||
};
|
};
|
||||||
|
|
||||||
class StaticInitializer final : public ClassElement {
|
class JS_API StaticInitializer final : public ClassElement {
|
||||||
public:
|
public:
|
||||||
StaticInitializer(SourceRange source_range, NonnullRefPtr<FunctionBody> function_body)
|
StaticInitializer(SourceRange source_range, NonnullRefPtr<FunctionBody> function_body)
|
||||||
: ClassElement(move(source_range), true)
|
: ClassElement(move(source_range), true)
|
||||||
|
@ -1481,7 +1481,7 @@ private:
|
||||||
NonnullRefPtr<FunctionBody> m_function_body;
|
NonnullRefPtr<FunctionBody> m_function_body;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SuperExpression final : public Expression {
|
class JS_API SuperExpression final : public Expression {
|
||||||
public:
|
public:
|
||||||
explicit SuperExpression(SourceRange source_range)
|
explicit SuperExpression(SourceRange source_range)
|
||||||
: Expression(move(source_range))
|
: Expression(move(source_range))
|
||||||
|
@ -1494,7 +1494,7 @@ public:
|
||||||
virtual bool is_super_expression() const override { return true; }
|
virtual bool is_super_expression() const override { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class ClassExpression final : public Expression {
|
class JS_API ClassExpression final : public Expression {
|
||||||
public:
|
public:
|
||||||
ClassExpression(SourceRange source_range, RefPtr<Identifier const> name, ByteString source_text, RefPtr<FunctionExpression const> constructor, RefPtr<Expression const> super_class, Vector<NonnullRefPtr<ClassElement const>> elements)
|
ClassExpression(SourceRange source_range, RefPtr<Identifier const> name, ByteString source_text, RefPtr<FunctionExpression const> constructor, RefPtr<Expression const> super_class, Vector<NonnullRefPtr<ClassElement const>> elements)
|
||||||
: Expression(move(source_range))
|
: Expression(move(source_range))
|
||||||
|
@ -1531,7 +1531,7 @@ private:
|
||||||
Vector<NonnullRefPtr<ClassElement const>> m_elements;
|
Vector<NonnullRefPtr<ClassElement const>> m_elements;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ClassDeclaration final : public Declaration {
|
class JS_API ClassDeclaration final : public Declaration {
|
||||||
public:
|
public:
|
||||||
ClassDeclaration(SourceRange source_range, NonnullRefPtr<ClassExpression const> class_expression)
|
ClassDeclaration(SourceRange source_range, NonnullRefPtr<ClassExpression const> class_expression)
|
||||||
: Declaration(move(source_range))
|
: Declaration(move(source_range))
|
||||||
|
@ -1558,7 +1558,7 @@ private:
|
||||||
|
|
||||||
// We use this class to mimic Initializer : = AssignmentExpression of
|
// We use this class to mimic Initializer : = AssignmentExpression of
|
||||||
// 10.2.1.3 Runtime Semantics: EvaluateBody, https://tc39.es/ecma262/#sec-runtime-semantics-evaluatebody
|
// 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:
|
public:
|
||||||
ClassFieldInitializerStatement(SourceRange source_range, NonnullRefPtr<Expression const> expression, FlyString field_name)
|
ClassFieldInitializerStatement(SourceRange source_range, NonnullRefPtr<Expression const> expression, FlyString field_name)
|
||||||
: Statement(move(source_range))
|
: Statement(move(source_range))
|
||||||
|
@ -1575,7 +1575,7 @@ private:
|
||||||
FlyString m_class_field_identifier_name; // [[ClassFieldIdentifierName]]
|
FlyString m_class_field_identifier_name; // [[ClassFieldIdentifierName]]
|
||||||
};
|
};
|
||||||
|
|
||||||
class SpreadExpression final : public Expression {
|
class JS_API SpreadExpression final : public Expression {
|
||||||
public:
|
public:
|
||||||
explicit SpreadExpression(SourceRange source_range, NonnullRefPtr<Expression const> target)
|
explicit SpreadExpression(SourceRange source_range, NonnullRefPtr<Expression const> target)
|
||||||
: Expression(move(source_range))
|
: Expression(move(source_range))
|
||||||
|
@ -1592,7 +1592,7 @@ private:
|
||||||
NonnullRefPtr<Expression const> m_target;
|
NonnullRefPtr<Expression const> m_target;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ThisExpression final : public Expression {
|
class JS_API ThisExpression final : public Expression {
|
||||||
public:
|
public:
|
||||||
explicit ThisExpression(SourceRange source_range)
|
explicit ThisExpression(SourceRange source_range)
|
||||||
: Expression(move(source_range))
|
: Expression(move(source_range))
|
||||||
|
@ -1617,7 +1617,7 @@ enum InsideParenthesesEnum {
|
||||||
NotInsideParentheses,
|
NotInsideParentheses,
|
||||||
};
|
};
|
||||||
|
|
||||||
class CallExpression : public ASTNodeWithTailArray<CallExpression, Expression, CallExpressionArgument> {
|
class JS_API CallExpression : public ASTNodeWithTailArray<CallExpression, Expression, CallExpressionArgument> {
|
||||||
friend class ASTNodeWithTailArray;
|
friend class ASTNodeWithTailArray;
|
||||||
|
|
||||||
InvocationStyleEnum m_invocation_style;
|
InvocationStyleEnum m_invocation_style;
|
||||||
|
@ -1655,7 +1655,7 @@ protected:
|
||||||
NonnullRefPtr<Expression const> m_callee;
|
NonnullRefPtr<Expression const> m_callee;
|
||||||
};
|
};
|
||||||
|
|
||||||
class NewExpression final : public CallExpression {
|
class JS_API NewExpression final : public CallExpression {
|
||||||
friend class ASTNodeWithTailArray;
|
friend class ASTNodeWithTailArray;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -1672,7 +1672,7 @@ private:
|
||||||
|
|
||||||
static_assert(sizeof(NewExpression) == sizeof(CallExpression), "Adding members to NewExpression will break CallExpression memory layout");
|
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:
|
public:
|
||||||
// This is here to be able to make a constructor like
|
// This is here to be able to make a constructor like
|
||||||
// constructor(...args) { super(...args); } which does not use @@iterator of %Array.prototype%.
|
// constructor(...args) { super(...args); } which does not use @@iterator of %Array.prototype%.
|
||||||
|
@ -1723,7 +1723,7 @@ enum class AssignmentOp {
|
||||||
NullishAssignment,
|
NullishAssignment,
|
||||||
};
|
};
|
||||||
|
|
||||||
class AssignmentExpression final : public Expression {
|
class JS_API AssignmentExpression final : public Expression {
|
||||||
public:
|
public:
|
||||||
AssignmentExpression(SourceRange source_range, AssignmentOp op, NonnullRefPtr<Expression const> lhs, NonnullRefPtr<Expression const> rhs)
|
AssignmentExpression(SourceRange source_range, AssignmentOp op, NonnullRefPtr<Expression const> lhs, NonnullRefPtr<Expression const> rhs)
|
||||||
: Expression(move(source_range))
|
: Expression(move(source_range))
|
||||||
|
@ -1755,7 +1755,7 @@ enum class UpdateOp {
|
||||||
Decrement,
|
Decrement,
|
||||||
};
|
};
|
||||||
|
|
||||||
class UpdateExpression final : public Expression {
|
class JS_API UpdateExpression final : public Expression {
|
||||||
public:
|
public:
|
||||||
UpdateExpression(SourceRange source_range, UpdateOp op, NonnullRefPtr<Expression const> argument, bool prefixed = false)
|
UpdateExpression(SourceRange source_range, UpdateOp op, NonnullRefPtr<Expression const> argument, bool prefixed = false)
|
||||||
: Expression(move(source_range))
|
: Expression(move(source_range))
|
||||||
|
@ -1776,7 +1776,7 @@ private:
|
||||||
bool m_prefixed;
|
bool m_prefixed;
|
||||||
};
|
};
|
||||||
|
|
||||||
class VariableDeclarator final : public ASTNode {
|
class JS_API VariableDeclarator final : public ASTNode {
|
||||||
public:
|
public:
|
||||||
VariableDeclarator(SourceRange source_range, NonnullRefPtr<Identifier const> id)
|
VariableDeclarator(SourceRange source_range, NonnullRefPtr<Identifier const> id)
|
||||||
: ASTNode(move(source_range))
|
: ASTNode(move(source_range))
|
||||||
|
@ -1808,7 +1808,7 @@ private:
|
||||||
RefPtr<Expression const> m_init;
|
RefPtr<Expression const> m_init;
|
||||||
};
|
};
|
||||||
|
|
||||||
class VariableDeclaration final : public Declaration {
|
class JS_API VariableDeclaration final : public Declaration {
|
||||||
public:
|
public:
|
||||||
VariableDeclaration(SourceRange source_range, DeclarationKind declaration_kind, Vector<NonnullRefPtr<VariableDeclarator const>> declarations)
|
VariableDeclaration(SourceRange source_range, DeclarationKind declaration_kind, Vector<NonnullRefPtr<VariableDeclarator const>> declarations)
|
||||||
: Declaration(move(source_range))
|
: Declaration(move(source_range))
|
||||||
|
@ -1837,7 +1837,7 @@ private:
|
||||||
Vector<NonnullRefPtr<VariableDeclarator const>> m_declarations;
|
Vector<NonnullRefPtr<VariableDeclarator const>> m_declarations;
|
||||||
};
|
};
|
||||||
|
|
||||||
class UsingDeclaration final : public Declaration {
|
class JS_API UsingDeclaration final : public Declaration {
|
||||||
public:
|
public:
|
||||||
UsingDeclaration(SourceRange source_range, Vector<NonnullRefPtr<VariableDeclarator const>> declarations)
|
UsingDeclaration(SourceRange source_range, Vector<NonnullRefPtr<VariableDeclarator const>> declarations)
|
||||||
: Declaration(move(source_range))
|
: Declaration(move(source_range))
|
||||||
|
@ -1859,7 +1859,7 @@ private:
|
||||||
Vector<NonnullRefPtr<VariableDeclarator const>> m_declarations;
|
Vector<NonnullRefPtr<VariableDeclarator const>> m_declarations;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ObjectProperty final : public ASTNode {
|
class JS_API ObjectProperty final : public ASTNode {
|
||||||
public:
|
public:
|
||||||
enum class Type : u8 {
|
enum class Type : u8 {
|
||||||
KeyValue,
|
KeyValue,
|
||||||
|
@ -1897,7 +1897,7 @@ private:
|
||||||
RefPtr<Expression const> m_value;
|
RefPtr<Expression const> m_value;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ObjectExpression final : public Expression {
|
class JS_API ObjectExpression final : public Expression {
|
||||||
public:
|
public:
|
||||||
explicit ObjectExpression(SourceRange source_range, Vector<NonnullRefPtr<ObjectProperty>> properties = {})
|
explicit ObjectExpression(SourceRange source_range, Vector<NonnullRefPtr<ObjectProperty>> properties = {})
|
||||||
: Expression(move(source_range))
|
: Expression(move(source_range))
|
||||||
|
@ -1914,7 +1914,7 @@ private:
|
||||||
Vector<NonnullRefPtr<ObjectProperty>> m_properties;
|
Vector<NonnullRefPtr<ObjectProperty>> m_properties;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ArrayExpression final : public Expression {
|
class JS_API ArrayExpression final : public Expression {
|
||||||
public:
|
public:
|
||||||
ArrayExpression(SourceRange source_range, Vector<RefPtr<Expression const>> elements)
|
ArrayExpression(SourceRange source_range, Vector<RefPtr<Expression const>> elements)
|
||||||
: Expression(move(source_range))
|
: Expression(move(source_range))
|
||||||
|
@ -1933,7 +1933,7 @@ private:
|
||||||
Vector<RefPtr<Expression const>> m_elements;
|
Vector<RefPtr<Expression const>> m_elements;
|
||||||
};
|
};
|
||||||
|
|
||||||
class TemplateLiteral final : public Expression {
|
class JS_API TemplateLiteral final : public Expression {
|
||||||
public:
|
public:
|
||||||
TemplateLiteral(SourceRange source_range, Vector<NonnullRefPtr<Expression const>> expressions)
|
TemplateLiteral(SourceRange source_range, Vector<NonnullRefPtr<Expression const>> expressions)
|
||||||
: Expression(move(source_range))
|
: Expression(move(source_range))
|
||||||
|
@ -1959,7 +1959,7 @@ private:
|
||||||
Vector<NonnullRefPtr<Expression const>> const m_raw_strings;
|
Vector<NonnullRefPtr<Expression const>> const m_raw_strings;
|
||||||
};
|
};
|
||||||
|
|
||||||
class TaggedTemplateLiteral final : public Expression {
|
class JS_API TaggedTemplateLiteral final : public Expression {
|
||||||
public:
|
public:
|
||||||
TaggedTemplateLiteral(SourceRange source_range, NonnullRefPtr<Expression const> tag, NonnullRefPtr<TemplateLiteral const> template_literal)
|
TaggedTemplateLiteral(SourceRange source_range, NonnullRefPtr<Expression const> tag, NonnullRefPtr<TemplateLiteral const> template_literal)
|
||||||
: Expression(move(source_range))
|
: Expression(move(source_range))
|
||||||
|
@ -1976,7 +1976,7 @@ private:
|
||||||
NonnullRefPtr<TemplateLiteral const> const m_template_literal;
|
NonnullRefPtr<TemplateLiteral const> const m_template_literal;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MemberExpression final : public Expression {
|
class JS_API MemberExpression final : public Expression {
|
||||||
public:
|
public:
|
||||||
MemberExpression(SourceRange source_range, NonnullRefPtr<Expression const> object, NonnullRefPtr<Expression const> property, bool computed = false)
|
MemberExpression(SourceRange source_range, NonnullRefPtr<Expression const> object, NonnullRefPtr<Expression const> property, bool computed = false)
|
||||||
: Expression(move(source_range))
|
: Expression(move(source_range))
|
||||||
|
@ -2005,7 +2005,7 @@ private:
|
||||||
NonnullRefPtr<Expression const> m_property;
|
NonnullRefPtr<Expression const> m_property;
|
||||||
};
|
};
|
||||||
|
|
||||||
class OptionalChain final : public Expression {
|
class JS_API OptionalChain final : public Expression {
|
||||||
public:
|
public:
|
||||||
enum class Mode {
|
enum class Mode {
|
||||||
Optional,
|
Optional,
|
||||||
|
@ -2051,7 +2051,7 @@ private:
|
||||||
Vector<Reference> m_references;
|
Vector<Reference> m_references;
|
||||||
};
|
};
|
||||||
|
|
||||||
class MetaProperty final : public Expression {
|
class JS_API MetaProperty final : public Expression {
|
||||||
public:
|
public:
|
||||||
enum class Type {
|
enum class Type {
|
||||||
NewTarget,
|
NewTarget,
|
||||||
|
@ -2071,7 +2071,7 @@ private:
|
||||||
Type m_type;
|
Type m_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ImportCall final : public Expression {
|
class JS_API ImportCall final : public Expression {
|
||||||
public:
|
public:
|
||||||
ImportCall(SourceRange source_range, NonnullRefPtr<Expression const> specifier, RefPtr<Expression const> options)
|
ImportCall(SourceRange source_range, NonnullRefPtr<Expression const> specifier, RefPtr<Expression const> options)
|
||||||
: Expression(move(source_range))
|
: Expression(move(source_range))
|
||||||
|
@ -2090,7 +2090,7 @@ private:
|
||||||
RefPtr<Expression const> m_options;
|
RefPtr<Expression const> m_options;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ConditionalExpression final : public Expression {
|
class JS_API ConditionalExpression final : public Expression {
|
||||||
public:
|
public:
|
||||||
ConditionalExpression(SourceRange source_range, NonnullRefPtr<Expression const> test, NonnullRefPtr<Expression const> consequent, NonnullRefPtr<Expression const> alternate)
|
ConditionalExpression(SourceRange source_range, NonnullRefPtr<Expression const> test, NonnullRefPtr<Expression const> consequent, NonnullRefPtr<Expression const> alternate)
|
||||||
: Expression(move(source_range))
|
: Expression(move(source_range))
|
||||||
|
@ -2109,7 +2109,7 @@ private:
|
||||||
NonnullRefPtr<Expression const> m_alternate;
|
NonnullRefPtr<Expression const> m_alternate;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CatchClause final : public ASTNode {
|
class JS_API CatchClause final : public ASTNode {
|
||||||
public:
|
public:
|
||||||
CatchClause(SourceRange source_range, NonnullRefPtr<Identifier const> parameter, NonnullRefPtr<BlockStatement const> body)
|
CatchClause(SourceRange source_range, NonnullRefPtr<Identifier const> parameter, NonnullRefPtr<BlockStatement const> body)
|
||||||
: ASTNode(move(source_range))
|
: ASTNode(move(source_range))
|
||||||
|
@ -2142,7 +2142,7 @@ private:
|
||||||
NonnullRefPtr<BlockStatement const> m_body;
|
NonnullRefPtr<BlockStatement const> m_body;
|
||||||
};
|
};
|
||||||
|
|
||||||
class TryStatement final : public Statement {
|
class JS_API TryStatement final : public Statement {
|
||||||
public:
|
public:
|
||||||
TryStatement(SourceRange source_range, NonnullRefPtr<BlockStatement const> block, RefPtr<CatchClause const> handler, RefPtr<BlockStatement const> finalizer)
|
TryStatement(SourceRange source_range, NonnullRefPtr<BlockStatement const> block, RefPtr<CatchClause const> handler, RefPtr<BlockStatement const> finalizer)
|
||||||
: Statement(move(source_range))
|
: Statement(move(source_range))
|
||||||
|
@ -2165,7 +2165,7 @@ private:
|
||||||
RefPtr<BlockStatement const> m_finalizer;
|
RefPtr<BlockStatement const> m_finalizer;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ThrowStatement final : public Statement {
|
class JS_API ThrowStatement final : public Statement {
|
||||||
public:
|
public:
|
||||||
explicit ThrowStatement(SourceRange source_range, NonnullRefPtr<Expression const> argument)
|
explicit ThrowStatement(SourceRange source_range, NonnullRefPtr<Expression const> argument)
|
||||||
: Statement(move(source_range))
|
: Statement(move(source_range))
|
||||||
|
@ -2182,7 +2182,7 @@ private:
|
||||||
NonnullRefPtr<Expression const> m_argument;
|
NonnullRefPtr<Expression const> m_argument;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SwitchCase final : public ScopeNode {
|
class JS_API SwitchCase final : public ScopeNode {
|
||||||
public:
|
public:
|
||||||
SwitchCase(SourceRange source_range, RefPtr<Expression const> test)
|
SwitchCase(SourceRange source_range, RefPtr<Expression const> test)
|
||||||
: ScopeNode(move(source_range))
|
: ScopeNode(move(source_range))
|
||||||
|
@ -2198,7 +2198,7 @@ private:
|
||||||
RefPtr<Expression const> m_test;
|
RefPtr<Expression const> m_test;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SwitchStatement final : public ScopeNode {
|
class JS_API SwitchStatement final : public ScopeNode {
|
||||||
public:
|
public:
|
||||||
SwitchStatement(SourceRange source_range, NonnullRefPtr<Expression const> discriminant)
|
SwitchStatement(SourceRange source_range, NonnullRefPtr<Expression const> discriminant)
|
||||||
: ScopeNode(move(source_range))
|
: ScopeNode(move(source_range))
|
||||||
|
@ -2217,7 +2217,7 @@ private:
|
||||||
Vector<NonnullRefPtr<SwitchCase const>> m_cases;
|
Vector<NonnullRefPtr<SwitchCase const>> m_cases;
|
||||||
};
|
};
|
||||||
|
|
||||||
class BreakStatement final : public Statement {
|
class JS_API BreakStatement final : public Statement {
|
||||||
public:
|
public:
|
||||||
BreakStatement(SourceRange source_range, Optional<FlyString> target_label)
|
BreakStatement(SourceRange source_range, Optional<FlyString> target_label)
|
||||||
: Statement(move(source_range))
|
: Statement(move(source_range))
|
||||||
|
@ -2232,7 +2232,7 @@ private:
|
||||||
Optional<FlyString> m_target_label;
|
Optional<FlyString> m_target_label;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ContinueStatement final : public Statement {
|
class JS_API ContinueStatement final : public Statement {
|
||||||
public:
|
public:
|
||||||
ContinueStatement(SourceRange source_range, Optional<FlyString> target_label)
|
ContinueStatement(SourceRange source_range, Optional<FlyString> target_label)
|
||||||
: Statement(move(source_range))
|
: Statement(move(source_range))
|
||||||
|
@ -2248,7 +2248,7 @@ private:
|
||||||
Optional<FlyString> m_target_label;
|
Optional<FlyString> m_target_label;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DebuggerStatement final : public Statement {
|
class JS_API DebuggerStatement final : public Statement {
|
||||||
public:
|
public:
|
||||||
explicit DebuggerStatement(SourceRange source_range)
|
explicit DebuggerStatement(SourceRange source_range)
|
||||||
: Statement(move(source_range))
|
: Statement(move(source_range))
|
||||||
|
@ -2258,7 +2258,7 @@ public:
|
||||||
virtual Bytecode::CodeGenerationErrorOr<Optional<Bytecode::ScopedOperand>> generate_bytecode(Bytecode::Generator&, Optional<Bytecode::ScopedOperand> preferred_dst = {}) const override;
|
virtual Bytecode::CodeGenerationErrorOr<Optional<Bytecode::ScopedOperand>> generate_bytecode(Bytecode::Generator&, Optional<Bytecode::ScopedOperand> preferred_dst = {}) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SyntheticReferenceExpression final : public Expression {
|
class JS_API SyntheticReferenceExpression final : public Expression {
|
||||||
public:
|
public:
|
||||||
explicit SyntheticReferenceExpression(SourceRange source_range, Reference reference, Value value)
|
explicit SyntheticReferenceExpression(SourceRange source_range, Reference reference, Value value)
|
||||||
: Expression(move(source_range))
|
: Expression(move(source_range))
|
||||||
|
|
|
@ -22,7 +22,7 @@ struct UnwindInfo {
|
||||||
bool handler_called { false };
|
bool handler_called { false };
|
||||||
};
|
};
|
||||||
|
|
||||||
class BasicBlock {
|
class JS_API BasicBlock {
|
||||||
AK_MAKE_NONCOPYABLE(BasicBlock);
|
AK_MAKE_NONCOPYABLE(BasicBlock);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
namespace JS::Bytecode {
|
namespace JS::Bytecode {
|
||||||
|
|
||||||
struct CodeGenerationError {
|
struct JS_API CodeGenerationError {
|
||||||
ASTNode const* failing_node { nullptr };
|
ASTNode const* failing_node { nullptr };
|
||||||
StringView reason_literal;
|
StringView reason_literal;
|
||||||
|
|
||||||
|
|
|
@ -47,7 +47,7 @@ struct SourceRecord {
|
||||||
u32 source_end_offset {};
|
u32 source_end_offset {};
|
||||||
};
|
};
|
||||||
|
|
||||||
class Executable final : public Cell {
|
class JS_API Executable final : public Cell {
|
||||||
GC_CELL(Executable, Cell);
|
GC_CELL(Executable, Cell);
|
||||||
GC_DECLARE_ALLOCATOR(Executable);
|
GC_DECLARE_ALLOCATOR(Executable);
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
namespace JS::Bytecode {
|
namespace JS::Bytecode {
|
||||||
|
|
||||||
class Generator {
|
class JS_API Generator {
|
||||||
public:
|
public:
|
||||||
VM& vm() { return m_vm; }
|
VM& vm() { return m_vm; }
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ public:
|
||||||
[[nodiscard]] bool is_local_initialized(Identifier::Local const&) const;
|
[[nodiscard]] bool is_local_initialized(Identifier::Local const&) const;
|
||||||
[[nodiscard]] bool is_local_lexically_declared(Identifier::Local const& local) const;
|
[[nodiscard]] bool is_local_lexically_declared(Identifier::Local const& local) const;
|
||||||
|
|
||||||
class SourceLocationScope {
|
class JS_API SourceLocationScope {
|
||||||
public:
|
public:
|
||||||
SourceLocationScope(Generator&, ASTNode const& node);
|
SourceLocationScope(Generator&, ASTNode const& node);
|
||||||
~SourceLocationScope();
|
~SourceLocationScope();
|
||||||
|
@ -65,7 +65,7 @@ public:
|
||||||
ASTNode const* m_previous_node { nullptr };
|
ASTNode const* m_previous_node { nullptr };
|
||||||
};
|
};
|
||||||
|
|
||||||
class UnwindContext {
|
class JS_API UnwindContext {
|
||||||
public:
|
public:
|
||||||
UnwindContext(Generator&, Optional<Label> finalizer);
|
UnwindContext(Generator&, Optional<Label> finalizer);
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <AK/DistinctNumeric.h>
|
#include <AK/DistinctNumeric.h>
|
||||||
#include <AK/FlyString.h>
|
#include <AK/FlyString.h>
|
||||||
#include <AK/Vector.h>
|
#include <AK/Vector.h>
|
||||||
|
#include <LibJS/Forward.h>
|
||||||
|
|
||||||
namespace JS::Bytecode {
|
namespace JS::Bytecode {
|
||||||
|
|
||||||
|
@ -18,7 +19,7 @@ struct IdentifierTableIndex {
|
||||||
u32 value { 0 };
|
u32 value { 0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
class IdentifierTable {
|
class JS_API IdentifierTable {
|
||||||
AK_MAKE_NONMOVABLE(IdentifierTable);
|
AK_MAKE_NONMOVABLE(IdentifierTable);
|
||||||
AK_MAKE_NONCOPYABLE(IdentifierTable);
|
AK_MAKE_NONCOPYABLE(IdentifierTable);
|
||||||
|
|
||||||
|
|
|
@ -153,7 +153,7 @@
|
||||||
|
|
||||||
namespace JS::Bytecode {
|
namespace JS::Bytecode {
|
||||||
|
|
||||||
class alignas(void*) Instruction {
|
class alignas(void*) JS_API Instruction {
|
||||||
public:
|
public:
|
||||||
constexpr static bool IsTerminator = false;
|
constexpr static bool IsTerminator = false;
|
||||||
static constexpr bool IsVariableLength = false;
|
static constexpr bool IsVariableLength = false;
|
||||||
|
@ -185,7 +185,7 @@ private:
|
||||||
Type m_type {};
|
Type m_type {};
|
||||||
};
|
};
|
||||||
|
|
||||||
class InstructionStreamIterator {
|
class JS_API InstructionStreamIterator {
|
||||||
public:
|
public:
|
||||||
InstructionStreamIterator(ReadonlyBytes bytes, Executable const* executable = nullptr, size_t offset = 0)
|
InstructionStreamIterator(ReadonlyBytes bytes, Executable const* executable = nullptr, size_t offset = 0)
|
||||||
: m_begin(bytes.data())
|
: m_begin(bytes.data())
|
||||||
|
|
|
@ -19,7 +19,7 @@ namespace JS::Bytecode {
|
||||||
|
|
||||||
class InstructionStreamIterator;
|
class InstructionStreamIterator;
|
||||||
|
|
||||||
class Interpreter {
|
class JS_API Interpreter {
|
||||||
public:
|
public:
|
||||||
explicit Interpreter(VM&);
|
explicit Interpreter(VM&);
|
||||||
~Interpreter();
|
~Interpreter();
|
||||||
|
|
|
@ -7,12 +7,13 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <AK/Format.h>
|
#include <AK/Format.h>
|
||||||
|
#include <LibJS/Forward.h>
|
||||||
|
|
||||||
namespace JS::Bytecode {
|
namespace JS::Bytecode {
|
||||||
|
|
||||||
class BasicBlock;
|
class BasicBlock;
|
||||||
|
|
||||||
class Label {
|
class JS_API Label {
|
||||||
public:
|
public:
|
||||||
explicit Label(BasicBlock const&);
|
explicit Label(BasicBlock const&);
|
||||||
|
|
||||||
|
|
|
@ -34,7 +34,7 @@ class FunctionExpression;
|
||||||
|
|
||||||
namespace JS::Bytecode::Op {
|
namespace JS::Bytecode::Op {
|
||||||
|
|
||||||
class CreateRestParams final : public Instruction {
|
class JS_API CreateRestParams final : public Instruction {
|
||||||
public:
|
public:
|
||||||
CreateRestParams(Operand dst, u32 rest_index)
|
CreateRestParams(Operand dst, u32 rest_index)
|
||||||
: Instruction(Type::CreateRestParams)
|
: Instruction(Type::CreateRestParams)
|
||||||
|
@ -55,7 +55,7 @@ private:
|
||||||
u32 m_rest_index;
|
u32 m_rest_index;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CreateArguments final : public Instruction {
|
class JS_API CreateArguments final : public Instruction {
|
||||||
public:
|
public:
|
||||||
enum class Kind {
|
enum class Kind {
|
||||||
Mapped,
|
Mapped,
|
||||||
|
@ -84,7 +84,7 @@ private:
|
||||||
bool m_is_immutable { false };
|
bool m_is_immutable { false };
|
||||||
};
|
};
|
||||||
|
|
||||||
class Mov final : public Instruction {
|
class JS_API Mov final : public Instruction {
|
||||||
public:
|
public:
|
||||||
Mov(Operand dst, Operand src)
|
Mov(Operand dst, Operand src)
|
||||||
: Instruction(Type::Mov)
|
: Instruction(Type::Mov)
|
||||||
|
@ -135,7 +135,7 @@ private:
|
||||||
O(StrictlyEquals, strict_equals)
|
O(StrictlyEquals, strict_equals)
|
||||||
|
|
||||||
#define JS_DECLARE_COMMON_BINARY_OP(OpTitleCase, op_snake_case) \
|
#define JS_DECLARE_COMMON_BINARY_OP(OpTitleCase, op_snake_case) \
|
||||||
class OpTitleCase final : public Instruction { \
|
class JS_API OpTitleCase final : public Instruction { \
|
||||||
public: \
|
public: \
|
||||||
explicit OpTitleCase(Operand dst, Operand lhs, Operand rhs) \
|
explicit OpTitleCase(Operand dst, Operand lhs, Operand rhs) \
|
||||||
: Instruction(Type::OpTitleCase) \
|
: Instruction(Type::OpTitleCase) \
|
||||||
|
@ -176,7 +176,7 @@ JS_ENUMERATE_COMMON_BINARY_OPS_WITH_FAST_PATH(JS_DECLARE_COMMON_BINARY_OP)
|
||||||
O(Typeof, typeof_)
|
O(Typeof, typeof_)
|
||||||
|
|
||||||
#define JS_DECLARE_COMMON_UNARY_OP(OpTitleCase, op_snake_case) \
|
#define JS_DECLARE_COMMON_UNARY_OP(OpTitleCase, op_snake_case) \
|
||||||
class OpTitleCase final : public Instruction { \
|
class JS_API OpTitleCase final : public Instruction { \
|
||||||
public: \
|
public: \
|
||||||
OpTitleCase(Operand dst, Operand src) \
|
OpTitleCase(Operand dst, Operand src) \
|
||||||
: Instruction(Type::OpTitleCase) \
|
: Instruction(Type::OpTitleCase) \
|
||||||
|
@ -204,7 +204,7 @@ JS_ENUMERATE_COMMON_BINARY_OPS_WITH_FAST_PATH(JS_DECLARE_COMMON_BINARY_OP)
|
||||||
JS_ENUMERATE_COMMON_UNARY_OPS(JS_DECLARE_COMMON_UNARY_OP)
|
JS_ENUMERATE_COMMON_UNARY_OPS(JS_DECLARE_COMMON_UNARY_OP)
|
||||||
#undef JS_DECLARE_COMMON_UNARY_OP
|
#undef JS_DECLARE_COMMON_UNARY_OP
|
||||||
|
|
||||||
class NewObject final : public Instruction {
|
class JS_API NewObject final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit NewObject(Operand dst)
|
explicit NewObject(Operand dst)
|
||||||
: Instruction(Type::NewObject)
|
: Instruction(Type::NewObject)
|
||||||
|
@ -225,7 +225,7 @@ private:
|
||||||
Operand m_dst;
|
Operand m_dst;
|
||||||
};
|
};
|
||||||
|
|
||||||
class NewRegExp final : public Instruction {
|
class JS_API NewRegExp final : public Instruction {
|
||||||
public:
|
public:
|
||||||
NewRegExp(Operand dst, StringTableIndex source_index, StringTableIndex flags_index, RegexTableIndex regex_index)
|
NewRegExp(Operand dst, StringTableIndex source_index, StringTableIndex flags_index, RegexTableIndex regex_index)
|
||||||
: Instruction(Type::NewRegExp)
|
: Instruction(Type::NewRegExp)
|
||||||
|
@ -259,7 +259,7 @@ private:
|
||||||
O(TypeError)
|
O(TypeError)
|
||||||
|
|
||||||
#define JS_DECLARE_NEW_BUILTIN_ERROR_OP(ErrorName) \
|
#define JS_DECLARE_NEW_BUILTIN_ERROR_OP(ErrorName) \
|
||||||
class New##ErrorName final : public Instruction { \
|
class JS_API New##ErrorName final : public Instruction { \
|
||||||
public: \
|
public: \
|
||||||
New##ErrorName(Operand dst, StringTableIndex error_string) \
|
New##ErrorName(Operand dst, StringTableIndex error_string) \
|
||||||
: Instruction(Type::New##ErrorName) \
|
: Instruction(Type::New##ErrorName) \
|
||||||
|
@ -287,7 +287,7 @@ JS_ENUMERATE_NEW_BUILTIN_ERROR_OPS(JS_DECLARE_NEW_BUILTIN_ERROR_OP)
|
||||||
#undef JS_DECLARE_NEW_BUILTIN_ERROR_OP
|
#undef JS_DECLARE_NEW_BUILTIN_ERROR_OP
|
||||||
|
|
||||||
// NOTE: This instruction is variable-width depending on the number of excluded names
|
// NOTE: This instruction is variable-width depending on the number of excluded names
|
||||||
class CopyObjectExcludingProperties final : public Instruction {
|
class JS_API CopyObjectExcludingProperties final : public Instruction {
|
||||||
public:
|
public:
|
||||||
static constexpr bool IsVariableLength = true;
|
static constexpr bool IsVariableLength = true;
|
||||||
|
|
||||||
|
@ -330,7 +330,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
// NOTE: This instruction is variable-width depending on the number of elements!
|
// NOTE: This instruction is variable-width depending on the number of elements!
|
||||||
class NewArray final : public Instruction {
|
class JS_API NewArray final : public Instruction {
|
||||||
public:
|
public:
|
||||||
static constexpr bool IsVariableLength = true;
|
static constexpr bool IsVariableLength = true;
|
||||||
|
|
||||||
|
@ -375,7 +375,7 @@ private:
|
||||||
Operand m_elements[];
|
Operand m_elements[];
|
||||||
};
|
};
|
||||||
|
|
||||||
class NewPrimitiveArray final : public Instruction {
|
class JS_API NewPrimitiveArray final : public Instruction {
|
||||||
public:
|
public:
|
||||||
static constexpr bool IsVariableLength = true;
|
static constexpr bool IsVariableLength = true;
|
||||||
|
|
||||||
|
@ -410,7 +410,7 @@ private:
|
||||||
Value m_elements[];
|
Value m_elements[];
|
||||||
};
|
};
|
||||||
|
|
||||||
class AddPrivateName final : public Instruction {
|
class JS_API AddPrivateName final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit AddPrivateName(IdentifierTableIndex name)
|
explicit AddPrivateName(IdentifierTableIndex name)
|
||||||
: Instruction(Type::AddPrivateName)
|
: Instruction(Type::AddPrivateName)
|
||||||
|
@ -425,7 +425,7 @@ private:
|
||||||
IdentifierTableIndex m_name;
|
IdentifierTableIndex m_name;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ArrayAppend final : public Instruction {
|
class JS_API ArrayAppend final : public Instruction {
|
||||||
public:
|
public:
|
||||||
ArrayAppend(Operand dst, Operand src, bool is_spread)
|
ArrayAppend(Operand dst, Operand src, bool is_spread)
|
||||||
: Instruction(Type::ArrayAppend)
|
: Instruction(Type::ArrayAppend)
|
||||||
|
@ -453,7 +453,7 @@ private:
|
||||||
bool m_is_spread = false;
|
bool m_is_spread = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ImportCall final : public Instruction {
|
class JS_API ImportCall final : public Instruction {
|
||||||
public:
|
public:
|
||||||
ImportCall(Operand dst, Operand specifier, Operand options)
|
ImportCall(Operand dst, Operand specifier, Operand options)
|
||||||
: Instruction(Type::ImportCall)
|
: Instruction(Type::ImportCall)
|
||||||
|
@ -482,7 +482,7 @@ private:
|
||||||
Operand m_options;
|
Operand m_options;
|
||||||
};
|
};
|
||||||
|
|
||||||
class IteratorToArray final : public Instruction {
|
class JS_API IteratorToArray final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit IteratorToArray(Operand dst, Operand iterator)
|
explicit IteratorToArray(Operand dst, Operand iterator)
|
||||||
: Instruction(Type::IteratorToArray)
|
: Instruction(Type::IteratorToArray)
|
||||||
|
@ -508,7 +508,7 @@ private:
|
||||||
Operand m_iterator;
|
Operand m_iterator;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ConcatString final : public Instruction {
|
class JS_API ConcatString final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit ConcatString(Operand dst, Operand src)
|
explicit ConcatString(Operand dst, Operand src)
|
||||||
: Instruction(Type::ConcatString)
|
: Instruction(Type::ConcatString)
|
||||||
|
@ -544,7 +544,7 @@ enum class BindingInitializationMode {
|
||||||
Set,
|
Set,
|
||||||
};
|
};
|
||||||
|
|
||||||
class CreateLexicalEnvironment final : public Instruction {
|
class JS_API CreateLexicalEnvironment final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit CreateLexicalEnvironment(u32 capacity = 0)
|
explicit CreateLexicalEnvironment(u32 capacity = 0)
|
||||||
: Instruction(Type::CreateLexicalEnvironment)
|
: Instruction(Type::CreateLexicalEnvironment)
|
||||||
|
@ -559,7 +559,7 @@ private:
|
||||||
u32 m_capacity { 0 };
|
u32 m_capacity { 0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
class CreateVariableEnvironment final : public Instruction {
|
class JS_API CreateVariableEnvironment final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit CreateVariableEnvironment(u32 capacity = 0)
|
explicit CreateVariableEnvironment(u32 capacity = 0)
|
||||||
: Instruction(Type::CreateVariableEnvironment)
|
: Instruction(Type::CreateVariableEnvironment)
|
||||||
|
@ -574,7 +574,7 @@ private:
|
||||||
u32 m_capacity { 0 };
|
u32 m_capacity { 0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
class CreatePrivateEnvironment final : public Instruction {
|
class JS_API CreatePrivateEnvironment final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit CreatePrivateEnvironment()
|
explicit CreatePrivateEnvironment()
|
||||||
: Instruction(Type::CreatePrivateEnvironment)
|
: Instruction(Type::CreatePrivateEnvironment)
|
||||||
|
@ -585,7 +585,7 @@ public:
|
||||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class EnterObjectEnvironment final : public Instruction {
|
class JS_API EnterObjectEnvironment final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit EnterObjectEnvironment(Operand object)
|
explicit EnterObjectEnvironment(Operand object)
|
||||||
: Instruction(Type::EnterObjectEnvironment)
|
: Instruction(Type::EnterObjectEnvironment)
|
||||||
|
@ -607,7 +607,7 @@ private:
|
||||||
Operand m_object;
|
Operand m_object;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Catch final : public Instruction {
|
class JS_API Catch final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit Catch(Operand dst)
|
explicit Catch(Operand dst)
|
||||||
: Instruction(Type::Catch)
|
: Instruction(Type::Catch)
|
||||||
|
@ -629,7 +629,7 @@ private:
|
||||||
Operand m_dst;
|
Operand m_dst;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LeaveFinally final : public Instruction {
|
class JS_API LeaveFinally final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit LeaveFinally()
|
explicit LeaveFinally()
|
||||||
: Instruction(Type::LeaveFinally)
|
: Instruction(Type::LeaveFinally)
|
||||||
|
@ -640,7 +640,7 @@ public:
|
||||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class RestoreScheduledJump final : public Instruction {
|
class JS_API RestoreScheduledJump final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit RestoreScheduledJump()
|
explicit RestoreScheduledJump()
|
||||||
: Instruction(Type::RestoreScheduledJump)
|
: Instruction(Type::RestoreScheduledJump)
|
||||||
|
@ -651,7 +651,7 @@ public:
|
||||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class CreateVariable final : public Instruction {
|
class JS_API CreateVariable final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit CreateVariable(IdentifierTableIndex identifier, EnvironmentMode mode, bool is_immutable, bool is_global = false, bool is_strict = false)
|
explicit CreateVariable(IdentifierTableIndex identifier, EnvironmentMode mode, bool is_immutable, bool is_global = false, bool is_strict = false)
|
||||||
: Instruction(Type::CreateVariable)
|
: Instruction(Type::CreateVariable)
|
||||||
|
@ -680,7 +680,7 @@ private:
|
||||||
bool m_is_strict { false };
|
bool m_is_strict { false };
|
||||||
};
|
};
|
||||||
|
|
||||||
class InitializeLexicalBinding final : public Instruction {
|
class JS_API InitializeLexicalBinding final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit InitializeLexicalBinding(IdentifierTableIndex identifier, Operand src)
|
explicit InitializeLexicalBinding(IdentifierTableIndex identifier, Operand src)
|
||||||
: Instruction(Type::InitializeLexicalBinding)
|
: Instruction(Type::InitializeLexicalBinding)
|
||||||
|
@ -705,7 +705,7 @@ private:
|
||||||
mutable EnvironmentCoordinate m_cache;
|
mutable EnvironmentCoordinate m_cache;
|
||||||
};
|
};
|
||||||
|
|
||||||
class InitializeVariableBinding final : public Instruction {
|
class JS_API InitializeVariableBinding final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit InitializeVariableBinding(IdentifierTableIndex identifier, Operand src)
|
explicit InitializeVariableBinding(IdentifierTableIndex identifier, Operand src)
|
||||||
: Instruction(Type::InitializeVariableBinding)
|
: Instruction(Type::InitializeVariableBinding)
|
||||||
|
@ -730,7 +730,7 @@ private:
|
||||||
mutable EnvironmentCoordinate m_cache;
|
mutable EnvironmentCoordinate m_cache;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SetLexicalBinding final : public Instruction {
|
class JS_API SetLexicalBinding final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit SetLexicalBinding(IdentifierTableIndex identifier, Operand src)
|
explicit SetLexicalBinding(IdentifierTableIndex identifier, Operand src)
|
||||||
: Instruction(Type::SetLexicalBinding)
|
: Instruction(Type::SetLexicalBinding)
|
||||||
|
@ -755,7 +755,7 @@ private:
|
||||||
mutable EnvironmentCoordinate m_cache;
|
mutable EnvironmentCoordinate m_cache;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SetVariableBinding final : public Instruction {
|
class JS_API SetVariableBinding final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit SetVariableBinding(IdentifierTableIndex identifier, Operand src)
|
explicit SetVariableBinding(IdentifierTableIndex identifier, Operand src)
|
||||||
: Instruction(Type::SetVariableBinding)
|
: Instruction(Type::SetVariableBinding)
|
||||||
|
@ -780,7 +780,7 @@ private:
|
||||||
mutable EnvironmentCoordinate m_cache;
|
mutable EnvironmentCoordinate m_cache;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GetCalleeAndThisFromEnvironment final : public Instruction {
|
class JS_API GetCalleeAndThisFromEnvironment final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit GetCalleeAndThisFromEnvironment(Operand callee, Operand this_value, IdentifierTableIndex identifier)
|
explicit GetCalleeAndThisFromEnvironment(Operand callee, Operand this_value, IdentifierTableIndex identifier)
|
||||||
: Instruction(Type::GetCalleeAndThisFromEnvironment)
|
: Instruction(Type::GetCalleeAndThisFromEnvironment)
|
||||||
|
@ -809,7 +809,7 @@ private:
|
||||||
mutable EnvironmentCoordinate m_cache;
|
mutable EnvironmentCoordinate m_cache;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GetBinding final : public Instruction {
|
class JS_API GetBinding final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit GetBinding(Operand dst, IdentifierTableIndex identifier)
|
explicit GetBinding(Operand dst, IdentifierTableIndex identifier)
|
||||||
: Instruction(Type::GetBinding)
|
: Instruction(Type::GetBinding)
|
||||||
|
@ -835,7 +835,7 @@ private:
|
||||||
mutable EnvironmentCoordinate m_cache;
|
mutable EnvironmentCoordinate m_cache;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GetInitializedBinding final : public Instruction {
|
class JS_API GetInitializedBinding final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit GetInitializedBinding(Operand dst, IdentifierTableIndex identifier)
|
explicit GetInitializedBinding(Operand dst, IdentifierTableIndex identifier)
|
||||||
: Instruction(Type::GetInitializedBinding)
|
: Instruction(Type::GetInitializedBinding)
|
||||||
|
@ -861,7 +861,7 @@ private:
|
||||||
mutable EnvironmentCoordinate m_cache;
|
mutable EnvironmentCoordinate m_cache;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GetGlobal final : public Instruction {
|
class JS_API GetGlobal final : public Instruction {
|
||||||
public:
|
public:
|
||||||
GetGlobal(Operand dst, IdentifierTableIndex identifier, u32 cache_index)
|
GetGlobal(Operand dst, IdentifierTableIndex identifier, u32 cache_index)
|
||||||
: Instruction(Type::GetGlobal)
|
: Instruction(Type::GetGlobal)
|
||||||
|
@ -889,7 +889,7 @@ private:
|
||||||
u32 m_cache_index { 0 };
|
u32 m_cache_index { 0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
class SetGlobal final : public Instruction {
|
class JS_API SetGlobal final : public Instruction {
|
||||||
public:
|
public:
|
||||||
SetGlobal(IdentifierTableIndex identifier, Operand src, u32 cache_index)
|
SetGlobal(IdentifierTableIndex identifier, Operand src, u32 cache_index)
|
||||||
: Instruction(Type::SetGlobal)
|
: Instruction(Type::SetGlobal)
|
||||||
|
@ -917,7 +917,7 @@ private:
|
||||||
u32 m_cache_index { 0 };
|
u32 m_cache_index { 0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
class DeleteVariable final : public Instruction {
|
class JS_API DeleteVariable final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit DeleteVariable(Operand dst, IdentifierTableIndex identifier)
|
explicit DeleteVariable(Operand dst, IdentifierTableIndex identifier)
|
||||||
: Instruction(Type::DeleteVariable)
|
: Instruction(Type::DeleteVariable)
|
||||||
|
@ -942,7 +942,7 @@ private:
|
||||||
IdentifierTableIndex m_identifier;
|
IdentifierTableIndex m_identifier;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GetById final : public Instruction {
|
class JS_API GetById final : public Instruction {
|
||||||
public:
|
public:
|
||||||
GetById(Operand dst, Operand base, IdentifierTableIndex property, Optional<IdentifierTableIndex> base_identifier, u32 cache_index)
|
GetById(Operand dst, Operand base, IdentifierTableIndex property, Optional<IdentifierTableIndex> base_identifier, u32 cache_index)
|
||||||
: Instruction(Type::GetById)
|
: Instruction(Type::GetById)
|
||||||
|
@ -975,7 +975,7 @@ private:
|
||||||
u32 m_cache_index { 0 };
|
u32 m_cache_index { 0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
class GetCompletionFields final : public Instruction {
|
class JS_API GetCompletionFields final : public Instruction {
|
||||||
public:
|
public:
|
||||||
GetCompletionFields(Operand type_dst, Operand value_dst, Operand completion)
|
GetCompletionFields(Operand type_dst, Operand value_dst, Operand completion)
|
||||||
: Instruction(Type::GetCompletionFields)
|
: Instruction(Type::GetCompletionFields)
|
||||||
|
@ -1004,7 +1004,7 @@ private:
|
||||||
Operand m_completion;
|
Operand m_completion;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SetCompletionType final : public Instruction {
|
class JS_API SetCompletionType final : public Instruction {
|
||||||
public:
|
public:
|
||||||
SetCompletionType(Operand completion, Completion::Type type)
|
SetCompletionType(Operand completion, Completion::Type type)
|
||||||
: Instruction(Type::SetCompletionType)
|
: Instruction(Type::SetCompletionType)
|
||||||
|
@ -1027,7 +1027,7 @@ private:
|
||||||
Completion::Type m_type;
|
Completion::Type m_type;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GetByIdWithThis final : public Instruction {
|
class JS_API GetByIdWithThis final : public Instruction {
|
||||||
public:
|
public:
|
||||||
GetByIdWithThis(Operand dst, Operand base, IdentifierTableIndex property, Operand this_value, u32 cache_index)
|
GetByIdWithThis(Operand dst, Operand base, IdentifierTableIndex property, Operand this_value, u32 cache_index)
|
||||||
: Instruction(Type::GetByIdWithThis)
|
: Instruction(Type::GetByIdWithThis)
|
||||||
|
@ -1062,7 +1062,7 @@ private:
|
||||||
u32 m_cache_index { 0 };
|
u32 m_cache_index { 0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
class GetLength final : public Instruction {
|
class JS_API GetLength final : public Instruction {
|
||||||
public:
|
public:
|
||||||
GetLength(Operand dst, Operand base, Optional<IdentifierTableIndex> base_identifier, u32 cache_index)
|
GetLength(Operand dst, Operand base, Optional<IdentifierTableIndex> base_identifier, u32 cache_index)
|
||||||
: Instruction(Type::GetLength)
|
: Instruction(Type::GetLength)
|
||||||
|
@ -1092,7 +1092,7 @@ private:
|
||||||
u32 m_cache_index { 0 };
|
u32 m_cache_index { 0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
class GetLengthWithThis final : public Instruction {
|
class JS_API GetLengthWithThis final : public Instruction {
|
||||||
public:
|
public:
|
||||||
GetLengthWithThis(Operand dst, Operand base, Operand this_value, u32 cache_index)
|
GetLengthWithThis(Operand dst, Operand base, Operand this_value, u32 cache_index)
|
||||||
: Instruction(Type::GetLengthWithThis)
|
: Instruction(Type::GetLengthWithThis)
|
||||||
|
@ -1124,7 +1124,7 @@ private:
|
||||||
u32 m_cache_index { 0 };
|
u32 m_cache_index { 0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
class GetPrivateById final : public Instruction {
|
class JS_API GetPrivateById final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit GetPrivateById(Operand dst, Operand base, IdentifierTableIndex property)
|
explicit GetPrivateById(Operand dst, Operand base, IdentifierTableIndex property)
|
||||||
: Instruction(Type::GetPrivateById)
|
: Instruction(Type::GetPrivateById)
|
||||||
|
@ -1152,7 +1152,7 @@ private:
|
||||||
IdentifierTableIndex m_property;
|
IdentifierTableIndex m_property;
|
||||||
};
|
};
|
||||||
|
|
||||||
class HasPrivateId final : public Instruction {
|
class JS_API HasPrivateId final : public Instruction {
|
||||||
public:
|
public:
|
||||||
HasPrivateId(Operand dst, Operand base, IdentifierTableIndex property)
|
HasPrivateId(Operand dst, Operand base, IdentifierTableIndex property)
|
||||||
: Instruction(Type::HasPrivateId)
|
: Instruction(Type::HasPrivateId)
|
||||||
|
@ -1188,7 +1188,7 @@ enum class PropertyKind {
|
||||||
ProtoSetter,
|
ProtoSetter,
|
||||||
};
|
};
|
||||||
|
|
||||||
class PutBySpread final : public Instruction {
|
class JS_API PutBySpread final : public Instruction {
|
||||||
public:
|
public:
|
||||||
PutBySpread(Operand base, Operand src)
|
PutBySpread(Operand base, Operand src)
|
||||||
: Instruction(Type::PutBySpread)
|
: Instruction(Type::PutBySpread)
|
||||||
|
@ -1213,7 +1213,7 @@ private:
|
||||||
Operand m_src;
|
Operand m_src;
|
||||||
};
|
};
|
||||||
|
|
||||||
class PutById final : public Instruction {
|
class JS_API PutById final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit PutById(Operand base, IdentifierTableIndex property, Operand src, PropertyKind kind, u32 cache_index, Optional<IdentifierTableIndex> base_identifier = {})
|
explicit PutById(Operand base, IdentifierTableIndex property, Operand src, PropertyKind kind, u32 cache_index, Optional<IdentifierTableIndex> base_identifier = {})
|
||||||
: Instruction(Type::PutById)
|
: Instruction(Type::PutById)
|
||||||
|
@ -1249,7 +1249,7 @@ private:
|
||||||
Optional<IdentifierTableIndex> m_base_identifier {};
|
Optional<IdentifierTableIndex> m_base_identifier {};
|
||||||
};
|
};
|
||||||
|
|
||||||
class PutByIdWithThis final : public Instruction {
|
class JS_API PutByIdWithThis final : public Instruction {
|
||||||
public:
|
public:
|
||||||
PutByIdWithThis(Operand base, Operand this_value, IdentifierTableIndex property, Operand src, PropertyKind kind, u32 cache_index)
|
PutByIdWithThis(Operand base, Operand this_value, IdentifierTableIndex property, Operand src, PropertyKind kind, u32 cache_index)
|
||||||
: Instruction(Type::PutByIdWithThis)
|
: Instruction(Type::PutByIdWithThis)
|
||||||
|
@ -1287,7 +1287,7 @@ private:
|
||||||
u32 m_cache_index { 0 };
|
u32 m_cache_index { 0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
class PutPrivateById final : public Instruction {
|
class JS_API PutPrivateById final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit PutPrivateById(Operand base, IdentifierTableIndex property, Operand src, PropertyKind kind = PropertyKind::KeyValue)
|
explicit PutPrivateById(Operand base, IdentifierTableIndex property, Operand src, PropertyKind kind = PropertyKind::KeyValue)
|
||||||
: Instruction(Type::PutPrivateById)
|
: Instruction(Type::PutPrivateById)
|
||||||
|
@ -1317,7 +1317,7 @@ private:
|
||||||
PropertyKind m_kind;
|
PropertyKind m_kind;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DeleteById final : public Instruction {
|
class JS_API DeleteById final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit DeleteById(Operand dst, Operand base, IdentifierTableIndex property)
|
explicit DeleteById(Operand dst, Operand base, IdentifierTableIndex property)
|
||||||
: Instruction(Type::DeleteById)
|
: Instruction(Type::DeleteById)
|
||||||
|
@ -1345,7 +1345,7 @@ private:
|
||||||
IdentifierTableIndex m_property;
|
IdentifierTableIndex m_property;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DeleteByIdWithThis final : public Instruction {
|
class JS_API DeleteByIdWithThis final : public Instruction {
|
||||||
public:
|
public:
|
||||||
DeleteByIdWithThis(Operand dst, Operand base, Operand this_value, IdentifierTableIndex property)
|
DeleteByIdWithThis(Operand dst, Operand base, Operand this_value, IdentifierTableIndex property)
|
||||||
: Instruction(Type::DeleteByIdWithThis)
|
: Instruction(Type::DeleteByIdWithThis)
|
||||||
|
@ -1377,7 +1377,7 @@ private:
|
||||||
IdentifierTableIndex m_property;
|
IdentifierTableIndex m_property;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GetByValue final : public Instruction {
|
class JS_API GetByValue final : public Instruction {
|
||||||
public:
|
public:
|
||||||
GetByValue(Operand dst, Operand base, Operand property, Optional<IdentifierTableIndex> base_identifier = {})
|
GetByValue(Operand dst, Operand base, Operand property, Optional<IdentifierTableIndex> base_identifier = {})
|
||||||
: Instruction(Type::GetByValue)
|
: Instruction(Type::GetByValue)
|
||||||
|
@ -1408,7 +1408,7 @@ private:
|
||||||
Optional<IdentifierTableIndex> m_base_identifier;
|
Optional<IdentifierTableIndex> m_base_identifier;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GetByValueWithThis final : public Instruction {
|
class JS_API GetByValueWithThis final : public Instruction {
|
||||||
public:
|
public:
|
||||||
GetByValueWithThis(Operand dst, Operand base, Operand property, Operand this_value)
|
GetByValueWithThis(Operand dst, Operand base, Operand property, Operand this_value)
|
||||||
: Instruction(Type::GetByValueWithThis)
|
: Instruction(Type::GetByValueWithThis)
|
||||||
|
@ -1441,7 +1441,7 @@ private:
|
||||||
Operand m_this_value;
|
Operand m_this_value;
|
||||||
};
|
};
|
||||||
|
|
||||||
class PutByValue final : public Instruction {
|
class JS_API PutByValue final : public Instruction {
|
||||||
public:
|
public:
|
||||||
PutByValue(Operand base, Operand property, Operand src, PropertyKind kind = PropertyKind::KeyValue, Optional<IdentifierTableIndex> base_identifier = {})
|
PutByValue(Operand base, Operand property, Operand src, PropertyKind kind = PropertyKind::KeyValue, Optional<IdentifierTableIndex> base_identifier = {})
|
||||||
: Instruction(Type::PutByValue)
|
: Instruction(Type::PutByValue)
|
||||||
|
@ -1475,7 +1475,7 @@ private:
|
||||||
Optional<IdentifierTableIndex> m_base_identifier;
|
Optional<IdentifierTableIndex> m_base_identifier;
|
||||||
};
|
};
|
||||||
|
|
||||||
class PutByValueWithThis final : public Instruction {
|
class JS_API PutByValueWithThis final : public Instruction {
|
||||||
public:
|
public:
|
||||||
PutByValueWithThis(Operand base, Operand property, Operand this_value, Operand src, PropertyKind kind = PropertyKind::KeyValue)
|
PutByValueWithThis(Operand base, Operand property, Operand this_value, Operand src, PropertyKind kind = PropertyKind::KeyValue)
|
||||||
: Instruction(Type::PutByValueWithThis)
|
: Instruction(Type::PutByValueWithThis)
|
||||||
|
@ -1511,7 +1511,7 @@ private:
|
||||||
PropertyKind m_kind;
|
PropertyKind m_kind;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DeleteByValue final : public Instruction {
|
class JS_API DeleteByValue final : public Instruction {
|
||||||
public:
|
public:
|
||||||
DeleteByValue(Operand dst, Operand base, Operand property)
|
DeleteByValue(Operand dst, Operand base, Operand property)
|
||||||
: Instruction(Type::DeleteByValue)
|
: Instruction(Type::DeleteByValue)
|
||||||
|
@ -1540,7 +1540,7 @@ private:
|
||||||
Operand m_property;
|
Operand m_property;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DeleteByValueWithThis final : public Instruction {
|
class JS_API DeleteByValueWithThis final : public Instruction {
|
||||||
public:
|
public:
|
||||||
DeleteByValueWithThis(Operand dst, Operand base, Operand this_value, Operand property)
|
DeleteByValueWithThis(Operand dst, Operand base, Operand this_value, Operand property)
|
||||||
: Instruction(Type::DeleteByValueWithThis)
|
: Instruction(Type::DeleteByValueWithThis)
|
||||||
|
@ -1573,7 +1573,7 @@ private:
|
||||||
Operand m_property;
|
Operand m_property;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Jump final : public Instruction {
|
class JS_API Jump final : public Instruction {
|
||||||
public:
|
public:
|
||||||
constexpr static bool IsTerminator = true;
|
constexpr static bool IsTerminator = true;
|
||||||
|
|
||||||
|
@ -1595,7 +1595,7 @@ protected:
|
||||||
Label m_target;
|
Label m_target;
|
||||||
};
|
};
|
||||||
|
|
||||||
class JumpIf final : public Instruction {
|
class JS_API JumpIf final : public Instruction {
|
||||||
public:
|
public:
|
||||||
constexpr static bool IsTerminator = true;
|
constexpr static bool IsTerminator = true;
|
||||||
|
|
||||||
|
@ -1628,7 +1628,7 @@ private:
|
||||||
Label m_false_target;
|
Label m_false_target;
|
||||||
};
|
};
|
||||||
|
|
||||||
class JumpTrue final : public Instruction {
|
class JS_API JumpTrue final : public Instruction {
|
||||||
public:
|
public:
|
||||||
constexpr static bool IsTerminator = true;
|
constexpr static bool IsTerminator = true;
|
||||||
|
|
||||||
|
@ -1657,7 +1657,7 @@ private:
|
||||||
Label m_target;
|
Label m_target;
|
||||||
};
|
};
|
||||||
|
|
||||||
class JumpFalse final : public Instruction {
|
class JS_API JumpFalse final : public Instruction {
|
||||||
public:
|
public:
|
||||||
constexpr static bool IsTerminator = true;
|
constexpr static bool IsTerminator = true;
|
||||||
|
|
||||||
|
@ -1697,7 +1697,7 @@ private:
|
||||||
X(StrictlyInequals, strict_inequals, !=)
|
X(StrictlyInequals, strict_inequals, !=)
|
||||||
|
|
||||||
#define DECLARE_COMPARISON_OP(op_TitleCase, op_snake_case, numeric_operator) \
|
#define DECLARE_COMPARISON_OP(op_TitleCase, op_snake_case, numeric_operator) \
|
||||||
class Jump##op_TitleCase final : public Instruction { \
|
class JS_API Jump##op_TitleCase final : public Instruction { \
|
||||||
public: \
|
public: \
|
||||||
constexpr static bool IsTerminator = true; \
|
constexpr static bool IsTerminator = true; \
|
||||||
\
|
\
|
||||||
|
@ -1737,7 +1737,7 @@ private:
|
||||||
|
|
||||||
JS_ENUMERATE_COMPARISON_OPS(DECLARE_COMPARISON_OP)
|
JS_ENUMERATE_COMPARISON_OPS(DECLARE_COMPARISON_OP)
|
||||||
|
|
||||||
class JumpNullish final : public Instruction {
|
class JS_API JumpNullish final : public Instruction {
|
||||||
public:
|
public:
|
||||||
constexpr static bool IsTerminator = true;
|
constexpr static bool IsTerminator = true;
|
||||||
|
|
||||||
|
@ -1770,7 +1770,7 @@ private:
|
||||||
Label m_false_target;
|
Label m_false_target;
|
||||||
};
|
};
|
||||||
|
|
||||||
class JumpUndefined final : public Instruction {
|
class JS_API JumpUndefined final : public Instruction {
|
||||||
public:
|
public:
|
||||||
constexpr static bool IsTerminator = true;
|
constexpr static bool IsTerminator = true;
|
||||||
|
|
||||||
|
@ -1809,7 +1809,7 @@ enum class CallType : u8 {
|
||||||
DirectEval,
|
DirectEval,
|
||||||
};
|
};
|
||||||
|
|
||||||
class Call final : public Instruction {
|
class JS_API Call final : public Instruction {
|
||||||
public:
|
public:
|
||||||
static constexpr bool IsVariableLength = true;
|
static constexpr bool IsVariableLength = true;
|
||||||
|
|
||||||
|
@ -1858,7 +1858,7 @@ private:
|
||||||
Operand m_arguments[];
|
Operand m_arguments[];
|
||||||
};
|
};
|
||||||
|
|
||||||
class CallBuiltin final : public Instruction {
|
class JS_API CallBuiltin final : public Instruction {
|
||||||
public:
|
public:
|
||||||
static constexpr bool IsVariableLength = true;
|
static constexpr bool IsVariableLength = true;
|
||||||
|
|
||||||
|
@ -1911,7 +1911,7 @@ private:
|
||||||
Operand m_arguments[];
|
Operand m_arguments[];
|
||||||
};
|
};
|
||||||
|
|
||||||
class CallConstruct final : public Instruction {
|
class JS_API CallConstruct final : public Instruction {
|
||||||
public:
|
public:
|
||||||
static constexpr bool IsVariableLength = true;
|
static constexpr bool IsVariableLength = true;
|
||||||
|
|
||||||
|
@ -1956,7 +1956,7 @@ private:
|
||||||
Operand m_arguments[];
|
Operand m_arguments[];
|
||||||
};
|
};
|
||||||
|
|
||||||
class CallDirectEval final : public Instruction {
|
class JS_API CallDirectEval final : public Instruction {
|
||||||
public:
|
public:
|
||||||
static constexpr bool IsVariableLength = true;
|
static constexpr bool IsVariableLength = true;
|
||||||
|
|
||||||
|
@ -2005,7 +2005,7 @@ private:
|
||||||
Operand m_arguments[];
|
Operand m_arguments[];
|
||||||
};
|
};
|
||||||
|
|
||||||
class CallWithArgumentArray final : public Instruction {
|
class JS_API CallWithArgumentArray final : public Instruction {
|
||||||
public:
|
public:
|
||||||
CallWithArgumentArray(CallType type, Operand dst, Operand callee, Operand this_value, Operand arguments, Optional<StringTableIndex> expression_string = {})
|
CallWithArgumentArray(CallType type, Operand dst, Operand callee, Operand this_value, Operand arguments, Optional<StringTableIndex> expression_string = {})
|
||||||
: Instruction(Type::CallWithArgumentArray)
|
: Instruction(Type::CallWithArgumentArray)
|
||||||
|
@ -2044,7 +2044,7 @@ private:
|
||||||
Optional<StringTableIndex> m_expression_string;
|
Optional<StringTableIndex> m_expression_string;
|
||||||
};
|
};
|
||||||
|
|
||||||
class SuperCallWithArgumentArray : public Instruction {
|
class JS_API SuperCallWithArgumentArray : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit SuperCallWithArgumentArray(Operand dst, Operand arguments, bool is_synthetic)
|
explicit SuperCallWithArgumentArray(Operand dst, Operand arguments, bool is_synthetic)
|
||||||
: Instruction(Type::SuperCallWithArgumentArray)
|
: Instruction(Type::SuperCallWithArgumentArray)
|
||||||
|
@ -2072,7 +2072,7 @@ private:
|
||||||
bool m_is_synthetic;
|
bool m_is_synthetic;
|
||||||
};
|
};
|
||||||
|
|
||||||
class NewClass final : public Instruction {
|
class JS_API NewClass final : public Instruction {
|
||||||
public:
|
public:
|
||||||
static constexpr bool IsVariableLength = true;
|
static constexpr bool IsVariableLength = true;
|
||||||
|
|
||||||
|
@ -2123,7 +2123,7 @@ private:
|
||||||
Optional<Operand> m_element_keys[];
|
Optional<Operand> m_element_keys[];
|
||||||
};
|
};
|
||||||
|
|
||||||
class NewFunction final : public Instruction {
|
class JS_API NewFunction final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit NewFunction(Operand dst, FunctionNode const& function_node, Optional<IdentifierTableIndex> lhs_name, Optional<Operand> home_object = {})
|
explicit NewFunction(Operand dst, FunctionNode const& function_node, Optional<IdentifierTableIndex> lhs_name, Optional<Operand> home_object = {})
|
||||||
: Instruction(Type::NewFunction)
|
: Instruction(Type::NewFunction)
|
||||||
|
@ -2155,7 +2155,7 @@ private:
|
||||||
Optional<Operand> m_home_object;
|
Optional<Operand> m_home_object;
|
||||||
};
|
};
|
||||||
|
|
||||||
class BlockDeclarationInstantiation final : public Instruction {
|
class JS_API BlockDeclarationInstantiation final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit BlockDeclarationInstantiation(ScopeNode const& scope_node)
|
explicit BlockDeclarationInstantiation(ScopeNode const& scope_node)
|
||||||
: Instruction(Type::BlockDeclarationInstantiation)
|
: Instruction(Type::BlockDeclarationInstantiation)
|
||||||
|
@ -2172,7 +2172,7 @@ private:
|
||||||
ScopeNode const& m_scope_node;
|
ScopeNode const& m_scope_node;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Return final : public Instruction {
|
class JS_API Return final : public Instruction {
|
||||||
public:
|
public:
|
||||||
constexpr static bool IsTerminator = true;
|
constexpr static bool IsTerminator = true;
|
||||||
|
|
||||||
|
@ -2195,7 +2195,7 @@ private:
|
||||||
Operand m_value;
|
Operand m_value;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Increment final : public Instruction {
|
class JS_API Increment final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit Increment(Operand dst)
|
explicit Increment(Operand dst)
|
||||||
: Instruction(Type::Increment)
|
: Instruction(Type::Increment)
|
||||||
|
@ -2216,7 +2216,7 @@ private:
|
||||||
Operand m_dst;
|
Operand m_dst;
|
||||||
};
|
};
|
||||||
|
|
||||||
class PostfixIncrement final : public Instruction {
|
class JS_API PostfixIncrement final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit PostfixIncrement(Operand dst, Operand src)
|
explicit PostfixIncrement(Operand dst, Operand src)
|
||||||
: Instruction(Type::PostfixIncrement)
|
: Instruction(Type::PostfixIncrement)
|
||||||
|
@ -2241,7 +2241,7 @@ private:
|
||||||
Operand m_src;
|
Operand m_src;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Decrement final : public Instruction {
|
class JS_API Decrement final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit Decrement(Operand dst)
|
explicit Decrement(Operand dst)
|
||||||
: Instruction(Type::Decrement)
|
: Instruction(Type::Decrement)
|
||||||
|
@ -2262,7 +2262,7 @@ private:
|
||||||
Operand m_dst;
|
Operand m_dst;
|
||||||
};
|
};
|
||||||
|
|
||||||
class PostfixDecrement final : public Instruction {
|
class JS_API PostfixDecrement final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit PostfixDecrement(Operand dst, Operand src)
|
explicit PostfixDecrement(Operand dst, Operand src)
|
||||||
: Instruction(Type::PostfixDecrement)
|
: Instruction(Type::PostfixDecrement)
|
||||||
|
@ -2287,7 +2287,7 @@ private:
|
||||||
Operand m_src;
|
Operand m_src;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Throw final : public Instruction {
|
class JS_API Throw final : public Instruction {
|
||||||
public:
|
public:
|
||||||
constexpr static bool IsTerminator = true;
|
constexpr static bool IsTerminator = true;
|
||||||
|
|
||||||
|
@ -2310,7 +2310,7 @@ private:
|
||||||
Operand m_src;
|
Operand m_src;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ThrowIfNotObject final : public Instruction {
|
class JS_API ThrowIfNotObject final : public Instruction {
|
||||||
public:
|
public:
|
||||||
ThrowIfNotObject(Operand src)
|
ThrowIfNotObject(Operand src)
|
||||||
: Instruction(Type::ThrowIfNotObject)
|
: Instruction(Type::ThrowIfNotObject)
|
||||||
|
@ -2331,7 +2331,7 @@ private:
|
||||||
Operand m_src;
|
Operand m_src;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ThrowIfNullish final : public Instruction {
|
class JS_API ThrowIfNullish final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit ThrowIfNullish(Operand src)
|
explicit ThrowIfNullish(Operand src)
|
||||||
: Instruction(Type::ThrowIfNullish)
|
: Instruction(Type::ThrowIfNullish)
|
||||||
|
@ -2352,7 +2352,7 @@ private:
|
||||||
Operand m_src;
|
Operand m_src;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ThrowIfTDZ final : public Instruction {
|
class JS_API ThrowIfTDZ final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit ThrowIfTDZ(Operand src)
|
explicit ThrowIfTDZ(Operand src)
|
||||||
: Instruction(Type::ThrowIfTDZ)
|
: Instruction(Type::ThrowIfTDZ)
|
||||||
|
@ -2373,7 +2373,7 @@ private:
|
||||||
Operand m_src;
|
Operand m_src;
|
||||||
};
|
};
|
||||||
|
|
||||||
class EnterUnwindContext final : public Instruction {
|
class JS_API EnterUnwindContext final : public Instruction {
|
||||||
public:
|
public:
|
||||||
constexpr static bool IsTerminator = true;
|
constexpr static bool IsTerminator = true;
|
||||||
|
|
||||||
|
@ -2395,7 +2395,7 @@ private:
|
||||||
Label m_entry_point;
|
Label m_entry_point;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ScheduleJump final : public Instruction {
|
class JS_API ScheduleJump final : public Instruction {
|
||||||
public:
|
public:
|
||||||
// Note: We use this instruction to tell the next `finally` block to
|
// Note: We use this instruction to tell the next `finally` block to
|
||||||
// continue execution with a specific break/continue target;
|
// continue execution with a specific break/continue target;
|
||||||
|
@ -2419,7 +2419,7 @@ private:
|
||||||
Label m_target;
|
Label m_target;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LeaveLexicalEnvironment final : public Instruction {
|
class JS_API LeaveLexicalEnvironment final : public Instruction {
|
||||||
public:
|
public:
|
||||||
LeaveLexicalEnvironment()
|
LeaveLexicalEnvironment()
|
||||||
: Instruction(Type::LeaveLexicalEnvironment)
|
: Instruction(Type::LeaveLexicalEnvironment)
|
||||||
|
@ -2430,7 +2430,7 @@ public:
|
||||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LeavePrivateEnvironment final : public Instruction {
|
class JS_API LeavePrivateEnvironment final : public Instruction {
|
||||||
public:
|
public:
|
||||||
LeavePrivateEnvironment()
|
LeavePrivateEnvironment()
|
||||||
: Instruction(Type::LeavePrivateEnvironment)
|
: Instruction(Type::LeavePrivateEnvironment)
|
||||||
|
@ -2441,7 +2441,7 @@ public:
|
||||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class LeaveUnwindContext final : public Instruction {
|
class JS_API LeaveUnwindContext final : public Instruction {
|
||||||
public:
|
public:
|
||||||
LeaveUnwindContext()
|
LeaveUnwindContext()
|
||||||
: Instruction(Type::LeaveUnwindContext)
|
: Instruction(Type::LeaveUnwindContext)
|
||||||
|
@ -2452,7 +2452,7 @@ public:
|
||||||
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
ByteString to_byte_string_impl(Bytecode::Executable const&) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ContinuePendingUnwind final : public Instruction {
|
class JS_API ContinuePendingUnwind final : public Instruction {
|
||||||
public:
|
public:
|
||||||
constexpr static bool IsTerminator = true;
|
constexpr static bool IsTerminator = true;
|
||||||
|
|
||||||
|
@ -2474,7 +2474,7 @@ private:
|
||||||
Label m_resume_target;
|
Label m_resume_target;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Yield final : public Instruction {
|
class JS_API Yield final : public Instruction {
|
||||||
public:
|
public:
|
||||||
constexpr static bool IsTerminator = true;
|
constexpr static bool IsTerminator = true;
|
||||||
|
|
||||||
|
@ -2511,7 +2511,7 @@ private:
|
||||||
Operand m_value;
|
Operand m_value;
|
||||||
};
|
};
|
||||||
|
|
||||||
class PrepareYield final : public Instruction {
|
class JS_API PrepareYield final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit PrepareYield(Operand dest, Operand value)
|
explicit PrepareYield(Operand dest, Operand value)
|
||||||
: Instruction(Type::PrepareYield)
|
: Instruction(Type::PrepareYield)
|
||||||
|
@ -2536,7 +2536,7 @@ private:
|
||||||
Operand m_value;
|
Operand m_value;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Await final : public Instruction {
|
class JS_API Await final : public Instruction {
|
||||||
public:
|
public:
|
||||||
constexpr static bool IsTerminator = true;
|
constexpr static bool IsTerminator = true;
|
||||||
|
|
||||||
|
@ -2566,7 +2566,7 @@ private:
|
||||||
Operand m_argument;
|
Operand m_argument;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GetIterator final : public Instruction {
|
class JS_API GetIterator final : public Instruction {
|
||||||
public:
|
public:
|
||||||
GetIterator(Operand dst, Operand iterable, IteratorHint hint = IteratorHint::Sync)
|
GetIterator(Operand dst, Operand iterable, IteratorHint hint = IteratorHint::Sync)
|
||||||
: Instruction(Type::GetIterator)
|
: Instruction(Type::GetIterator)
|
||||||
|
@ -2594,7 +2594,7 @@ private:
|
||||||
IteratorHint m_hint { IteratorHint::Sync };
|
IteratorHint m_hint { IteratorHint::Sync };
|
||||||
};
|
};
|
||||||
|
|
||||||
class GetObjectFromIteratorRecord final : public Instruction {
|
class JS_API GetObjectFromIteratorRecord final : public Instruction {
|
||||||
public:
|
public:
|
||||||
GetObjectFromIteratorRecord(Operand object, Operand iterator_record)
|
GetObjectFromIteratorRecord(Operand object, Operand iterator_record)
|
||||||
: Instruction(Type::GetObjectFromIteratorRecord)
|
: Instruction(Type::GetObjectFromIteratorRecord)
|
||||||
|
@ -2619,7 +2619,7 @@ private:
|
||||||
Operand m_iterator_record;
|
Operand m_iterator_record;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GetNextMethodFromIteratorRecord final : public Instruction {
|
class JS_API GetNextMethodFromIteratorRecord final : public Instruction {
|
||||||
public:
|
public:
|
||||||
GetNextMethodFromIteratorRecord(Operand next_method, Operand iterator_record)
|
GetNextMethodFromIteratorRecord(Operand next_method, Operand iterator_record)
|
||||||
: Instruction(Type::GetNextMethodFromIteratorRecord)
|
: Instruction(Type::GetNextMethodFromIteratorRecord)
|
||||||
|
@ -2644,7 +2644,7 @@ private:
|
||||||
Operand m_iterator_record;
|
Operand m_iterator_record;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GetMethod final : public Instruction {
|
class JS_API GetMethod final : public Instruction {
|
||||||
public:
|
public:
|
||||||
GetMethod(Operand dst, Operand object, IdentifierTableIndex property)
|
GetMethod(Operand dst, Operand object, IdentifierTableIndex property)
|
||||||
: Instruction(Type::GetMethod)
|
: Instruction(Type::GetMethod)
|
||||||
|
@ -2672,7 +2672,7 @@ private:
|
||||||
IdentifierTableIndex m_property;
|
IdentifierTableIndex m_property;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GetObjectPropertyIterator final : public Instruction {
|
class JS_API GetObjectPropertyIterator final : public Instruction {
|
||||||
public:
|
public:
|
||||||
GetObjectPropertyIterator(Operand dst, Operand object)
|
GetObjectPropertyIterator(Operand dst, Operand object)
|
||||||
: Instruction(Type::GetObjectPropertyIterator)
|
: Instruction(Type::GetObjectPropertyIterator)
|
||||||
|
@ -2697,7 +2697,7 @@ private:
|
||||||
Operand m_object;
|
Operand m_object;
|
||||||
};
|
};
|
||||||
|
|
||||||
class IteratorClose final : public Instruction {
|
class JS_API IteratorClose final : public Instruction {
|
||||||
public:
|
public:
|
||||||
IteratorClose(Operand iterator_record, Completion::Type completion_type, Optional<Value> completion_value)
|
IteratorClose(Operand iterator_record, Completion::Type completion_type, Optional<Value> completion_value)
|
||||||
: Instruction(Type::IteratorClose)
|
: Instruction(Type::IteratorClose)
|
||||||
|
@ -2724,7 +2724,7 @@ private:
|
||||||
Optional<Value> m_completion_value;
|
Optional<Value> m_completion_value;
|
||||||
};
|
};
|
||||||
|
|
||||||
class AsyncIteratorClose final : public Instruction {
|
class JS_API AsyncIteratorClose final : public Instruction {
|
||||||
public:
|
public:
|
||||||
AsyncIteratorClose(Operand iterator_record, Completion::Type completion_type, Optional<Value> completion_value)
|
AsyncIteratorClose(Operand iterator_record, Completion::Type completion_type, Optional<Value> completion_value)
|
||||||
: Instruction(Type::AsyncIteratorClose)
|
: Instruction(Type::AsyncIteratorClose)
|
||||||
|
@ -2751,7 +2751,7 @@ private:
|
||||||
Optional<Value> m_completion_value;
|
Optional<Value> m_completion_value;
|
||||||
};
|
};
|
||||||
|
|
||||||
class IteratorNext final : public Instruction {
|
class JS_API IteratorNext final : public Instruction {
|
||||||
public:
|
public:
|
||||||
IteratorNext(Operand dst, Operand iterator_record)
|
IteratorNext(Operand dst, Operand iterator_record)
|
||||||
: Instruction(Type::IteratorNext)
|
: Instruction(Type::IteratorNext)
|
||||||
|
@ -2776,7 +2776,7 @@ private:
|
||||||
Operand m_iterator_record;
|
Operand m_iterator_record;
|
||||||
};
|
};
|
||||||
|
|
||||||
class IteratorNextUnpack final : public Instruction {
|
class JS_API IteratorNextUnpack final : public Instruction {
|
||||||
public:
|
public:
|
||||||
IteratorNextUnpack(Operand dst_value, Operand dst_done, Operand iterator_record)
|
IteratorNextUnpack(Operand dst_value, Operand dst_done, Operand iterator_record)
|
||||||
: Instruction(Type::IteratorNextUnpack)
|
: Instruction(Type::IteratorNextUnpack)
|
||||||
|
@ -2805,7 +2805,7 @@ private:
|
||||||
Operand m_iterator_record;
|
Operand m_iterator_record;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ResolveThisBinding final : public Instruction {
|
class JS_API ResolveThisBinding final : public Instruction {
|
||||||
public:
|
public:
|
||||||
ResolveThisBinding()
|
ResolveThisBinding()
|
||||||
: Instruction(Type::ResolveThisBinding)
|
: Instruction(Type::ResolveThisBinding)
|
||||||
|
@ -2817,7 +2817,7 @@ public:
|
||||||
void visit_operands_impl(Function<void(Operand&)>) { }
|
void visit_operands_impl(Function<void(Operand&)>) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
class ResolveSuperBase final : public Instruction {
|
class JS_API ResolveSuperBase final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit ResolveSuperBase(Operand dst)
|
explicit ResolveSuperBase(Operand dst)
|
||||||
: Instruction(Type::ResolveSuperBase)
|
: Instruction(Type::ResolveSuperBase)
|
||||||
|
@ -2838,7 +2838,7 @@ private:
|
||||||
Operand m_dst;
|
Operand m_dst;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GetNewTarget final : public Instruction {
|
class JS_API GetNewTarget final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit GetNewTarget(Operand dst)
|
explicit GetNewTarget(Operand dst)
|
||||||
: Instruction(Type::GetNewTarget)
|
: Instruction(Type::GetNewTarget)
|
||||||
|
@ -2859,7 +2859,7 @@ private:
|
||||||
Operand m_dst;
|
Operand m_dst;
|
||||||
};
|
};
|
||||||
|
|
||||||
class GetImportMeta final : public Instruction {
|
class JS_API GetImportMeta final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit GetImportMeta(Operand dst)
|
explicit GetImportMeta(Operand dst)
|
||||||
: Instruction(Type::GetImportMeta)
|
: Instruction(Type::GetImportMeta)
|
||||||
|
@ -2880,7 +2880,7 @@ private:
|
||||||
Operand m_dst;
|
Operand m_dst;
|
||||||
};
|
};
|
||||||
|
|
||||||
class TypeofBinding final : public Instruction {
|
class JS_API TypeofBinding final : public Instruction {
|
||||||
public:
|
public:
|
||||||
TypeofBinding(Operand dst, IdentifierTableIndex identifier)
|
TypeofBinding(Operand dst, IdentifierTableIndex identifier)
|
||||||
: Instruction(Type::TypeofBinding)
|
: Instruction(Type::TypeofBinding)
|
||||||
|
@ -2905,7 +2905,7 @@ private:
|
||||||
mutable EnvironmentCoordinate m_cache;
|
mutable EnvironmentCoordinate m_cache;
|
||||||
};
|
};
|
||||||
|
|
||||||
class End final : public Instruction {
|
class JS_API End final : public Instruction {
|
||||||
public:
|
public:
|
||||||
constexpr static bool IsTerminator = true;
|
constexpr static bool IsTerminator = true;
|
||||||
|
|
||||||
|
@ -2927,7 +2927,7 @@ private:
|
||||||
Operand m_value;
|
Operand m_value;
|
||||||
};
|
};
|
||||||
|
|
||||||
class Dump final : public Instruction {
|
class JS_API Dump final : public Instruction {
|
||||||
public:
|
public:
|
||||||
explicit Dump(StringView text, Operand value)
|
explicit Dump(StringView text, Operand value)
|
||||||
: Instruction(Type::Dump)
|
: Instruction(Type::Dump)
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
namespace JS::Bytecode {
|
namespace JS::Bytecode {
|
||||||
|
|
||||||
class Operand {
|
class JS_API Operand {
|
||||||
public:
|
public:
|
||||||
enum class Type
|
enum class Type
|
||||||
#if ARCH(AARCH64)
|
#if ARCH(AARCH64)
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <AK/DistinctNumeric.h>
|
#include <AK/DistinctNumeric.h>
|
||||||
#include <AK/String.h>
|
#include <AK/String.h>
|
||||||
#include <AK/Vector.h>
|
#include <AK/Vector.h>
|
||||||
|
#include <LibJS/Forward.h>
|
||||||
#include <LibRegex/RegexParser.h>
|
#include <LibRegex/RegexParser.h>
|
||||||
|
|
||||||
namespace JS::Bytecode {
|
namespace JS::Bytecode {
|
||||||
|
@ -21,7 +22,7 @@ struct ParsedRegex {
|
||||||
regex::RegexOptions<ECMAScriptFlags> flags;
|
regex::RegexOptions<ECMAScriptFlags> flags;
|
||||||
};
|
};
|
||||||
|
|
||||||
class RegexTable {
|
class JS_API RegexTable {
|
||||||
AK_MAKE_NONMOVABLE(RegexTable);
|
AK_MAKE_NONMOVABLE(RegexTable);
|
||||||
AK_MAKE_NONCOPYABLE(RegexTable);
|
AK_MAKE_NONCOPYABLE(RegexTable);
|
||||||
|
|
||||||
|
|
|
@ -7,10 +7,11 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <AK/Format.h>
|
#include <AK/Format.h>
|
||||||
|
#include <LibJS/Forward.h>
|
||||||
|
|
||||||
namespace JS::Bytecode {
|
namespace JS::Bytecode {
|
||||||
|
|
||||||
class Register {
|
class JS_API Register {
|
||||||
public:
|
public:
|
||||||
constexpr static u32 accumulator_index = 0;
|
constexpr static u32 accumulator_index = 0;
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
namespace JS::Bytecode {
|
namespace JS::Bytecode {
|
||||||
|
|
||||||
class ScopedOperandImpl : public RefCounted<ScopedOperandImpl> {
|
class JS_API ScopedOperandImpl : public RefCounted<ScopedOperandImpl> {
|
||||||
public:
|
public:
|
||||||
ScopedOperandImpl(Generator& generator, Operand operand)
|
ScopedOperandImpl(Generator& generator, Operand operand)
|
||||||
: m_generator(generator)
|
: m_generator(generator)
|
||||||
|
@ -29,7 +29,7 @@ private:
|
||||||
Operand m_operand;
|
Operand m_operand;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ScopedOperand {
|
class JS_API ScopedOperand {
|
||||||
public:
|
public:
|
||||||
explicit ScopedOperand(Generator& generator, Operand operand)
|
explicit ScopedOperand(Generator& generator, Operand operand)
|
||||||
: m_impl(adopt_ref(*new ScopedOperandImpl(generator, operand)))
|
: m_impl(adopt_ref(*new ScopedOperandImpl(generator, operand)))
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
#include <AK/DistinctNumeric.h>
|
#include <AK/DistinctNumeric.h>
|
||||||
#include <AK/String.h>
|
#include <AK/String.h>
|
||||||
#include <AK/Vector.h>
|
#include <AK/Vector.h>
|
||||||
|
#include <LibJS/Forward.h>
|
||||||
|
|
||||||
namespace JS::Bytecode {
|
namespace JS::Bytecode {
|
||||||
|
|
||||||
|
@ -18,7 +19,7 @@ struct StringTableIndex {
|
||||||
u32 value { 0 };
|
u32 value { 0 };
|
||||||
};
|
};
|
||||||
|
|
||||||
class StringTable {
|
class JS_API StringTable {
|
||||||
AK_MAKE_NONMOVABLE(StringTable);
|
AK_MAKE_NONMOVABLE(StringTable);
|
||||||
AK_MAKE_NONCOPYABLE(StringTable);
|
AK_MAKE_NONCOPYABLE(StringTable);
|
||||||
|
|
||||||
|
|
|
@ -267,7 +267,7 @@ set(SOURCES
|
||||||
Token.cpp
|
Token.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
serenity_lib(LibJS js)
|
serenity_lib(LibJS js EXPLICIT_SYMBOL_EXPORT)
|
||||||
target_link_libraries(LibJS PRIVATE LibCore LibCrypto LibFileSystem LibRegex LibSyntax LibGC)
|
target_link_libraries(LibJS PRIVATE LibCore LibCrypto LibFileSystem LibRegex LibSyntax LibGC)
|
||||||
|
|
||||||
# Link LibUnicode publicly to ensure ICU data (which is in libicudata.a) is available in any process using LibJS.
|
# Link LibUnicode publicly to ensure ICU data (which is in libicudata.a) is available in any process using LibJS.
|
||||||
|
|
|
@ -23,7 +23,7 @@ namespace JS {
|
||||||
class ConsoleClient;
|
class ConsoleClient;
|
||||||
|
|
||||||
// https://console.spec.whatwg.org
|
// https://console.spec.whatwg.org
|
||||||
class Console : public Cell {
|
class JS_API Console : public Cell {
|
||||||
GC_CELL(Console, Cell);
|
GC_CELL(Console, Cell);
|
||||||
GC_DECLARE_ALLOCATOR(Console);
|
GC_DECLARE_ALLOCATOR(Console);
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ private:
|
||||||
Vector<Group> m_group_stack;
|
Vector<Group> m_group_stack;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ConsoleClient : public Cell {
|
class JS_API ConsoleClient : public Cell {
|
||||||
GC_CELL(ConsoleClient, Cell);
|
GC_CELL(ConsoleClient, Cell);
|
||||||
GC_DECLARE_ALLOCATOR(ConsoleClient);
|
GC_DECLARE_ALLOCATOR(ConsoleClient);
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
namespace JS::Test262 {
|
namespace JS::Test262 {
|
||||||
|
|
||||||
class $262Object final : public Object {
|
class JS_API $262Object final : public Object {
|
||||||
JS_OBJECT($262Object, Object);
|
JS_OBJECT($262Object, Object);
|
||||||
GC_DECLARE_ALLOCATOR($262Object);
|
GC_DECLARE_ALLOCATOR($262Object);
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
namespace JS::Test262 {
|
namespace JS::Test262 {
|
||||||
|
|
||||||
class AgentObject final : public Object {
|
class JS_API AgentObject final : public Object {
|
||||||
JS_OBJECT(AgentObject, Object);
|
JS_OBJECT(AgentObject, Object);
|
||||||
GC_DECLARE_ALLOCATOR(AgentObject);
|
GC_DECLARE_ALLOCATOR(AgentObject);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace JS::Test262 {
|
namespace JS::Test262 {
|
||||||
|
|
||||||
class IsHTMLDDA final : public NativeFunction {
|
class JS_API IsHTMLDDA final : public NativeFunction {
|
||||||
JS_OBJECT(IsHTMLDDA, NativeFunction);
|
JS_OBJECT(IsHTMLDDA, NativeFunction);
|
||||||
GC_DECLARE_ALLOCATOR(IsHTMLDDA);
|
GC_DECLARE_ALLOCATOR(IsHTMLDDA);
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@ enum class ModuleStatus {
|
||||||
};
|
};
|
||||||
|
|
||||||
// 16.2.1.5 Cyclic Module Records, https://tc39.es/ecma262/#cyclic-module-record
|
// 16.2.1.5 Cyclic Module Records, https://tc39.es/ecma262/#cyclic-module-record
|
||||||
class CyclicModule : public Module {
|
class JS_API CyclicModule : public Module {
|
||||||
GC_CELL(CyclicModule, Module);
|
GC_CELL(CyclicModule, Module);
|
||||||
GC_DECLARE_ALLOCATOR(CyclicModule);
|
GC_DECLARE_ALLOCATOR(CyclicModule);
|
||||||
|
|
||||||
|
@ -76,8 +76,8 @@ protected:
|
||||||
Optional<u32> m_pending_async_dependencies; // [[PendingAsyncDependencies]]
|
Optional<u32> m_pending_async_dependencies; // [[PendingAsyncDependencies]]
|
||||||
};
|
};
|
||||||
|
|
||||||
void inner_module_loading(VM&, GraphLoadingState& state, GC::Ref<Module>);
|
JS_API void inner_module_loading(VM&, GraphLoadingState& state, GC::Ref<Module>);
|
||||||
void continue_module_loading(GraphLoadingState&, ThrowCompletionOr<GC::Ref<Module>> const&);
|
JS_API void continue_module_loading(GraphLoadingState&, ThrowCompletionOr<GC::Ref<Module>> const&);
|
||||||
void continue_dynamic_import(GC::Ref<PromiseCapability>, ThrowCompletionOr<GC::Ref<Module>> const& module_completion);
|
JS_API void continue_dynamic_import(GC::Ref<PromiseCapability>, ThrowCompletionOr<GC::Ref<Module>> const& module_completion);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
|
|
||||||
#include <AK/Concepts.h>
|
#include <AK/Concepts.h>
|
||||||
#include <AK/Types.h>
|
#include <AK/Types.h>
|
||||||
|
#include <LibJS/Export.h>
|
||||||
|
|
||||||
#define JS_DECLARE_NATIVE_FUNCTION(name) \
|
#define JS_DECLARE_NATIVE_FUNCTION(name) \
|
||||||
static JS::ThrowCompletionOr<JS::Value> name(JS::VM&)
|
static JS::ThrowCompletionOr<JS::Value> name(JS::VM&)
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class Cell : public GC::Cell {
|
class JS_API Cell : public GC::Cell {
|
||||||
GC_CELL(Cell, GC::Cell);
|
GC_CELL(Cell, GC::Cell);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -12,10 +12,11 @@
|
||||||
#include <AK/HashMap.h>
|
#include <AK/HashMap.h>
|
||||||
#include <AK/String.h>
|
#include <AK/String.h>
|
||||||
#include <AK/StringView.h>
|
#include <AK/StringView.h>
|
||||||
|
#include <LibJS/Export.h>
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class Lexer {
|
class JS_API Lexer {
|
||||||
public:
|
public:
|
||||||
explicit Lexer(StringView source, StringView filename = "(unknown)"sv, size_t line_number = 1, size_t line_column = 0);
|
explicit Lexer(StringView source, StringView filename = "(unknown)"sv, size_t line_number = 1, size_t line_column = 0);
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class MarkupGenerator {
|
class JS_API MarkupGenerator {
|
||||||
public:
|
public:
|
||||||
static ErrorOr<String> html_from_source(StringView);
|
static ErrorOr<String> html_from_source(StringView);
|
||||||
static ErrorOr<String> html_from_value(Value);
|
static ErrorOr<String> html_from_value(Value);
|
||||||
|
|
|
@ -57,7 +57,7 @@ struct ResolvedBinding {
|
||||||
};
|
};
|
||||||
|
|
||||||
// https://tc39.es/ecma262/#graphloadingstate-record
|
// https://tc39.es/ecma262/#graphloadingstate-record
|
||||||
struct GraphLoadingState : public Cell {
|
struct JS_API GraphLoadingState : public Cell {
|
||||||
GC_CELL(GraphLoadingState, Cell);
|
GC_CELL(GraphLoadingState, Cell);
|
||||||
GC_DECLARE_ALLOCATOR(GraphLoadingState);
|
GC_DECLARE_ALLOCATOR(GraphLoadingState);
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
// 16.2.1.4 Abstract Module Records, https://tc39.es/ecma262/#sec-abstract-module-records
|
// 16.2.1.4 Abstract Module Records, https://tc39.es/ecma262/#sec-abstract-module-records
|
||||||
class Module : public Cell {
|
class JS_API Module : public Cell {
|
||||||
GC_CELL(Module, Cell);
|
GC_CELL(Module, Cell);
|
||||||
GC_DECLARE_ALLOCATOR(Module);
|
GC_DECLARE_ALLOCATOR(Module);
|
||||||
|
|
||||||
|
@ -150,6 +150,6 @@ private:
|
||||||
class CyclicModule;
|
class CyclicModule;
|
||||||
struct GraphLoadingState;
|
struct GraphLoadingState;
|
||||||
|
|
||||||
void finish_loading_imported_module(ImportedModuleReferrer, ModuleRequest const&, ImportedModulePayload, ThrowCompletionOr<GC::Ref<Module>> const&);
|
JS_API void finish_loading_imported_module(ImportedModuleReferrer, ModuleRequest const&, ImportedModulePayload, ThrowCompletionOr<GC::Ref<Module>> const&);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -5204,8 +5204,8 @@ Parser::ForbiddenTokens Parser::ForbiddenTokens::forbid(std::initializer_list<To
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
template NonnullRefPtr<FunctionExpression> Parser::parse_function_node(u16, Optional<Position> const&);
|
template JS_API NonnullRefPtr<FunctionExpression> Parser::parse_function_node(u16, Optional<Position> const&);
|
||||||
template NonnullRefPtr<FunctionDeclaration> Parser::parse_function_node(u16, Optional<Position> const&);
|
template JS_API NonnullRefPtr<FunctionDeclaration> Parser::parse_function_node(u16, Optional<Position> const&);
|
||||||
|
|
||||||
NonnullRefPtr<Identifier const> Parser::create_identifier_and_register_in_current_scope(SourceRange range, FlyString string, Optional<DeclarationKind> declaration_kind)
|
NonnullRefPtr<Identifier const> Parser::create_identifier_and_register_in_current_scope(SourceRange range, FlyString string, Optional<DeclarationKind> declaration_kind)
|
||||||
{
|
{
|
||||||
|
|
|
@ -45,7 +45,7 @@ struct FunctionNodeParseOptions {
|
||||||
|
|
||||||
class ScopePusher;
|
class ScopePusher;
|
||||||
|
|
||||||
class Parser {
|
class JS_API Parser {
|
||||||
public:
|
public:
|
||||||
struct EvalInitialState {
|
struct EvalInitialState {
|
||||||
bool in_eval_function_context { false };
|
bool in_eval_function_context { false };
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
struct ParserError {
|
struct JS_API ParserError {
|
||||||
String message;
|
String message;
|
||||||
Optional<Position> position;
|
Optional<Position> position;
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,6 @@ struct PrintContext {
|
||||||
bool disable_string_quotes { false };
|
bool disable_string_quotes { false };
|
||||||
};
|
};
|
||||||
|
|
||||||
ErrorOr<void> print(JS::Value value, PrintContext&);
|
JS_API ErrorOr<void> print(JS::Value value, PrintContext&);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,27 +23,27 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
GC::Ref<DeclarativeEnvironment> new_declarative_environment(Environment&);
|
JS_API GC::Ref<DeclarativeEnvironment> new_declarative_environment(Environment&);
|
||||||
GC::Ref<ObjectEnvironment> new_object_environment(Object&, bool is_with_environment, Environment*);
|
JS_API GC::Ref<ObjectEnvironment> new_object_environment(Object&, bool is_with_environment, Environment*);
|
||||||
GC::Ref<FunctionEnvironment> new_function_environment(ECMAScriptFunctionObject&, Object* new_target);
|
JS_API GC::Ref<FunctionEnvironment> new_function_environment(ECMAScriptFunctionObject&, Object* new_target);
|
||||||
GC::Ref<PrivateEnvironment> new_private_environment(VM& vm, PrivateEnvironment* outer);
|
JS_API GC::Ref<PrivateEnvironment> new_private_environment(VM& vm, PrivateEnvironment* outer);
|
||||||
GC::Ref<Environment> get_this_environment(VM&);
|
JS_API GC::Ref<Environment> get_this_environment(VM&);
|
||||||
bool can_be_held_weakly(Value);
|
JS_API bool can_be_held_weakly(Value);
|
||||||
Object* get_super_constructor(VM&);
|
JS_API Object* get_super_constructor(VM&);
|
||||||
ThrowCompletionOr<Value> require_object_coercible(VM&, Value);
|
JS_API ThrowCompletionOr<Value> require_object_coercible(VM&, Value);
|
||||||
ThrowCompletionOr<Value> call_impl(VM&, Value function, Value this_value, ReadonlySpan<Value> arguments = {});
|
JS_API ThrowCompletionOr<Value> call_impl(VM&, Value function, Value this_value, ReadonlySpan<Value> arguments = {});
|
||||||
ThrowCompletionOr<Value> call_impl(VM&, FunctionObject& function, Value this_value, ReadonlySpan<Value> arguments = {});
|
JS_API ThrowCompletionOr<Value> call_impl(VM&, FunctionObject& function, Value this_value, ReadonlySpan<Value> arguments = {});
|
||||||
ThrowCompletionOr<GC::Ref<Object>> construct_impl(VM&, FunctionObject&, ReadonlySpan<Value> arguments = {}, FunctionObject* new_target = nullptr);
|
JS_API ThrowCompletionOr<GC::Ref<Object>> construct_impl(VM&, FunctionObject&, ReadonlySpan<Value> arguments = {}, FunctionObject* new_target = nullptr);
|
||||||
ThrowCompletionOr<size_t> length_of_array_like(VM&, Object const&);
|
JS_API ThrowCompletionOr<size_t> length_of_array_like(VM&, Object const&);
|
||||||
ThrowCompletionOr<GC::RootVector<Value>> create_list_from_array_like(VM&, Value, Function<ThrowCompletionOr<void>(Value)> = {});
|
JS_API ThrowCompletionOr<GC::RootVector<Value>> create_list_from_array_like(VM&, Value, Function<ThrowCompletionOr<void>(Value)> = {});
|
||||||
ThrowCompletionOr<FunctionObject*> species_constructor(VM&, Object const&, FunctionObject& default_constructor);
|
JS_API ThrowCompletionOr<FunctionObject*> species_constructor(VM&, Object const&, FunctionObject& default_constructor);
|
||||||
ThrowCompletionOr<Realm*> get_function_realm(VM&, FunctionObject const&);
|
JS_API ThrowCompletionOr<Realm*> get_function_realm(VM&, FunctionObject const&);
|
||||||
ThrowCompletionOr<void> initialize_bound_name(VM&, FlyString const&, Value, Environment*);
|
JS_API ThrowCompletionOr<void> initialize_bound_name(VM&, FlyString const&, Value, Environment*);
|
||||||
bool is_compatible_property_descriptor(bool extensible, PropertyDescriptor const&, Optional<PropertyDescriptor> const& current);
|
JS_API bool is_compatible_property_descriptor(bool extensible, PropertyDescriptor const&, Optional<PropertyDescriptor> const& current);
|
||||||
bool validate_and_apply_property_descriptor(Object*, PropertyKey const&, bool extensible, PropertyDescriptor const&, Optional<PropertyDescriptor> const& current);
|
JS_API bool validate_and_apply_property_descriptor(Object*, PropertyKey const&, bool extensible, PropertyDescriptor const&, Optional<PropertyDescriptor> const& current);
|
||||||
ThrowCompletionOr<Object*> get_prototype_from_constructor(VM&, FunctionObject const& constructor, GC::Ref<Object> (Intrinsics::*intrinsic_default_prototype)());
|
JS_API ThrowCompletionOr<Object*> get_prototype_from_constructor(VM&, FunctionObject const& constructor, GC::Ref<Object> (Intrinsics::*intrinsic_default_prototype)());
|
||||||
Object* create_unmapped_arguments_object(VM&, ReadonlySpan<Value> arguments);
|
JS_API Object* create_unmapped_arguments_object(VM&, ReadonlySpan<Value> arguments);
|
||||||
Object* create_mapped_arguments_object(VM&, FunctionObject&, NonnullRefPtr<FunctionParameters const> const&, ReadonlySpan<Value> arguments, Environment&);
|
JS_API Object* create_mapped_arguments_object(VM&, FunctionObject&, NonnullRefPtr<FunctionParameters const> const&, ReadonlySpan<Value> arguments, Environment&);
|
||||||
|
|
||||||
// 2.1.1 DisposeCapability Records, https://tc39.es/proposal-explicit-resource-management/#sec-disposecapability-records
|
// 2.1.1 DisposeCapability Records, https://tc39.es/proposal-explicit-resource-management/#sec-disposecapability-records
|
||||||
struct DisposeCapability {
|
struct DisposeCapability {
|
||||||
|
@ -61,30 +61,30 @@ struct DisposableResource {
|
||||||
GC::Ptr<FunctionObject> dispose_method; // [[DisposeMethod]]
|
GC::Ptr<FunctionObject> dispose_method; // [[DisposeMethod]]
|
||||||
};
|
};
|
||||||
|
|
||||||
DisposeCapability new_dispose_capability();
|
JS_API DisposeCapability new_dispose_capability();
|
||||||
ThrowCompletionOr<void> add_disposable_resource(VM&, DisposeCapability&, Value, Environment::InitializeBindingHint, GC::Ptr<FunctionObject> = {});
|
JS_API ThrowCompletionOr<void> add_disposable_resource(VM&, DisposeCapability&, Value, Environment::InitializeBindingHint, GC::Ptr<FunctionObject> = {});
|
||||||
ThrowCompletionOr<DisposableResource> create_disposable_resource(VM&, Value, Environment::InitializeBindingHint, GC::Ptr<FunctionObject> = {});
|
JS_API ThrowCompletionOr<DisposableResource> create_disposable_resource(VM&, Value, Environment::InitializeBindingHint, GC::Ptr<FunctionObject> = {});
|
||||||
ThrowCompletionOr<GC::Ptr<FunctionObject>> get_dispose_method(VM&, Value, Environment::InitializeBindingHint);
|
JS_API ThrowCompletionOr<GC::Ptr<FunctionObject>> get_dispose_method(VM&, Value, Environment::InitializeBindingHint);
|
||||||
Completion dispose(VM&, Value, Environment::InitializeBindingHint, GC::Ptr<FunctionObject> method);
|
JS_API Completion dispose(VM&, Value, Environment::InitializeBindingHint, GC::Ptr<FunctionObject> method);
|
||||||
Completion dispose_resources(VM&, DisposeCapability&, Completion);
|
JS_API Completion dispose_resources(VM&, DisposeCapability&, Completion);
|
||||||
|
|
||||||
ThrowCompletionOr<Value> perform_import_call(VM&, Value specifier, Value options_value);
|
JS_API ThrowCompletionOr<Value> perform_import_call(VM&, Value specifier, Value options_value);
|
||||||
|
|
||||||
enum class CanonicalIndexMode {
|
enum class CanonicalIndexMode {
|
||||||
DetectNumericRoundtrip,
|
DetectNumericRoundtrip,
|
||||||
IgnoreNumericRoundtrip,
|
IgnoreNumericRoundtrip,
|
||||||
};
|
};
|
||||||
[[nodiscard]] CanonicalIndex canonical_numeric_index_string(PropertyKey const&, CanonicalIndexMode needs_numeric);
|
[[nodiscard]] JS_API CanonicalIndex canonical_numeric_index_string(PropertyKey const&, CanonicalIndexMode needs_numeric);
|
||||||
ThrowCompletionOr<String> get_substitution(VM&, Utf16View const& matched, Utf16View const& str, size_t position, Span<Value> captures, Value named_captures, Value replacement);
|
JS_API ThrowCompletionOr<String> get_substitution(VM&, Utf16View const& matched, Utf16View const& str, size_t position, Span<Value> captures, Value named_captures, Value replacement);
|
||||||
|
|
||||||
enum class CallerMode {
|
enum class CallerMode {
|
||||||
Strict,
|
Strict,
|
||||||
NonStrict
|
NonStrict
|
||||||
};
|
};
|
||||||
|
|
||||||
ThrowCompletionOr<Value> perform_eval(VM&, Value, CallerMode, EvalMode);
|
JS_API ThrowCompletionOr<Value> perform_eval(VM&, Value, CallerMode, EvalMode);
|
||||||
|
|
||||||
ThrowCompletionOr<void> eval_declaration_instantiation(VM& vm, Program const& program, Environment* variable_environment, Environment* lexical_environment, PrivateEnvironment* private_environment, bool strict);
|
JS_API ThrowCompletionOr<void> eval_declaration_instantiation(VM& vm, Program const& program, Environment* variable_environment, Environment* lexical_environment, PrivateEnvironment* private_environment, bool strict);
|
||||||
|
|
||||||
// 7.3.14 Call ( F, V [ , argumentsList ] ), https://tc39.es/ecma262/#sec-call
|
// 7.3.14 Call ( F, V [ , argumentsList ] ), https://tc39.es/ecma262/#sec-call
|
||||||
ALWAYS_INLINE ThrowCompletionOr<Value> call(VM& vm, Value function, Value this_value, ReadonlySpan<Value> arguments_list)
|
ALWAYS_INLINE ThrowCompletionOr<Value> call(VM& vm, Value function, Value this_value, ReadonlySpan<Value> arguments_list)
|
||||||
|
@ -342,8 +342,8 @@ enum class OptionType {
|
||||||
struct Required { };
|
struct Required { };
|
||||||
using OptionDefault = Variant<Required, Empty, bool, StringView, double>;
|
using OptionDefault = Variant<Required, Empty, bool, StringView, double>;
|
||||||
|
|
||||||
ThrowCompletionOr<GC::Ref<Object>> get_options_object(VM&, Value options);
|
JS_API ThrowCompletionOr<GC::Ref<Object>> get_options_object(VM&, Value options);
|
||||||
ThrowCompletionOr<Value> get_option(VM&, Object const& options, PropertyKey const& property, OptionType type, ReadonlySpan<StringView> values, OptionDefault const&);
|
JS_API ThrowCompletionOr<Value> get_option(VM&, Object const& options, PropertyKey const& property, OptionType type, ReadonlySpan<StringView> values, OptionDefault const&);
|
||||||
|
|
||||||
template<size_t Size>
|
template<size_t Size>
|
||||||
ThrowCompletionOr<Value> get_option(VM& vm, Object const& options, PropertyKey const& property, OptionType type, StringView const (&values)[Size], OptionDefault const& default_)
|
ThrowCompletionOr<Value> get_option(VM& vm, Object const& options, PropertyKey const& property, OptionType type, StringView const (&values)[Size], OptionDefault const& default_)
|
||||||
|
@ -364,9 +364,9 @@ enum class RoundingMode {
|
||||||
HalfEven,
|
HalfEven,
|
||||||
};
|
};
|
||||||
|
|
||||||
ThrowCompletionOr<RoundingMode> get_rounding_mode_option(VM&, Object const& options, RoundingMode fallback);
|
JS_API ThrowCompletionOr<RoundingMode> get_rounding_mode_option(VM&, Object const& options, RoundingMode fallback);
|
||||||
ThrowCompletionOr<u64> get_rounding_increment_option(VM&, Object const& options);
|
JS_API ThrowCompletionOr<u64> get_rounding_increment_option(VM&, Object const& options);
|
||||||
|
|
||||||
Crypto::SignedBigInteger big_floor(Crypto::SignedBigInteger const& numerator, Crypto::UnsignedBigInteger const& denominator);
|
JS_API Crypto::SignedBigInteger big_floor(Crypto::SignedBigInteger const& numerator, Crypto::UnsignedBigInteger const& denominator);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class Accessor final : public Cell {
|
class JS_API Accessor final : public Cell {
|
||||||
GC_CELL(Accessor, Cell);
|
GC_CELL(Accessor, Cell);
|
||||||
GC_DECLARE_ALLOCATOR(Accessor);
|
GC_DECLARE_ALLOCATOR(Accessor);
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
// https://tc39.es/ecma262/#sec-agents
|
// https://tc39.es/ecma262/#sec-agents
|
||||||
class Agent {
|
class JS_API Agent {
|
||||||
public:
|
public:
|
||||||
enum class CanBlock {
|
enum class CanBlock {
|
||||||
Yes,
|
Yes,
|
||||||
|
@ -38,6 +38,6 @@ private:
|
||||||
CanBlock m_can_block { false };
|
CanBlock m_can_block { false };
|
||||||
};
|
};
|
||||||
|
|
||||||
bool agent_can_suspend(VM const&);
|
JS_API bool agent_can_suspend(VM const&);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class AggregateError : public Error {
|
class JS_API AggregateError : public Error {
|
||||||
JS_OBJECT(AggregateError, Error);
|
JS_OBJECT(AggregateError, Error);
|
||||||
GC_DECLARE_ALLOCATOR(AggregateError);
|
GC_DECLARE_ALLOCATOR(AggregateError);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class AggregateErrorConstructor final : public NativeFunction {
|
class JS_API AggregateErrorConstructor final : public NativeFunction {
|
||||||
JS_OBJECT(AggregateErrorConstructor, NativeFunction);
|
JS_OBJECT(AggregateErrorConstructor, NativeFunction);
|
||||||
GC_DECLARE_ALLOCATOR(AggregateErrorConstructor);
|
GC_DECLARE_ALLOCATOR(AggregateErrorConstructor);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class AggregateErrorPrototype final : public Object {
|
class JS_API AggregateErrorPrototype final : public Object {
|
||||||
JS_OBJECT(AggregateErrorPrototype, Object);
|
JS_OBJECT(AggregateErrorPrototype, Object);
|
||||||
GC_DECLARE_ALLOCATOR(AggregateErrorPrototype);
|
GC_DECLARE_ALLOCATOR(AggregateErrorPrototype);
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class ArgumentsObject final : public Object {
|
class JS_API ArgumentsObject final : public Object {
|
||||||
JS_OBJECT(ArgumentsObject, Object);
|
JS_OBJECT(ArgumentsObject, Object);
|
||||||
GC_DECLARE_ALLOCATOR(ArgumentsObject);
|
GC_DECLARE_ALLOCATOR(ArgumentsObject);
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class Array : public Object {
|
class JS_API Array : public Object {
|
||||||
JS_OBJECT(Array, Object);
|
JS_OBJECT(Array, Object);
|
||||||
GC_DECLARE_ALLOCATOR(Array);
|
GC_DECLARE_ALLOCATOR(Array);
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ enum class Holes {
|
||||||
ReadThroughHoles,
|
ReadThroughHoles,
|
||||||
};
|
};
|
||||||
|
|
||||||
ThrowCompletionOr<GC::RootVector<Value>> sort_indexed_properties(VM&, Object const&, size_t length, Function<ThrowCompletionOr<double>(Value, Value)> const& sort_compare, Holes holes);
|
JS_API ThrowCompletionOr<GC::RootVector<Value>> sort_indexed_properties(VM&, Object const&, size_t length, Function<ThrowCompletionOr<double>(Value, Value)> const& sort_compare, Holes holes);
|
||||||
ThrowCompletionOr<double> compare_array_elements(VM&, Value x, Value y, FunctionObject* comparefn);
|
JS_API ThrowCompletionOr<double> compare_array_elements(VM&, Value x, Value y, FunctionObject* comparefn);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -54,7 +54,7 @@ struct DataBlock {
|
||||||
Shared is_shared = { Shared::No };
|
Shared is_shared = { Shared::No };
|
||||||
};
|
};
|
||||||
|
|
||||||
class ArrayBuffer : public Object {
|
class JS_API ArrayBuffer : public Object {
|
||||||
JS_OBJECT(ArrayBuffer, Object);
|
JS_OBJECT(ArrayBuffer, Object);
|
||||||
GC_DECLARE_ALLOCATOR(ArrayBuffer);
|
GC_DECLARE_ALLOCATOR(ArrayBuffer);
|
||||||
|
|
||||||
|
@ -145,14 +145,14 @@ private:
|
||||||
Value m_detach_key;
|
Value m_detach_key;
|
||||||
};
|
};
|
||||||
|
|
||||||
ThrowCompletionOr<DataBlock> create_byte_data_block(VM& vm, size_t size);
|
JS_API ThrowCompletionOr<DataBlock> create_byte_data_block(VM& vm, size_t size);
|
||||||
void copy_data_block_bytes(ByteBuffer& to_block, u64 to_index, ByteBuffer const& from_block, u64 from_index, u64 count);
|
JS_API void copy_data_block_bytes(ByteBuffer& to_block, u64 to_index, ByteBuffer const& from_block, u64 from_index, u64 count);
|
||||||
ThrowCompletionOr<ArrayBuffer*> allocate_array_buffer(VM&, FunctionObject& constructor, size_t byte_length, Optional<size_t> const& max_byte_length = {});
|
JS_API ThrowCompletionOr<ArrayBuffer*> allocate_array_buffer(VM&, FunctionObject& constructor, size_t byte_length, Optional<size_t> const& max_byte_length = {});
|
||||||
ThrowCompletionOr<ArrayBuffer*> array_buffer_copy_and_detach(VM&, ArrayBuffer& array_buffer, Value new_length, PreserveResizability preserve_resizability);
|
JS_API ThrowCompletionOr<ArrayBuffer*> array_buffer_copy_and_detach(VM&, ArrayBuffer& array_buffer, Value new_length, PreserveResizability preserve_resizability);
|
||||||
ThrowCompletionOr<void> detach_array_buffer(VM&, ArrayBuffer& array_buffer, Optional<Value> key = {});
|
JS_API ThrowCompletionOr<void> detach_array_buffer(VM&, ArrayBuffer& array_buffer, Optional<Value> key = {});
|
||||||
ThrowCompletionOr<Optional<size_t>> get_array_buffer_max_byte_length_option(VM&, Value options);
|
JS_API ThrowCompletionOr<Optional<size_t>> get_array_buffer_max_byte_length_option(VM&, Value options);
|
||||||
ThrowCompletionOr<ArrayBuffer*> clone_array_buffer(VM&, ArrayBuffer& source_buffer, size_t source_byte_offset, size_t source_length);
|
JS_API ThrowCompletionOr<ArrayBuffer*> clone_array_buffer(VM&, ArrayBuffer& source_buffer, size_t source_byte_offset, size_t source_length);
|
||||||
ThrowCompletionOr<GC::Ref<ArrayBuffer>> allocate_shared_array_buffer(VM&, FunctionObject& constructor, size_t byte_length);
|
JS_API ThrowCompletionOr<GC::Ref<ArrayBuffer>> allocate_shared_array_buffer(VM&, FunctionObject& constructor, size_t byte_length);
|
||||||
|
|
||||||
// 25.1.3.2 ArrayBufferByteLength ( arrayBuffer, order ), https://tc39.es/ecma262/#sec-arraybufferbytelength
|
// 25.1.3.2 ArrayBufferByteLength ( arrayBuffer, order ), https://tc39.es/ecma262/#sec-arraybufferbytelength
|
||||||
inline size_t array_buffer_byte_length(ArrayBuffer const& array_buffer, ArrayBuffer::Order)
|
inline size_t array_buffer_byte_length(ArrayBuffer const& array_buffer, ArrayBuffer::Order)
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class ArrayBufferConstructor final : public NativeFunction {
|
class JS_API ArrayBufferConstructor final : public NativeFunction {
|
||||||
JS_OBJECT(ArrayBufferConstructor, NativeFunction);
|
JS_OBJECT(ArrayBufferConstructor, NativeFunction);
|
||||||
GC_DECLARE_ALLOCATOR(ArrayBufferConstructor);
|
GC_DECLARE_ALLOCATOR(ArrayBufferConstructor);
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class ArrayBufferPrototype final : public PrototypeObject<ArrayBufferPrototype, ArrayBuffer> {
|
class JS_API ArrayBufferPrototype final : public PrototypeObject<ArrayBufferPrototype, ArrayBuffer> {
|
||||||
JS_PROTOTYPE_OBJECT(ArrayBufferPrototype, ArrayBuffer, ArrayBuffer);
|
JS_PROTOTYPE_OBJECT(ArrayBufferPrototype, ArrayBuffer, ArrayBuffer);
|
||||||
GC_DECLARE_ALLOCATOR(ArrayBufferPrototype);
|
GC_DECLARE_ALLOCATOR(ArrayBufferPrototype);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class ArrayConstructor final : public NativeFunction {
|
class JS_API ArrayConstructor final : public NativeFunction {
|
||||||
JS_OBJECT(ArrayConstructor, NativeFunction);
|
JS_OBJECT(ArrayConstructor, NativeFunction);
|
||||||
GC_DECLARE_ALLOCATOR(ArrayConstructor);
|
GC_DECLARE_ALLOCATOR(ArrayConstructor);
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class ArrayIterator final : public Object
|
class JS_API ArrayIterator final : public Object
|
||||||
, public BuiltinIterator {
|
, public BuiltinIterator {
|
||||||
JS_OBJECT(ArrayIterator, Object);
|
JS_OBJECT(ArrayIterator, Object);
|
||||||
GC_DECLARE_ALLOCATOR(ArrayIterator);
|
GC_DECLARE_ALLOCATOR(ArrayIterator);
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class ArrayIteratorPrototype final : public PrototypeObject<ArrayIteratorPrototype, ArrayIterator> {
|
class JS_API ArrayIteratorPrototype final : public PrototypeObject<ArrayIteratorPrototype, ArrayIterator> {
|
||||||
JS_PROTOTYPE_OBJECT(ArrayIteratorPrototype, ArrayIterator, ArrayIterator);
|
JS_PROTOTYPE_OBJECT(ArrayIteratorPrototype, ArrayIterator, ArrayIterator);
|
||||||
GC_DECLARE_ALLOCATOR(ArrayIteratorPrototype);
|
GC_DECLARE_ALLOCATOR(ArrayIteratorPrototype);
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class ArrayPrototype final : public Array {
|
class JS_API ArrayPrototype final : public Array {
|
||||||
JS_OBJECT(ArrayPrototype, Array);
|
JS_OBJECT(ArrayPrototype, Array);
|
||||||
GC_DECLARE_ALLOCATOR(ArrayPrototype);
|
GC_DECLARE_ALLOCATOR(ArrayPrototype);
|
||||||
|
|
||||||
|
@ -64,6 +64,6 @@ private:
|
||||||
JS_DECLARE_NATIVE_FUNCTION(with);
|
JS_DECLARE_NATIVE_FUNCTION(with);
|
||||||
};
|
};
|
||||||
|
|
||||||
ThrowCompletionOr<void> array_merge_sort(VM&, Function<ThrowCompletionOr<double>(Value, Value)> const& compare_func, GC::RootVector<Value>& arr_to_sort);
|
JS_API ThrowCompletionOr<void> array_merge_sort(VM&, Function<ThrowCompletionOr<double>(Value, Value)> const& compare_func, GC::RootVector<Value>& arr_to_sort);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class AsyncDisposableStack final : public Object {
|
class JS_API AsyncDisposableStack final : public Object {
|
||||||
JS_OBJECT(AsyncDisposableStack, Object);
|
JS_OBJECT(AsyncDisposableStack, Object);
|
||||||
GC_DECLARE_ALLOCATOR(AsyncDisposableStack);
|
GC_DECLARE_ALLOCATOR(AsyncDisposableStack);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class AsyncDisposableStackConstructor final : public NativeFunction {
|
class JS_API AsyncDisposableStackConstructor final : public NativeFunction {
|
||||||
JS_OBJECT(AsyncDisposableStackConstructor, NativeFunction);
|
JS_OBJECT(AsyncDisposableStackConstructor, NativeFunction);
|
||||||
GC_DECLARE_ALLOCATOR(AsyncDisposableStackConstructor);
|
GC_DECLARE_ALLOCATOR(AsyncDisposableStackConstructor);
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class AsyncDisposableStackPrototype final : public PrototypeObject<AsyncDisposableStackPrototype, AsyncDisposableStack> {
|
class JS_API AsyncDisposableStackPrototype final : public PrototypeObject<AsyncDisposableStackPrototype, AsyncDisposableStack> {
|
||||||
JS_PROTOTYPE_OBJECT(AsyncDisposableStackPrototype, AsyncDisposableStack, AsyncDisposableStack);
|
JS_PROTOTYPE_OBJECT(AsyncDisposableStackPrototype, AsyncDisposableStack, AsyncDisposableStack);
|
||||||
GC_DECLARE_ALLOCATOR(AsyncDisposableStackPrototype);
|
GC_DECLARE_ALLOCATOR(AsyncDisposableStackPrototype);
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
// 27.1.4.3 Properties of Async-from-Sync Iterator Instances, https://tc39.es/ecma262/#sec-properties-of-async-from-sync-iterator-instances
|
// 27.1.4.3 Properties of Async-from-Sync Iterator Instances, https://tc39.es/ecma262/#sec-properties-of-async-from-sync-iterator-instances
|
||||||
class AsyncFromSyncIterator final : public Object {
|
class JS_API AsyncFromSyncIterator final : public Object {
|
||||||
JS_OBJECT(AsyncFromSyncIterator, Object);
|
JS_OBJECT(AsyncFromSyncIterator, Object);
|
||||||
GC_DECLARE_ALLOCATOR(AsyncFromSyncIterator);
|
GC_DECLARE_ALLOCATOR(AsyncFromSyncIterator);
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
// 27.1.4.2 The %AsyncFromSyncIteratorPrototype% Object, https://tc39.es/ecma262/#sec-%asyncfromsynciteratorprototype%-object
|
// 27.1.4.2 The %AsyncFromSyncIteratorPrototype% Object, https://tc39.es/ecma262/#sec-%asyncfromsynciteratorprototype%-object
|
||||||
class AsyncFromSyncIteratorPrototype final : public PrototypeObject<AsyncFromSyncIteratorPrototype, AsyncFromSyncIterator> {
|
class JS_API AsyncFromSyncIteratorPrototype final : public PrototypeObject<AsyncFromSyncIteratorPrototype, AsyncFromSyncIterator> {
|
||||||
JS_PROTOTYPE_OBJECT(AsyncFromSyncIteratorPrototype, AsyncFromSyncIterator, AsyncFromSyncIterator);
|
JS_PROTOTYPE_OBJECT(AsyncFromSyncIteratorPrototype, AsyncFromSyncIterator, AsyncFromSyncIterator);
|
||||||
GC_DECLARE_ALLOCATOR(AsyncFromSyncIteratorPrototype);
|
GC_DECLARE_ALLOCATOR(AsyncFromSyncIteratorPrototype);
|
||||||
|
|
||||||
|
@ -31,6 +31,6 @@ private:
|
||||||
JS_DECLARE_NATIVE_FUNCTION(throw_);
|
JS_DECLARE_NATIVE_FUNCTION(throw_);
|
||||||
};
|
};
|
||||||
|
|
||||||
GC::Ref<IteratorRecord> create_async_from_sync_iterator(VM&, GC::Ref<IteratorRecord> sync_iterator);
|
JS_API GC::Ref<IteratorRecord> create_async_from_sync_iterator(VM&, GC::Ref<IteratorRecord> sync_iterator);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class AsyncFunctionConstructor final : public NativeFunction {
|
class JS_API AsyncFunctionConstructor final : public NativeFunction {
|
||||||
JS_OBJECT(AsyncFunctionConstructor, NativeFunction);
|
JS_OBJECT(AsyncFunctionConstructor, NativeFunction);
|
||||||
GC_DECLARE_ALLOCATOR(AsyncFunctionConstructor);
|
GC_DECLARE_ALLOCATOR(AsyncFunctionConstructor);
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class AsyncFunctionDriverWrapper final : public Promise {
|
class JS_API AsyncFunctionDriverWrapper final : public Promise {
|
||||||
JS_OBJECT(AsyncFunctionDriverWrapper, Promise);
|
JS_OBJECT(AsyncFunctionDriverWrapper, Promise);
|
||||||
GC_DECLARE_ALLOCATOR(AsyncFunctionDriverWrapper);
|
GC_DECLARE_ALLOCATOR(AsyncFunctionDriverWrapper);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class AsyncFunctionPrototype final : public Object {
|
class JS_API AsyncFunctionPrototype final : public Object {
|
||||||
JS_OBJECT(AsyncFunctionPrototype, Object);
|
JS_OBJECT(AsyncFunctionPrototype, Object);
|
||||||
GC_DECLARE_ALLOCATOR(AsyncFunctionPrototype);
|
GC_DECLARE_ALLOCATOR(AsyncFunctionPrototype);
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
// 27.6.2 Properties of AsyncGenerator Instances, https://tc39.es/ecma262/#sec-properties-of-asyncgenerator-intances
|
// 27.6.2 Properties of AsyncGenerator Instances, https://tc39.es/ecma262/#sec-properties-of-asyncgenerator-intances
|
||||||
class AsyncGenerator final : public Object {
|
class JS_API AsyncGenerator final : public Object {
|
||||||
JS_OBJECT(AsyncGenerator, Object);
|
JS_OBJECT(AsyncGenerator, Object);
|
||||||
GC_DECLARE_ALLOCATOR(AsyncGenerator);
|
GC_DECLARE_ALLOCATOR(AsyncGenerator);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class AsyncGeneratorFunctionConstructor final : public NativeFunction {
|
class JS_API AsyncGeneratorFunctionConstructor final : public NativeFunction {
|
||||||
JS_OBJECT(AsyncGeneratorFunctionConstructor, NativeFunction);
|
JS_OBJECT(AsyncGeneratorFunctionConstructor, NativeFunction);
|
||||||
GC_DECLARE_ALLOCATOR(AsyncGeneratorFunctionConstructor);
|
GC_DECLARE_ALLOCATOR(AsyncGeneratorFunctionConstructor);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class AsyncGeneratorFunctionPrototype final : public PrototypeObject<AsyncGeneratorFunctionPrototype, AsyncGeneratorFunction> {
|
class JS_API AsyncGeneratorFunctionPrototype final : public PrototypeObject<AsyncGeneratorFunctionPrototype, AsyncGeneratorFunction> {
|
||||||
JS_PROTOTYPE_OBJECT(AsyncGeneratorFunctionPrototype, AsyncGeneratorFunction, AsyncGeneratorFunction);
|
JS_PROTOTYPE_OBJECT(AsyncGeneratorFunctionPrototype, AsyncGeneratorFunction, AsyncGeneratorFunction);
|
||||||
GC_DECLARE_ALLOCATOR(AsyncGeneratorFunctionPrototype);
|
GC_DECLARE_ALLOCATOR(AsyncGeneratorFunctionPrototype);
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class AsyncGeneratorPrototype final : public PrototypeObject<AsyncGeneratorPrototype, AsyncGenerator> {
|
class JS_API AsyncGeneratorPrototype final : public PrototypeObject<AsyncGeneratorPrototype, AsyncGenerator> {
|
||||||
JS_PROTOTYPE_OBJECT(AsyncGeneratorPrototype, AsyncGenerator, AsyncGenerator)
|
JS_PROTOTYPE_OBJECT(AsyncGeneratorPrototype, AsyncGenerator, AsyncGenerator)
|
||||||
GC_DECLARE_ALLOCATOR(AsyncGeneratorPrototype);
|
GC_DECLARE_ALLOCATOR(AsyncGeneratorPrototype);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class AsyncIteratorPrototype final : public Object {
|
class JS_API AsyncIteratorPrototype final : public Object {
|
||||||
JS_OBJECT(AsyncIteratorPrototype, Object)
|
JS_OBJECT(AsyncIteratorPrototype, Object)
|
||||||
GC_DECLARE_ALLOCATOR(AsyncIteratorPrototype);
|
GC_DECLARE_ALLOCATOR(AsyncIteratorPrototype);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class AtomicsObject : public Object {
|
class JS_API AtomicsObject : public Object {
|
||||||
JS_OBJECT(AtomicsObject, Object);
|
JS_OBJECT(AtomicsObject, Object);
|
||||||
GC_DECLARE_ALLOCATOR(AtomicsObject);
|
GC_DECLARE_ALLOCATOR(AtomicsObject);
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class BigInt final : public Cell {
|
class JS_API BigInt final : public Cell {
|
||||||
GC_CELL(BigInt, Cell);
|
GC_CELL(BigInt, Cell);
|
||||||
GC_DECLARE_ALLOCATOR(BigInt);
|
GC_DECLARE_ALLOCATOR(BigInt);
|
||||||
|
|
||||||
|
@ -35,6 +35,6 @@ private:
|
||||||
Crypto::SignedBigInteger m_big_integer;
|
Crypto::SignedBigInteger m_big_integer;
|
||||||
};
|
};
|
||||||
|
|
||||||
ThrowCompletionOr<GC::Ref<BigInt>> number_to_bigint(VM&, Value);
|
JS_API ThrowCompletionOr<GC::Ref<BigInt>> number_to_bigint(VM&, Value);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class BigIntConstructor final : public NativeFunction {
|
class JS_API BigIntConstructor final : public NativeFunction {
|
||||||
JS_OBJECT(BigIntConstructor, NativeFunction);
|
JS_OBJECT(BigIntConstructor, NativeFunction);
|
||||||
GC_DECLARE_ALLOCATOR(BigIntConstructor);
|
GC_DECLARE_ALLOCATOR(BigIntConstructor);
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class BigIntObject final : public Object {
|
class JS_API BigIntObject final : public Object {
|
||||||
JS_OBJECT(BigIntObject, Object);
|
JS_OBJECT(BigIntObject, Object);
|
||||||
GC_DECLARE_ALLOCATOR(BigIntObject);
|
GC_DECLARE_ALLOCATOR(BigIntObject);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class BigIntPrototype final : public Object {
|
class JS_API BigIntPrototype final : public Object {
|
||||||
JS_OBJECT(BigIntPrototype, Object);
|
JS_OBJECT(BigIntPrototype, Object);
|
||||||
GC_DECLARE_ALLOCATOR(BigIntPrototype);
|
GC_DECLARE_ALLOCATOR(BigIntPrototype);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class BooleanConstructor final : public NativeFunction {
|
class JS_API BooleanConstructor final : public NativeFunction {
|
||||||
JS_OBJECT(BooleanConstructor, NativeFunction);
|
JS_OBJECT(BooleanConstructor, NativeFunction);
|
||||||
GC_DECLARE_ALLOCATOR(BooleanConstructor);
|
GC_DECLARE_ALLOCATOR(BooleanConstructor);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class BooleanObject : public Object {
|
class JS_API BooleanObject : public Object {
|
||||||
JS_OBJECT(BooleanObject, Object);
|
JS_OBJECT(BooleanObject, Object);
|
||||||
GC_DECLARE_ALLOCATOR(BooleanObject);
|
GC_DECLARE_ALLOCATOR(BooleanObject);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class BooleanPrototype final : public BooleanObject {
|
class JS_API BooleanPrototype final : public BooleanObject {
|
||||||
JS_OBJECT(BooleanPrototype, BooleanObject);
|
JS_OBJECT(BooleanPrototype, BooleanObject);
|
||||||
GC_DECLARE_ALLOCATOR(BooleanPrototype);
|
GC_DECLARE_ALLOCATOR(BooleanPrototype);
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class BoundFunction final : public FunctionObject {
|
class JS_API BoundFunction final : public FunctionObject {
|
||||||
JS_OBJECT(BoundFunction, FunctionObject);
|
JS_OBJECT(BoundFunction, FunctionObject);
|
||||||
GC_DECLARE_ALLOCATOR(BoundFunction);
|
GC_DECLARE_ALLOCATOR(BoundFunction);
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <AK/TypeCasts.h>
|
#include <AK/TypeCasts.h>
|
||||||
|
#include <LibJS/Export.h>
|
||||||
#include <LibJS/Runtime/Agent.h>
|
#include <LibJS/Runtime/Agent.h>
|
||||||
#include <LibJS/Runtime/Completion.h>
|
#include <LibJS/Runtime/Completion.h>
|
||||||
#include <LibJS/Runtime/NativeFunction.h>
|
#include <LibJS/Runtime/NativeFunction.h>
|
||||||
|
@ -17,7 +18,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
bool g_log_all_js_exceptions = false;
|
JS_API bool g_log_all_js_exceptions = false;
|
||||||
|
|
||||||
Completion::Completion(ThrowCompletionOr<Value> const& throw_completion_or_value)
|
Completion::Completion(ThrowCompletionOr<Value> const& throw_completion_or_value)
|
||||||
{
|
{
|
||||||
|
|
|
@ -49,7 +49,7 @@ namespace JS {
|
||||||
})
|
})
|
||||||
|
|
||||||
// 6.2.3 The Completion Record Specification Type, https://tc39.es/ecma262/#sec-completion-record-specification-type
|
// 6.2.3 The Completion Record Specification Type, https://tc39.es/ecma262/#sec-completion-record-specification-type
|
||||||
class [[nodiscard]] Completion {
|
class [[nodiscard]] JS_API Completion {
|
||||||
public:
|
public:
|
||||||
enum class Type {
|
enum class Type {
|
||||||
Empty,
|
Empty,
|
||||||
|
@ -335,7 +335,7 @@ private:
|
||||||
Value m_value;
|
Value m_value;
|
||||||
};
|
};
|
||||||
|
|
||||||
ThrowCompletionOr<Value> await(VM&, Value);
|
JS_API ThrowCompletionOr<Value> await(VM&, Value);
|
||||||
|
|
||||||
// 6.2.4.1 NormalCompletion ( value ), https://tc39.es/ecma262/#sec-normalcompletion
|
// 6.2.4.1 NormalCompletion ( value ), https://tc39.es/ecma262/#sec-normalcompletion
|
||||||
inline Completion normal_completion(Value value)
|
inline Completion normal_completion(Value value)
|
||||||
|
@ -345,6 +345,6 @@ inline Completion normal_completion(Value value)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 6.2.4.2 ThrowCompletion ( value ), https://tc39.es/ecma262/#sec-throwcompletion
|
// 6.2.4.2 ThrowCompletion ( value ), https://tc39.es/ecma262/#sec-throwcompletion
|
||||||
Completion throw_completion(Value);
|
JS_API Completion throw_completion(Value);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class CompletionCell final : public Cell {
|
class JS_API CompletionCell final : public Cell {
|
||||||
GC_CELL(CompletionCell, Cell);
|
GC_CELL(CompletionCell, Cell);
|
||||||
GC_DECLARE_ALLOCATOR(CompletionCell);
|
GC_DECLARE_ALLOCATOR(CompletionCell);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class ConsoleObject final : public Object {
|
class JS_API ConsoleObject final : public Object {
|
||||||
JS_OBJECT(ConsoleObject, Object);
|
JS_OBJECT(ConsoleObject, Object);
|
||||||
GC_DECLARE_ALLOCATOR(ConsoleObject);
|
GC_DECLARE_ALLOCATOR(ConsoleObject);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class ConsoleObjectPrototype final : public Object {
|
class JS_API ConsoleObjectPrototype final : public Object {
|
||||||
JS_OBJECT(ConsoleObjectPrototype, Object);
|
JS_OBJECT(ConsoleObjectPrototype, Object);
|
||||||
GC_DECLARE_ALLOCATOR(ConsoleObjectPrototype);
|
GC_DECLARE_ALLOCATOR(ConsoleObjectPrototype);
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class DataView : public Object {
|
class JS_API DataView : public Object {
|
||||||
JS_OBJECT(DataView, Object);
|
JS_OBJECT(DataView, Object);
|
||||||
GC_DECLARE_ALLOCATOR(DataView);
|
GC_DECLARE_ALLOCATOR(DataView);
|
||||||
|
|
||||||
|
@ -42,8 +42,8 @@ struct DataViewWithBufferWitness {
|
||||||
ByteLength cached_buffer_byte_length; // [[CachedBufferByteLength]]
|
ByteLength cached_buffer_byte_length; // [[CachedBufferByteLength]]
|
||||||
};
|
};
|
||||||
|
|
||||||
DataViewWithBufferWitness make_data_view_with_buffer_witness_record(DataView const&, ArrayBuffer::Order);
|
JS_API DataViewWithBufferWitness make_data_view_with_buffer_witness_record(DataView const&, ArrayBuffer::Order);
|
||||||
u32 get_view_byte_length(DataViewWithBufferWitness const&);
|
JS_API u32 get_view_byte_length(DataViewWithBufferWitness const&);
|
||||||
bool is_view_out_of_bounds(DataViewWithBufferWitness const&);
|
JS_API bool is_view_out_of_bounds(DataViewWithBufferWitness const&);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class DataViewConstructor final : public NativeFunction {
|
class JS_API DataViewConstructor final : public NativeFunction {
|
||||||
JS_OBJECT(DataViewConstructor, NativeFunction);
|
JS_OBJECT(DataViewConstructor, NativeFunction);
|
||||||
GC_DECLARE_ALLOCATOR(DataViewConstructor);
|
GC_DECLARE_ALLOCATOR(DataViewConstructor);
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class DataViewPrototype final : public PrototypeObject<DataViewPrototype, DataView> {
|
class JS_API DataViewPrototype final : public PrototypeObject<DataViewPrototype, DataView> {
|
||||||
JS_PROTOTYPE_OBJECT(DataViewPrototype, DataView, DataView);
|
JS_PROTOTYPE_OBJECT(DataViewPrototype, DataView, DataView);
|
||||||
GC_DECLARE_ALLOCATOR(DataViewPrototype);
|
GC_DECLARE_ALLOCATOR(DataViewPrototype);
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class Date final : public Object {
|
class JS_API Date final : public Object {
|
||||||
JS_OBJECT(Date, Object);
|
JS_OBJECT(Date, Object);
|
||||||
GC_DECLARE_ALLOCATOR(Date);
|
GC_DECLARE_ALLOCATOR(Date);
|
||||||
|
|
||||||
|
@ -63,36 +63,36 @@ constexpr inline double ms_per_day = 86'400'000;
|
||||||
constexpr inline double ns_per_day = 86'400'000'000'000;
|
constexpr inline double ns_per_day = 86'400'000'000'000;
|
||||||
extern Crypto::SignedBigInteger const ns_per_day_bigint;
|
extern Crypto::SignedBigInteger const ns_per_day_bigint;
|
||||||
|
|
||||||
double day(double);
|
JS_API double day(double);
|
||||||
double time_within_day(double);
|
JS_API double time_within_day(double);
|
||||||
u16 days_in_year(i32);
|
JS_API u16 days_in_year(i32);
|
||||||
double day_from_year(i32);
|
JS_API double day_from_year(i32);
|
||||||
double time_from_year(i32);
|
JS_API double time_from_year(i32);
|
||||||
i32 year_from_time(double);
|
JS_API i32 year_from_time(double);
|
||||||
u16 day_within_year(double);
|
JS_API u16 day_within_year(double);
|
||||||
bool in_leap_year(double);
|
JS_API bool in_leap_year(double);
|
||||||
u8 month_from_time(double);
|
JS_API u8 month_from_time(double);
|
||||||
u8 date_from_time(double);
|
JS_API u8 date_from_time(double);
|
||||||
u8 week_day(double);
|
JS_API u8 week_day(double);
|
||||||
u8 hour_from_time(double);
|
JS_API u8 hour_from_time(double);
|
||||||
u8 min_from_time(double);
|
JS_API u8 min_from_time(double);
|
||||||
u8 sec_from_time(double);
|
JS_API u8 sec_from_time(double);
|
||||||
u16 ms_from_time(double);
|
JS_API u16 ms_from_time(double);
|
||||||
Crypto::SignedBigInteger get_utc_epoch_nanoseconds(Temporal::ISODateTime const&);
|
JS_API Crypto::SignedBigInteger get_utc_epoch_nanoseconds(Temporal::ISODateTime const&);
|
||||||
Vector<Crypto::SignedBigInteger> get_named_time_zone_epoch_nanoseconds(StringView time_zone_identifier, Temporal::ISODateTime const&);
|
JS_API Vector<Crypto::SignedBigInteger> get_named_time_zone_epoch_nanoseconds(StringView time_zone_identifier, Temporal::ISODateTime const&);
|
||||||
Unicode::TimeZoneOffset get_named_time_zone_offset_nanoseconds(StringView time_zone_identifier, Crypto::SignedBigInteger const& epoch_nanoseconds);
|
JS_API Unicode::TimeZoneOffset get_named_time_zone_offset_nanoseconds(StringView time_zone_identifier, Crypto::SignedBigInteger const& epoch_nanoseconds);
|
||||||
Unicode::TimeZoneOffset get_named_time_zone_offset_milliseconds(StringView time_zone_identifier, double epoch_milliseconds);
|
JS_API Unicode::TimeZoneOffset get_named_time_zone_offset_milliseconds(StringView time_zone_identifier, double epoch_milliseconds);
|
||||||
String system_time_zone_identifier();
|
JS_API String system_time_zone_identifier();
|
||||||
void clear_system_time_zone_cache();
|
JS_API void clear_system_time_zone_cache();
|
||||||
double local_time(double time);
|
JS_API double local_time(double time);
|
||||||
double utc_time(double time);
|
JS_API double utc_time(double time);
|
||||||
double make_time(double hour, double min, double sec, double ms);
|
JS_API double make_time(double hour, double min, double sec, double ms);
|
||||||
double make_day(double year, double month, double date);
|
JS_API double make_day(double year, double month, double date);
|
||||||
double make_date(double day, double time);
|
JS_API double make_date(double day, double time);
|
||||||
double time_clip(double time);
|
JS_API double time_clip(double time);
|
||||||
bool is_offset_time_zone_identifier(StringView offset_string);
|
JS_API bool is_offset_time_zone_identifier(StringView offset_string);
|
||||||
ThrowCompletionOr<double> parse_date_time_utc_offset(VM&, StringView offset_string);
|
JS_API ThrowCompletionOr<double> parse_date_time_utc_offset(VM&, StringView offset_string);
|
||||||
double parse_date_time_utc_offset(StringView offset_string);
|
JS_API double parse_date_time_utc_offset(StringView offset_string);
|
||||||
double parse_date_time_utc_offset(Temporal::TimeZoneOffset const&);
|
JS_API double parse_date_time_utc_offset(Temporal::TimeZoneOffset const&);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class DateConstructor final : public NativeFunction {
|
class JS_API DateConstructor final : public NativeFunction {
|
||||||
JS_OBJECT(DateConstructor, NativeFunction);
|
JS_OBJECT(DateConstructor, NativeFunction);
|
||||||
GC_DECLARE_ALLOCATOR(DateConstructor);
|
GC_DECLARE_ALLOCATOR(DateConstructor);
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class DatePrototype final : public PrototypeObject<DatePrototype, Date> {
|
class JS_API DatePrototype final : public PrototypeObject<DatePrototype, Date> {
|
||||||
JS_PROTOTYPE_OBJECT(DatePrototype, Date, Date);
|
JS_PROTOTYPE_OBJECT(DatePrototype, Date, Date);
|
||||||
GC_DECLARE_ALLOCATOR(DatePrototype);
|
GC_DECLARE_ALLOCATOR(DatePrototype);
|
||||||
|
|
||||||
|
@ -74,10 +74,10 @@ private:
|
||||||
JS_DECLARE_NATIVE_FUNCTION(symbol_to_primitive);
|
JS_DECLARE_NATIVE_FUNCTION(symbol_to_primitive);
|
||||||
};
|
};
|
||||||
|
|
||||||
ThrowCompletionOr<double> this_time_value(VM&, Value value);
|
JS_API ThrowCompletionOr<double> this_time_value(VM&, Value value);
|
||||||
ByteString time_string(double time);
|
JS_API ByteString time_string(double time);
|
||||||
ByteString date_string(double time);
|
JS_API ByteString date_string(double time);
|
||||||
ByteString time_zone_string(double time);
|
JS_API ByteString time_zone_string(double time);
|
||||||
ByteString to_date_string(double time);
|
JS_API ByteString to_date_string(double time);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class DeclarativeEnvironment : public Environment {
|
class JS_API DeclarativeEnvironment : public Environment {
|
||||||
JS_ENVIRONMENT(DeclarativeEnvironment, Environment);
|
JS_ENVIRONMENT(DeclarativeEnvironment, Environment);
|
||||||
GC_DECLARE_ALLOCATOR(DeclarativeEnvironment);
|
GC_DECLARE_ALLOCATOR(DeclarativeEnvironment);
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class DisposableStack final : public Object {
|
class JS_API DisposableStack final : public Object {
|
||||||
JS_OBJECT(DisposableStack, Object);
|
JS_OBJECT(DisposableStack, Object);
|
||||||
GC_DECLARE_ALLOCATOR(DisposableStack);
|
GC_DECLARE_ALLOCATOR(DisposableStack);
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class DisposableStackConstructor final : public NativeFunction {
|
class JS_API DisposableStackConstructor final : public NativeFunction {
|
||||||
JS_OBJECT(DisposableStackConstructor, NativeFunction);
|
JS_OBJECT(DisposableStackConstructor, NativeFunction);
|
||||||
GC_DECLARE_ALLOCATOR(DisposableStackConstructor);
|
GC_DECLARE_ALLOCATOR(DisposableStackConstructor);
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class DisposableStackPrototype final : public PrototypeObject<DisposableStackPrototype, DisposableStack> {
|
class JS_API DisposableStackPrototype final : public PrototypeObject<DisposableStackPrototype, DisposableStack> {
|
||||||
JS_PROTOTYPE_OBJECT(DisposableStackPrototype, DisposableStack, DisposableStack);
|
JS_PROTOTYPE_OBJECT(DisposableStackPrototype, DisposableStack, DisposableStack);
|
||||||
GC_DECLARE_ALLOCATOR(DisposableStackPrototype);
|
GC_DECLARE_ALLOCATOR(DisposableStackPrototype);
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
// 10.2 ECMAScript Function Objects, https://tc39.es/ecma262/#sec-ecmascript-function-objects
|
// 10.2 ECMAScript Function Objects, https://tc39.es/ecma262/#sec-ecmascript-function-objects
|
||||||
class ECMAScriptFunctionObject final : public FunctionObject {
|
class JS_API ECMAScriptFunctionObject final : public FunctionObject {
|
||||||
JS_OBJECT(ECMAScriptFunctionObject, FunctionObject);
|
JS_OBJECT(ECMAScriptFunctionObject, FunctionObject);
|
||||||
GC_DECLARE_ALLOCATOR(ECMAScriptFunctionObject);
|
GC_DECLARE_ALLOCATOR(ECMAScriptFunctionObject);
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ struct Variable {
|
||||||
|
|
||||||
#define JS_ENVIRONMENT(class_, base_class) GC_CELL(class_, base_class)
|
#define JS_ENVIRONMENT(class_, base_class) GC_CELL(class_, base_class)
|
||||||
|
|
||||||
class Environment : public Cell {
|
class JS_API Environment : public Cell {
|
||||||
GC_CELL(Environment, Cell);
|
GC_CELL(Environment, Cell);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
struct TracebackFrame {
|
struct JS_API TracebackFrame {
|
||||||
FlyString function_name;
|
FlyString function_name;
|
||||||
[[nodiscard]] SourceRange const& source_range() const;
|
[[nodiscard]] SourceRange const& source_range() const;
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@ enum CompactTraceback {
|
||||||
Yes,
|
Yes,
|
||||||
};
|
};
|
||||||
|
|
||||||
class Error : public Object {
|
class JS_API Error : public Object {
|
||||||
JS_OBJECT(Error, Object);
|
JS_OBJECT(Error, Object);
|
||||||
GC_DECLARE_ALLOCATOR(Error);
|
GC_DECLARE_ALLOCATOR(Error);
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ inline bool Object::fast_is<Error>() const { return is_error_object(); }
|
||||||
// our way of implementing the [[ErrorData]] internal slot, which is
|
// our way of implementing the [[ErrorData]] internal slot, which is
|
||||||
// used in Object.prototype.toString().
|
// used in Object.prototype.toString().
|
||||||
#define DECLARE_NATIVE_ERROR(ClassName, snake_name, PrototypeName, ConstructorName) \
|
#define DECLARE_NATIVE_ERROR(ClassName, snake_name, PrototypeName, ConstructorName) \
|
||||||
class ClassName final : public Error { \
|
class JS_API ClassName final : public Error { \
|
||||||
JS_OBJECT(ClassName, Error); \
|
JS_OBJECT(ClassName, Error); \
|
||||||
GC_DECLARE_ALLOCATOR(ClassName); \
|
GC_DECLARE_ALLOCATOR(ClassName); \
|
||||||
\
|
\
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class ErrorConstructor final : public NativeFunction {
|
class JS_API ErrorConstructor final : public NativeFunction {
|
||||||
JS_OBJECT(ErrorConstructor, NativeFunction);
|
JS_OBJECT(ErrorConstructor, NativeFunction);
|
||||||
GC_DECLARE_ALLOCATOR(ErrorConstructor);
|
GC_DECLARE_ALLOCATOR(ErrorConstructor);
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class ErrorPrototype final : public PrototypeObject<ErrorPrototype, Error> {
|
class JS_API ErrorPrototype final : public PrototypeObject<ErrorPrototype, Error> {
|
||||||
JS_PROTOTYPE_OBJECT(ErrorPrototype, Error, Error);
|
JS_PROTOTYPE_OBJECT(ErrorPrototype, Error, Error);
|
||||||
GC_DECLARE_ALLOCATOR(ErrorPrototype);
|
GC_DECLARE_ALLOCATOR(ErrorPrototype);
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ struct CachedSourceRange : public RefCounted<CachedSourceRange> {
|
||||||
};
|
};
|
||||||
|
|
||||||
// 9.4 Execution Contexts, https://tc39.es/ecma262/#sec-execution-contexts
|
// 9.4 Execution Contexts, https://tc39.es/ecma262/#sec-execution-contexts
|
||||||
struct ExecutionContext {
|
struct JS_API ExecutionContext {
|
||||||
static NonnullOwnPtr<ExecutionContext> create(u32 registers_and_constants_and_locals_count, u32 arguments_count);
|
static NonnullOwnPtr<ExecutionContext> create(u32 registers_and_constants_and_locals_count, u32 arguments_count);
|
||||||
[[nodiscard]] NonnullOwnPtr<ExecutionContext> copy() const;
|
[[nodiscard]] NonnullOwnPtr<ExecutionContext> copy() const;
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class FinalizationRegistry final
|
class JS_API FinalizationRegistry final
|
||||||
: public Object
|
: public Object
|
||||||
, public GC::WeakContainer {
|
, public GC::WeakContainer {
|
||||||
JS_OBJECT(FinalizationRegistry, Object);
|
JS_OBJECT(FinalizationRegistry, Object);
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class FinalizationRegistryConstructor final : public NativeFunction {
|
class JS_API FinalizationRegistryConstructor final : public NativeFunction {
|
||||||
JS_OBJECT(FinalizationRegistryConstructor, NativeFunction);
|
JS_OBJECT(FinalizationRegistryConstructor, NativeFunction);
|
||||||
GC_DECLARE_ALLOCATOR(FinalizationRegistryConstructor);
|
GC_DECLARE_ALLOCATOR(FinalizationRegistryConstructor);
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class FinalizationRegistryPrototype final : public PrototypeObject<FinalizationRegistryPrototype, FinalizationRegistry> {
|
class JS_API FinalizationRegistryPrototype final : public PrototypeObject<FinalizationRegistryPrototype, FinalizationRegistry> {
|
||||||
JS_PROTOTYPE_OBJECT(FinalizationRegistryPrototype, FinalizationRegistry, FinalizationRegistry);
|
JS_PROTOTYPE_OBJECT(FinalizationRegistryPrototype, FinalizationRegistry, FinalizationRegistry);
|
||||||
GC_DECLARE_ALLOCATOR(FinalizationRegistryPrototype);
|
GC_DECLARE_ALLOCATOR(FinalizationRegistryPrototype);
|
||||||
|
|
||||||
|
|
|
@ -16,9 +16,9 @@ struct ParameterArgumentsAndBody {
|
||||||
String body;
|
String body;
|
||||||
};
|
};
|
||||||
|
|
||||||
ThrowCompletionOr<ParameterArgumentsAndBody> extract_parameter_arguments_and_body(VM&, Span<Value> arguments);
|
JS_API ThrowCompletionOr<ParameterArgumentsAndBody> extract_parameter_arguments_and_body(VM&, Span<Value> arguments);
|
||||||
|
|
||||||
class FunctionConstructor final : public NativeFunction {
|
class JS_API FunctionConstructor final : public NativeFunction {
|
||||||
JS_OBJECT(FunctionConstructor, NativeFunction);
|
JS_OBJECT(FunctionConstructor, NativeFunction);
|
||||||
GC_DECLARE_ALLOCATOR(FunctionConstructor);
|
GC_DECLARE_ALLOCATOR(FunctionConstructor);
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class FunctionEnvironment final : public DeclarativeEnvironment {
|
class JS_API FunctionEnvironment final : public DeclarativeEnvironment {
|
||||||
JS_ENVIRONMENT(FunctionEnvironment, DeclarativeEnvironment);
|
JS_ENVIRONMENT(FunctionEnvironment, DeclarativeEnvironment);
|
||||||
GC_DECLARE_ALLOCATOR(FunctionEnvironment);
|
GC_DECLARE_ALLOCATOR(FunctionEnvironment);
|
||||||
|
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class FunctionObject : public Object {
|
class JS_API FunctionObject : public Object {
|
||||||
JS_OBJECT(FunctionObject, Object);
|
JS_OBJECT(FunctionObject, Object);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class FunctionPrototype final : public FunctionObject {
|
class JS_API FunctionPrototype final : public FunctionObject {
|
||||||
JS_OBJECT(FunctionPrototype, FunctionObject);
|
JS_OBJECT(FunctionPrototype, FunctionObject);
|
||||||
GC_DECLARE_ALLOCATOR(FunctionPrototype);
|
GC_DECLARE_ALLOCATOR(FunctionPrototype);
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
// 27.3.1 %GeneratorFunction%, https://tc39.es/ecma262/#sec-generatorfunction-constructor
|
// 27.3.1 %GeneratorFunction%, https://tc39.es/ecma262/#sec-generatorfunction-constructor
|
||||||
class GeneratorFunctionConstructor final : public NativeFunction {
|
class JS_API GeneratorFunctionConstructor final : public NativeFunction {
|
||||||
JS_OBJECT(GeneratorFunctionConstructor, NativeFunction);
|
JS_OBJECT(GeneratorFunctionConstructor, NativeFunction);
|
||||||
GC_DECLARE_ALLOCATOR(GeneratorFunctionConstructor);
|
GC_DECLARE_ALLOCATOR(GeneratorFunctionConstructor);
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
// 27.3.3 %GeneratorFunction.prototype%, https://tc39.es/ecma262/#sec-properties-of-the-generatorfunction-prototype-object
|
// 27.3.3 %GeneratorFunction.prototype%, https://tc39.es/ecma262/#sec-properties-of-the-generatorfunction-prototype-object
|
||||||
class GeneratorFunctionPrototype final : public Object {
|
class JS_API GeneratorFunctionPrototype final : public Object {
|
||||||
JS_OBJECT(GeneratorFunctionPrototype, Object);
|
JS_OBJECT(GeneratorFunctionPrototype, Object);
|
||||||
GC_DECLARE_ALLOCATOR(GeneratorFunctionPrototype);
|
GC_DECLARE_ALLOCATOR(GeneratorFunctionPrototype);
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class GeneratorObject : public Object {
|
class JS_API GeneratorObject : public Object {
|
||||||
JS_OBJECT(GeneratorObject, Object);
|
JS_OBJECT(GeneratorObject, Object);
|
||||||
GC_DECLARE_ALLOCATOR(GeneratorObject);
|
GC_DECLARE_ALLOCATOR(GeneratorObject);
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
// 27.5.1 Properties of the Generator Prototype Object, https://tc39.es/ecma262/#sec-properties-of-generator-prototype
|
// 27.5.1 Properties of the Generator Prototype Object, https://tc39.es/ecma262/#sec-properties-of-generator-prototype
|
||||||
class GeneratorPrototype final : public PrototypeObject<GeneratorPrototype, GeneratorObject> {
|
class JS_API GeneratorPrototype final : public PrototypeObject<GeneratorPrototype, GeneratorObject> {
|
||||||
JS_PROTOTYPE_OBJECT(GeneratorPrototype, GeneratorObject, Generator);
|
JS_PROTOTYPE_OBJECT(GeneratorPrototype, GeneratorObject, Generator);
|
||||||
GC_DECLARE_ALLOCATOR(GeneratorPrototype);
|
GC_DECLARE_ALLOCATOR(GeneratorPrototype);
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
namespace JS {
|
namespace JS {
|
||||||
|
|
||||||
class GeneratorResult final : public Cell {
|
class JS_API GeneratorResult final : public Cell {
|
||||||
GC_CELL(GeneratorResult, Cell);
|
GC_CELL(GeneratorResult, Cell);
|
||||||
GC_DECLARE_ALLOCATOR(GeneratorResult);
|
GC_DECLARE_ALLOCATOR(GeneratorResult);
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue