]> Cypherpunks repositories - gostls13.git/commit
runtime: move map ismapkey check to the compiler
authorMartin Möhrmann <moehrmann@google.com>
Sat, 2 Sep 2017 15:32:58 +0000 (17:32 +0200)
committerMartin Möhrmann <moehrmann@google.com>
Tue, 5 Sep 2017 20:39:52 +0000 (20:39 +0000)
commitbb31217579974587871a6b7d278ec186f93df126
tree6999c9fb43fda1c0e99ca573a8e12d8e15a3f299
parent2d362f7a4917057d6790ddeba1742f009c13feeb
runtime: move map ismapkey check to the compiler

Remove the runtime ismapkey check from makemap and
add a check that the map key type supports comparison
to the hmap construction in the compiler.

Move the ismapkey check for the reflect code path
into reflect_makemap.

Change-Id: I718f79b0670c05b63ef31721e72408f59ec4ae86
Reviewed-on: https://go-review.googlesource.com/61035
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/gc/reflect.go
src/runtime/hashmap.go