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
1,610 changes: 0 additions & 1,610 deletions bench/snippets/_fixture.txt

This file was deleted.

2 changes: 1 addition & 1 deletion misctools/lldb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This directory contains LLDB pretty printers for various Bun data structures to

## Files

- `bun_pretty_printer.py` - Pretty printers for Bun-specific types (bun.String, WTFStringImpl, ZigString, BabyList, etc.)
- `bun_pretty_printer.py` - Pretty printers for Bun-specific types (bun.String, WTFStringImpl, ZigString, etc.)
- `lldb_webkit.py` - Pretty printers for WebKit/JavaScriptCore types
- `init.lldb` - LLDB initialization commands

Expand Down
51 changes: 0 additions & 51 deletions misctools/lldb/bun_pretty_printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,54 +2,6 @@
import lldb
import re

class bun_BabyList_SynthProvider:
def __init__(self, value, _=None):
self.value = value

def update(self):

try:
self.ptr = self.value.GetChildMemberWithName('ptr')
self.len = self.value.GetChildMemberWithName('len').GetValueAsUnsigned()
self.cap = self.value.GetChildMemberWithName('cap').GetValueAsUnsigned()
self.elem_type = self.ptr.type.GetPointeeType()
self.elem_size = self.elem_type.size
except:
self.len = 0
self.cap = 0
pass


def has_children(self):
return True

def num_children(self):
return self.len or 0

def get_child_index(self, name):
try:
return int(name.removeprefix('[').removesuffix(']'))
except:
return -1

def get_child_at_index(self, index):
if index not in range(self.len):
return None
try:
return self.ptr.CreateChildAtOffset('[%d]' % index, index * self.elem_size, self.elem_type)
except:
return None

def bun_BabyList_SummaryProvider(value, _=None):
try:
# Get the non-synthetic value to access raw members
value = value.GetNonSyntheticValue()
len_val = value.GetChildMemberWithName('len')
cap_val = value.GetChildMemberWithName('cap')
return 'len=%d cap=%d' % (len_val.GetValueAsUnsigned(), cap_val.GetValueAsUnsigned())
except:
return 'len=? cap=?'

def add(debugger, *, category, regex=False, type, identifier=None, synth=False, inline_children=False, expand=False, summary=False):
prefix = '.'.join((__name__, (identifier or type).replace('.', '_').replace(':', '_')))
if summary:
Expand Down Expand Up @@ -306,9 +258,6 @@ def __lldb_init_module(debugger, _=None):
# Initialize Bun Category
debugger.HandleCommand('type category define --language c99 bun')

# Initialize Bun Data Structures
add(debugger, category='bun', regex=True, type='^baby_list\\.BabyList\\(.*\\)$', identifier='bun_BabyList', synth=True, expand=True, summary=True)

# Add WTFStringImpl pretty printer - try multiple possible type names
add(debugger, category='bun', type='WTFStringImpl', identifier='WTFStringImpl', summary=True)
add(debugger, category='bun', type='*WTFStringImplStruct', identifier='WTFStringImpl', summary=True)
Expand Down
2 changes: 0 additions & 2 deletions packages/bun-debug-adapter-protocol/.gitattributes

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ async function run() {
const schema: Protocol = await download(
"https://microsoft.github.io/debug-adapter-protocol/debugAdapterProtocol.json",
);
write("protocol.json", JSON.stringify(schema));
const types = formatProtocol(schema);
write("index.d.ts", `// GENERATED - DO NOT EDIT\n${types}`);
}
Expand Down
3,779 changes: 0 additions & 3,779 deletions packages/bun-debug-adapter-protocol/src/protocol/protocol.json

This file was deleted.

