Commit Graph

8286 Commits

Author SHA1 Message Date
Jarred Sumner
2b8893da53 Use a separate heap for HTTP 2022-01-23 21:12:59 -08:00
Jarred Sumner
744f52fb27 fake segfault test 2022-01-23 20:13:35 -08:00
Jarred Sumner
43b9f9462f Add kernel version to crash report 2022-01-23 20:11:17 -08:00
Jarred Sumner
d89aa9a9e6 Update main.zig 2022-01-23 20:10:55 -08:00
Jarred Sumner
084d78be29 Add C++ exception handler 2022-01-23 20:10:51 -08:00
Jarred Sumner
4d95e44317 Update helpers.h 2022-01-22 20:06:53 -08:00
Jarred Sumner
4b7235ac5f Update helpers.h 2022-01-22 20:06:18 -08:00
Jarred Sumner
4152c1b177 Update linker.zig 2022-01-22 19:41:01 -08:00
Jarred Sumner
dc5745080d Ensure we fully copy strings 2022-01-22 19:39:23 -08:00
Jarred Sumner
3dfac788fa Update http.zig 2022-01-22 19:17:07 -08:00
Jarred Sumner
c56ff7efb4 Rename bun:runtime -> bun:wrap so it fits 8 chars 2022-01-22 19:17:03 -08:00
Jarred Sumner
114c560912 Don't do isolated copy when we don't need to 2022-01-22 18:32:06 -08:00
Jarred Sumner
1576d183c9 Instead of 4 loops, we can do one switch statement 2022-01-22 18:31:45 -08:00
Jarred Sumner
0e0bfe91d0 [Bun.js] Resolve dynamic imports lazily 2022-01-22 18:31:28 -08:00
Jarred Sumner
08bc06dfe0 No more leading ./ necessary to pass a script to bun to execute 2022-01-22 16:25:21 -08:00
Jarred Sumner
f4fbf84294 Make Ref more safe 2022-01-22 16:23:14 -08:00
Jarred Sumner
56ae4bcb55 Ensure we allocate the correct number of argv 2022-01-22 16:21:45 -08:00
Jarred Sumner
ec61dc0665 [Resolver] Improve how we detect ESM 2022-01-22 16:21:08 -08:00
Jarred Sumner
b21b0ea849 Update report.zig 2022-01-22 16:20:55 -08:00
Jarred Sumner
318c423e14 [Resolver] Improve how we detect ESM 2022-01-22 16:20:35 -08:00
Jarred Sumner
834ff71157 Use newer hash table 2022-01-22 15:10:21 -08:00
Jarred Sumner
39a187d32e Update js_parser.zig 2022-01-22 15:09:37 -08:00
Jarred Sumner
146d2cc231 Sort imports 2022-01-22 15:09:28 -08:00
Jarred Sumner
87c95d45f7 Reset imported_module_ids 2022-01-22 15:00:25 -08:00
Jarred Sumner
22c01ca14c FIx macros remap in Transpiler 2022-01-21 18:10:38 -08:00
Jarred Sumner
111f0921f5 [macros] Always remove imports to macros 2022-01-21 18:09:43 -08:00
Jarred Sumner
8c515c7077 Update exports.zig 2022-01-21 18:09:13 -08:00
Jarred Sumner
04579909ff [Bun.js] Fix error printing 2022-01-21 18:08:56 -08:00
Jarred Sumner
40ff3e4618 memory 2022-01-21 16:28:46 -08:00
Jarred SUmner
c0a446df02 Tags on pointers need to be cleared on Linux 2022-01-21 15:19:50 -08:00
Jarred Sumner
9a5aa95893 [Bun.js] Bun.Transpiler.transform & Bun.Transpiler.transformSync APIs 2022-01-21 03:39:27 -08:00
Jarred Sumner
8d623e21b6 [Bun.js] Add a threadpool for doing CPU-bound work 2022-01-21 03:37:05 -08:00
Jarred Sumner
7a87e41ab8 Update js_printer.zig 2022-01-21 03:36:27 -08:00
Jarred Sumner
f62f184241 Update logger.zig 2022-01-21 03:36:17 -08:00
Jarred Sumner
8ea69cb5d1 Improve reliabiltiy of multithreaded code by using threadlocal mimalloc heaps 2022-01-21 03:36:13 -08:00
Jarred Sumner
97f0cef391 [Bun.js] Fix TypedArray/ArrayBuffer <> Zig interop 2022-01-20 16:19:07 -08:00
Jarred Sumner
85084c6db9 Fix segfault 2022-01-20 01:42:23 -08:00
Jarred Sumner
a09b995651 Bun.Transpiler – API for scanning imports/exports of JSX/TSX/TS/JS files 2022-01-19 23:07:03 -08:00
Jarred Sumner
43ae61e095 Update libbacktrace 2022-01-19 13:34:10 -08:00
Jarred Sumner
f6c05ef7a1 small bugfix 2022-01-19 13:26:24 -08:00
Jarred Sumner
d3a93d5273 fs.*Sync(), bun wiptest, and More ™ (#106)
* very very wip

* almost ready to fix the errors

* Update identity_context.zig

* Update base.zig

* [bun test] It runs successfully

* Remove unnecessary call

* [Bun.js] Improve JS <> Zig unicode string interop

This fixes longstanding unicode bugs with `console.log` & `fetch`.

I believe @evanwashere reported this first awhile ago

* [Bun.js] Implement `Object.is()` binding and a way to set a timeout for script execution

* Update PLCrashReport.zig

* [Bun.js] Make `console.log` more closely match Node.js and Deno

* [Bun.js] Implement formatting specifier for console.*

* Implement `console.clear()`

* bug fix

* Support console.clear()

* Buffer stderr

* [bun test] Begin implementing Node.js `fs`

* Update darwin_c.zig

* Implement more of `fs`

* `mkdir`, `mkdir` recursive, `mkdtemp`

* `open`, `read` (and pread)

* Move some things into more files

* Implement readdir

* `readFile`, `readLink`, and `realpath`

* `writeFile`, `symlink`, `chown`, `rename`, `stat`, `unlink`, `truncate`

* `lutimes`

* Implement `SystemError` and begin wiring up the `fs` module

* `"fs"` - Most of the arguments / validation

* `fs` - Rest of the arguments / validations

* Begin wiring up the `fs` module

* Fix all the build errors

* support printing typed arrays in console.log

* It...works?

* Support `require("fs")`, `import fs from 'fs';`, `import * as fs from 'fs'`

* Fix a couple bugs

* get rid of the crash reporter for now

* Update fs.exports.js

* [bun.js] slight improvement to startup time

* [bun.js] Improve error message printing

* [Bun.js] Add `Bun.gc()` to run the garbage collector manually and report heap size

* [Bun.js] Add Bun.generateHeapSnapshot to return what JS types are using memory

* [Bun.js] Add `Bun.shrink()` to tell JSC to shrink the VM size

* Improve encoding reader

* [bun.js] Improve callback & microtask performance

* Update node_fs.zig

* Implement `console.assert`

* simple test

* [Bun.js] Prepare for multiple globals/realms to support testing

* Create callbacks-overhead.mjs

* Update http.zig

* [Bun.js] Implement `queueMicrotask`

* Add test for queueMicrotask

* 😪

* [Bun.js] Implement `process.versions`, `process.pid`, `process.ppid`, `process.nextTick`, `process.versions`,

* Implement `process.env.toJSON()`

* [Bun.js] Improve performance of `fs.existsSync`

* 💅

* [Bun.js] Implement `process.chdir(str)` and `process.cwd()`, support up to 4 args in `process.nextTick`

* Make creating Zig::Process lazy

* Split processi nto separte file

* [Bun.js] Node.js Streams - Part 1/?

* [Bun.js] Node.js streams 2/?

* WIP streams

* fix crash

* Reduce allocations in many places

* swap

* Make `bun` start 2ms faster

* Always use an apiLock()

* libBacktrace doesn't really work yet

* Fix crash in the upgrade checker

* Clean up code for importing the runtime when not bundling

* 📷

* Update linker.zig

* 68!

* backtrace

* no, really backtrace

* Fix

* Linux fixes

* Fixes on Linux

* Update mimalloc

* [bun test] Automatically scan for {.test,_test,.spec,_spec}.{jsx,tsx,js,cts,mts,ts,cjs}
2022-01-19 02:29:07 -08:00
Jarred Sumner
ed9637de50 Fix bug preventing multiple framework overrides 2022-01-05 17:27:46 -08:00
Jarred Sumner
4e744c057b Reduce memory usage 2022-01-05 16:42:08 -08:00
Jarred Sumner
4b717fe554 Fix crash that sometimes happens after 30 seconds 2022-01-05 16:41:58 -08:00
Jarred Sumner
236a0fde35 [bun bun][bun dev] Fix crash affecting large projects
ArrayList cannot be used here
2022-01-05 16:41:25 -08:00
Jarred Sumner
306d309209 move some code around 2022-01-05 15:04:50 -08:00
Jarred Sumner
a8f4cd271e we want the opposite of this 2022-01-05 13:21:45 -08:00
Jarred Sumner
3cd129544e [JS Parser] Reduce memory usage by ~8% 2022-01-05 13:12:11 -08:00
Jarred Sumner
c013ede227 Update resolver.zig 2022-01-05 13:12:11 -08:00
Jarred Sumner
914b363a37 Update options.zig 2022-01-05 13:12:11 -08:00