mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
Implement source maps (#2770)
* wip * Begin computing source map tables * source map progress * external source maps * fix merge * remove `@as` coercion * inline source maps and output source map shifts * fix `codeWithSourceMapShifts()` after merge * remove second call to `findReachableFiles()` * use `worker.allocator`, remove comment * don't reuse memory for source and sourceContents * don't reuse `quote_buf` * fix writing to stdout * Add comment * Don't include a sourcemap if the text was empty * Make the parser faster * +16% faster sourcemap generation @dylan-conway I'll need you to look this over to make sure I didn't mess anything up Though it currently doesn't generate the offsets in the right order... * 30% performance improvement to Bun.build() * Print `debugId` in source maps cc @mitsuhiko @notzeeg --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
This commit is contained in:
@@ -25,6 +25,10 @@ pub const MutableString = struct {
|
||||
};
|
||||
}
|
||||
|
||||
pub fn isEmpty(this: *const MutableString) bool {
|
||||
return this.list.items.len == 0;
|
||||
}
|
||||
|
||||
pub fn deinit(str: *MutableString) void {
|
||||
if (str.list.capacity > 0) {
|
||||
str.list.expandToCapacity();
|
||||
|
||||
Reference in New Issue
Block a user