Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 205 for cmap (0.06 sec)

  1. src/go/ast/commentmap.go

    			stack.push(q)
    		}
    	}
    
    	return cmap
    }
    
    // Update replaces an old node in the comment map with the new node
    // and returns the new node. Comments that were associated with the
    // old node are associated with the new node.
    func (cmap CommentMap) Update(old, new Node) Node {
    	if list := cmap[old]; len(list) > 0 {
    		delete(cmap, old)
    		cmap[new] = append(cmap[new], list...)
    	}
    	return new
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 8.9K bytes
    - Viewed (0)
  2. src/go/ast/commentmap_test.go

    		}
    	}
    
    	// verify that no comments got lost
    	if n := len(cmap.Comments()); n != len(f.Comments) {
    		t.Errorf("got %d comment groups in map; want %d", n, len(f.Comments))
    	}
    
    	// support code to update test:
    	// set genMap to true to generate res map
    	const genMap = false
    	if genMap {
    		out := make([]string, 0, len(cmap))
    		for n, list := range cmap {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 09 15:35:30 UTC 2022
    - 3.9K bytes
    - Viewed (0)
  3. src/go/ast/example_test.go

    	// and AST nodes.
    	cmap := ast.NewCommentMap(fset, f, f.Comments)
    
    	// Remove the first variable declaration from the list of declarations.
    	for i, decl := range f.Decls {
    		if gen, ok := decl.(*ast.GenDecl); ok && gen.Tok == token.VAR {
    			copy(f.Decls[i:], f.Decls[i+1:])
    			f.Decls = f.Decls[:len(f.Decls)-1]
    			break
    		}
    	}
    
    	// Use the comment map to filter comments that don't belong anymore
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 21:44:50 UTC 2024
    - 6.1K bytes
    - Viewed (0)
  4. src/cmd/gofmt/rewrite.go

    }
    */
    
    // rewriteFile applies the rewrite rule 'pattern -> replace' to an entire file.
    func rewriteFile(fileSet *token.FileSet, pattern, replace ast.Expr, p *ast.File) *ast.File {
    	cmap := ast.NewCommentMap(fileSet, p, p.Comments)
    	m := make(map[string]reflect.Value)
    	pat := reflect.ValueOf(pattern)
    	repl := reflect.ValueOf(replace)
    
    	var rewriteVal func(val reflect.Value) reflect.Value
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 27 22:07:13 UTC 2023
    - 8.1K bytes
    - Viewed (0)
  5. pilot/pkg/networking/core/sidecar_simulation_test.go

    			}
    			cmap := xdstest.ExtractClusters(clusters)
    			got := xdstest.MapKeys(cmap)
    
    			// Check we have all expected clusters
    			if !reflect.DeepEqual(xdstest.MapKeys(tt.clusters), got) {
    				t.Errorf("expected clusters: %v, got: %v", xdstest.MapKeys(tt.clusters), got)
    			}
    
    			for cname, c := range cmap {
    				// Check the upstream endpoints match
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Jun 13 01:56:28 UTC 2024
    - 84.7K bytes
    - Viewed (0)
  6. src/runtime/mmap.go

    package runtime
    
    import "unsafe"
    
    // mmap calls the mmap system call. It is implemented in assembly.
    // We only pass the lower 32 bits of file offset to the
    // assembly routine; the higher bits (if required), should be provided
    // by the assembly routine as 0.
    // The err result is an OS error code such as ENOMEM.
    func mmap(addr unsafe.Pointer, n uintptr, prot, flags, fd int32, off uint32) (p unsafe.Pointer, err int)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Aug 25 20:58:13 UTC 2023
    - 844 bytes
    - Viewed (0)
  7. src/runtime/map.go

    		top += minTopHash
    	}
    	return top
    }
    
    func evacuated(b *bmap) bool {
    	h := b.tophash[0]
    	return h > emptyOne && h < minTopHash
    }
    
    func (b *bmap) overflow(t *maptype) *bmap {
    	return *(**bmap)(add(unsafe.Pointer(b), uintptr(t.BucketSize)-goarch.PtrSize))
    }
    
    func (b *bmap) setoverflow(t *maptype, ovf *bmap) {
    	*(**bmap)(add(unsafe.Pointer(b), uintptr(t.BucketSize)-goarch.PtrSize)) = ovf
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 57.6K bytes
    - Viewed (0)
  8. src/cmd/go/internal/mmap/mmap.go

    // license that can be found in the LICENSE file.
    
    // This package is a lightly modified version of the mmap code
    // in github.com/google/codesearch/index.
    
    // The mmap package provides an abstraction for memory mapping files
    // on different platforms.
    package mmap
    
    import (
    	"os"
    )
    
    // Data is mmap'ed read-only data from a file.
    // The backing file is never closed, so Data
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Dec 15 21:57:36 UTC 2023
    - 754 bytes
    - Viewed (0)
  9. pkg/controller/util/selectors/bimultimap_test.go

    func unorderedEqual(as, bs []Key) bool {
    	if len(as) != len(bs) {
    		return false
    	}
    	aMap := make(map[Key]int)
    	for _, a := range as {
    		aMap[a]++
    	}
    	bMap := make(map[Key]int)
    	for _, b := range bs {
    		bMap[b]++
    	}
    	if len(aMap) != len(bMap) {
    		return false
    	}
    	for a, count := range aMap {
    		if bMap[a] != count {
    			return false
    		}
    	}
    	return true
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Dec 13 01:56:36 UTC 2022
    - 16.9K bytes
    - Viewed (0)
  10. src/runtime/map_fast32.go

    )
    
    func mapaccess1_fast32(t *maptype, h *hmap, key uint32) unsafe.Pointer {
    	if raceenabled && h != nil {
    		callerpc := getcallerpc()
    		racereadpc(unsafe.Pointer(h), callerpc, abi.FuncPCABIInternal(mapaccess1_fast32))
    	}
    	if h == nil || h.count == 0 {
    		return unsafe.Pointer(&zeroVal[0])
    	}
    	if h.flags&hashWriting != 0 {
    		fatal("concurrent map read and map write")
    	}
    	var b *bmap
    	if h.B == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 13.9K bytes
    - Viewed (0)
Back to top