]> Cypherpunks repositories - gostls13.git/commit
runtime: remove hmap field from maptypes
authorMartin Möhrmann <moehrmann@google.com>
Mon, 29 Jan 2018 20:40:57 +0000 (21:40 +0100)
committerMartin Möhrmann <moehrmann@google.com>
Sun, 6 May 2018 05:46:06 +0000 (05:46 +0000)
commit4ebc67d334336561af5844d8105b5daa81591b04
treee99463e40fdf4fa29bb02a5939be89d021ae32ac
parentb9a59d9f2e78ce497b38a984f62094a53e7dfce7
runtime: remove hmap field from maptypes

The hmap field in the maptype is only used by the runtime to check the sizes of
the hmap structure created by the compiler and runtime agree.

Comments are already present about the hmap structure definitions in the
compiler and runtime needing to be in sync.

Add a test that checks the runtimes hmap size is as expected to detect
when the compilers and runtimes hmap sizes diverge instead of checking
this at runtime when a map is created.

Change-Id: I974945ebfdb66883a896386a17bbcae62a18cf2a
Reviewed-on: https://go-review.googlesource.com/91796
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
src/cmd/compile/internal/gc/reflect.go
src/cmd/link/internal/ld/decodesym.go
src/reflect/type.go
src/runtime/export_test.go
src/runtime/map.go
src/runtime/map_test.go
src/runtime/type.go