Re: [go-nuts] How to export internal runtime functions using go:linkname to bypass linkname checks in Go 1.23?

2024-12-25 Thread Kurtis Rader
This seems like an XY Problem . Why are you depending on a private implementation detail of the Go runtime? What happens to your code if that function is removed or its behavior changes? There is probably a better solution than creating that dependency. If nothing else by k

[go-nuts] How to export internal runtime functions using go:linkname to bypass linkname checks in Go 1.23?

2024-12-25 Thread zhengyao xie
I would like to ask everyone for your help. In external code, I used `//go:linkname` directive as follows: ```go //go:linkname runtime_setEventErr runtime.(*pollDesc).setEventErr func runtime_setEventErr(pd runtimePollDesc, b bool, seq uintptr) ``` The `runtime.(*pollDesc).setEventErr` function h

[go-nuts] Re: Performance: Restrictions on arguments in registers in SSA implementation

2024-12-25 Thread Arseny Samoylov
Hello, thank you for your response. I understand the concern about how many registers a single variable consumes. However, I don’t fully understand why this affects SSA, or why we preemptively decide to spill structures that are already laid out in registers. As far as I understand, this shoul