Skip to content
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

Avoid .always_inline to improve debugging experience. #16

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jhark
Copy link

@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`.
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.

1 participant