Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 100 for ktyp (0.05 sec)

  1. src/cmd/gofmt/simplify.go

    		outer := n
    		var keyType, eltType ast.Expr
    		switch typ := outer.Type.(type) {
    		case *ast.ArrayType:
    			eltType = typ.Elt
    		case *ast.MapType:
    			keyType = typ.Key
    			eltType = typ.Value
    		}
    
    		if eltType != nil {
    			var ktyp reflect.Value
    			if keyType != nil {
    				ktyp = reflect.ValueOf(keyType)
    			}
    			typ := reflect.ValueOf(eltType)
    			for i, x := range outer.Elts {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 19 20:06:14 UTC 2022
    - 4.8K bytes
    - Viewed (0)
  2. src/reflect/type.go

    	mt.TFlag = 0
    	mt.Hash = fnv1(etyp.Hash, 'm', byte(ktyp.Hash>>24), byte(ktyp.Hash>>16), byte(ktyp.Hash>>8), byte(ktyp.Hash))
    	mt.Key = ktyp
    	mt.Elem = etyp
    	mt.Bucket = bucketOf(ktyp, etyp)
    	mt.Hasher = func(p unsafe.Pointer, seed uintptr) uintptr {
    		return typehash(ktyp, p, seed)
    	}
    	mt.Flags = 0
    	if ktyp.Size_ > abi.MapMaxKeyBytes {
    		mt.KeySize = uint8(goarch.PtrSize)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 85.5K bytes
    - Viewed (0)
  3. src/runtime/mfinal.go

    	}
    	if ft.InCount != 1 {
    		throw("runtime.SetFinalizer: cannot pass " + toRType(etyp).string() + " to finalizer " + toRType(ftyp).string())
    	}
    	fint := ft.InSlice()[0]
    	switch {
    	case fint == etyp:
    		// ok - same type
    		goto okarg
    	case fint.Kind_&abi.KindMask == abi.Pointer:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 01:56:56 UTC 2024
    - 19K bytes
    - Viewed (0)
  4. src/go/types/signature.go

    			rtyp, _ := deref(recv.typ)
    			atyp := Unalias(rtyp)
    			if !isValid(atyp) {
    				return // error was reported before
    			}
    			// spec: "The type denoted by T is called the receiver base type; it must not
    			// be a pointer or interface type and it must be declared in the same package
    			// as the method."
    			switch T := atyp.(type) {
    			case *Named:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 29 22:06:18 UTC 2024
    - 13K bytes
    - Viewed (0)
  5. src/unique/clone.go

    func buildArrayCloneSeq(typ *abi.Type, seq *cloneSeq, baseOffset uintptr) {
    	atyp := typ.ArrayType()
    	etyp := atyp.Elem
    	offset := baseOffset
    	for range atyp.Len {
    		switch etyp.Kind() {
    		case abi.String:
    			seq.stringOffsets = append(seq.stringOffsets, offset)
    		case abi.Struct:
    			buildStructCloneSeq(etyp, seq, offset)
    		case abi.Array:
    			buildArrayCloneSeq(etyp, seq, offset)
    		}
    		offset += etyp.Size()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun May 05 00:24:21 UTC 2024
    - 2.6K bytes
    - Viewed (0)
  6. src/go/types/interface.go

    	t.check = nil
    	t.embedPos = nil
    }
    
    func (check *Checker) interfaceType(ityp *Interface, iface *ast.InterfaceType, def *TypeName) {
    	addEmbedded := func(pos token.Pos, typ Type) {
    		ityp.embeddeds = append(ityp.embeddeds, typ)
    		if ityp.embedPos == nil {
    			ityp.embedPos = new([]token.Pos)
    		}
    		*ityp.embedPos = append(*ityp.embedPos, pos)
    	}
    
    	for _, f := range iface.Methods.List {
    		if len(f.Names) == 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Nov 09 17:24:42 UTC 2023
    - 8.1K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types2/signature.go

    			rtyp, _ := deref(recv.typ)
    			atyp := Unalias(rtyp)
    			if !isValid(atyp) {
    				return // error was reported before
    			}
    			// spec: "The type denoted by T is called the receiver base type; it must not
    			// be a pointer or interface type and it must be declared in the same package
    			// as the method."
    			switch T := atyp.(type) {
    			case *Named:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 21:33:05 UTC 2024
    - 12.6K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types2/resolver.go

    	for {
    		switch t := rtyp.(type) {
    		case *syntax.ParenExpr:
    			rtyp = t.X
    		// case *ast.StarExpr:
    		//      ptr = true
    		// 	rtyp = t.X
    		case *syntax.Operation:
    			if t.Op != syntax.Mul || t.Y != nil {
    				break
    			}
    			ptr = true
    			rtyp = t.X
    		default:
    			break L
    		}
    	}
    
    	// unpack type parameters, if any
    	if ptyp, _ := rtyp.(*syntax.IndexExpr); ptyp != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 14:10:44 UTC 2024
    - 26.3K bytes
    - Viewed (0)
  9. src/encoding/gob/decode.go

    	keyP := reflect.New(mtyp.Key())
    	elemP := reflect.New(mtyp.Elem())
    	for i := 0; i < n; i++ {
    		key := decodeIntoValue(state, keyOp, keyIsPtr, keyP.Elem(), keyInstr)
    		elem := decodeIntoValue(state, elemOp, elemIsPtr, elemP.Elem(), elemInstr)
    		value.SetMapIndex(key, elem)
    		keyP.Elem().SetZero()
    		elemP.Elem().SetZero()
    	}
    }
    
    // ignoreArrayHelper does the work for discarding arrays and slices.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 07 19:10:23 UTC 2023
    - 40.1K bytes
    - Viewed (0)
  10. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/copylock/copylock.go

    				}
    				return append(subpath, typ.String())
    			}
    		}
    		return nil
    	}
    
    	for {
    		atyp, ok := typ.Underlying().(*types.Array)
    		if !ok {
    			break
    		}
    		typ = atyp.Elem()
    	}
    
    	ttyp, ok := typ.Underlying().(*types.Tuple)
    	if ok {
    		for i := 0; i < ttyp.Len(); i++ {
    			subpath := lockPath(tpkg, ttyp.At(i).Type(), seen)
    			if subpath != nil {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Jun 04 16:19:04 UTC 2024
    - 9.9K bytes
    - Viewed (0)
Back to top