Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 14 for PtrType (0.15 sec)

  1. src/runtime/type.go

    type maptype = abi.MapType
    
    type arraytype = abi.ArrayType
    
    type chantype = abi.ChanType
    
    type slicetype = abi.SliceType
    
    type functype = abi.FuncType
    
    type ptrtype = abi.PtrType
    
    type name = abi.Name
    
    type structtype = abi.StructType
    
    func pkgPath(n name) string {
    	if n.Bytes == nil || *n.Data(0)&(1<<2) == 0 {
    		return ""
    	}
    	i, l := n.ReadVarint(1)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 12.7K bytes
    - Viewed (0)
  2. src/runtime/mfinal.go

    	arg  unsafe.Pointer // ptr to object (may be a heap pointer)
    	nret uintptr        // bytes of return values from fn
    	fint *_type         // type of first argument of fn
    	ot   *ptrtype       // type of ptr to object (may be a heap pointer)
    }
    
    var finalizer1 = [...]byte{
    	// Each Finalizer is 5 words, ptr ptr INT ptr ptr (INT = uintptr here)
    	// Each byte describes 8 words.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 01:56:56 UTC 2024
    - 19K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssa/func.go

    	return c, d
    }
    
    func (f *Func) SplitSlice(name *LocalSlot) (*LocalSlot, *LocalSlot, *LocalSlot) {
    	ptrType := types.NewPtr(name.Type.Elem())
    	lenType := types.Types[types.TINT]
    	p := f.SplitSlot(name, ".ptr", 0, ptrType)
    	l := f.SplitSlot(name, ".len", ptrType.Size(), lenType)
    	c := f.SplitSlot(name, ".cap", ptrType.Size()+lenType.Size(), lenType)
    	return p, l, c
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 10 19:44:43 UTC 2024
    - 25.8K bytes
    - Viewed (0)
  4. src/runtime/export_debug_test.go

    	if a._type != nil && a._type.Kind_&abi.KindMask != abi.Pointer {
    		return nil, plainError("args must be a pointer or nil")
    	}
    	argp := a.data
    	var argSize uintptr
    	if argp != nil {
    		argSize = (*ptrtype)(unsafe.Pointer(a._type)).Elem.Size_
    	}
    
    	h := new(debugCallHandler)
    	h.gp = gp
    	// gp may not be running right now, but we can still get the M
    	// it will run on since it's locked.
    	h.mp = gp.lockedm.ptr()
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 15:41:45 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  5. src/reflect/type.go

    	if pi, ok := ptrMap.Load(t); ok {
    		return &pi.(*ptrType).Type
    	}
    
    	// Look in known types.
    	s := "*" + t.String()
    	for _, tt := range typesByString(s) {
    		p := (*ptrType)(unsafe.Pointer(tt))
    		if p.Elem != &t.t {
    			continue
    		}
    		pi, _ := ptrMap.LoadOrStore(t, p)
    		return &pi.(*ptrType).Type
    	}
    
    	// Create a new ptrType starting with the description
    	// of an *unsafe.Pointer.
    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/cmd/cgo/gcc.go

    			}
    			if !strings.HasPrefix(name, "__cgo__") {
    				break
    			}
    			typ, err := d.Type(typOff)
    			if err != nil {
    				fatalf("loading DWARF type: %s", err)
    			}
    			t, ok := typ.(*dwarf.PtrType)
    			if !ok || t == nil {
    				fatalf("internal error: %s has non-pointer type", name)
    			}
    			i, err := strconv.Atoi(name[7:])
    			if err != nil {
    				fatalf("malformed __cgo__ name: %s", name)
    			}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 20 15:50:06 UTC 2024
    - 97K bytes
    - Viewed (0)
  7. src/cmd/link/internal/ld/deadcode.go

    	}
    	off := commonsize(arch) // reflect.rtype
    	switch decodetypeKind(arch, p) {
    	case abi.Struct: // reflect.structType
    		off += 4 * arch.PtrSize
    	case abi.Pointer: // reflect.ptrType
    		off += arch.PtrSize
    	case abi.Func: // reflect.funcType
    		off += arch.PtrSize // 4 bytes, pointer aligned
    	case abi.Slice: // reflect.sliceType
    		off += arch.PtrSize
    	case abi.Array: // reflect.arrayType
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 14:52:41 UTC 2024
    - 19K bytes
    - Viewed (0)
  8. src/runtime/cgocall.go

    		aep := efaceOf(&arg)
    		switch aep._type.Kind_ & abi.KindMask {
    		case abi.Bool:
    			if t.Kind_&abi.KindMask == abi.UnsafePointer {
    				// We don't know the type of the element.
    				break
    			}
    			pt := (*ptrtype)(unsafe.Pointer(t))
    			cgoCheckArg(pt.Elem, p, true, false, cgoCheckPointerFail)
    			return
    		case abi.Slice:
    			// Check the slice rather than the pointer.
    			ep = aep
    			t = ep._type
    		case abi.Array:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:16:47 UTC 2024
    - 24.2K bytes
    - Viewed (0)
  9. src/runtime/mbitmap.go

    	t := e._type
    
    	var et *_type
    	if t.Kind_&abi.KindMask != abi.Pointer {
    		throw("bad argument to getgcmask: expected type to be a pointer to the value type whose mask is being queried")
    	}
    	et = (*ptrtype)(unsafe.Pointer(t)).Elem
    
    	// data or bss
    	for _, datap := range activeModules() {
    		// data
    		if datap.data <= uintptr(p) && uintptr(p) < datap.edata {
    			bitmap := datap.gcdatamask.bytedata
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 00:18:55 UTC 2024
    - 60K bytes
    - Viewed (0)
  10. src/runtime/mheap.go

    	nret    uintptr
    	fint    *_type   // May be a heap pointer, but always live.
    	ot      *ptrtype // May be a heap pointer, but always live.
    }
    
    // Adds a finalizer to the object p. Returns true if it succeeded.
    func addfinalizer(p unsafe.Pointer, f *funcval, nret uintptr, fint *_type, ot *ptrtype) bool {
    	lock(&mheap_.speciallock)
    	s := (*specialfinalizer)(mheap_.specialfinalizeralloc.alloc())
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 22:31:00 UTC 2024
    - 78K bytes
    - Viewed (0)
Back to top