Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 564 for SLICE (0.04 sec)

  1. src/cmd/compile/internal/types2/conversions.go

    		return true
    	}
    	// "and vice versa"
    	if isUnsafePointer(Vu) && (isPointer(Tu) || isUintptr(Tu)) {
    		return true
    	}
    
    	// "V is a slice, T is an array or pointer-to-array type,
    	// and the slice and array types have identical element types."
    	if s, _ := Vu.(*Slice); s != nil {
    		switch a := Tu.(type) {
    		case *Array:
    			if Identical(s.Elem(), a.Elem()) {
    				if check == nil || check.allowVersion(x, go1_20) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 18:51:00 UTC 2024
    - 9K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/walk/assign.go

    	nif.Cond = ir.NewBinaryExpr(base.Pos, ir.OLE, nuint, scapuint)
    	nif.Likely = true
    
    	// then { s = s[:newLen] }
    	slice := ir.NewSliceExpr(base.Pos, ir.OSLICE, s, nil, newLen, nil)
    	slice.SetBounded(true)
    	nif.Body = []ir.Node{ir.NewAssignStmt(base.Pos, s, slice)}
    
    	// else { s = growslice(oldPtr, newLen, oldCap, num, T) }
    	call := walkGrowslice(s, nif.PtrInit(), oldPtr, newLen, oldCap, num)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:09:06 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/types2/builtins.go

    		}
    
    	case _SliceData:
    		// unsafe.SliceData(slice []T) *T
    		check.verifyVersionf(call.Fun, go1_20, "unsafe.SliceData")
    
    		slice, _ := coreType(x.typ).(*Slice)
    		if slice == nil {
    			check.errorf(x, InvalidUnsafeSliceData, invalidArg+"%s is not a slice", x)
    			return
    		}
    
    		x.mode = value
    		x.typ = NewPointer(slice.elem)
    		if check.recordTypes() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 30 19:19:55 UTC 2024
    - 27.1K bytes
    - Viewed (0)
  4. src/index/suffixarray/suffixarray.go

    	} else {
    		// re-use existing buffers
    		x.data = x.data[0:n]
    		x.sa = x.sa.slice(0, n)
    	}
    
    	// read data
    	if _, err := io.ReadFull(r, x.data); err != nil {
    		return err
    	}
    
    	// read index
    	sa := x.sa
    	for sa.len() > 0 {
    		n, err := readSlice(r, buf, sa)
    		if err != nil {
    			return err
    		}
    		sa = sa.slice(n, sa.len())
    	}
    	return nil
    }
    
    // Write writes the index x to w.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 9.5K bytes
    - Viewed (0)
  5. staging/src/k8s.io/api/resource/v1alpha2/namedresources.go

    }
    
    // NamedResourcesIntSlice contains a slice of 64-bit integers.
    type NamedResourcesIntSlice struct {
    	// Ints is the slice of 64-bit integers.
    	//
    	// +listType=atomic
    	Ints []int64 `json:"ints" protobuf:"bytes,1,opt,name=ints"`
    }
    
    // NamedResourcesStringSlice contains a slice of strings.
    type NamedResourcesStringSlice struct {
    	// Strings is the slice of strings.
    	//
    	// +listType=atomic
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 22 12:18:45 UTC 2024
    - 5.1K bytes
    - Viewed (0)
  6. src/cmd/trace/gstate.go

    		panic("non-executing goroutine stopped")
    	}
    	ctx.Slice(traceviewer.SliceEvent{
    		Name:     gs.name(),
    		Ts:       ctx.elapsed(gs.startRunningTime),
    		Dur:      ts.Sub(gs.startRunningTime),
    		Resource: uint64(gs.executing),
    		Stack:    stk,
    	})
    
    	// Flush completed ranges.
    	for _, cr := range gs.completedRanges {
    		ctx.Slice(traceviewer.SliceEvent{
    			Name:     cr.name,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 18:48:18 UTC 2024
    - 11.9K bytes
    - Viewed (0)
  7. src/slices/iter_test.go

    	}
    
    	if want := [][]int{{1, 2}, {3, 4}}; !chunkEqual(got, want) {
    		t.Errorf("Chunk iteration did not stop, got %v, want %v", got, want)
    	}
    }
    
    func chunkEqual[Slice ~[]E, E comparable](s1, s2 []Slice) bool {
    	return EqualFunc(s1, s2, Equal[Slice])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 10 17:28:50 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  8. src/crypto/tls/key_agreement.go

    	if sigType == signatureEd25519 {
    		var signed []byte
    		for _, slice := range slices {
    			signed = append(signed, slice...)
    		}
    		return signed
    	}
    	if version >= VersionTLS12 {
    		h := hashFunc.New()
    		for _, slice := range slices {
    			h.Write(slice)
    		}
    		digest := h.Sum(nil)
    		return digest
    	}
    	if sigType == signatureECDSA {
    		return sha1Hash(slices)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 22 14:56:25 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  9. src/cmd/vendor/golang.org/x/tools/internal/typesinternal/errorcode.go

    	//  var i string
    	//  var _ = s[i]
    	InvalidIndex
    
    	// SwappedSliceIndices occurs when constant indices in a slice expression
    	// are decreasing in value.
    	//
    	// Example:
    	//  var _ = []int{1,2,3}[2:1]
    	SwappedSliceIndices
    
    	/* operators > slice */
    
    	// NonSliceableOperand occurs when a slice operation is applied to a value
    	// whose type is not sliceable, or is unaddressable.
    	//
    	// Example:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 34K bytes
    - Viewed (0)
  10. src/strings/strings.go

    }
    
    // Split slices s into all substrings separated by sep and returns a slice of
    // the substrings between those separators.
    //
    // If s does not contain sep and sep is not empty, Split returns a
    // slice of length 1 whose only element is s.
    //
    // If sep is empty, Split splits after each UTF-8 sequence. If both s
    // and sep are empty, Split returns an empty slice.
    //
    // It is equivalent to [SplitN] with a count of -1.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 16:48:16 UTC 2024
    - 31.2K bytes
    - Viewed (0)
Back to top