go/test/typeparam
Dan Scales d48f6d9f6f [dev.typeparams] Don't check typecheck(3) on transform, so no need to export/import it
We have a value typecheck(3) that indicates that a node in a generic
function still needs transformation (via the functions in transform.go).
But it is not very desirable to export/import the value of typecheck(3).
So, I changed the stenciling code to just try to transform all relevant
node types during node copy. Almost all tranform functions were already
idempotent. I only had to add an extra if check before calling
transformAssign() in the OAS case. We still use the typecheck(3) in
noder to determine when higher-nodes have to delay transformation
because one or more of their args are delaying transformation.

Added new test mapsimp.go that required these tranformations after import.

As an additional change, export/import of OINDEX requires exporting the
type using w.exoticType() rather than w.typ(), in order to handle
generic functions. Since generic functions can have pre-transform
operations, the index operation can have a tuple type (multiple return
from a map lookup).

Added printing of imported function bodies in -W=3 debug mode.

Change-Id: I220e2428dc5f2741e91db146f075eb5b6045f451
Reviewed-on: https://go-review.googlesource.com/c/go/+/322191
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Dan Scales <danscales@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
2021-05-24 22:17:33 +00:00
..
chansimp.dir [dev.typeparams] cmd/compile: fixing import of comm clauses/closures in generic functions 2021-05-21 23:13:46 +00:00
factimp.dir [dev.typeparams] cmd/compile: export OFUNCINST and OSELRECV2 nodes (for generic functions) 2021-05-21 17:03:30 +00:00
listimp.dir [dev.typeparams] cmd/compile: export OFUNCINST and OSELRECV2 nodes (for generic functions) 2021-05-21 17:03:30 +00:00
listimp2.dir [dev.typeparams] cmd/compile: Fix handling of Name nodes during stenciling 2021-05-24 22:16:09 +00:00
mapimp.dir [dev.typeparams] cmd/compile: add import/export of calls to builtin functions 2021-05-21 17:14:19 +00:00
mapsimp.dir [dev.typeparams] Don't check typecheck(3) on transform, so no need to export/import it 2021-05-24 22:17:33 +00:00
minimp.dir [dev.typeparams] cmd/compile: get export/import of generic types & functions working 2021-05-21 03:41:18 +00:00
pairimp.dir [dev.typeparams] cmd/compile: get export/import of generic types & functions working 2021-05-21 03:41:18 +00:00
sliceimp.dir [dev.typeparams] cmd/compile: fix handling of Nname field in (*subster).tstruct. 2021-05-21 23:25:07 +00:00
stringerimp.dir [dev.typeparams] cmd/compile: get export/import of generic types & functions working 2021-05-21 03:41:18 +00:00
valimp.dir [dev.typeparams] cmd/compile: get export/import of generic types & functions working 2021-05-21 03:41:18 +00:00
absdiff.go
adder.go [dev.typeparams] cmd/compile: get export/import of generic types & functions working 2021-05-21 03:41:18 +00:00
append.go
chans.go
chansimp.go [dev.typeparams] cmd/compile: fixing import of comm clauses/closures in generic functions 2021-05-21 23:13:46 +00:00
combine.go [dev.typeparams] cmd/compile: export OFUNCINST and OSELRECV2 nodes (for generic functions) 2021-05-21 17:03:30 +00:00
cons.go [dev.typeparams] cmd/compile: export OFUNCINST and OSELRECV2 nodes (for generic functions) 2021-05-21 17:03:30 +00:00
double.go
fact.go
factimp.go [dev.typeparams] cmd/compile: export OFUNCINST and OSELRECV2 nodes (for generic functions) 2021-05-21 17:03:30 +00:00
graph.go
importtest.go
index.go [dev.typeparams] cmd/compile: export OFUNCINST and OSELRECV2 nodes (for generic functions) 2021-05-21 17:03:30 +00:00
interfacearg.go
issue45547.go
issue45722.go cmd/compile: fix handling of ir.CurFunc during stenciling 2021-04-27 16:55:20 +00:00
issue45738.go cmd/compile: fix nongeneric closures in generic functions 2021-04-27 19:30:11 +00:00
issue45817.go [dev.typeparams] cmd/compile: fix use of method values with stenciled methods 2021-05-12 22:25:00 +00:00
list.go
list2.go [dev.typeparams] cmd/compile: Fix handling of Name nodes during stenciling 2021-05-24 22:16:09 +00:00
listimp.go [dev.typeparams] cmd/compile: move to new export version, keep reading previous version 2021-05-21 04:03:26 +00:00
listimp2.go [dev.typeparams] cmd/compile: Fix handling of Name nodes during stenciling 2021-05-24 22:16:09 +00:00
lockable.go [dev.typeparams] cmd/compile: export OFUNCINST and OSELRECV2 nodes (for generic functions) 2021-05-21 17:03:30 +00:00
map.go
mapimp.go [dev.typeparams] cmd/compile: add import/export of calls to builtin functions 2021-05-21 17:14:19 +00:00
maps.go
mapsimp.go [dev.typeparams] Don't check typecheck(3) on transform, so no need to export/import it 2021-05-24 22:17:33 +00:00
metrics.go
min.go [dev.typeparams] cmd/compile: get export/import of generic types & functions working 2021-05-21 03:41:18 +00:00
minimp.go [dev.typeparams] cmd/compile: get export/import of generic types & functions working 2021-05-21 03:41:18 +00:00
ordered.go
orderedmap.go
pair.go [dev.typeparams] cmd/compile: get export/import of generic types & functions working 2021-05-21 03:41:18 +00:00
pairimp.go [dev.typeparams] cmd/compile: get export/import of generic types & functions working 2021-05-21 03:41:18 +00:00
pragma.go
sets.go
settable.go [dev.typeparams] cmd/compile: get export/import of generic types & functions working 2021-05-21 03:41:18 +00:00
sliceimp.go [dev.typeparams] cmd/compile: fix handling of Nname field in (*subster).tstruct. 2021-05-21 23:25:07 +00:00
slices.go
smallest.go [dev.typeparams] cmd/compile: get export/import of generic types & functions working 2021-05-21 03:41:18 +00:00
smoketest.go
stringable.go [dev.typeparams] cmd/compile: get export/import of generic types & functions working 2021-05-21 03:41:18 +00:00
stringer.go
stringerimp.go [dev.typeparams] cmd/compile: get export/import of generic types & functions working 2021-05-21 03:41:18 +00:00
struct.go [dev.typeparams] cmd/compile: get export/import of generic types & functions working 2021-05-21 03:41:18 +00:00
sum.go [dev.typeparams] cmd/compile: get export/import of generic types & functions working 2021-05-21 03:41:18 +00:00
tparam1.go
typelist.go
valimp.go [dev.typeparams] cmd/compile: get export/import of generic types & functions working 2021-05-21 03:41:18 +00:00
value.go