Commit 166b691b authored by Robert Griesemer's avatar Robert Griesemer
Browse files

cmd/compile/internal/types2: remove need for instance (struct)

instance was only used to hold the instantiation position for
lazy instantiation (and encode the fact that we have a lazy
instantiation). Just use a (pointer to a) syntax.Pos instead.

We could use a syntax.Pos (no pointer) and rely on the fact
that we have a known position (or fake position, if need be)
to indicate lazy instantiation. But using a pointer leads to
a smaller Named struct.

Change-Id: I441a839a125f453ad6c501de1ce499b72a2f67a4
Reviewed-on: https://go-review.googlesource.com/c/go/+/345177


Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: default avatarMatthew Dempsky <mdempsky@google.com>
parent d6bdae33
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment