Skip to content

Avoid .always_inline to improve debugging experience. #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/zflecs.zig
Original file line number Diff line number Diff line change
@@ -2686,8 +2686,14 @@ fn SystemImpl(comptime fn_system: anytype) type {
args_tuple[i] = field(it, @typeInfo(p.type.?).pointer.child, i - start_index).?;
}

//NOTE: .always_inline seems ok, but unsure. Replace to .auto if it breaks
_ = @call(.always_inline, fn_system, args_tuple);
// NOTE: In theory there is no reason not to use .always_inline
// here, but in practice it results in a worse debugging experience
// as of Zig 0.14.0.
//
// For example, on Windows crashes inside fn_system are attributed
// to this @call, and it is not possible to set breakpoints on code
// inside fn_system.
_ = @call(.auto, fn_system, args_tuple);
}
};
}