diff options
author | Ayke van Laethem <[email protected]> | 2018-12-12 14:22:52 +0100 |
---|---|---|
committer | Ayke van Laethem <[email protected]> | 2019-02-05 17:11:08 +0100 |
commit | 1d34f868da5e751a62f0574e65dc28d1979091f8 (patch) | |
tree | 4300a68c9496282c9496536b3eb32b705fddb13d | |
parent | f0904779a5211e03acffc87c0eb271e4c1ef3695 (diff) | |
download | tinygo-1d34f868da5e751a62f0574e65dc28d1979091f8.tar.gz tinygo-1d34f868da5e751a62f0574e65dc28d1979091f8.zip |
compiler: sort interface type codes in reverse order
This makes sure the most commonly used types have the lowest type codes.
This was intended to be the case, but apparently I forgot to sort them
the right way.
-rw-r--r-- | compiler/interface-lowering.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/interface-lowering.go b/compiler/interface-lowering.go index a9812980a..00f0df206 100644 --- a/compiler/interface-lowering.go +++ b/compiler/interface-lowering.go @@ -415,7 +415,7 @@ func (p *lowerInterfacesPass) run() { for _, t := range p.types { typeSlice = append(typeSlice, t) } - sort.Sort(typeSlice) + sort.Sort(sort.Reverse(typeSlice)) // A type code must fit in 16 bits. if len(typeSlice) >= 1<<16 { |