Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 31 for newarray (0.22 sec)

  1. src/go/types/array.go

    package types
    
    // An Array represents an array type.
    type Array struct {
    	len  int64
    	elem Type
    }
    
    // NewArray returns a new array type for the given element type and length.
    // A negative length indicates an unknown length.
    func NewArray(elem Type, len int64) *Array { return &Array{len: len, elem: elem} }
    
    // Len returns the length of array a.
    // A negative result indicates an unknown length.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 927 bytes
    - Viewed (0)
  2. src/cmd/compile/internal/typecheck/builtin.go

    	typs[28] = types.Types[types.TSTRING]
    	typs[29] = newSig(params(typs[28]), nil)
    	typs[30] = newSig(params(typs[2]), nil)
    	typs[31] = newSig(params(typs[5]), nil)
    	typs[32] = types.NewArray(typs[0], 32)
    	typs[33] = types.NewPtr(typs[32])
    	typs[34] = newSig(params(typs[33], typs[28], typs[28]), params(typs[28]))
    	typs[35] = newSig(params(typs[33], typs[28], typs[28], typs[28]), params(typs[28]))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/walk/temp.go

    func stackBufAddr(len int64, elem *types.Type) *ir.AddrExpr {
    	if elem.HasPointers() {
    		base.FatalfAt(base.Pos, "%v has pointers", elem)
    	}
    	tmp := typecheck.TempAt(base.Pos, ir.CurFunc, types.NewArray(elem, len))
    	return typecheck.Expr(typecheck.NodAddr(tmp)).(*ir.AddrExpr)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 09 16:41:23 UTC 2024
    - 1.5K bytes
    - Viewed (0)
  4. src/runtime/malloc.go

    				if size == 0 {
    					size = physPageSize
    				}
    				newArray := (*notInHeap)(persistentalloc(size, goarch.PtrSize, &memstats.gcMiscSys))
    				if newArray == nil {
    					throw("out of memory allocating allArenas")
    				}
    				oldSlice := h.allArenas
    				*(*notInHeapSlice)(unsafe.Pointer(&h.allArenas)) = notInHeapSlice{newArray, len(h.allArenas), int(size / goarch.PtrSize)}
    				copy(h.allArenas, oldSlice)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 17:58:53 UTC 2024
    - 59.6K bytes
    - Viewed (0)
  5. src/runtime/map_fast64.go

    	// Set hashWriting after calling t.hasher for consistency with mapassign.
    	h.flags ^= hashWriting
    
    	if h.buckets == nil {
    		h.buckets = newobject(t.Bucket) // newarray(t.bucket, 1)
    	}
    
    again:
    	bucket := hash & bucketMask(h.B)
    	if h.growing() {
    		growWork_fast64(t, h, bucket)
    	}
    	b := (*bmap)(add(h.buckets, bucket*uintptr(t.BucketSize)))
    
    	var insertb *bmap
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  6. src/runtime/map_fast32.go

    	// Set hashWriting after calling t.hasher for consistency with mapassign.
    	h.flags ^= hashWriting
    
    	if h.buckets == nil {
    		h.buckets = newobject(t.Bucket) // newarray(t.bucket, 1)
    	}
    
    again:
    	bucket := hash & bucketMask(h.B)
    	if h.growing() {
    		growWork_fast32(t, h, bucket)
    	}
    	b := (*bmap)(add(h.buckets, bucket*uintptr(t.BucketSize)))
    
    	var insertb *bmap
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 13.9K bytes
    - Viewed (0)
  7. src/runtime/map_faststr.go

    	// Set hashWriting after calling t.hasher for consistency with mapassign.
    	h.flags ^= hashWriting
    
    	if h.buckets == nil {
    		h.buckets = newobject(t.Bucket) // newarray(t.bucket, 1)
    	}
    
    again:
    	bucket := hash & bucketMask(h.B)
    	if h.growing() {
    		growWork_faststr(t, h, bucket)
    	}
    	b := (*bmap)(add(h.buckets, bucket*uintptr(t.BucketSize)))
    	top := tophash(hash)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:17:26 UTC 2024
    - 15.3K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/types/type.go

    		t.extra = new(Chan)
    	case TTUPLE:
    		t.extra = new(Tuple)
    	case TRESULTS:
    		t.extra = new(Results)
    	}
    	return t
    }
    
    // NewArray returns a new fixed-length array Type.
    func NewArray(elem *Type, bound int64) *Type {
    	if bound < 0 {
    		base.Fatalf("NewArray: invalid bound %v", bound)
    	}
    	t := newType(TARRAY)
    	t.extra = &Array{Elem: elem, Bound: bound}
    	if elem.HasShape() {
    		t.SetHasShape(true)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 49.5K bytes
    - Viewed (0)
  9. src/go/internal/gcimporter/ureader.go

    			return t
    		}
    		return name.Type()
    
    	case pkgbits.TypeTypeParam:
    		return r.dict.tparams[r.Len()]
    
    	case pkgbits.TypeArray:
    		len := int64(r.Uint64())
    		return types.NewArray(r.typ(), len)
    	case pkgbits.TypeChan:
    		dir := types.ChanDir(r.Len())
    		return types.NewChan(dir, r.typ())
    	case pkgbits.TypeMap:
    		return types.NewMap(r.typ(), r.typ())
    	case pkgbits.TypePointer:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/types2/api_test.go

    		{newDefined(Typ[Int]), new(Struct), false},
    		{Typ[UntypedInt], Typ[Int], true},
    		{NewSlice(Typ[Int]), NewArray(Typ[Int], 10), true},
    		{NewSlice(Typ[Int]), NewArray(Typ[Uint], 10), false},
    		{NewSlice(Typ[Int]), NewPointer(NewArray(Typ[Int], 10)), true},
    		{NewSlice(Typ[Int]), NewPointer(NewArray(Typ[Uint], 10)), false},
    		// Untyped string values are not permitted by the spec, so the behavior below is undefined.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 07 20:08:23 UTC 2024
    - 93.3K bytes
    - Viewed (0)
Back to top