Skip to content

Commit 34f6cc3

Browse files
authored
Merge pull request #16 from jhark/inline-call
Avoid `.always_inline` to improve debugging experience.
2 parents 90e268b + 1b53a31 commit 34f6cc3

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/zflecs.zig

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2686,8 +2686,14 @@ fn SystemImpl(comptime fn_system: anytype) type {
26862686
args_tuple[i] = field(it, @typeInfo(p.type.?).pointer.child, i - start_index).?;
26872687
}
26882688

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

0 commit comments

Comments
 (0)