]> Cypherpunks repositories - gostls13.git/commit
[dev.typeparams] cmd/compile/internal/typecheck: declutter generated builtin.go ...
authorRobert Griesemer <gri@golang.org>
Thu, 28 Jan 2021 23:52:36 +0000 (15:52 -0800)
committerRobert Griesemer <gri@golang.org>
Fri, 29 Jan 2021 04:27:59 +0000 (04:27 +0000)
commit507e641963c6e4277ae4bc9d5f44469d2b4c9c8f
treef59ee3b38f46ad2e3b7c8bce373f7daff3702ca8
parent2440dd457a451084e4a23b1b0903953f331abea7
[dev.typeparams] cmd/compile/internal/typecheck: declutter generated builtin.go (cleanup)

Even though builtin.go is generated, there's no need for
it to be so huge in terms code size. Nor does ultimate
speed matter here.

Added two simple helper functions that are not inlined,
which reduce the amount of code generated for this file
from 77881 bytes to 27641 bytes of assembly (per compiler
-S output) and reduce the compile binary by ~140KiB
(of course that's insignificant given the 22MiB file size).

Change-Id: I3058ec62788b33eaeff2f9d5fe975b8e41cbf172
Reviewed-on: https://go-review.googlesource.com/c/go/+/287772
Trust: Robert Griesemer <gri@golang.org>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
src/cmd/compile/internal/typecheck/builtin.go
src/cmd/compile/internal/typecheck/mkbuiltin.go