mirror of
https://github.com/oven-sh/bun
synced 2026-02-11 19:38:58 +00:00
Refactor Zig imports and file structure (part 1) (#21270)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -182,7 +182,7 @@ pub const StandaloneModuleGraph = struct {
|
||||
return this.wtf_string.dupeRef();
|
||||
}
|
||||
|
||||
pub fn blob(this: *File, globalObject: *bun.JSC.JSGlobalObject) *bun.webcore.Blob {
|
||||
pub fn blob(this: *File, globalObject: *bun.jsc.JSGlobalObject) *bun.webcore.Blob {
|
||||
if (this.cached_blob == null) {
|
||||
const store = bun.webcore.Blob.Store.init(@constCast(this.contents), bun.default_allocator);
|
||||
// make it never free
|
||||
@@ -1226,13 +1226,13 @@ pub const StandaloneModuleGraph = struct {
|
||||
|
||||
// the allocator given to the JS parser is not respected for all parts
|
||||
// of the parse, so we need to remember to reset the ast store
|
||||
bun.JSAst.Expr.Data.Store.reset();
|
||||
bun.JSAst.Stmt.Data.Store.reset();
|
||||
bun.ast.Expr.Data.Store.reset();
|
||||
bun.ast.Stmt.Data.Store.reset();
|
||||
defer {
|
||||
bun.JSAst.Expr.Data.Store.reset();
|
||||
bun.JSAst.Stmt.Data.Store.reset();
|
||||
bun.ast.Expr.Data.Store.reset();
|
||||
bun.ast.Stmt.Data.Store.reset();
|
||||
}
|
||||
var json = bun.JSON.parse(&json_src, &log, arena, false) catch
|
||||
var json = bun.json.parse(&json_src, &log, arena, false) catch
|
||||
return error.InvalidSourceMap;
|
||||
|
||||
const mappings_str = json.get("mappings") orelse
|
||||
@@ -1324,4 +1324,4 @@ const Syscall = bun.sys;
|
||||
const macho = bun.macho;
|
||||
const pe = bun.pe;
|
||||
const strings = bun.strings;
|
||||
const Schema = bun.Schema.Api;
|
||||
const Schema = bun.schema.api;
|
||||
|
||||
Reference in New Issue
Block a user