]> Cypherpunks repositories - gostls13.git/commit
go/internal/gccgoimporter: use a slice instead of a map for type map (optimization)
authorRobert Griesemer <gri@golang.org>
Wed, 26 Sep 2018 23:56:19 +0000 (16:56 -0700)
committerRobert Griesemer <gri@golang.org>
Thu, 27 Sep 2018 02:52:14 +0000 (02:52 +0000)
commitd1594055ccb667882b7be2a3224abc14f13f6737
treea76a6cd7d00fab9c55e6405fc74929e1335de0f4
parent9c81402f58ae83987f32153c1587c9f03b4a5769
go/internal/gccgoimporter: use a slice instead of a map for type map (optimization)

ggcgo's export format numbers types consecutively, starting at 1.
This makes it trivially possible to use a slice (list) instead of
map for the internal types map.

Change-Id: Ib7814d7fabffac0ad2b56f04a5dad7d6d4c4dd0e
Reviewed-on: https://go-review.googlesource.com/137935
Run-TryBot: Robert Griesemer <gri@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/go/internal/gccgoimporter/parser.go