- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 343 for Map (0.02 sec)
-
src/testing/fstest/mapfs.go
// // File system operations read directly from the map, // so that the file system can be changed by editing the map as needed. // An implication is that file system operations must not run concurrently // with changes to the map, which would be a race. // Another implication is that opening or reading a directory requires // iterating over the entire map, so a MapFS should typically be used with not more
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 7.1K bytes - Viewed (0) -
src/archive/zip/register.go
defer r.mu.Unlock() var err error if r.fr != nil { err = r.fr.Close() flateReaderPool.Put(r.fr) r.fr = nil } return err } var ( compressors sync.Map // map[uint16]Compressor decompressors sync.Map // map[uint16]Decompressor ) func init() { compressors.Store(Store, Compressor(func(w io.Writer) (io.WriteCloser, error) { return &nopCloser{w}, nil }))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 13 18:36:46 UTC 2023 - 3.7K bytes - Viewed (0) -
src/internal/dag/parse.go
package dag import ( "cmp" "fmt" "slices" "strings" ) type Graph struct { Nodes []string byLabel map[string]int edges map[string]map[string]bool } func newGraph() *Graph { return &Graph{byLabel: map[string]int{}, edges: map[string]map[string]bool{}} } func (g *Graph) addNode(label string) bool { if _, ok := g.byLabel[label]; ok { return false }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 6.7K bytes - Viewed (0) -
src/internal/types/testdata/fixedbugs/issue61879.go
args: args, } } func (k *ImplA[T]) setData(data string) InterfaceA[T] { k.data = data return k } func Foo[M ~map[InterfaceA[T]]V, T comparable, V any](m M) { // DO SOMETHING HERE return } func Bar() { keys := make([]InterfaceA[int], 0, 10) m := make(map[InterfaceA[int]]int) for i := 0; i < 10; i++ { keys = append(keys, NewInterfaceA[int](i)) m[keys[i]] = i } Foo(m) // panic here
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 15 19:42:56 UTC 2023 - 1K bytes - Viewed (0) -
src/cmd/compile/internal/ssagen/nowb.go
// get back to the ODCLFUNCs. symToFunc := make(map[*obj.LSym]*ir.Func) // funcs records the back-edges of the BFS call graph walk. It // maps from the ODCLFUNC of each function that must not have // write barriers to the call that inhibits them. Functions // that are directly marked go:nowritebarrierrec are in this // map with a zero-valued nowritebarrierrecCall. This also
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 15 17:29:46 UTC 2024 - 5.9K bytes - Viewed (0) -
src/go/types/mono.go
// // For example, given: // // func f[A, B any]() { // type T int // f[T, map[A]B]() // } // // we construct vertices representing types A, B, and T. Because of // declaration "type T int", we construct edges T<-A and T<-B with // weight 1; and because of instantiation "f[T, map[A]B]" we construct // edges A<-T with weight 0, and B<-A and B<-B with weight 1. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 9.2K bytes - Viewed (0) -
src/cmd/internal/obj/line_test.go
package obj import ( "cmd/internal/src" "fmt" "testing" ) func TestGetFileSymbolAndLine(t *testing.T) { ctxt := new(Link) ctxt.hash = make(map[string]*LSym) ctxt.statichash = make(map[string]*LSym) afile := src.NewFileBase("a.go", "a.go") bfile := src.NewFileBase("b.go", "/foo/bar/b.go") lfile := src.NewLinePragmaBase(src.MakePos(afile, 8, 1), "linedir", "linedir", 100, 1)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 01 15:52:41 UTC 2023 - 1.2K bytes - Viewed (0) -
src/go/types/objset.go
// object name. package types // An objset is a set of objects identified by their unique id. // The zero value for objset is a ready-to-use empty objset. type objset map[string]Object // initialized lazily // insert attempts to insert an object obj into objset s. // If s already contains an alternative object alt with // the same name, insert leaves s unchanged and returns alt.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 1K bytes - Viewed (0) -
src/cmd/compile/internal/types2/context.go
// The use of a shared context does not guarantee that identical instances are // deduplicated in all cases. type Context struct { mu sync.Mutex typeMap map[string][]ctxtEntry // type hash -> instances entries nextID int // next unique ID originIDs map[Type]int // origin type -> unique ID } type ctxtEntry struct { orig Type targs []Type instance Type // = orig[targs] }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 28 17:29:21 UTC 2023 - 4.3K bytes - Viewed (0) -
src/go/types/resolver_test.go
files = append(files, mustParse(fset, src)) } // resolve and type-check package AST importer := new(resolveTestImporter) conf := Config{Importer: importer} uses := make(map[*ast.Ident]Object) defs := make(map[*ast.Ident]Object) _, err := conf.Check("testResolveIdents", fset, files, &Info{Defs: defs, Uses: uses}) if err != nil { t.Fatal(err) } // check that all packages were imported
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 4.5K bytes - Viewed (0)