- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 20 for NumElem (0.47 sec)
-
src/cmd/compile/internal/types/size.go
cap := (uint64(MaxWidth) - 1) / uint64(t.Elem().width) if uint64(t.NumElem()) > cap { base.Errorf("type %L larger than address space", t) } } w = t.NumElem() * t.Elem().width t.align = t.Elem().align // ABIInternal only allows "trivial" arrays (i.e., length 0 or 1) // to be passed by register. switch t.NumElem() { case 0: t.intRegs = 0 t.floatRegs = 0 case 1:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 15K bytes - Viewed (0) -
src/cmd/compile/internal/types/identity.go
fs2 := t2.ParamsResults() for i, f1 := range fs1 { if !identical(f1.Type, fs2[i].Type, flags, assumedEqual) { return false } } return true case TARRAY: if t1.NumElem() != t2.NumElem() { return false } case TCHAN: if t1.ChanDir() != t2.ChanDir() { return false } case TMAP: if !identical(t1.Key(), t2.Key(), flags, assumedEqual) { return false
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 22 20:57:01 UTC 2023 - 4.6K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/decompose.go
// returned. func decomposeUserArrayInto(f *Func, name *LocalSlot, slots []*LocalSlot) []*LocalSlot { t := name.Type if t.NumElem() == 0 { // TODO(khr): Not sure what to do here. Probably nothing. // Names for empty arrays aren't important. return slots } if t.NumElem() != 1 { // shouldn't get here due to CanSSA f.Fatalf("array not of size 1") } elemName := f.SplitArray(name)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 23 21:22:15 UTC 2022 - 13.4K bytes - Viewed (0) -
src/cmd/compile/internal/walk/compare.go
} return n case types.TARRAY: // We can compare several elements at once with 2/4/8 byte integer compares inline = t.NumElem() <= 1 || (types.IsSimple[t.Elem().Kind()] && (t.NumElem() <= 4 || t.Elem().Size()*t.NumElem() <= maxcmpsize)) case types.TSTRUCT: inline = compare.EqStructCost(t) <= 4 } cmpl := n.X for cmpl != nil && cmpl.Op() == ir.OCONVNOP {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 24 21:55:14 UTC 2023 - 16.2K bytes - Viewed (0) -
src/cmd/compile/internal/typebits/typebits.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 22 01:53:41 UTC 2023 - 3.2K bytes - Viewed (0) -
src/cmd/compile/internal/walk/complit.go
var_ = typecheck.AssignExpr(var_) name, offset, ok := staticinit.StaticLoc(var_) if !ok || name.Class != ir.PEXTERN { base.Fatalf("slicelit: %v", var_) } staticdata.InitSlice(name, offset, vstat.Linksym(), t.NumElem()) return } // recipe for var = []t{...} // 1. make a static array // var vstat [...]t // 2. assign (data statements) the constant part // vstat = constpart{}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 19:03:54 UTC 2023 - 19.5K bytes - Viewed (0) -
src/cmd/compile/internal/types/type.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:29:45 UTC 2024 - 49.5K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/typecheck.go
base.Errorf("invalid slice index %v (index must be non-negative)", r) return false } else if tp != nil && tp.NumElem() >= 0 && constant.Compare(x, token.GTR, constant.MakeInt64(tp.NumElem())) { base.Errorf("invalid slice index %v (out of bounds for %d-element array)", r, tp.NumElem()) return false } else if ir.IsConst(l, constant.String) && constant.Compare(x, token.GTR, constant.MakeInt64(int64(len(ir.StringVal(l))))) {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 20 19:08:34 UTC 2024 - 30.5K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/expand_calls.go
return m0 } else { panic(fmt.Errorf("Store of not a load")) } } mem := m0 switch at.Kind() { case types.TARRAY: et := at.Elem() for i := int64(0); i < at.NumElem(); i++ { e := b.NewValue1I(pos, OpArraySelect, et, i, a) pos = pos.WithNotStmt() mem = x.decomposeAsNecessary(pos, b, e, mem, rc.next(et)) } return mem case types.TSTRUCT:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Nov 28 05:13:40 UTC 2023 - 31.9K bytes - Viewed (0) -
src/cmd/compile/internal/types/fmt.go
if verb == 'S' { tconv2(b, t.Elem(), 'S', mode, visited) return } } tconv2(b, t.Elem(), 'v', mode, visited) case TARRAY: b.WriteByte('[') b.WriteString(strconv.FormatInt(t.NumElem(), 10)) b.WriteByte(']') tconv2(b, t.Elem(), 0, mode, visited) case TSLICE: b.WriteString("[]") tconv2(b, t.Elem(), 0, mode, visited) case TCHAN: switch t.ChanDir() { case Crecv:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 12 15:41:17 UTC 2023 - 15.7K bytes - Viewed (0)