Generate differnet versions of Bundler, Resolver, and Caches at comptime based on whether we're serving over HTTP

Former-commit-id: e1a8852706
This commit is contained in:
Jarred Sumner
2021-06-04 16:06:38 -07:00
parent 3d827342a5
commit 65f4ea1e18
10 changed files with 2534 additions and 2467 deletions

View File

@@ -41,7 +41,6 @@ const last_high_surrogate: u21 = 0xDBFF;
const first_low_surrogate: u21 = 0xDC00;
const last_low_surrogate: u21 = 0xDFFF;
const assert = std.debug.assert;
const Linker = @import("linker.zig").Linker;
fn notimpl() void {
Global.panic("Not implemented yet!", .{});
@@ -118,7 +117,7 @@ const ExprFlag = packed struct {
}
};
pub fn NewPrinter(comptime ascii_only: bool, comptime Writer: type) type {
pub fn NewPrinter(comptime ascii_only: bool, comptime Writer: type, comptime Linker: type) type {
// comptime const comptime_buf_len = 64;
// comptime var comptime_buf = [comptime_buf_len]u8{};
// comptime var comptime_buf_i: usize = 0;
@@ -3135,9 +3134,10 @@ pub fn printAst(
source: *const logger.Source,
ascii_only: bool,
opts: Options,
linker: ?*Linker,
comptime LinkerType: type,
linker: ?*LinkerType,
) !usize {
const PrinterType = NewPrinter(false, Writer);
const PrinterType = NewPrinter(false, Writer, LinkerType);
var writer = _writer;
var printer = try PrinterType.init(
writer,