Commit Graph

29 Commits

Author SHA1 Message Date
Jarred Sumner
51fbbea1d3 upgrade zig 2022-03-04 00:20:22 -08:00
Jarred Sumner
c27577147c Update base.zig 2022-02-18 20:46:57 -08:00
Jarred Sumner
a0717e6fa7 Simple dead code elimination 2022-02-18 15:24:09 -08:00
Jarred Sumner
08e8eabc6f Revert "Remove usage of packed struct in Ref because packed is buggy in zig"
This reverts commit 2578f426b6.
2022-02-15 20:08:35 -08:00
Jarred Sumner
2578f426b6 Remove usage of packed struct in Ref because packed is buggy in zig 2022-02-15 13:47:18 -08:00
Jarred Sumner
f4fbf84294 Make Ref more safe 2022-01-22 16:23:14 -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
e75c711c68 Upgrade to latest Zig, remove dependency on patched version of Zig (#96)
* Prepare to upgrade zig

* zig fmt

* AllocGate

* Update data_url.zig

* wip

* few files

* just headers now?

* I think everything works?

* Update mimalloc

* Update hash_map.zig

* Perf improvements to compensate for Allocgate

* Bump

* 📷

* Update bun.lockb

* Less branching

* [js parser] Slightly reduce memory usage

* Update js_parser.zig

* WIP remove unused

* [JS parser] WIP support for `with` keyword

* Remove more dead code

* Fix all the build errors!

* cleanup

* Move `network_thread` up

* Bump peechy

* Update README.md
2021-12-30 21:12:32 -08:00
Jarred Sumner
1b90619890 [internal] ✂️ dead code 2021-10-23 16:15:36 -07:00
Jarred Sumner
ff8393ce32 WIP 2021-09-25 14:16:05 -07:00
Jarred Sumner
bdfb5a91b1 macro 2021-09-24 15:33:02 -07:00
Jarred Sumner
079fe523d4 Upgrade hash table
Former-commit-id: 5d208f9ea0
2021-06-06 21:16:43 -07:00
Jarred Sumner
d264d4e4ba Fix Define, JSX, use more pointers for property access to minimize calls to memmove
Former-commit-id: 09ceececba
2021-05-30 12:50:08 -07:00
Jarred Sumner
3436ee9ded microp
Former-commit-id: b876a8d480
2021-05-29 13:33:48 -07:00
Jarred Sumner
e73da759b9 Move wyhasxh
Former-commit-id: cd91772f2f
2021-05-29 13:32:13 -07:00
Jarred Sumner
05ec7232bf all
Former-commit-id: 664dbf569c
2021-05-28 23:26:13 -07:00
Jarred Sumner
a58adfcaa2 Starting to work on rutnime
Former-commit-id: 23220fd348
2021-05-19 19:30:24 -07:00
Jarred Sumner
e0e32986c7 Fix duplicate exports error
Former-commit-id: 957e871f4a
2021-05-18 13:49:23 -07:00
Jarred Sumner
154e049638 lots
Former-commit-id: 9ccb4dd082
2021-05-16 23:25:12 -07:00
Jarred Sumner
ca4120afec bug fixes galore
Former-commit-id: 7243945291
2021-05-13 17:44:50 -07:00
Jarred Sumner
fad34bb4ab cool
Former-commit-id: 96ff169e46
2021-05-07 01:26:26 -07:00
Jarred Sumner
6be0a4653f damn tho
Former-commit-id: e1df98878d
2021-05-05 03:09:59 -07:00
Jarred Sumner
a432247053 slice
Former-commit-id: 0bfd74af55
2021-05-04 15:56:55 -07:00
Jarred Sumner
3050d5a1a4 Assorted bugfixes but the next step really is porting tests and fixing
Former-commit-id: f59ec8d6c0
2021-05-01 01:28:40 -07:00
Jarred Sumner
cabe773a4f wip
Former-commit-id: b37acf309c
2021-04-28 21:58:02 -07:00
Jarred Sumner
70b6f889c7 lots 2021-04-26 19:22:17 -07:00
Jarred Sumner
da509f3d5a a 2021-04-22 14:24:28 -07:00
Jarred Sumner
49f4011a66 WIP 2021-04-20 19:09:17 -07:00
Jarred Sumner
ba1c784316 at least it builds 2021-04-20 13:47:15 -07:00