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

Conversation

jhark
Copy link
Contributor

@jhark jhark commented Mar 17, 2025

The SystemImpl wrapper used by convenience functions such as ADD_SYSTEM call the user's system update function (fn_system) via @call(.always_inline, .... 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.

The `SystemImpl` wrapper used by convenience functions such as `ADD_SYSTEM` call the user's system update function (`fn_system`) via `@call(.always_inline, ...`. 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`.
@Srekel
Copy link
Member

Srekel commented Apr 14, 2025

Thanks :)

@Srekel Srekel merged commit 34f6cc3 into zig-gamedev:main Apr 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants