]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: fix import/export of Init and Def fields.
authorDan Scales <danscales@google.com>
Fri, 17 Sep 2021 19:18:19 +0000 (12:18 -0700)
committerDan Scales <danscales@google.com>
Fri, 17 Sep 2021 22:41:29 +0000 (22:41 +0000)
commit50e450826916c777a7d61edab52793ed77314f7a
treea75d7806057adb3a31f4c4a72b3075c43c594deb
parent3fa35b5f9741d7d1c9a9e047057c7210da04fbba
cmd/compile: fix import/export of Init and Def fields.

Change so that the Init and Def fields of assignments and OSELREVC2
nodes are exported/imported properly.

A quirk of iimport.go is that it automatically converts an ODCL node to
an ODCL/OAS sequence (where the OAS is to just zero out the declared
variable). Given that the Inits are properly fixed, o.stmt needs
adjustment for the OSELRECV2 case to skip over the new OAS nodes that
are inserted only on re-import.

Change-Id: Ic38017efca4b7ca9b3952ffbbfca067380902b7a
Reviewed-on: https://go-review.googlesource.com/c/go/+/350809
Run-TryBot: Dan Scales <danscales@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Trust: Dan Scales <danscales@google.com>
src/cmd/compile/internal/typecheck/iexport.go
src/cmd/compile/internal/typecheck/iimport.go
src/cmd/compile/internal/walk/order.go