Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 140 for nzslice (0.26 sec)

  1. src/runtime/iface_test.go

    	zero64I    T64    = 0
    	one64      uint64 = 1
    	thousand64 uint64 = 1000
    
    	zerostr  string = ""
    	zerostrI Tstr   = ""
    	nzstr    string = "abc"
    
    	zeroslice  []byte = nil
    	zerosliceI Tslice = nil
    	nzslice    []byte = []byte("abc")
    
    	zerobig [512]byte
    	nzbig   [512]byte = [512]byte{511: 1}
    )
    
    func BenchmarkConvT2Ezero(b *testing.B) {
    	b.Run("zero", func(b *testing.B) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Dec 13 18:45:54 UTC 2021
    - 7.5K bytes
    - Viewed (0)
  2. test/named.go

    	asMap(Map{})
    	isMap(Map{})
    
    	asSlice(slice)
    	isSlice(slice)
    	asSlice(make(Slice, 5))
    	isSlice(make(Slice, 5))
    	asSlice([]byte{1, 2, 3})
    	asSlice([]byte{1, 2, 3}[0:2])
    	asSlice(slice[0:4])
    	isSlice(slice[0:4])
    	asSlice(slice[3:8])
    	isSlice(slice[3:8])
    	asSlice(nil)
    	asSlice(Slice(nil))
    	isSlice(Slice(nil))
    	slice = nil
    	asSlice(Slice{1, 2, 3})
    	isSlice(Slice{1, 2, 3})
    	asSlice(Slice{})
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon May 02 13:43:18 UTC 2016
    - 4.6K bytes
    - Viewed (0)
  3. src/go/types/slice.go

    // Source: ../../cmd/compile/internal/types2/slice.go
    
    // Copyright 2011 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package types
    
    // A Slice represents a slice type.
    type Slice struct {
    	elem Type
    }
    
    // NewSlice returns a new slice type for the given element type.
    func NewSlice(elem Type) *Slice { return &Slice{elem: elem} }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Apr 03 18:48:38 UTC 2024
    - 701 bytes
    - Viewed (0)
  4. src/cmd/compile/internal/types2/slice.go

    package types2
    
    // A Slice represents a slice type.
    type Slice struct {
    	elem Type
    }
    
    // NewSlice returns a new slice type for the given element type.
    func NewSlice(elem Type) *Slice { return &Slice{elem: elem} }
    
    // Elem returns the element type of slice s.
    func (s *Slice) Elem() Type { return s.elem }
    
    func (s *Slice) Underlying() Type { return s }
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jul 01 22:17:50 UTC 2021
    - 577 bytes
    - Viewed (0)
  5. src/cmd/asm/internal/lex/slice.go

    	"cmd/internal/src"
    )
    
    // A Slice reads from a slice of Tokens.
    type Slice struct {
    	tokens []Token
    	base   *src.PosBase
    	line   int
    	pos    int
    }
    
    func NewSlice(base *src.PosBase, line int, tokens []Token) *Slice {
    	return &Slice{
    		tokens: tokens,
    		base:   base,
    		line:   line,
    		pos:    -1, // Next will advance to zero.
    	}
    }
    
    func (s *Slice) Next() ScanToken {
    	s.pos++
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Jun 29 22:49:50 UTC 2023
    - 1.6K bytes
    - Viewed (0)
  6. src/runtime/slice.go

    package runtime
    
    import (
    	"internal/abi"
    	"internal/goarch"
    	"runtime/internal/math"
    	"runtime/internal/sys"
    	"unsafe"
    )
    
    type slice struct {
    	array unsafe.Pointer
    	len   int
    	cap   int
    }
    
    // A notInHeapSlice is a slice backed by runtime/internal/sys.NotInHeap memory.
    type notInHeapSlice struct {
    	array *notInHeap
    	len   int
    	cap   int
    }
    
    func panicmakeslicelen() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  7. pkg/util/slice/slice.go

    		if item == s {
    			continue
    		}
    		if modifier != nil && modifier(item) == s {
    			continue
    		}
    		newSlice = append(newSlice, item)
    	}
    	if len(newSlice) == 0 {
    		// Sanitize for unit tests so we don't need to distinguish empty array
    		// and nil.
    		newSlice = nil
    	}
    	return newSlice
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Aug 21 19:03:53 UTC 2019
    - 2.1K bytes
    - Viewed (0)
  8. src/sort/slice.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package sort
    
    import (
    	"internal/reflectlite"
    	"math/bits"
    )
    
    // Slice sorts the slice x given the provided less function.
    // It panics if x is not a slice.
    //
    // The sort is not guaranteed to be stable: equal elements
    // may be reversed from their original order.
    // For a stable sort, use [SliceStable].
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Nov 28 16:40:32 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/typecheck/expr.go

    	if t == nil {
    		n.SetType(nil)
    		return n
    	}
    	if !t.IsSlice() && !t.IsString() {
    		base.Fatalf("OSPTR of %v", t)
    	}
    	if t.IsString() {
    		n.SetType(types.NewPtr(types.Types[types.TUINT8]))
    	} else {
    		n.SetType(types.NewPtr(t.Elem()))
    	}
    	return n
    }
    
    // tcSlice typechecks an OSLICE or OSLICE3 node.
    func tcSlice(n *ir.SliceExpr) ir.Node {
    	n.X = DefaultLit(Expr(n.X), nil)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  10. pkg/controller/endpointslicemirroring/utils.go

    			continue
    		}
    		epSlice.Annotations[annotation] = val
    	}
    
    	if sliceName == "" {
    		epSlice.GenerateName = getEndpointSlicePrefix(endpoints.Name)
    	} else {
    		epSlice.Name = sliceName
    	}
    
    	return epSlice
    }
    
    // getEndpointSlicePrefix returns a suitable prefix for an EndpointSlice name.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jul 11 18:08:12 UTC 2023
    - 8.8K bytes
    - Viewed (0)
Back to top