cmd/compile: treat pointer-to-go:notinheap types as scalar #22519
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
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 whenT
is 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
The text was updated successfully, but these errors were encountered: