mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 11:29:02 +00:00
move GCDeferralContext
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
#include <JavaScriptCore/JSString.h>
|
||||
#include <JavaScriptCore/ScriptArguments.h>
|
||||
#include <wtf/text/WTFString.h>
|
||||
|
||||
#include "GCDefferalContext.h"
|
||||
|
||||
using ScriptArguments = Inspector::ScriptArguments;
|
||||
using MessageType = JSC::MessageType;
|
||||
using MessageLevel = JSC::MessageLevel;
|
||||
@@ -13,24 +16,6 @@ using JSGlobalObject = JSC__JSGlobalObject;
|
||||
|
||||
using String = WTF::String;
|
||||
|
||||
namespace JSC {
|
||||
|
||||
ALWAYS_INLINE GCDeferralContext::GCDeferralContext(VM& vm)
|
||||
: m_vm(vm)
|
||||
{
|
||||
}
|
||||
|
||||
ALWAYS_INLINE GCDeferralContext::~GCDeferralContext()
|
||||
{
|
||||
if constexpr (validateDFGDoesGC)
|
||||
m_vm.verifyCanGC();
|
||||
|
||||
if (UNLIKELY(m_shouldGC))
|
||||
m_vm.heap.collectIfNecessaryOrDefer();
|
||||
}
|
||||
|
||||
} // namespace JSC
|
||||
|
||||
extern "C" {
|
||||
JSC__JSValue Inspector__ScriptArguments__argumentAt(Inspector__ScriptArguments* arg0, size_t i)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user