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