Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 24 for makemap64 (0.33 sec)

  1. src/html/template/exec_test.go

    func add(args ...int) int {
    	sum := 0
    	for _, x := range args {
    		sum += x
    	}
    	return sum
    }
    
    func echo(arg any) any {
    	return arg
    }
    
    func makemap(arg ...string) map[string]string {
    	if len(arg)%2 != 0 {
    		panic("bad makemap")
    	}
    	m := make(map[string]string)
    	for i := 0; i < len(arg); i += 2 {
    		m[arg[i]] = arg[i+1]
    	}
    	return m
    }
    
    func stringer(s fmt.Stringer) string {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Feb 24 21:59:12 UTC 2024
    - 57.6K bytes
    - Viewed (0)
  2. src/runtime/map_fast32.go

    					hash := t.Hasher(k, uintptr(h.hash0))
    					if hash&newbit != 0 {
    						useY = 1
    					}
    				}
    
    				b.tophash[i] = evacuatedX + useY // evacuatedX + 1 == evacuatedY, enforced in makemap
    				dst := &xy[useY]                 // evacuation destination
    
    				if dst.i == abi.MapBucketCount {
    					dst.b = h.newoverflow(t, dst.b)
    					dst.i = 0
    					dst.k = add(unsafe.Pointer(dst.b), dataOffset)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  3. src/runtime/map_fast64.go

    					hash := t.Hasher(k, uintptr(h.hash0))
    					if hash&newbit != 0 {
    						useY = 1
    					}
    				}
    
    				b.tophash[i] = evacuatedX + useY // evacuatedX + 1 == evacuatedY, enforced in makemap
    				dst := &xy[useY]                 // evacuation destination
    
    				if dst.i == abi.MapBucketCount {
    					dst.b = h.newoverflow(t, dst.b)
    					dst.i = 0
    					dst.k = add(unsafe.Pointer(dst.b), dataOffset)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  4. src/runtime/map_faststr.go

    					hash := t.Hasher(k, uintptr(h.hash0))
    					if hash&newbit != 0 {
    						useY = 1
    					}
    				}
    
    				b.tophash[i] = evacuatedX + useY // evacuatedX + 1 == evacuatedY, enforced in makemap
    				dst := &xy[useY]                 // evacuation destination
    
    				if dst.i == abi.MapBucketCount {
    					dst.b = h.newoverflow(t, dst.b)
    					dst.i = 0
    					dst.k = add(unsafe.Pointer(dst.b), dataOffset)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  5. src/reflect/value.go

    		panic("reflect.MakeChan: unidirectional channel type")
    	}
    	t := typ.common()
    	ch := makechan(t, buffer)
    	return Value{t, ch, flag(Chan)}
    }
    
    // MakeMap creates a new map with the specified type.
    func MakeMap(typ Type) Value {
    	return MakeMapWithSize(typ, 0)
    }
    
    // MakeMapWithSize creates a new map with the specified type
    // and initial space for approximately n elements.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 119.9K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/staticinit/sched.go

    		n := n.(*ir.BinaryExpr)
    		if n.Y.Op() != ir.OLITERAL || constant.Sign(n.Y.Val()) == 0 {
    			return true
    		}
    
    	// Only possible side effect is panic on invalid size,
    	// but many makechan and makemap use size zero, which is definitely OK.
    	case ir.OMAKECHAN, ir.OMAKEMAP:
    		n := n.(*ir.MakeExpr)
    		if !ir.IsConst(n.Len, constant.Int) || constant.Sign(n.Len.Val()) != 0 {
    			return true
    		}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 17:16:14 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  7. src/encoding/json/decode.go

    				d.saveError(&UnmarshalTypeError{Value: "object", Type: t, Offset: int64(d.off)})
    				d.skip()
    				return nil
    			}
    		}
    		if v.IsNil() {
    			v.Set(reflect.MakeMap(t))
    		}
    	case reflect.Struct:
    		fields = cachedTypeFields(t)
    		// ok
    	default:
    		d.saveError(&UnmarshalTypeError{Value: "object", Type: t, Offset: int64(d.off)})
    		d.skip()
    		return nil
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 35.3K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/Ordering.java

        private final AtomicInteger counter = new AtomicInteger(0);
        private final ConcurrentMap<Object, Integer> uids =
            Platform.tryWeakKeys(new MapMaker()).makeMap();
    
        private Integer getUid(Object obj) {
          Integer uid = uids.get(obj);
          if (uid == null) {
            // One or more integer values could be skipped in the event of a race
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue May 28 18:11:09 UTC 2024
    - 39.4K bytes
    - Viewed (0)
  9. android/guava/src/com/google/common/collect/Ordering.java

        private final AtomicInteger counter = new AtomicInteger(0);
        private final ConcurrentMap<Object, Integer> uids =
            Platform.tryWeakKeys(new MapMaker()).makeMap();
    
        private Integer getUid(Object obj) {
          Integer uid = uids.get(obj);
          if (uid == null) {
            // One or more integer values could be skipped in the event of a race
    Registered: Wed Jun 12 16:38:11 UTC 2024
    - Last Modified: Tue May 28 18:11:09 UTC 2024
    - 39.4K bytes
    - Viewed (0)
  10. src/reflect/all_test.go

    func TestMap(t *testing.T) {
    	m := map[string]int{"a": 1, "b": 2}
    	mv := ValueOf(m)
    	if n := mv.Len(); n != len(m) {
    		t.Errorf("Len = %d, want %d", n, len(m))
    	}
    	keys := mv.MapKeys()
    	newmap := MakeMap(mv.Type())
    	for k, v := range m {
    		// Check that returned Keys match keys in range.
    		// These aren't required to be in the same order.
    		seen := false
    		for _, kv := range keys {
    			if kv.String() == k {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 218.8K bytes
    - Viewed (0)
Back to top