diff options
author | 2021-12-23 23:47:12 +0000 | |
---|---|---|
committer | 2021-12-23 23:47:12 +0000 | |
commit | 2047140ddaded70f7091ab1dc79be0945bf70c67 (patch) | |
tree | e704c0f979456106074145f16b25850871a4b28a /src/javascript/jsc/javascript.zig | |
parent | b7e2f6c71a497a5bc4f9fd580d5fb07110001aac (diff) | |
download | bun-2047140ddaded70f7091ab1dc79be0945bf70c67.tar.gz bun-2047140ddaded70f7091ab1dc79be0945bf70c67.tar.zst bun-2047140ddaded70f7091ab1dc79be0945bf70c67.zip |
Workaround miscompilation so JavaScriptCore runs on Linux AARCH64
Diffstat (limited to '')
-rw-r--r-- | src/javascript/jsc/javascript.zig | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/javascript/jsc/javascript.zig b/src/javascript/jsc/javascript.zig index 9807c8436..d233fddd5 100644 --- a/src/javascript/jsc/javascript.zig +++ b/src/javascript/jsc/javascript.zig @@ -1436,7 +1436,7 @@ pub const VirtualMachine = struct { vm.global.createAggregateError( errors.ptr, @intCast(u16, errors.len), - ZigString.init(std.fmt.allocPrint(vm.bundler.allocator, "{d} errors building \"{s}\"", .{ errors.len, specifier.slice() }) catch unreachable), + &ZigString.init(std.fmt.allocPrint(vm.bundler.allocator, "{d} errors building \"{s}\"", .{ errors.len, specifier.slice() }) catch unreachable), ).asVoid(), ); return; @@ -1477,7 +1477,7 @@ pub const VirtualMachine = struct { // We first import the node_modules bundle. This prevents any potential TDZ issues. // The contents of the node_modules bundle are lazy, so hopefully this should be pretty quick. if (this.node_modules != null) { - promise = JSModuleLoader.loadAndEvaluateModule(this.global, ZigString.init(std.mem.span(bun_file_import_path))); + promise = JSModuleLoader.loadAndEvaluateModule(this.global, &ZigString.init(std.mem.span(bun_file_import_path))); this.tick(); @@ -1492,7 +1492,7 @@ pub const VirtualMachine = struct { _ = promise.result(this.global.vm()); } - promise = JSModuleLoader.loadAndEvaluateModule(this.global, ZigString.init(std.mem.span(main_file_name))); + promise = JSModuleLoader.loadAndEvaluateModule(this.global, &ZigString.init(std.mem.span(main_file_name))); this.tick(); @@ -1515,7 +1515,7 @@ pub const VirtualMachine = struct { var promise: *JSInternalPromise = undefined; - promise = JSModuleLoader.loadAndEvaluateModule(this.global, ZigString.init(entry_point.source.path.text)); + promise = JSModuleLoader.loadAndEvaluateModule(this.global, &ZigString.init(entry_point.source.path.text)); this.tick(); |