Commit Graph

38 Commits

Author SHA1 Message Date
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
336a4b6ac2 Prepare to run unit tests & remove some dead code (#92)
* Remove some dead code

* 💀 code

* Fix the zig tests

* [JS Printer] Print integers faster & less scientific notation on decimals

* 💀 dead code

* skip

* Run all the unit tests
2021-12-27 18:06:31 -08:00
Jarred Sumner
3036cbe552 bun add and bun remove sorta works now. but not fast enough! 2021-12-16 19:18:51 -08:00
Jarred Sumner
538243dc3b [bun install] Deterministic lockfile and simple installs 2021-12-16 19:18:51 -08:00
Jarred Sumner
9fcd2c53c8 [JSON parser] const has better codegen (unlike in JavaScript!) 2021-12-16 19:18:51 -08:00
Jarred Sumner
bd6b9a58d3 [internal] disable debug workaround 2021-12-16 00:44:39 -08:00
Jarred Sumner
04e0910dea Fix occasional segfault when parsing JSON in http server 2021-11-25 17:17:17 -08:00
Jarred Sumner
fe1a6cee10 [JSON Parser] Improve perf by 2%-4%
We warn when a JSON object has duplicate keys, but detecting duplicate keys has a cost. Now the hash table used for deduping keys is pooled instead of reallocated each time

This also removes a call to potentially resize object properties and arrays to their smallest possible size. Resizing an array can be expensive
2021-11-11 15:33:39 -08:00
Jarred Sumner
bc5f99dc43 [internal] Tiny changes that will eventually make it easier to update zig 2021-11-01 04:04:18 -07:00
Jarred Sumner
9e4f16ac8b ^ 2021-10-24 16:52:16 -07:00
Jarred Sumner
6f6510169e [JSON] Use a special lexer variant only for JSON 2021-10-24 16:09:15 -07:00
Jarred Sumner
ff01dfa03d When bundling JSON, only use JSON.parse when the input is ASCII.
We don't want to add an extra pass over the input to convert it to UTF16. And JS engines storing strings as UTF-16 is more expensive anyway, so the runtime win here probably isn't as big (though open to evidence to the contrary!)
2021-09-23 21:43:37 -07:00
Jarred Sumner
e869cdca9f Slightly improve .env loader string inference 2021-09-20 22:37:39 -07:00
Jarred Sumner
f4d1a3c33d Remove most usages of anytype in js_ast.zig 2021-09-15 21:29:20 -07:00
Jarred Sumner
fc907e2f81 current 2021-09-09 23:33:34 -07:00
Jarred Sumner
c20df72d73 more mutexes
Former-commit-id: 52966012b4b74d24ab28a0c75740aef35fb75327
2021-09-05 02:05:45 -07:00
Jarred Sumner
8c67007926 Use mimalloc for a 10% boost
Former-commit-id: 044e11d720bc6742dc53b30b4e88e8be7e76c419
2021-08-23 02:29:07 -07:00
Jarred Sumner
f96f299377 hash
Former-commit-id: b97aca7fa1
2021-06-06 21:16:50 -07:00
Jarred Sumner
87d01c9f4a Fix printing bugs
Former-commit-id: 52f37e4fe4
2021-05-30 23:35:43 -07:00
Jarred Sumner
4aee9094a7 detect JSON errors
Former-commit-id: 9b5f317c5b
2021-05-26 18:11:28 -07:00
Jarred Sumner
154e049638 lots
Former-commit-id: 9ccb4dd082
2021-05-16 23:25:12 -07:00
Jarred Sumner
e80f865974 lots
Former-commit-id: d8b1d29656
2021-05-15 17:23:55 -07:00
Jarred Sumner
bed0227a8f hm
Former-commit-id: 28fce4aac1
2021-05-13 00:46:22 -07:00
Jarred Sumner
c09d7cf839 That's all the errors??
Former-commit-id: f9a74df73d
2021-05-12 13:00:25 -07:00
Jarred Sumner
ae90b3deea Use try for errors during parsing so that backtracking can happen
Former-commit-id: 7d3b0e7daa
2021-05-08 20:48:20 -07:00
Jarred Sumner
fad34bb4ab cool
Former-commit-id: 96ff169e46
2021-05-07 01:26:26 -07:00
Jarred Sumner
41c9896e11 I think that fixes the scopes bug
Former-commit-id: 2cbd4c9d80
2021-05-05 19:02:14 -07:00
Jarred Sumner
6be0a4653f damn tho
Former-commit-id: e1df98878d
2021-05-05 03:09:59 -07:00
Jarred Sumner
ed9981c9c6 re
Former-commit-id: 2e8d6d549d
2021-05-04 16:02:09 -07:00
Jarred Sumner
adc4e9b23c *
Former-commit-id: 4c60accdc1
2021-05-04 16:01:21 -07:00
Jarred Sumner
cabe773a4f wip
Former-commit-id: b37acf309c
2021-04-28 21:58:02 -07:00
Jarred Sumner
02fbb8e82a json works in CLI sort of 2021-04-27 12:00:10 -07:00
Jarred Sumner
70b6f889c7 lots 2021-04-26 19:22:17 -07:00
Jarred Sumner
97ce2513dc strings kind of 2021-04-26 10:28:48 -07:00
Jarred Sumner
568db047a3 wap 2021-04-26 00:34:45 -07:00
Jarred Sumner
19ab1672ca wip 2021-04-25 18:56:40 -07:00
Jarred Sumner
99918c35ec it prints true and false 2021-04-25 18:47:09 -07:00
Jarred Sumner
c0b7f71b9a little defines, little readme, json parser 2021-04-25 00:56:48 -07:00