- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 133 for Map (0.02 sec)
-
src/go/types/map.go
// Source: ../../cmd/compile/internal/types2/map.go // Copyright 2011 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package types // A Map represents a map type. type Map struct { key, elem Type } // NewMap returns a new map for the given key and element types. func NewMap(key, elem Type) *Map { return &Map{key: key, elem: elem} }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 781 bytes - Viewed (0) -
src/internal/abi/map.go
// Copyright 2023 The Go Authors. All rights reserved. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. package abi // Map constants common to several packages // runtime/runtime-gdb.py:MapTypePrinter contains its own copy const ( // Maximum number of key/elem pairs a bucket can hold. MapBucketCountBits = 3 // log2 of number of elements in a bucket. MapBucketCount = 1 << MapBucketCountBits
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 20:09:01 UTC 2024 - 719 bytes - Viewed (0) -
src/unique/handle.go
toInsertWeak = weak.Make(toInsert) } return toInsertWeak } var ptr *T for { // Check the map. wp, ok := m.Load(value) if !ok { // Try to insert a new value into the map. wp, _ = m.LoadOrStore(value, newValue()) } // Now that we're sure there's a value in the map, let's // try to get the pointer we need out of it. ptr = wp.Strong() if ptr != nil { break }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 16:01:55 UTC 2024 - 5.3K bytes - Viewed (0) -
src/cmd/compile/internal/test/mergelocals_test.go
testcases := []struct { vars []*ir.Name partition map[*ir.Name][]int experr bool }{ { vars: []*ir.Name{v1, v2, v3}, partition: map[*ir.Name][]int{ v1: []int{0, 1, 2}, v2: []int{0, 1, 2}, v3: []int{0, 1, 2}, }, experr: false, }, { // invalid mls.v slot -1 vars: []*ir.Name{v1, v2, v3}, partition: map[*ir.Name][]int{ v1: []int{-1, 0}, v2: []int{0, 1, 2},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 18 15:43:53 UTC 2024 - 4.7K bytes - Viewed (0) -
src/expvar/expvar.go
v.f.Store(math.Float64bits(value)) } // Map is a string-to-Var map variable that satisfies the [Var] interface. type Map struct { m sync.Map // map[string]Var keysMu sync.RWMutex keys []string // sorted } // KeyValue represents a single entry in a [Map]. type KeyValue struct { Key string Value Var } func (v *Map) String() string { return string(v.appendJSON(nil)) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Apr 26 21:32:11 UTC 2024 - 9.1K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/facts/imports.go
) // importMap computes the import map for a package by traversing the // entire exported API each of its imports. // // This is a workaround for the fact that we cannot access the map used // internally by the types.Importer returned by go/importer. The entries // in this map are the packages and objects that may be relevant to the // current analysis unit. // // Packages in the map that are only indirectly imported may be
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 3.5K bytes - Viewed (0) -
src/crypto/internal/hpke/hpke_test.go
} func parseVectorSetup(vector string) map[string]string { vals := map[string]string{} for _, l := range strings.Split(vector, "\n") { fields := strings.Split(l, ": ") vals[fields[0]] = fields[1] } return vals } func parseVectorEncryptions(vector string) []map[string]string { vals := []map[string]string{} for _, section := range strings.Split(vector, "\n\n") { e := map[string]string{}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 22:33:33 UTC 2024 - 4.7K bytes - Viewed (0) -
src/internal/concurrent/hashtriemap_test.go
}) } func testAll[K, V comparable](t *testing.T, m *HashTrieMap[K, V], testData map[K]V, yield func(K, V) bool) { for k, v := range testData { expectStored(t, k, v)(m.LoadOrStore(k, v)) } visited := make(map[K]int) m.All()(func(key K, got V) bool { want, ok := testData[key] if !ok { t.Errorf("unexpected key %v in map", key) return false } if got != want {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 16:01:55 UTC 2024 - 9.3K bytes - Viewed (0) -
src/maps/iter.go
// to be the same from one call to the next. func Values[Map ~map[K]V, K comparable, V any](m Map) iter.Seq[V] { return func(yield func(V) bool) { for _, v := range m { if !yield(v) { return } } } } // Insert adds the key-value pairs from seq to m. // If a key in seq already exists in m, its value will be overwritten. func Insert[Map ~map[K]V, K comparable, V any](m Map, seq iter.Seq2[K, V]) { for k, v := range seq {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 22 13:41:45 UTC 2024 - 1.6K 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)