Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions completions/bun.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -1477,10 +1477,6 @@ _bun_test_param_script_completion() {
_alternative "files:file:_files -g '*(_|.)(test|spec).(js|ts|jsx|tsx)'"
}

_set_remove() {
comm -23 <(echo $1 | sort | tr " " "\n") <(echo $2 | sort | tr " " "\n") 2>/dev/null
}

_bun_add_param_package_completion() {

IFS=$'\n' inexact=($(history -n bun | grep -E "^bun add " | cut -c 9- | uniq))
Expand Down Expand Up @@ -1510,23 +1506,6 @@ _bun_add_param_package_completion() {

}

__bun_dynamic_comp() {
local comp=""

for arg in scripts; do
local line
while read -r line; do
local name="$line"
local desc="$line"
name="${name%$'\t'*}"
desc="${desc/*$'\t'/}"
echo
done <<<"$arg"
done

return $comp
}

if ! command -v compinit >/dev/null; then
autoload -U compinit && compinit
fi
Expand Down
1 change: 0 additions & 1 deletion src/install/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
// Self-alias so Phase-A drafts written against `bun_install::…` resolve
// without rewriting every `use` (e.g. yarn.rs, extract_tarball.rs,
// lifecycle_script_runner.rs).
extern crate bun_sha_hmac as bun_sha;
extern crate self as bun_install;
// `bun_output::declare_scope!` / `scoped_log!` — the macros live at
// `bun_core` crate root (#[macro_export]); alias the crate so the
Expand Down
14 changes: 0 additions & 14 deletions src/jsc/bindings/Bindgen/IDLConvert.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,20 +119,6 @@ ALWAYS_INLINE JSC::JSValue stringOfStringObject(JSC::JSGlobalObject& globalObjec
return value;
}

// An argument of a function whose body is C++ (`cppSymbol`).
class ArgumentInFrame {
public:
ALWAYS_INLINE ArgumentInFrame(JSC::JSValue value)
: m_value(value)
{
}

ALWAYS_INLINE JSC::JSValue value() const { return m_value; }

private:
JSC::JSValue m_value;
};

// What an inline C++ body (`cppInlineBody`) is handed by the generated host function: `at(n)` reads the argument from the frame of the caller where the body asks for it, and answers undefined for one that is left out.
class ArgumentsInFrame {
public:
Expand Down
4 changes: 0 additions & 4 deletions src/jsc/bindings/BunProcess.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,10 @@ typedef int mode_t;
#endif

#if defined(__linux__) || defined(__FreeBSD__)
#include <sys/resource.h>
#include <sys/time.h>
#include <sys/stat.h>
#include <fcntl.h>
#endif

#if defined(__FreeBSD__)
#include <sys/types.h>
#include <sys/sysctl.h>
#include <sys/user.h>
#endif
Expand Down
1 change: 0 additions & 1 deletion src/jsc/bindings/JSFFIFunction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ extern "C" JSC::EncodedJSValue Bun__CreateFFIFunctionValue(Zig::GlobalObject* gl
// We should also consider a separate JSFunction type for our usage to not have this branch in the first place...
// `functionPointer` is the wrapper with the JSC host function ABI. "ptr" is the C function that it calls.
function->putDirect(vm, JSC::Identifier::fromString(vm, String("ptr"_s)), JSC::jsNumber(static_cast<double>(reinterpret_cast<uintptr_t>(symbolFromDynamicLibrary))), JSC::PropertyAttribute::ReadOnly | 0);
function->symbolFromDynamicLibrary = symbolFromDynamicLibrary;
return JSC::JSValue::encode(function);
}

Expand Down
1 change: 0 additions & 1 deletion src/jsc/bindings/JSFFIFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ class JSFFIFunction final : public JSC::JSFunction {
static JSC::EncodedJSValue JSC_HOST_CALL_ATTRIBUTES trampoline(JSGlobalObject* globalObject, CallFrame* callFrame);

void* dataPtr;
void* symbolFromDynamicLibrary { nullptr };

private:
JSFFIFunction(VM&, NativeExecutable*, JSGlobalObject*, Structure*, CFFIFunction&&);
Expand Down
5 changes: 0 additions & 5 deletions src/jsc/bindings/ZigGlobalObject.h
Original file line number Diff line number Diff line change
Expand Up @@ -748,11 +748,6 @@ class StandaloneGlobalObject : public GlobalObject {

namespace Bun {

ALWAYS_INLINE void* vm(Zig::GlobalObject* globalObject)
{
return globalObject->bunVM();
}

ALWAYS_INLINE void* vm(JSC::VM& vm)
{
return WebCore::clientData(vm)->bunVM;
Expand Down
2 changes: 0 additions & 2 deletions src/jsc/bindings/bun-spawn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#include <sys/stat.h>
#include <sys/wait.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <signal.h>
#include <sys/resource.h>
#include <grp.h>

Expand Down
7 changes: 0 additions & 7 deletions src/jsc/bindings/c-bindings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include <cstring>
#include <csignal>
#include <cstdint>
#include <cstdlib>
#include <pthread.h>
#include <termios.h>
#include <sys/ioctl.h>
Expand All @@ -29,9 +28,6 @@
#include <sys/mman.h>
#include <sys/syscall.h>
#include <sys/uio.h>
#if ENABLE(AOT_GUARDED_PAGES)
#include <wtf/WTFConfig.h>
#endif
#endif
#else
#include <uv.h>
Expand Down Expand Up @@ -304,7 +300,6 @@ extern "C" ssize_t bun_close_range(unsigned int start, unsigned int end, unsigne
}

#if CPU(X86_64) || CPU(ARM64)
#include <atomic>
#include <ucontext.h>

#ifndef SYS_SECCOMP
Expand Down Expand Up @@ -1344,8 +1339,6 @@ extern "C" int ffi_fileno(FILE* file)
// Handle signals in bun.spawnSync.
// If we receive a signal, we want to forward the signal to the child process.
#if OS(LINUX) || OS(DARWIN) || OS(FREEBSD)
#include <signal.h>
#include <pthread.h>
#include <wtf/Lock.h>

// The handler below can run on any thread while the spawning thread stores the pid.
Expand Down
1 change: 0 additions & 1 deletion src/jsc/bindings/node/crypto/DiffieHellmanFunctions.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "JSBufferEncodingType.h"
#include <JavaScriptCore/TypedArrayInlines.h>
#include <JavaScriptCore/JSCJSValueInlines.h>
#include "JSBufferEncodingType.h"
#include "ncrypto.h"
#include "CryptoUtil.h"
#include "JSBuffer.h"
Expand Down
1 change: 0 additions & 1 deletion src/jsc/bindings/node/crypto/JSHash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include <JavaScriptCore/StringObject.h>
#include <JavaScriptCore/ThrowScope.h>
#include <openssl/evp.h>
#include <JavaScriptCore/Error.h>
#include "NodeValidator.h"
#include <JavaScriptCore/FunctionPrototype.h>

Expand Down
1 change: 0 additions & 1 deletion src/jsc/bindings/node/crypto/JSHmac.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <JavaScriptCore/JSTypedArrays.h>
#include <JavaScriptCore/ThrowScope.h>
#include <openssl/evp.h>
#include <JavaScriptCore/Error.h>
#include "NodeValidator.h"
#include <JavaScriptCore/FunctionPrototype.h>
#include "KeyObject.h"
Expand Down
12 changes: 0 additions & 12 deletions src/jsc/bindings/sqlite/lazy_sqlite3.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,10 @@ struct sqlite3_session;
struct sqlite3_changeset_iter;
}

typedef int (*lazy_sqlite3_bind_blob_type)(sqlite3_stmt*, int, const void*, int n, void (*)(void*));
typedef int (*lazy_sqlite3_bind_blob64_type)(sqlite3_stmt*, int, const void*, sqlite3_uint64, void (*)(void*));
typedef int (*lazy_sqlite3_bind_double_type)(sqlite3_stmt*, int, double);
typedef int (*lazy_sqlite3_bind_int64_type)(sqlite3_stmt*, int, sqlite3_int64);
typedef int (*lazy_sqlite3_bind_null_type)(sqlite3_stmt*, int);
typedef int (*lazy_sqlite3_bind_text_type)(sqlite3_stmt*, int, const char*, int, void (*)(void*));
typedef int (*lazy_sqlite3_bind_text16_type)(sqlite3_stmt*, int, const void*, int, void (*)(void*));
typedef int (*lazy_sqlite3_bind_text64_type)(sqlite3_stmt*, int, const char*, sqlite3_uint64, void (*)(void*), unsigned char encoding);
typedef int (*lazy_sqlite3_bind_parameter_count_type)(sqlite3_stmt*);
typedef int (*lazy_sqlite3_bind_parameter_index_type)(sqlite3_stmt*, const char* zName);
Expand Down Expand Up @@ -123,15 +120,12 @@ typedef int (*lazy_sqlite3changeset_apply_type)(sqlite3*, int nChangeset, void*
// every TU that includes this header (JSSQLStatement.cpp + NodeSqlite.cpp),
// so bun:sqlite's Database.setCustomSQLite() also affects node:sqlite and
// exactly one dlopen happens per process.
inline lazy_sqlite3_bind_blob_type lazy_sqlite3_bind_blob;
inline lazy_sqlite3_bind_blob64_type lazy_sqlite3_bind_blob64;
inline lazy_sqlite3_bind_double_type lazy_sqlite3_bind_double;
inline lazy_sqlite3_bind_int64_type lazy_sqlite3_bind_int64;
inline lazy_sqlite3_bind_null_type lazy_sqlite3_bind_null;
inline lazy_sqlite3_bind_parameter_count_type lazy_sqlite3_bind_parameter_count;
inline lazy_sqlite3_bind_parameter_index_type lazy_sqlite3_bind_parameter_index;
inline lazy_sqlite3_bind_text_type lazy_sqlite3_bind_text;
inline lazy_sqlite3_bind_text16_type lazy_sqlite3_bind_text16;
inline lazy_sqlite3_bind_text64_type lazy_sqlite3_bind_text64;
inline lazy_sqlite3_changes_type lazy_sqlite3_changes;
inline lazy_sqlite3_changes64_type lazy_sqlite3_changes64;
Expand Down Expand Up @@ -219,15 +213,12 @@ inline lazy_sqlite3session_changeset_type lazy_sqlite3session_changeset;
inline lazy_sqlite3session_patchset_type lazy_sqlite3session_patchset;
inline lazy_sqlite3changeset_apply_type lazy_sqlite3changeset_apply;

#define sqlite3_bind_blob lazy_sqlite3_bind_blob
#define sqlite3_bind_blob64 lazy_sqlite3_bind_blob64
#define sqlite3_bind_double lazy_sqlite3_bind_double
#define sqlite3_bind_int64 lazy_sqlite3_bind_int64
#define sqlite3_bind_null lazy_sqlite3_bind_null
#define sqlite3_bind_parameter_count lazy_sqlite3_bind_parameter_count
#define sqlite3_bind_parameter_index lazy_sqlite3_bind_parameter_index
#define sqlite3_bind_text lazy_sqlite3_bind_text
#define sqlite3_bind_text16 lazy_sqlite3_bind_text16
#define sqlite3_bind_text64 lazy_sqlite3_bind_text64
#define sqlite3_changes lazy_sqlite3_changes
#define sqlite3_changes64 lazy_sqlite3_changes64
Expand Down Expand Up @@ -372,15 +363,12 @@ inline int lazyLoadSQLiteUnlocked(WTF::String* errorMessage = nullptr)
unloadSQLiteHandleUnlocked();
return -1;
}
lazy_sqlite3_bind_blob = (lazy_sqlite3_bind_blob_type)dlsym(sqlite3_handle, "sqlite3_bind_blob");
lazy_sqlite3_bind_blob64 = (lazy_sqlite3_bind_blob64_type)dlsym(sqlite3_handle, "sqlite3_bind_blob64");
lazy_sqlite3_bind_double = (lazy_sqlite3_bind_double_type)dlsym(sqlite3_handle, "sqlite3_bind_double");
lazy_sqlite3_bind_int64 = (lazy_sqlite3_bind_int64_type)dlsym(sqlite3_handle, "sqlite3_bind_int64");
lazy_sqlite3_bind_null = (lazy_sqlite3_bind_null_type)dlsym(sqlite3_handle, "sqlite3_bind_null");
lazy_sqlite3_bind_parameter_count = (lazy_sqlite3_bind_parameter_count_type)dlsym(sqlite3_handle, "sqlite3_bind_parameter_count");
lazy_sqlite3_bind_parameter_index = (lazy_sqlite3_bind_parameter_index_type)dlsym(sqlite3_handle, "sqlite3_bind_parameter_index");
lazy_sqlite3_bind_text = (lazy_sqlite3_bind_text_type)dlsym(sqlite3_handle, "sqlite3_bind_text");
lazy_sqlite3_bind_text16 = (lazy_sqlite3_bind_text16_type)dlsym(sqlite3_handle, "sqlite3_bind_text16");
lazy_sqlite3_bind_text64 = (lazy_sqlite3_bind_text64_type)dlsym(sqlite3_handle, "sqlite3_bind_text64");
lazy_sqlite3_changes = (lazy_sqlite3_changes_type)dlsym(sqlite3_handle, "sqlite3_changes");
lazy_sqlite3_changes64 = (lazy_sqlite3_changes64_type)dlsym(sqlite3_handle, "sqlite3_changes64");
Expand Down
2 changes: 0 additions & 2 deletions src/jsc/bindings/webcore/EventNames.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@

#pragma once

// #include "ThreadGlobalData.h"
#include "EventTarget.h"
#include <wtf/text/AtomString.h>

Expand Down Expand Up @@ -70,7 +69,6 @@ struct EventNames {

private:
EventNames(); // Private to prevent accidental call to EventNames() instead of eventNames().
// friend class ThreadGlobalData; // Allow ThreadGlobalData to create the per-thread EventNames object.

[[maybe_unused]] int dummy; // Needed to make initialization macro work.
};
Expand Down
1 change: 0 additions & 1 deletion src/jsc/bindings/webcore/JSAbortSignal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "ExtendedDOMClientIsoSubspaces.h"
#include "ExtendedDOMIsoSubspaces.h"
#include "IDLTypes.h"
#include "JSAbortSignal.h"
#include "JSDOMAttribute.h"
#include "JSDOMBinding.h"
#include "JSDOMConstructorNotConstructable.h"
Expand Down
1 change: 0 additions & 1 deletion src/jsc/bindings/webcore/JSDOMURL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include "JSDOMGlobalObject.h"
#include "JSDOMGlobalObjectInlines.h"
#include "JSDOMOperation.h"
#include "JSDOMURL.h"
#include "JSDOMWrapperCache.h"
#include "JSURLSearchParams.h"
#include "ScriptExecutionContext.h"
Expand Down
4 changes: 0 additions & 4 deletions src/jsc/bindings/webcore/JSEventTargetCustom.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,6 @@ JSValue toJSNewlyCreated(JSGlobalObject*, JSDOMGlobalObject* globalObject, Ref<E

EventTarget* JSEventTarget::toWrapped(VM& vm, JSValue value)
{
// if (value.inherits<JSWindowProxy>())
// return &uncheckedDowncast<JSWindowProxy>(asObject(value))->wrapped();
// if (value.inherits<JSDOMWindow>())
// return &uncheckedDowncast<JSDOMWindow>(asObject(value))->wrapped();
if (value.inherits<JSDOMGlobalObject>())
return uncheckedDowncast<JSDOMGlobalObject>(asObject(value))->globalEventScope.ptr();
if (value.inherits<JSEventTarget>())
Expand Down
4 changes: 0 additions & 4 deletions src/jsc/bindings/webcore/JSWebSocket.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,6 @@
#include "JSDOMGlobalObjectInlines.h"
#include "JSDOMIterator.h"
#include "JSDOMOperation.h"
#include "JSDOMExceptionHandling.h"
#include "JSDOMGlobalObjectInlines.h"
#include "JSDOMOperation.h"
#include "JSDOMWrapperCache.h"
#include "JSEventListener.h"
#include "ScriptExecutionContext.h"
Expand All @@ -61,7 +58,6 @@
#include <wtf/GetPtr.h>
#include <wtf/PointerPreparations.h>
#include <wtf/URL.h>
#include "IDLTypes.h"
#include "FetchHeaders.h"
#include "HTTPParsers.h"
#include "JSFetchHeaders.h"
Expand Down
Loading