]> Cypherpunks repositories - gostls13.git/commit
runtime: have typelinksinit work forwards
authorDavid Crawshaw <crawshaw@golang.org>
Fri, 26 Aug 2016 02:19:16 +0000 (22:19 -0400)
committerDavid Crawshaw <crawshaw@golang.org>
Fri, 26 Aug 2016 21:22:30 +0000 (21:22 +0000)
commitbee42067649390557c772c561e02d46b3f066fe3
tree5cb7cd671df5f24710cdb1431e1a0f4c1dd57410
parent8f3c8a33fad917abb45ef98b3a1cd34fe9715370
runtime: have typelinksinit work forwards

For reasons I have forgotten typelinksinit processed modules backwards.
(I suspect this was an attempt to process types in the executing
binary first.)

It does not appear to be necessary, and it is not the order we want
when a module can be loaded at an arbitrary point during a program's
execution as a plugin. So reverse the order.

While here, make it safe to call typelinksinit multiple times.

Change-Id: Ie10587c55c8e5efa0542981efb6eb3c12dd59e8c
Reviewed-on: https://go-review.googlesource.com/27822
Reviewed-by: Ian Lance Taylor <iant@golang.org>
src/runtime/type.go