In the runtime, we have the go:notinheap directive to flag types that can never appear in the Go heap. The compiler currently uses this directive to omit write barriers for *T-typed slots when T is marked go:notinheap.
However, we still mark *T-typed slots as pointers in the GC maps, worry about zero-initializing them, allocate them in the .bss/.data sections instead of .noptrbss/.noptrdata sections, etc. This issue is about determining whether we can just treat them as scalars instead; and if so, implementing that change.
See also brief discussion in CL 73412.
/cc @aclements
In the runtime, we have the
go:notinheapdirective to flag types that can never appear in the Go heap. The compiler currently uses this directive to omit write barriers for*T-typed slots whenTis markedgo:notinheap.However, we still mark
*T-typed slots as pointers in the GC maps, worry about zero-initializing them, allocate them in the .bss/.data sections instead of .noptrbss/.noptrdata sections, etc. This issue is about determining whether we can just treat them as scalars instead; and if so, implementing that change.See also brief discussion in CL 73412.
/cc @aclements