diff options
Diffstat (limited to 'src/resolver')
-rw-r--r-- | src/resolver/package_json.zig | 10 | ||||
-rw-r--r-- | src/resolver/resolve_path.zig | 4 | ||||
-rw-r--r-- | src/resolver/resolver.zig | 44 |
3 files changed, 29 insertions, 29 deletions
diff --git a/src/resolver/package_json.zig b/src/resolver/package_json.zig index d9e2515de..13f0b5467 100644 --- a/src/resolver/package_json.zig +++ b/src/resolver/package_json.zig @@ -1069,7 +1069,7 @@ pub const ESModule = struct { "%5C", }; - threadlocal var resolved_path_buf_percent: [std.fs.MAX_PATH_BYTES]u8 = undefined; + threadlocal var resolved_path_buf_percent: [_global.MAX_PATH_BYTES]u8 = undefined; pub fn resolve(r: *const ESModule, package_url: string, subpath: string, exports: ExportsMap.Entry) Resolution { var result = r.resolveExports(package_url, subpath, exports); @@ -1239,8 +1239,8 @@ pub const ESModule = struct { }; } - threadlocal var resolve_target_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; - threadlocal var resolve_target_buf2: [std.fs.MAX_PATH_BYTES]u8 = undefined; + threadlocal var resolve_target_buf: [_global.MAX_PATH_BYTES]u8 = undefined; + threadlocal var resolve_target_buf2: [_global.MAX_PATH_BYTES]u8 = undefined; fn resolveTarget( r: *const ESModule, package_url: string, @@ -1505,8 +1505,8 @@ pub const ESModule = struct { } } - threadlocal var resolve_target_reverse_prefix_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; - threadlocal var resolve_target_reverse_prefix_buf2: [std.fs.MAX_PATH_BYTES]u8 = undefined; + threadlocal var resolve_target_reverse_prefix_buf: [_global.MAX_PATH_BYTES]u8 = undefined; + threadlocal var resolve_target_reverse_prefix_buf2: [_global.MAX_PATH_BYTES]u8 = undefined; fn resolveTargetReverse( r: *const ESModule, diff --git a/src/resolver/resolve_path.zig b/src/resolver/resolve_path.zig index a2366b50a..c731aff6b 100644 --- a/src/resolver/resolve_path.zig +++ b/src/resolver/resolve_path.zig @@ -3,7 +3,7 @@ const std = @import("std"); const strings = @import("../string_immutable.zig"); const FeatureFlags = @import("../feature_flags.zig"); const default_allocator = @import("../memory_allocator.zig").c_allocator; - +const _global = @import("../global.zig"); threadlocal var parser_join_input_buffer: [4096]u8 = undefined; threadlocal var parser_buffer: [1024]u8 = undefined; @@ -716,7 +716,7 @@ pub fn joinAbsStringBufZ(_cwd: []const u8, buf: []u8, _parts: anytype, comptime inline fn _joinAbsStringBuf(comptime is_sentinel: bool, comptime ReturnType: type, _cwd: []const u8, buf: []u8, _parts: anytype, comptime _platform: Platform) ReturnType { var parts: []const []const u8 = _parts; - var temp_buf: [std.fs.MAX_PATH_BYTES * 2]u8 = undefined; + var temp_buf: [_global.MAX_PATH_BYTES * 2]u8 = undefined; if (parts.len == 0) { if (comptime is_sentinel) { unreachable; diff --git a/src/resolver/resolver.zig b/src/resolver/resolver.zig index f153db65a..f05cbb6f1 100644 --- a/src/resolver/resolver.zig +++ b/src/resolver/resolver.zig @@ -56,8 +56,8 @@ pub const TemporaryBuffer = struct { pub threadlocal var ExtensionPathBuf: [512]u8 = undefined; pub threadlocal var TSConfigMatchStarBuf: [512]u8 = undefined; pub threadlocal var TSConfigMatchPathBuf: [512]u8 = undefined; - pub threadlocal var TSConfigMatchFullBuf: [std.fs.MAX_PATH_BYTES]u8 = undefined; - pub threadlocal var TSConfigMatchFullBuf2: [std.fs.MAX_PATH_BYTES]u8 = undefined; + pub threadlocal var TSConfigMatchFullBuf: [_global.MAX_PATH_BYTES]u8 = undefined; + pub threadlocal var TSConfigMatchFullBuf2: [_global.MAX_PATH_BYTES]u8 = undefined; }; pub const PathPair = struct { @@ -212,21 +212,21 @@ pub const DirEntryResolveQueueItem = struct { threadlocal var _dir_entry_paths_to_resolve: [256]DirEntryResolveQueueItem = undefined; threadlocal var _open_dirs: [256]std.fs.Dir = undefined; -threadlocal var resolve_without_remapping_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; -threadlocal var index_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; -threadlocal var dir_info_uncached_filename_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; -threadlocal var node_bin_path: [std.fs.MAX_PATH_BYTES]u8 = undefined; -threadlocal var dir_info_uncached_path_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; -threadlocal var tsconfig_base_url_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; -threadlocal var relative_abs_path_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; -threadlocal var load_as_file_or_directory_via_tsconfig_base_path: [std.fs.MAX_PATH_BYTES]u8 = undefined; -threadlocal var node_modules_check_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; -threadlocal var field_abs_path_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; -threadlocal var tsconfig_path_abs_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; -threadlocal var check_browser_map_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; -threadlocal var remap_path_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; -threadlocal var load_as_file_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; -threadlocal var remap_path_trailing_slash: [std.fs.MAX_PATH_BYTES]u8 = undefined; +threadlocal var resolve_without_remapping_buf: [_global.MAX_PATH_BYTES]u8 = undefined; +threadlocal var index_buf: [_global.MAX_PATH_BYTES]u8 = undefined; +threadlocal var dir_info_uncached_filename_buf: [_global.MAX_PATH_BYTES]u8 = undefined; +threadlocal var node_bin_path: [_global.MAX_PATH_BYTES]u8 = undefined; +threadlocal var dir_info_uncached_path_buf: [_global.MAX_PATH_BYTES]u8 = undefined; +threadlocal var tsconfig_base_url_buf: [_global.MAX_PATH_BYTES]u8 = undefined; +threadlocal var relative_abs_path_buf: [_global.MAX_PATH_BYTES]u8 = undefined; +threadlocal var load_as_file_or_directory_via_tsconfig_base_path: [_global.MAX_PATH_BYTES]u8 = undefined; +threadlocal var node_modules_check_buf: [_global.MAX_PATH_BYTES]u8 = undefined; +threadlocal var field_abs_path_buf: [_global.MAX_PATH_BYTES]u8 = undefined; +threadlocal var tsconfig_path_abs_buf: [_global.MAX_PATH_BYTES]u8 = undefined; +threadlocal var check_browser_map_buf: [_global.MAX_PATH_BYTES]u8 = undefined; +threadlocal var remap_path_buf: [_global.MAX_PATH_BYTES]u8 = undefined; +threadlocal var load_as_file_buf: [_global.MAX_PATH_BYTES]u8 = undefined; +threadlocal var remap_path_trailing_slash: [_global.MAX_PATH_BYTES]u8 = undefined; pub const DebugLogs = struct { what: string = "", @@ -511,7 +511,7 @@ pub const Resolver = struct { pkg.loadFrameworkWithPreference(pair, json, r.allocator, load_defines, preference); const dir = pkg.source.path.sourceDir(); - var buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; + var buf: [_global.MAX_PATH_BYTES]u8 = undefined; pair.framework.resolved_dir = pkg.source.path.sourceDir(); @@ -716,7 +716,7 @@ pub const Resolver = struct { } } else if (dir.abs_real_path.len > 0) { var parts = [_]string{ dir.abs_real_path, query.entry.base() }; - var buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; + var buf: [_global.MAX_PATH_BYTES]u8 = undefined; var out = r.fs.absBuf(&parts, &buf); @@ -1161,8 +1161,8 @@ pub const Resolver = struct { } threadlocal var esm_subpath_buf: [512]u8 = undefined; - threadlocal var esm_absolute_package_path: [std.fs.MAX_PATH_BYTES]u8 = undefined; - threadlocal var esm_absolute_package_path_joined: [std.fs.MAX_PATH_BYTES]u8 = undefined; + threadlocal var esm_absolute_package_path: [_global.MAX_PATH_BYTES]u8 = undefined; + threadlocal var esm_absolute_package_path_joined: [_global.MAX_PATH_BYTES]u8 = undefined; pub fn loadNodeModules(r: *ThisResolver, import_path: string, kind: ast.ImportKind, _dir_info: *DirInfo) ?MatchResult { var dir_info = _dir_info; if (r.debug_logs) |*debug| { @@ -1814,7 +1814,7 @@ pub const Resolver = struct { extension_order: []const string, map: BrowserMap, - pub threadlocal var abs_to_rel_buf: [std.fs.MAX_PATH_BYTES]u8 = undefined; + pub threadlocal var abs_to_rel_buf: [_global.MAX_PATH_BYTES]u8 = undefined; pub const Kind = enum { PackagePath, AbsolutePath }; |