Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 38 for mapfndel (0.59 sec)

  1. src/cmd/compile/internal/walk/walk.go

    	}
    	if mapfast(t) == mapslow || isfat {
    		return typecheck.LookupRuntime(name, t.Key(), t.Elem(), t.Key(), t.Elem())
    	}
    	return typecheck.LookupRuntime(name, t.Key(), t.Elem(), t.Elem())
    }
    
    func mapfndel(name string, t *types.Type) ir.Node {
    	if !t.IsMap() {
    		base.Fatalf("mapfn %v", t)
    	}
    	if mapfast(t) == mapslow {
    		return typecheck.LookupRuntime(name, t.Key(), t.Elem(), t.Key())
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 20:56:00 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/walk/builtin.go

    	map_ := n.Args[0]
    	key := n.Args[1]
    	map_ = walkExpr(map_, init)
    	key = walkExpr(key, init)
    
    	t := map_.Type()
    	fast := mapfast(t)
    	key = mapKeyArg(fast, n, key, false)
    	return mkcall1(mapfndel(mapdelete[fast], t), nil, init, reflectdata.DeleteMapRType(base.Pos, n), map_, key)
    }
    
    // walkLenCap walks an OLEN or OCAP node.
    func walkLenCap(n *ir.UnaryExpr, init *ir.Nodes) ir.Node {
    	if isRuneCount(n) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 22:35:22 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  3. src/reflect/set_test.go

    	// Test implicit conversions in MapIndex and SetMapIndex.
    	{
    		// direct
    		m := make(map[int]int)
    		mv := ValueOf(m)
    		mv.SetMapIndex(ValueOf(1), ValueOf(2))
    		x, ok := m[1]
    		if x != 2 {
    			t.Errorf("#1 after SetMapIndex(1,2): %d, %t (map=%v)", x, ok, m)
    		}
    		if n := mv.MapIndex(ValueOf(1)).Interface().(int); n != 2 {
    			t.Errorf("#1 MapIndex(1) = %d", n)
    		}
    	}
    	{
    		// convert interface key
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 07 13:56:11 UTC 2022
    - 5.7K bytes
    - Viewed (0)
  4. src/go/types/operand.go

    //
    // variable   <expr> (<untyped kind> <mode>                    )
    // variable   <expr> (               <mode>       of type <typ>)
    //
    // mapindex   <expr> (<untyped kind> <mode>                    )
    // mapindex   <expr> (               <mode>       of type <typ>)
    //
    // value      <expr> (<untyped kind> <mode>                    )
    // value      <expr> (               <mode>       of type <typ>)
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 21:17:10 UTC 2024
    - 11.1K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/types2/operand.go

    //
    // variable   <expr> (<untyped kind> <mode>                    )
    // variable   <expr> (               <mode>       of type <typ>)
    //
    // mapindex   <expr> (<untyped kind> <mode>                    )
    // mapindex   <expr> (               <mode>       of type <typ>)
    //
    // value      <expr> (<untyped kind> <mode>                    )
    // value      <expr> (               <mode>       of type <typ>)
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 21:17:10 UTC 2024
    - 11K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apimachinery/third_party/forked/golang/reflect/deep_equal.go

    			}
    		}
    		if v1.Len() != v2.Len() {
    			return false
    		}
    		if v1.Pointer() == v2.Pointer() {
    			return true
    		}
    		for _, k := range v1.MapKeys() {
    			if !e.deepValueEqual(v1.MapIndex(k), v2.MapIndex(k), visited, equateNilAndEmpty, depth+1) {
    				return false
    			}
    		}
    		return true
    	case reflect.Func:
    		if v1.IsNil() && v2.IsNil() {
    			return true
    		}
    		// Can't do better than this:
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 20 17:18:42 UTC 2022
    - 10.8K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apimachinery/pkg/api/apitesting/fuzzer/valuefuzz.go

    		}
    	case reflect.Map:
    		if obj.IsNil() {
    			// TODO: set non-nil value
    		} else {
    			for _, k := range obj.MapKeys() {
    				// map values are not addressable. We need a copy.
    				v := obj.MapIndex(k)
    				copy := reflect.New(v.Type())
    				copy.Elem().Set(v)
    				valueFuzz(copy.Elem())
    				obj.SetMapIndex(k, copy.Elem())
    			}
    			// TODO: set some new value
    		}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jun 25 16:23:43 UTC 2022
    - 2.3K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/api.go

    func (tv TypeAndValue) Assignable() bool {
    	return tv.mode == variable || tv.mode == mapindex
    }
    
    // HasOk reports whether the corresponding expression may be
    // used on the rhs of a comma-ok assignment.
    func (tv TypeAndValue) HasOk() bool {
    	return tv.mode == commaok || tv.mode == mapindex
    }
    
    // Instance reports the type arguments and instantiated type for type and
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 13:48:53 UTC 2024
    - 17.4K bytes
    - Viewed (0)
  9. src/reflect/benchmark_test.go

    	}
    
    	for _, tt := range tests {
    		b.Run(tt.label, func(b *testing.B) {
    			b.Run("MapIndex", func(b *testing.B) {
    				b.ReportAllocs()
    				for i := 0; i < b.N; i++ {
    					for j := tt.keys.Len() - 1; j >= 0; j-- {
    						tt.m.MapIndex(tt.keys.Index(j))
    					}
    				}
    			})
    			b.Run("SetMapIndex", func(b *testing.B) {
    				b.ReportAllocs()
    				for i := 0; i < b.N; i++ {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Nov 19 17:09:03 UTC 2023
    - 8.8K bytes
    - Viewed (0)
  10. src/go/types/api.go

    func (tv TypeAndValue) Assignable() bool {
    	return tv.mode == variable || tv.mode == mapindex
    }
    
    // HasOk reports whether the corresponding expression may be
    // used on the rhs of a comma-ok assignment.
    func (tv TypeAndValue) HasOk() bool {
    	return tv.mode == commaok || tv.mode == mapindex
    }
    
    // Instance reports the type arguments and instantiated type for type and
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 19:57:43 UTC 2024
    - 17.2K bytes
    - Viewed (0)
Back to top