diff --git a/Userland/Libraries/LibJS/Heap/Handle.cpp b/Userland/Libraries/LibJS/Heap/Handle.cpp index c1758ee429..7916fdffa5 100644 --- a/Userland/Libraries/LibJS/Heap/Handle.cpp +++ b/Userland/Libraries/LibJS/Heap/Handle.cpp @@ -27,6 +27,7 @@ #include #include #include +#include namespace JS { diff --git a/Userland/Libraries/LibJS/Runtime/Cell.cpp b/Userland/Libraries/LibJS/Runtime/Cell.cpp index 57543adc6c..929826fd23 100644 --- a/Userland/Libraries/LibJS/Runtime/Cell.cpp +++ b/Userland/Libraries/LibJS/Runtime/Cell.cpp @@ -43,14 +43,4 @@ void Cell::Visitor::visit(Value value) visit_impl(value.as_cell()); } -Heap& Cell::heap() const -{ - return HeapBlock::from_cell(this)->heap(); -} - -VM& Cell::vm() const -{ - return heap().vm(); -} - } diff --git a/Userland/Libraries/LibJS/Runtime/VM.h b/Userland/Libraries/LibJS/Runtime/VM.h index 025d83e25e..ad8fc88db9 100644 --- a/Userland/Libraries/LibJS/Runtime/VM.h +++ b/Userland/Libraries/LibJS/Runtime/VM.h @@ -284,4 +284,14 @@ template<> template<> [[nodiscard]] ALWAYS_INLINE Value VM::call(Function& function, Value this_value) { return call(function, this_value, Optional {}); } +ALWAYS_INLINE Heap& Cell::heap() const +{ + return HeapBlock::from_cell(this)->heap(); +} + +ALWAYS_INLINE VM& Cell::vm() const +{ + return heap().vm(); +} + }