aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/typecheck/typecheck.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2021-01-11 15:07:09 -0800
committerMatthew Dempsky <mdempsky@google.com>2021-01-12 03:15:18 +0000
commit12ee55ba7bf22157267e735e8e4bbf651c5b4e7d (patch)
treea024598854c7bc9f41d4e7497c2c07cb52a9c4cf /src/cmd/compile/internal/typecheck/typecheck.go
parentb4d2a0445b0ca54a159e0895e1a8b31d47411894 (diff)
downloadgo-12ee55ba7bf22157267e735e8e4bbf651c5b4e7d.tar.gz
go-12ee55ba7bf22157267e735e8e4bbf651c5b4e7d.zip
[dev.regabi] cmd/compile: stop using Vargen for import/export
Historically, inline function bodies were exported as plain Go source code, and symbol mangling was a convenient hack because it allowed variables to be re-imported with largely the same names as they were originally exported as. However, nowadays we use a binary format that's more easily extended, so we can simply serialize all of a function's declared objects up front, and then refer to them by index later on. This also allows us to easily report unmangled names all the time (e.g., error message from issue7921.go). Fixes #43633. Change-Id: I46c88f5a47cb921f70ab140976ba9ddce38df216 Reviewed-on: https://go-review.googlesource.com/c/go/+/283193 Run-TryBot: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Dan Scales <danscales@google.com> Trust: Dan Scales <danscales@google.com> Trust: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/typecheck/typecheck.go')
-rw-r--r--src/cmd/compile/internal/typecheck/typecheck.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/typecheck/typecheck.go b/src/cmd/compile/internal/typecheck/typecheck.go
index 3160725e3c..431fb04bef 100644
--- a/src/cmd/compile/internal/typecheck/typecheck.go
+++ b/src/cmd/compile/internal/typecheck/typecheck.go
@@ -1687,7 +1687,7 @@ func typecheckdeftype(n *ir.Name) {
}
t := types.NewNamed(n)
- t.Vargen = n.Vargen
+ t.Vargen = n.Typegen
if n.Pragma()&ir.NotInHeap != 0 {
t.SetNotInHeap(true)
}