github.com/tetratelabs/wazero@v1.7.3-0.20240513003603-48f702e154b5/internal/engine/wazevo/frontend/sort_id_old.go (about)

     1  //go:build !go1.21
     2  
     3  // TODO: delete after the floor Go version is 1.21
     4  
     5  package frontend
     6  
     7  import (
     8  	"sort"
     9  
    10  	"github.com/tetratelabs/wazero/internal/engine/wazevo/ssa"
    11  )
    12  
    13  func sortSSAValueIDs(IDs []ssa.ValueID) {
    14  	sort.SliceStable(IDs, func(i, j int) bool {
    15  		return int(IDs[i]) < int(IDs[j])
    16  	})
    17  }