1 change: 0 additions & 1 deletion scripts/build/buildOptionsRs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ export function generateBuildOptionsRs(cfg: Config): string {
`pub const IS_CANARY: bool = ${cfg.canary};`,
`pub const CANARY_REVISION: &str = ${rstr(cfg.canaryRevision)};`,
`pub const ENABLE_FUZZILLI: bool = ${cfg.fuzzilli};`,
`pub const FALLBACK_HTML_VERSION: &str = "0000000000000000";`,
"pub const VERSION: crate::Version = crate::Version {",
` major: ${Number(major)},`,
` minor: ${Number(minor)},`,
Expand Down
2 changes: 0 additions & 2 deletions src/bun_core/feature_flags.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ pub const TRACING: bool = true;

pub const WATCH_DIRECTORIES: bool = true;

pub const DISABLE_COMPRESSION_IN_HTTP_CLIENT: bool = false;

pub const ENABLE_KEEPALIVE: bool = true;

pub const ATOMIC_FILE_WATCHER: bool = env::IS_LINUX;
Expand Down
5 changes: 1 addition & 4 deletions src/bun_core/string/immutable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -970,10 +970,7 @@ pub fn starts_with_case_insensitive_ascii(self_: &[u8], prefix: &[u8]) -> bool {
&& eql_case_insensitive_ascii(&self_[0..prefix.len()], prefix, false)
}

pub use crate::strings_impl::{
has_prefix_t, has_prefix_t as starts_with_generic, has_suffix_t,
has_suffix_t as ends_with_generic,
};
pub use crate::strings_impl::{has_prefix_t, has_suffix_t};

#[inline]
pub fn ends_with(self_: &[u8], str: &[u8]) -> bool {
Expand Down
15 changes: 2 additions & 13 deletions src/http/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -986,19 +986,8 @@ const CHUNKED_ENCODED_HEADER: picohttp::Header =
const CONNECTION_HEADER: picohttp::Header = picohttp::Header::new(b"Connection", b"keep-alive");
const ACCEPT_HEADER: picohttp::Header = picohttp::Header::new(b"Accept", b"*/*");

const ACCEPT_ENCODING_NO_COMPRESSION: &[u8] = b"identity";
const ACCEPT_ENCODING_COMPRESSION: &[u8] = b"gzip, deflate, br, zstd";
const ACCEPT_ENCODING_HEADER_COMPRESSION: picohttp::Header =
picohttp::Header::new(b"Accept-Encoding", ACCEPT_ENCODING_COMPRESSION);
const ACCEPT_ENCODING_HEADER_NO_COMPRESSION: picohttp::Header =
picohttp::Header::new(b"Accept-Encoding", ACCEPT_ENCODING_NO_COMPRESSION);

const ACCEPT_ENCODING_HEADER: picohttp::Header = if FeatureFlags::DISABLE_COMPRESSION_IN_HTTP_CLIENT
{
ACCEPT_ENCODING_HEADER_NO_COMPRESSION
} else {
ACCEPT_ENCODING_HEADER_COMPRESSION
};
const ACCEPT_ENCODING_HEADER: picohttp::Header =
picohttp::Header::new(b"Accept-Encoding", b"gzip, deflate, br, zstd");

fn get_user_agent_header() -> picohttp::Header {
let ua = OVERRIDDEN_DEFAULT_USER_AGENT.get().copied().unwrap_or(b"");
Expand Down
1 change: 0 additions & 1 deletion src/js/builtins.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ type TODO = any;
declare module "bun" {
interface Socket {
$write(data: string | BufferSource, byteOffset?: number, byteLength?: number): number;
$end(): void;
}
}

Expand Down
10 changes: 0 additions & 10 deletions src/jsc/bindings/AsyncContextFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,6 @@ AsyncContextFrame* AsyncContextFrame::create(VM& vm, JSC::Structure* structure,
return asyncContextData;
}

AsyncContextFrame* AsyncContextFrame::create(JSGlobalObject* global, JSValue callback, JSValue context)
{
auto& vm = global->vm();
ASSERT(callback.isCallable());
auto* structure = uncheckedDowncast<Zig::GlobalObject>(global)->AsyncContextFrameStructure();
AsyncContextFrame* asyncContextData = new (NotNull, allocateCell<AsyncContextFrame>(vm)) AsyncContextFrame(vm, structure, callback, context);
asyncContextData->finishCreation(vm);
return asyncContextData;
}

JSC::Structure* AsyncContextFrame::createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject)
{
return Structure::create(vm, globalObject, jsNull(), TypeInfo(ObjectType, StructureFlags), info());
Expand Down
1 change: 0 additions & 1 deletion src/jsc/bindings/AsyncContextFrame.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ class AsyncContextFrame : public JSC::JSNonFinalObject {
static constexpr unsigned StructureFlags = Base::StructureFlags;

static AsyncContextFrame* create(JSC::VM& vm, JSC::Structure* structure, JSC::JSValue callback, JSC::JSValue context);
static AsyncContextFrame* create(JSC::JSGlobalObject* global, JSC::JSValue callback, JSC::JSValue context);

static JSC::Structure* createStructure(JSC::VM& vm, JSC::JSGlobalObject* globalObject);

Expand Down
5 changes: 0 additions & 5 deletions src/jsc/bindings/BunGlobalScope.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ class GlobalScope : public JSC::JSGlobalObject {
void finishCreation(JSC::VM& vm);

public:
GlobalScope(JSC::VM& vm, JSC::Structure* structure)
: Base(vm, structure)
{
}

GlobalScope(JSC::VM& vm, JSC::Structure* structure, const JSC::GlobalObjectMethodTable* methodTable)
: Base(vm, structure, methodTable)
{
Expand Down
3 changes: 0 additions & 3 deletions src/jsc/bindings/JSNodePerformanceHooksHistogram.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,6 @@ class JSNodePerformanceHooksHistogram final : public JSC::JSDestructibleObject {
static size_t estimatedSize(JSC::JSCell* cell, JSC::VM& vm);
static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&);

template<typename Visitor>
static void visitChildren(JSCell*, Visitor&);

DECLARE_INFO;
DECLARE_VISIT_CHILDREN;

Expand Down
3 changes: 0 additions & 3 deletions src/jsc/bindings/JSX509Certificate.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,6 @@ class JSX509Certificate final : public JSC::JSDestructibleObject {

static void analyzeHeap(JSCell*, JSC::HeapAnalyzer&);

template<typename Visitor>
static void visitChildren(JSCell*, Visitor&);

DECLARE_INFO;
DECLARE_VISIT_CHILDREN;

Expand Down
62 changes: 0 additions & 62 deletions src/jsc/bindings/dh-primes.h

This file was deleted.

5 changes: 0 additions & 5 deletions src/jsc/bindings/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,6 @@ static void* untagVoid(const unsigned char* ptr)
return const_cast<void*>(reinterpret_cast<const void*>(untag(ptr)));
}

static void* untagVoid(const char16_t* ptr)
{
return untagVoid(reinterpret_cast<const unsigned char*>(ptr));
}

static bool isTaggedUTF16Ptr(const unsigned char* ptr)
{
return (reinterpret_cast<uintptr_t>(ptr) & (static_cast<uint64_t>(1) << 63)) != 0;
Expand Down
2 changes: 1 addition & 1 deletion src/jsc/bindings/ncrypto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#include <openssl/provider.h>
#endif
#ifdef OPENSSL_IS_BORINGSSL
#include "dh-primes.h"
#include <openssl/mem.h>
#endif // OPENSSL_IS_BORINGSSL

// EVP_PKEY_CTX_set_dsa_paramgen_q_bits was added in OpenSSL 1.1.1e.
Expand Down
1 change: 0 additions & 1 deletion src/jsc/bindings/webcore/JSDOMConvertBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "ZigGlobalObject.h"
#include "JSDOMGlobalObject.h"
#include "JSDOMExceptionHandling.h"
#include "JSDOMConvertResult.h"
#include <JavaScriptCore/Error.h>

namespace WebCore {
Expand Down
Loading
Loading