- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 40 for mapLit (1.13 sec)
-
src/runtime/symtab_test.go
{"sliceLit[1]", sliceLit[1], 25}, {"sliceLit[2]", sliceLit[2], 25}, {"sliceLit[3]", sliceLit[3], 26}, {"mapLit[29]", mapLit[29], 29}, {"mapLit[30]", mapLit[30], 30}, {"mapLit[31]", mapLit[31+firstLine] + firstLine, 31}, // nb it's the key not the value {"mapLit[32]", mapLit[32+firstLine] + firstLine, 32}, // nb it's the key not the value {"intLit", intLit - 2*firstLine, 34 + 35 + 36},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 17 21:46:33 UTC 2022 - 7.5K bytes - Viewed (0) -
src/cmd/compile/internal/walk/complit.go
case ir.OSLICELIT: n := n.(*ir.CompLitExpr) slicelit(inInitFunction, n, var_, init) case ir.OMAPLIT: n := n.(*ir.CompLitExpr) if !t.IsMap() { base.Fatalf("anylit: not map") } maplit(n, var_, init) } } // oaslit handles special composite literal assignments. // It returns true if n's effects have been added to init,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 19:03:54 UTC 2023 - 19.5K bytes - Viewed (0) -
src/go/parser/parser_test.go
{name: "structlit", format: "package main; var x = «struct{x any}{«nil»}»", parseMultiplier: 2}, // Parser nodes: UnaryExpr, CompositeLit {name: "maplit", format: "package main; var x = «map[int]any{1:«nil»}»", parseMultiplier: 2}, // Parser nodes: CompositeLit, KeyValueExpr {name: "dot", format: "package main; var x = «x.»x"},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 31 20:26:14 UTC 2024 - 24.6K bytes - Viewed (0) -
src/cmd/compile/internal/staticinit/sched.go
} a := a.(*ir.StructKeyExpr) if a.Sym().IsBlank() { continue } s.addvalue(p, a.Field.Offset, a.Value) } case ir.OMAPLIT: n := n.(*ir.CompLitExpr) for _, a := range n.List { if a.Op() != ir.OKEY { base.Fatalf("initplan maplit") } a := a.(*ir.KeyExpr) s.addvalue(p, -1, a.Value) } } } func (s *Schedule) addvalue(p *Plan, xoffset int64, n ir.Node) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 17:16:14 UTC 2024 - 30.7K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/cel/common/maplist.go
*/ package common import ( "fmt" "strings" ) // MapList provides a "lookup by key" operation for lists (arrays) with x-kubernetes-list-type=map. type MapList interface { // Get returns the first element having given key, for all // x-kubernetes-list-map-keys, to the provided object. If the provided object isn't itself a valid MapList element, // get returns nil. Get(interface{}) interface{} }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Feb 07 02:56:51 UTC 2023 - 4.5K bytes - Viewed (0) -
staging/src/k8s.io/apiextensions-apiserver/pkg/apiserver/schema/cel/maplist.go
// keyedItems. If the provided schema is _not_ an array with x-kubernetes-list-type=map, returns an // empty mapList. func makeMapList(sts *schema.Structural, items []interface{}) (rv common.MapList) { return common.MakeMapList(&model.Structural{Structural: sts}, items)
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Tue Feb 07 02:56:51 UTC 2023 - 1.1K bytes - Viewed (0) -
test/typeparam/issue48716.dir/main.go
// Creates copy of set func Copy[T comparable](src MapSet[T]) (dst MapSet[T]) { dst = HashSet[T](src.Len()) Fill(src, dst) return } // Fill src from dst func Fill[T any](src, dst MapSet[T]) { src.Iterate(func(t T) bool { dst.Add(t) return true }) return } type MapSet[T any] struct { m a.Map[T, struct{}] } func HashSet[T comparable](capacity int) MapSet[T] {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 24 02:14:15 UTC 2022 - 1021 bytes - Viewed (0) -
test/typeparam/cons.go
type Cons[a any] struct { Head a Tail List[a] } func (xs Cons[a]) Match(casenil Function[Nil[a], any], casecons Function[Cons[a], any]) any { return casecons.Apply(xs) } type mapNil[a, b any] struct { } func (m mapNil[a, b]) Apply(_ Nil[a]) any { return Nil[b]{} } type mapCons[a, b any] struct { f Function[a, b] } func (m mapCons[a, b]) Apply(xs Cons[a]) any {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 21 23:41:49 UTC 2022 - 2K bytes - Viewed (0) -
src/testing/fstest/mapfs.go
} return n, nil } // A mapDir is a directory fs.File (so also an fs.ReadDirFile) open for reading. type mapDir struct { path string mapFileInfo entry []mapFileInfo offset int } func (d *mapDir) Stat() (fs.FileInfo, error) { return &d.mapFileInfo, nil } func (d *mapDir) Close() error { return nil } func (d *mapDir) Read(b []byte) (int, error) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 7.1K bytes - Viewed (0) -
staging/src/k8s.io/apiserver/pkg/cel/openapi/maplist_test.go
"ki": int64(42), "ks": "hello", "v1": "b", }, }, } { t.Run(tc.name, func(t *testing.T) { mapList := MakeMapList(tc.sts, tc.items) for _, warmUp := range tc.warmUpQueries { mapList.Get(warmUp) } actual := mapList.Get(tc.query) if !reflect.DeepEqual(tc.expected, actual) { t.Errorf("got: %v, expected %v", actual, tc.expected) } }) }
Registered: Sat Jun 15 01:39:40 UTC 2024 - Last Modified: Wed Jan 11 18:08:11 UTC 2023 - 6.7K bytes - Viewed (0)