]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: remove DDD array types
authorMatthew Dempsky <mdempsky@google.com>
Thu, 26 Sep 2019 19:37:36 +0000 (12:37 -0700)
committerMatthew Dempsky <mdempsky@google.com>
Thu, 26 Sep 2019 20:45:09 +0000 (20:45 +0000)
commit616c39f6a636166447bdaac4f0871a5ca52bae8c
treebebd6a04043549bf6068f9a6535e267b531600c0
parente1b1b7856f416ca6ff086adc00adc89fd900992c
cmd/compile: remove DDD array types

Currently we handle [...]T array literals by treating [...]T as
special "DDD array" types. However, these array literals are just
composite literal syntax, not a distinct Go type. Moreover,
representing them as Go types contributes to complexity in a number of
unrelated bits of code.

This CL changes OCOMPLIT typechecking to look for the [...]T syntax
and handle it specially, so we can remove DDD arrays.

Passes toolstash-check.

Change-Id: Ibbf701eac4caa7a321e2d10e256658fdfaa8a160
Reviewed-on: https://go-review.googlesource.com/c/go/+/197604
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/cmd/compile/internal/gc/align.go
src/cmd/compile/internal/gc/fmt.go
src/cmd/compile/internal/gc/typecheck.go
src/cmd/compile/internal/types/type.go