Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 258 for typeOff (0.12 sec)

  1. src/internal/reflectlite/type.go

    func add(p unsafe.Pointer, x uintptr, whySafe string) unsafe.Pointer {
    	return unsafe.Pointer(uintptr(p) + x)
    }
    
    // TypeOf returns the reflection Type that represents the dynamic type of i.
    // If i is a nil interface value, TypeOf returns nil.
    func TypeOf(i any) Type {
    	return toType(abi.TypeOf(i))
    }
    
    func (t rtype) Implements(u Type) bool {
    	if u == nil {
    		panic("reflect: nil type passed to Type.Implements")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 17:01:54 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  2. src/runtime/type.go

    		return t
    	}
    	res := md.types + uintptr(off)
    	if res > md.etypes {
    		println("runtime: typeOff", hex(off), "out of range", hex(md.types), "-", hex(md.etypes))
    		throw("runtime: type offset out of range")
    	}
    	return (*_type)(unsafe.Pointer(res))
    }
    
    func (t rtype) typeOff(off typeOff) *_type {
    	return resolveTypeOff(unsafe.Pointer(t.Type), off)
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  3. src/runtime/plugin.go

    	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)
    
    		name := symName.Name()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 15:10:48 UTC 2024
    - 4.4K bytes
    - Viewed (0)
  4. src/internal/abi/type.go

    	TFlagUnrolledBitmap TFlag = 1 << 4
    )
    
    // NameOff is the offset to a name from moduledata.types.  See resolveNameOff in runtime.
    type NameOff int32
    
    // TypeOff is the offset to a type from moduledata.types.  See resolveTypeOff in runtime.
    type TypeOff int32
    
    // TextOff is an offset from the top of a text section.  See (rtype).textOff in runtime.
    type TextOff int32
    
    // String returns the name of k.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 17 21:09:59 UTC 2024
    - 21.8K bytes
    - Viewed (0)
  5. 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,
    // but widely used packages access it using linkname.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 17:52:17 UTC 2024
    - 19.3K bytes
    - Viewed (0)
  6. src/reflect/type.go

    }
    
    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)
    }
    
    func (t *interfaceType) common() *abi.Type {
    	return &t.Type
    }
    
    func (t *interfaceType) uncommon() *abi.UncommonType {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 85.5K bytes
    - Viewed (0)
  7. src/runtime/symtab.go

    }
    
    // pinnedTypemaps are the map[typeOff]*_type from the moduledata objects.
    //
    // These typemap objects are allocated at run time on the heap, but the
    // only direct reference to them is in the moduledata, created by the
    // linker and marked SNOPTRDATA so it is ignored by the GC.
    //
    // To make sure the map isn't collected, we keep a second reference here.
    var pinnedTypemaps []map[typeOff]*_type
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 40K bytes
    - Viewed (0)
  8. src/runtime/iface.go

    		i := &inter.Methods[k]
    		itype := toRType(&inter.Type).typeOff(i.Typ)
    		name := toRType(&inter.Type).nameOff(i.Name)
    		iname := name.Name()
    		ipkg := pkgPath(name)
    		if ipkg == "" {
    			ipkg = inter.PkgPath.Name()
    		}
    		for ; j < nt; j++ {
    			t := &xmhdr[j]
    			rtyp := toRType(typ)
    			tname := rtyp.nameOff(t.Name)
    			if rtyp.typeOff(t.Mtyp) == itype && tname.Name() == iname {
    				pkgPath := pkgPath(tname)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 22.5K bytes
    - Viewed (0)
  9. src/cmd/link/internal/ld/deadcode.go

    }
    
    // decodeMethodSig decodes an array of method signature information.
    // Each element of the array is size bytes. The first 4 bytes is a
    // nameOff for the method name, and the next 4 bytes is a typeOff for
    // the function type.
    //
    // Conveniently this is the layout of both runtime.method and runtime.imethod.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 14:52:41 UTC 2024
    - 19K bytes
    - Viewed (0)
  10. subprojects/core-api/src/main/java/org/gradle/api/reflect/TypeOf.java

                @Override
                public TypeOf<?> apply(ModelType<?> it) {
                    return typeOf(it);
                }
            });
        }
    
        private static <U> TypeOf<U> typeOf(ModelType<U> componentType) {
            return new TypeOf<U>(componentType) {
            };
        }
    
        private TypeOf<?> nullableTypeOf(Class<?> type) {
            return type != null
                ? typeOf(type)
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Fri Apr 26 09:45:59 UTC 2024
    - 10.9K bytes
    - Viewed (0)
Back to top