diff --git a/Userland/Libraries/LibJS/Heap/Cell.h b/Userland/Libraries/LibJS/Heap/Cell.h index 549d06c3561..827c413860f 100644 --- a/Userland/Libraries/LibJS/Heap/Cell.h +++ b/Userland/Libraries/LibJS/Heap/Cell.h @@ -13,6 +13,7 @@ #include #include #include +#include namespace JS { @@ -53,22 +54,30 @@ public: if (cell) visit_impl(*cell); } + void visit(Cell& cell) { visit_impl(cell); } + template void visit(GCPtr cell) { if (cell) visit_impl(*cell.ptr()); } + template void visit(NonnullGCPtr cell) { visit_impl(*cell.ptr()); } - void visit(Value); + + void visit(Value value) + { + if (value.is_cell()) + visit_impl(value.as_cell()); + } protected: virtual void visit_impl(Cell&) = 0; diff --git a/Userland/Libraries/LibJS/Runtime/ArrayBuffer.h b/Userland/Libraries/LibJS/Runtime/ArrayBuffer.h index 16158e7e7d4..ccab35cbd2e 100644 --- a/Userland/Libraries/LibJS/Runtime/ArrayBuffer.h +++ b/Userland/Libraries/LibJS/Runtime/ArrayBuffer.h @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/Userland/Libraries/LibJS/Runtime/Date.h b/Userland/Libraries/LibJS/Runtime/Date.h index c1374e3edef..358752c06e6 100644 --- a/Userland/Libraries/LibJS/Runtime/Date.h +++ b/Userland/Libraries/LibJS/Runtime/Date.h @@ -7,6 +7,7 @@ #pragma once +#include #include namespace JS { diff --git a/Userland/Libraries/LibJS/Runtime/Intl/MathematicalValue.h b/Userland/Libraries/LibJS/Runtime/Intl/MathematicalValue.h index e9d0ea131c7..1ff11938ea8 100644 --- a/Userland/Libraries/LibJS/Runtime/Intl/MathematicalValue.h +++ b/Userland/Libraries/LibJS/Runtime/Intl/MathematicalValue.h @@ -10,6 +10,7 @@ #include #include #include +#include #include namespace JS::Intl { diff --git a/Userland/Libraries/LibJS/Runtime/NumberConstructor.cpp b/Userland/Libraries/LibJS/Runtime/NumberConstructor.cpp index 6b0d1054cd4..53b0825bb39 100644 --- a/Userland/Libraries/LibJS/Runtime/NumberConstructor.cpp +++ b/Userland/Libraries/LibJS/Runtime/NumberConstructor.cpp @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h index 84ef9555219..3b902d89f01 100644 --- a/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h +++ b/Userland/Libraries/LibJS/Runtime/Temporal/AbstractOperations.h @@ -9,6 +9,7 @@ #include #include +#include #include #include #include diff --git a/Userland/Libraries/LibJS/Runtime/Value.h b/Userland/Libraries/LibJS/Runtime/Value.h index fa745b9d32e..d4679254c28 100644 --- a/Userland/Libraries/LibJS/Runtime/Value.h +++ b/Userland/Libraries/LibJS/Runtime/Value.h @@ -19,7 +19,6 @@ #include #include #include -#include #include // 2 ** 53 - 1 @@ -526,12 +525,6 @@ inline Value js_negative_infinity() return Value(-INFINITY); } -inline void Cell::Visitor::visit(Value value) -{ - if (value.is_cell()) - visit_impl(value.as_cell()); -} - ThrowCompletionOr greater_than(VM&, Value lhs, Value rhs); ThrowCompletionOr greater_than_equals(VM&, Value lhs, Value rhs); ThrowCompletionOr less_than(VM&, Value lhs, Value rhs); diff --git a/Userland/Libraries/LibJS/Runtime/ValueTraits.h b/Userland/Libraries/LibJS/Runtime/ValueTraits.h index c88fddc7094..efcbfd163b8 100644 --- a/Userland/Libraries/LibJS/Runtime/ValueTraits.h +++ b/Userland/Libraries/LibJS/Runtime/ValueTraits.h @@ -8,6 +8,7 @@ #pragma once +#include #include #include diff --git a/Userland/Libraries/LibWeb/Layout/Box.h b/Userland/Libraries/LibWeb/Layout/Box.h index a02a4043ce1..7bca93cdef2 100644 --- a/Userland/Libraries/LibWeb/Layout/Box.h +++ b/Userland/Libraries/LibWeb/Layout/Box.h @@ -8,6 +8,7 @@ #include #include +#include #include namespace Web::Layout { diff --git a/Userland/Libraries/LibWeb/Layout/Node.h b/Userland/Libraries/LibWeb/Layout/Node.h index 98ee636ad1f..effb811f018 100644 --- a/Userland/Libraries/LibWeb/Layout/Node.h +++ b/Userland/Libraries/LibWeb/Layout/Node.h @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include diff --git a/Userland/Libraries/LibWeb/TreeNode.h b/Userland/Libraries/LibWeb/TreeNode.h index 74d7a94d409..f4142e79e11 100644 --- a/Userland/Libraries/LibWeb/TreeNode.h +++ b/Userland/Libraries/LibWeb/TreeNode.h @@ -8,6 +8,7 @@ #include #include +#include #include #include