Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 150 for typeOff (0.19 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/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)
  4. 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)
  5. 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)
  6. 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)
  7. 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)
  8. 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)
  9. 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)
  10. src/reflect/value.go

    			panic("reflect: " + op + " of method on nil interface value")
    		}
    		rcvrtype = iface.itab.Type
    		fn = unsafe.Pointer(&unsafe.Slice(&iface.itab.Fun[0], i+1)[i])
    		t = (*funcType)(unsafe.Pointer(tt.typeOff(m.Typ)))
    	} else {
    		rcvrtype = v.typ()
    		ms := v.typ().ExportedMethods()
    		if uint(i) >= uint(len(ms)) {
    			panic("reflect: internal error: invalid method index")
    		}
    		m := ms[i]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 21:17:41 UTC 2024
    - 119.9K bytes
    - Viewed (0)
Back to top