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.
Этот коммит содержится в:
родитель
f0904779a5
коммит
1d34f868da
1 изменённых файлов: 1 добавлений и 1 удалений
|
@ -415,7 +415,7 @@ func (p *lowerInterfacesPass) run() {
|
||||||
for _, t := range p.types {
|
for _, t := range p.types {
|
||||||
typeSlice = append(typeSlice, t)
|
typeSlice = append(typeSlice, t)
|
||||||
}
|
}
|
||||||
sort.Sort(typeSlice)
|
sort.Sort(sort.Reverse(typeSlice))
|
||||||
|
|
||||||
// A type code must fit in 16 bits.
|
// A type code must fit in 16 bits.
|
||||||
if len(typeSlice) >= 1<<16 {
|
if len(typeSlice) >= 1<<16 {
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче