Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for lexHeap (0.27 sec)

  1. src/cmd/link/internal/ld/heap.go

    type lexHeap []loader.Sym
    
    func (h *lexHeap) push(ldr *loader.Loader, s loader.Sym) {
    	*h = append(*h, s)
    	// sift up
    	n := len(*h) - 1
    	for n > 0 {
    		p := (n - 1) / 2 // parent
    		if ldr.SymName((*h)[p]) <= ldr.SymName((*h)[n]) {
    			break
    		}
    		(*h)[n], (*h)[p] = (*h)[p], (*h)[n]
    		n = p
    	}
    }
    
    func (h *lexHeap) pop(ldr *loader.Loader) loader.Sym {
    	r := (*h)[0]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 14 16:55:22 UTC 2023
    - 1.9K bytes
    - Viewed (0)
  2. src/cmd/link/internal/ld/inittask.go

    	}
    	var edges []edge
    
    	// List of packages that are ready to schedule. We use a lexicographic
    	// ordered heap to pick the lexically earliest uninitialized but
    	// inititalizeable package at each step.
    	var h lexHeap
    
    	// m maps from an inittask symbol for package p to the number of
    	// p's direct imports that have not yet been scheduled.
    	m := map[loader.Sym]int{}
    
    	// Find all reachable inittask records from the roots.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jan 30 20:09:45 UTC 2024
    - 6.2K bytes
    - Viewed (0)
Back to top