mirror of https://github.com/golang/go.git
Monomorphize the instantiation of generic functions. Applies type substitution while building the function instantiation. Adds a new BuilderMode, ssa.InstantiateGenerics, to enable monomorphization. InstantiateGenerics is turned on by the flag 'G' in tools that specify the BuilderMode. Adds a parameterized field to Program to detect when a MethodValue is parameterized. Thunk creation creates new MethodExpr selections. Adds a new methodExpr type to construct a MethodExpr from outside of types, and selection interface to generalize a *methodExpr and *types.Selection. Tests x/tools/go/ssa/interp against the runnable examples in $GOROOT/test/typeparam/*.go. Some additional models to support files. Misc. cleanup: - adding (*canonizer).instantiateMethod to create a canonical representative of a method. - documenting builder.go - adding (*subster).types that applies type substitution to a list. Updates golang/go#48525 Change-Id: I885a4223900feaa3664e35caf8618d11ba16a2a7 Reviewed-on: https://go-review.googlesource.com/c/tools/+/356315 Reviewed-by: Dominik Honnef <dominik@honnef.co> Reviewed-by: Robert Findley <rfindley@google.com> Reviewed-by: Zvonimir Pavlinovic <zpavlinovic@google.com> Run-TryBot: Tim King <taking@google.com> gopls-CI: kokoro <noreply+kokoro@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> |
||
|---|---|---|
| .. | ||
| auth | ||
| benchcmp | ||
| bundle | ||
| callgraph | ||
| compilebench | ||
| cover | ||
| digraph | ||
| eg | ||
| file2fuzz | ||
| fiximports | ||
| getgo | ||
| go-contrib-init | ||
| godex | ||
| godoc | ||
| goimports | ||
| gomvpkg | ||
| gorename | ||
| gotype | ||
| goyacc | ||
| guru | ||
| html2article | ||
| present | ||
| present2md | ||
| signature-fuzzer | ||
| splitdwarf | ||
| ssadump | ||
| stress | ||
| stringer | ||
| toolstash | ||