- Sort Score
- Result 10 results
- Languages All
Results 11 - 20 of 100 for cap (0.03 sec)
-
doc/next/6-stdlib/1-time.md
prepared before that call will be sent or received after the call. Earlier versions of Go used channels with a one-element buffer, making it difficult to use `Reset` and `Stop` correctly. A visible effect of this change is that `len` and `cap` of timer channels now returns 0 instead of 1, which may affect programs that poll the length to decide whether a receive on the timer channel will succeed. Such code should use a non-blocking receive instead.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 20:49:22 UTC 2024 - 1.5K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/sparseset.go
} // newSparseSet returns a sparseSet that can represent // integers between 0 and n-1. func newSparseSet(n int) *sparseSet { return &sparseSet{dense: nil, sparse: make([]int32, n)} } func (s *sparseSet) cap() int { return len(s.sparse) } func (s *sparseSet) size() int { return len(s.dense) } func (s *sparseSet) contains(x ID) bool { i := s.sparse[x] return i < int32(len(s.dense)) && s.dense[i] == x }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Nov 18 17:59:44 UTC 2022 - 1.5K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/sparsemappos.go
// integers between 0 and n-1 to the pair <int32,src.XPos>. func newSparseMapPos(n int) *sparseMapPos { return &sparseMapPos{dense: nil, sparse: make([]int32, n)} } func (s *sparseMapPos) cap() int { return len(s.sparse) } func (s *sparseMapPos) size() int { return len(s.dense) } func (s *sparseMapPos) contains(k ID) bool { i := s.sparse[k]
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 31 21:41:06 UTC 2022 - 1.7K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/rewritedec.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 12 00:48:31 UTC 2023 - 24.9K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/expr.go
n.Ptr = Expr(n.Ptr) n.Len = DefaultLit(Expr(n.Len), types.Types[types.TINT]) n.Cap = DefaultLit(Expr(n.Cap), types.Types[types.TINT]) if ir.IsConst(n.Len, constant.Int) && ir.Int64Val(n.Len) < 0 { base.Fatalf("len for OSLICEHEADER must be non-negative") } if ir.IsConst(n.Cap, constant.Int) && ir.Int64Val(n.Cap) < 0 { base.Fatalf("cap for OSLICEHEADER must be non-negative") }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:29:45 UTC 2024 - 23.1K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/dcl.go
defer autotmpnamesmu.Unlock() // Grow autotmpnames, if needed. if n >= len(autotmpnames) { autotmpnames = append(autotmpnames, make([]string, n+1-len(autotmpnames))...) autotmpnames = autotmpnames[:cap(autotmpnames)] } s := autotmpnames[n] if s == "" { // Give each tmp a different name so that they can be registerized. // Add a preceding . to avoid clashing with legal names. prefix := ".autotmp_%d"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Sep 14 13:15:50 UTC 2023 - 3.1K bytes - Viewed (0) -
src/cmd/internal/test2json/test2json.go
// and line and part set to the desired input processors. // The lineBuffer will call line(x) for any whole line x (including the final newline) // that fits entirely in cap(b). It will handle input lines longer than cap(b) by // calling part(x) for sections of the line. The line will be split at UTF8 boundaries, // and the final call to part for a long line includes the final newline. type lineBuffer struct {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 09 17:33:07 UTC 2022 - 14.5K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/op.go
BoundsKindCount ) // boundsABI determines which register arguments a bounds check call should use. For an [a:b:c] slice, we do: // // CMPQ c, cap // JA fail1 // CMPQ b, c // JA fail2 // CMPQ a, b // JA fail3 // // fail1: CALL panicSlice3Acap (c, cap) // fail2: CALL panicSlice3B (b, c) // fail3: CALL panicSlice3C (a, b) // // When we register allocate that code, we want the same register to be used for
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 22 15:29:10 UTC 2024 - 18.7K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/sparsemap.go
} // newSparseMap returns a sparseMap that can map // integers between 0 and n-1 to int32s. func newSparseMap(n int) *sparseMap { return &sparseMap{dense: nil, sparse: make([]int32, n)} } func (s *sparseMap) cap() int { return len(s.sparse) } func (s *sparseMap) size() int { return len(s.dense) } func (s *sparseMap) contains(k ID) bool { i := s.sparse[k] return i < int32(len(s.dense)) && s.dense[i].key == k
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 31 21:41:06 UTC 2022 - 1.9K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/stackalloc.go
} return s.live } func (s *stackAllocState) init(f *Func, spillLive [][]ID) { s.f = f // Initialize value information. if n := f.NumValues(); cap(s.values) >= n { s.values = s.values[:n] } else { s.values = make([]stackValState, n) } for _, b := range f.Blocks { for _, v := range b.Values { s.values[v.ID].typ = v.Type
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Feb 29 21:29:41 UTC 2024 - 12.6K bytes - Viewed (0)