mirror of
https://github.com/oven-sh/bun
synced 2026-02-17 22:32:06 +00:00
Split JS parser into multiple files (#20880)
Splits up js_parser.zig into multiple files. Also changes visitExprInOut to use function calls rather than switch Not ready: - [ ] P.zig is ~70,000 tokens, still needs to get smaller - [x] ~~measure zig build time before & after (is it slower?)~~ no significant impact --------- Co-authored-by: pfgithub <6010774+pfgithub@users.noreply.github.com>
This commit is contained in:
10
src/bun.zig
10
src/bun.zig
@@ -1462,10 +1462,6 @@ pub fn concat(comptime T: type, dest: []T, src: []const []const T) void {
|
||||
}
|
||||
}
|
||||
|
||||
pub const fast_debug_build_cmd = .None;
|
||||
pub const fast_debug_build_mode = fast_debug_build_cmd != .None and
|
||||
Environment.isDebug;
|
||||
|
||||
pub const renamer = @import("./renamer.zig");
|
||||
// TODO: Rename to SourceMap as this is a struct.
|
||||
pub const sourcemap = @import("./sourcemap/sourcemap.zig");
|
||||
@@ -1481,10 +1477,8 @@ pub fn asByteSlice(buffer: anytype) []const u8 {
|
||||
}
|
||||
|
||||
comptime {
|
||||
if (fast_debug_build_cmd != .RunCommand and fast_debug_build_mode) {
|
||||
_ = @import("./bun.js/node/buffer.zig").BufferVectorized.fill;
|
||||
_ = @import("./cli/upgrade_command.zig").Version;
|
||||
}
|
||||
_ = @import("./bun.js/node/buffer.zig").BufferVectorized.fill;
|
||||
_ = @import("./cli/upgrade_command.zig").Version;
|
||||
}
|
||||
|
||||
pub fn DebugOnlyDisabler(comptime Type: type) type {
|
||||
|
||||
Reference in New Issue
Block a user