Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 75 for toRType (0.11 sec)

  1. src/runtime/error.go

    func (e *TypeAssertionError) Error() string {
    	inter := "interface"
    	if e._interface != nil {
    		inter = toRType(e._interface).string()
    	}
    	as := toRType(e.asserted).string()
    	if e.concrete == nil {
    		return "interface conversion: " + inter + " is nil, not " + as
    	}
    	cs := toRType(e.concrete).string()
    	if e.missingMethod == "" {
    		msg := "interface conversion: " + inter + " is " + cs + ", not " + as
    		if cs == as {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 19:10:41 UTC 2024
    - 9.9K bytes
    - Viewed (0)
  2. src/runtime/alg.go

    		// typehash, but we want to report the topmost type in
    		// the error text (e.g. in a struct with a field of slice type
    		// we want to report the struct, not the slice).
    		panic(errorString("hash of unhashable type " + toRType(t).string()))
    	}
    	if isDirectIface(t) {
    		return c1 * typehash(t, unsafe.Pointer(&a.data), h^c0)
    	} else {
    		return c1 * typehash(t, a.data, h^c0)
    	}
    }
    
    // nilinterhash should be an internal detail,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  3. src/internal/reflectlite/type.go

    			sqBrackets--
    		}
    		i--
    	}
    	return s[i+1:]
    }
    
    func toRType(t *abi.Type) rtype {
    	return rtype{t}
    }
    
    func elem(t *abi.Type) *abi.Type {
    	et := t.Elem()
    	if et != nil {
    		return et
    	}
    	panic("reflect: Elem of invalid type " + toRType(t).String())
    }
    
    func (t rtype) Elem() Type {
    	return toType(elem(t.common()))
    }
    
    func (t rtype) In(i int) Type {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:01:54 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  4. src/runtime/mfinal.go

    		throw("runtime.SetFinalizer: second argument is " + toRType(ftyp).string() + ", not a function")
    	}
    	ft := (*functype)(unsafe.Pointer(ftyp))
    	if ft.IsVariadic() {
    		throw("runtime.SetFinalizer: cannot pass " + toRType(etyp).string() + " to finalizer " + toRType(ftyp).string() + " because dotdotdot")
    	}
    	if ft.InCount != 1 {
    		throw("runtime.SetFinalizer: cannot pass " + toRType(etyp).string() + " to finalizer " + toRType(ftyp).string())
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 01:56:56 UTC 2024
    - 19K bytes
    - Viewed (0)
  5. src/reflect/type.go

    func (t *interfaceType) nameOff(off aNameOff) abi.Name {
    	return toRType(&t.Type).nameOff(off)
    }
    
    func nameOffFor(t *abi.Type, off aNameOff) abi.Name {
    	return toRType(t).nameOff(off)
    }
    
    func typeOffFor(t *abi.Type, off aTypeOff) *abi.Type {
    	return toRType(t).typeOff(off)
    }
    
    func (t *interfaceType) typeOff(off aTypeOff) *abi.Type {
    	return toRType(&t.Type).typeOff(off)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 85.5K bytes
    - Viewed (0)
  6. src/runtime/tracetype.go

    	}
    	w.flush().end()
    	t.tab.reset()
    }
    
    func dumpTypesRec(node *traceMapNode, w traceExpWriter) traceExpWriter {
    	typ := (*abi.Type)(*(*unsafe.Pointer)(unsafe.Pointer(&node.data[0])))
    	typName := toRType(typ).string()
    
    	// The maximum number of bytes required to hold the encoded type.
    	maxBytes := 1 + 5*traceBytesPerNumber + len(typName)
    
    	// Estimate the size of this record. This
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 20:31:27 UTC 2024
    - 2.3K bytes
    - Viewed (0)
  7. src/runtime/type.go

    	// different modules
    	seen[tp] = struct{}{}
    
    	if t == v {
    		return true
    	}
    	kind := t.Kind_ & abi.KindMask
    	if kind != v.Kind_&abi.KindMask {
    		return false
    	}
    	rt, rv := toRType(t), toRType(v)
    	if rt.string() != rv.string() {
    		return false
    	}
    	ut := t.Uncommon()
    	uv := v.Uncommon()
    	if ut != nil || uv != nil {
    		if ut == nil || uv == nil {
    			return false
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  8. src/internal/reflectlite/value.go

    		} else {
    			ifaceE2I(dst, x, target)
    		}
    		return Value{dst, target, flagIndir | flag(abi.Interface)}
    	}
    
    	// Failed.
    	panic(context + ": value of type " + toRType(v.typ()).String() + " is not assignable to type " + toRType(dst).String())
    }
    
    // arrayAt returns the i-th element of p,
    // an array whose elements are eltSize bytes wide.
    // The array pointed at by p must have at least i+1 elements:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:01:54 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  9. src/runtime/plugin.go

    	// a dependency on the reflect package.
    	syms = make(map[string]any, len(md.ptab))
    	for _, ptab := range md.ptab {
    		symName := resolveNameOff(unsafe.Pointer(md.types), ptab.name)
    		t := toRType((*_type)(unsafe.Pointer(md.types))).typeOff(ptab.typ) // TODO can this stack of conversions be simpler?
    		var val any
    		valp := (*[2]unsafe.Pointer)(unsafe.Pointer(&val))
    		(*valp)[0] = unsafe.Pointer(t)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 15:10:48 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  10. src/runtime/runtime1.go

    // See go.dev/issue/67401.
    //
    //go:linkname reflect_resolveTypeOff reflect.resolveTypeOff
    func reflect_resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer {
    	return unsafe.Pointer(toRType((*_type)(rtype)).typeOff(typeOff(off)))
    }
    
    // reflect_resolveTextOff resolves a function pointer offset from a base type.
    //
    // reflect_resolveTextOff is for package reflect,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:52:17 UTC 2024
    - 19.3K bytes
    - Viewed (0)
Back to top