Lines Matching refs:Cap
702 // Cap returns v's capacity.
704 func (v Value) Cap() int {
713 return (*sliceHeader)(v.ptr).Cap
715 panic(&ValueError{"reflect.Value.Cap", v.kind()})
1466 if uint(n) > uint(s.Cap) {
1479 if n < s.Len || n > s.Cap {
1482 s.Cap = n
1561 cap int
1574 cap = int(tt.len)
1582 cap = s.Cap
1596 if i < 0 || j < i || j > cap {
1606 s.Cap = cap - i
1607 if cap-i > 0 {
1608 s.Data = arrayAt(base, i, typ.elem.Size(), "i < cap")
1623 cap int
1636 cap = int(tt.len)
1644 cap = s.Cap
1647 if i < 0 || j < i || k < j || k > cap {
1658 s.Cap = k - i
1660 s.Data = arrayAt(base, i, typ.elem.Size(), "i < k <= cap")
1803 Cap int
1810 Cap int
1838 m := s.Cap()
1917 ds.Cap = ds.Len
1924 ss.Cap = ss.Len
1931 ss.Cap = sh.Len
2090 func MakeSlice(typ Type, len, cap int) Value {
2097 if cap < 0 {
2098 panic("reflect.MakeSlice: negative cap")
2100 if len > cap {
2101 panic("reflect.MakeSlice: len > cap")
2104 s := sliceHeader{unsafe_NewArray(typ.Elem().(*rtype), cap), len, cap}
2534 func makemap(t *rtype, cap int) (m unsafe.Pointer)