]> Cypherpunks repositories - gostls13.git/commit
go/types: don't create new context string for each argument of each call
authorRobert Griesemer <gri@golang.org>
Wed, 9 Jan 2019 06:39:13 +0000 (22:39 -0800)
committerRobert Griesemer <gri@golang.org>
Wed, 9 Jan 2019 16:10:07 +0000 (16:10 +0000)
commit8765a786b6e8199959bba8244ac5f95aa3eb9474
treef892d805ad4b5090bfbb7d8124fd004802187559
parenta14ed2a82a1563ba89e1f22ab517bf3c9abe416f
go/types: don't create new context string for each argument of each call

The argument context string is only used in error messages. Don't format
the function AST into a string for every single argument of every single
call that is type-checked. Instead do it once per call (still not great,
but much much better).

Performance optimization.

Change-Id: Iec87f9ad34128d7b3eee58577ad37dbaa8e6db44
Reviewed-on: https://go-review.googlesource.com/c/157037
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/go/types/call.go