Skip to content

Commit

Permalink
mark more things as unreachable
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner committed Mar 3, 2022
1 parent 5ace39e commit 696710f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/bun_js.zig
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ pub const Run = struct {
entry_path: string,

pub fn boot(ctx: Command.Context, file: std.fs.File, entry_path: string) !void {
if (comptime JSC.is_bindgen) unreachable;
@import("javascript/jsc/javascript_core_c_api.zig").JSCInitialize();

js_ast.Expr.Data.Store.create(default_allocator);
Expand Down
2 changes: 2 additions & 0 deletions src/cli/test_command.zig
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ const Run = @import("../bun_js.zig").Run;
var path_buf: [_global.MAX_PATH_BYTES]u8 = undefined;
var path_buf2: [_global.MAX_PATH_BYTES]u8 = undefined;
const PathString = _global.PathString;
const is_bindgen = std.meta.globalOption("bindgen", bool) orelse false;

const JSC = @import("javascript_core");
const Jest = JSC.Jest;
Expand Down Expand Up @@ -229,6 +230,7 @@ const Scanner = struct {
pub const TestCommand = struct {
pub const name = "wiptest";
pub fn exec(ctx: Command.Context) !void {
if (comptime is_bindgen) unreachable;
var env_loader = brk: {
var map = try ctx.allocator.create(DotEnv.Map);
map.* = DotEnv.Map.init(ctx.allocator);
Expand Down
2 changes: 2 additions & 0 deletions src/deps/backtrace.zig
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
const Environment = @import("../env.zig");
pub const backtrace_state = struct_backtrace_state;
pub const struct_backtrace_state = opaque {};
pub const backtrace_error_callback = ?fn (
Expand Down Expand Up @@ -88,6 +89,7 @@ noinline fn full_callback(_: ?*anyopaque, pc: usize, filename: [*c]const u8, lin

var state: ?*backtrace_state = null;
pub inline fn print() void {
if (Environment.isMac) return;
state = backtrace_create_state(null, BACKTRACE_SUPPORTS_THREADS, null, null);
_ = backtrace_full(state, 2, full_callback, null, null);
}
Expand Down

0 comments on commit 696710f

Please sign in to comment.