mirror of
https://github.com/oven-sh/bun
synced 2026-02-14 12:51:54 +00:00
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
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
usingnamespace @import("string_types.zig");
|
||||
const string = @import("string_types.zig").string;
|
||||
const Allocator = @import("std").mem.Allocator;
|
||||
const assert = @import("std").debug.assert;
|
||||
const copy = @import("std").mem.copy;
|
||||
@@ -13,7 +13,7 @@ pub fn count(this: *StringBuilder, slice: string) void {
|
||||
this.cap += slice.len;
|
||||
}
|
||||
|
||||
pub fn allocate(this: *StringBuilder, allocator: *Allocator) !void {
|
||||
pub fn allocate(this: *StringBuilder, allocator: Allocator) !void {
|
||||
var slice = try allocator.alloc(u8, this.cap);
|
||||
this.ptr = slice.ptr;
|
||||
this.len = 0;
|
||||
|
||||
Reference in New Issue
Block a user