]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: revert init order changes
authorKeith Randall <keithr@alum.mit.edu>
Tue, 21 May 2019 05:01:12 +0000 (01:01 -0400)
committerKeith Randall <khr@golang.org>
Wed, 22 May 2019 11:07:00 +0000 (11:07 +0000)
commit6105e8b4193401cf3344471924025c8a293c8e40
tree56474192eb7204674462c41a746e8702659a3de5
parent648c7b592a30b2280e8d23419224c657ab0a8332
runtime: revert init order changes

First, remove the randomization of initialization order.

Then, revert to source code order instead of sorted package path order.

This restores the behavior that was in 1.12.

A larger change which will implement the suggestion in #31636 will
wait for 1.14. It's too complicated for 1.13 at this point (it has
tricky interactions with plugins).

Fixes #31636

Change-Id: I35b48e8cc21cf9f93c0973edd9193d2eac197628
Reviewed-on: https://go-review.googlesource.com/c/go/+/178297
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/cmd/compile/internal/gc/init.go
src/cmd/compile/internal/types/pkg.go
src/runtime/proc.go
test/fixedbugs/issue31636.dir/a.go [new file with mode: 0644]
test/fixedbugs/issue31636.dir/b.go [new file with mode: 0644]
test/fixedbugs/issue31636.dir/c.go [new file with mode: 0644]
test/fixedbugs/issue31636.dir/main.go [new file with mode: 0644]
test/fixedbugs/issue31636.go [new file with mode: 0644]
test/fixedbugs/issue31636.out [new file with mode: 0644]