]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: preserve escape information for map literals
authorMartin Möhrmann <moehrmann@google.com>
Sun, 10 Sep 2017 17:36:38 +0000 (19:36 +0200)
committerMartin Möhrmann <moehrmann@google.com>
Mon, 11 Sep 2017 05:54:46 +0000 (05:54 +0000)
commit098126103e861264bc746e8de1dae2063ad7ba71
tree670e05b4781897766f3e097ca883fd41f53ae988
parent1a3230f281e2ad7a35f7f81a5e6bae291b8e6245
cmd/compile: preserve escape information for map literals

While some map literals were marked non-escaping that information
was lost when creating the corresponding OMAKE node which made map
literals always heap allocated.

Copying the escape information to the corresponding OMAKE node allows
stack allocation of hmap and a map bucket for non escaping map literals.

Fixes #21830

Change-Id: Ife0b020fffbc513f1ac009352f2ecb110d6889c9
Reviewed-on: https://go-review.googlesource.com/62790
Run-TryBot: Martin Möhrmann <moehrmann@google.com>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Reviewed-by: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
src/cmd/compile/internal/gc/sinit.go
src/runtime/map_test.go