Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 377 for asSlice (0.19 sec)

  1. src/cmd/vendor/golang.org/x/tools/go/analysis/passes/asmdecl/asmdecl.go

    	case asmSlice:
    		cc = append(cc, newComponent(suffix+"_base", asmKind(arch.ptrSize), "slice base", off, arch.ptrSize, suffix))
    		cc = append(cc, newComponent(suffix+"_len", asmKind(arch.intSize), "slice len", off+arch.ptrSize, arch.intSize, suffix))
    		cc = append(cc, newComponent(suffix+"_cap", asmKind(arch.intSize), "slice cap", off+arch.ptrSize+arch.intSize, arch.intSize, suffix))
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 22.8K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/walk/range.go

    			body = []ir.Node{rangeAssign(nrange, hv1)}
    		}
    
    	case k == types.TARRAY, k == types.TSLICE, k == types.TPTR: // TPTR is pointer-to-array
    		if nn := arrayRangeClear(nrange, v1, v2, a); nn != nil {
    			base.Pos = lno
    			return nn
    		}
    
    		// Element type of the iteration
    		var elem *types.Type
    		switch t.Kind() {
    		case types.TSLICE, types.TARRAY:
    			elem = t.Elem()
    		case types.TPTR:
    			elem = t.Elem().Elem()
    		}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 14:52:33 UTC 2023
    - 17.6K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/walk/convert.go

    			appendWalkStmt(init, as)
    		}
    
    		// Slice the [n]byte to a []byte.
    		slice := ir.NewSliceExpr(n.Pos(), ir.OSLICEARR, p, nil, nil, nil)
    		slice.SetType(n.Type())
    		slice.SetTypecheck(1)
    		return walkExpr(slice, init)
    	}
    
    	a := typecheck.NodNil()
    	if n.Esc() == ir.EscNone {
    		// Create temporary buffer for slice on stack.
    		a = stackBufAddr(tmpstringbufsize, types.Types[types.TUINT8])
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Oct 09 17:28:22 UTC 2023
    - 18.2K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/typecheck/typecheck.go

    	types.TUNSAFEPTR:  "unsafe.Pointer",
    	types.TSTRUCT:     "struct",
    	types.TINTER:      "interface",
    	types.TCHAN:       "chan",
    	types.TMAP:        "map",
    	types.TARRAY:      "array",
    	types.TSLICE:      "slice",
    	types.TFUNC:       "func",
    	types.TNIL:        "nil",
    	types.TIDEAL:      "untyped number",
    }
    
    func typekind(t *types.Type) string {
    	if t.IsUntyped() {
    		return fmt.Sprintf("%v", t)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 19:08:34 UTC 2024
    - 30.5K bytes
    - Viewed (0)
  5. src/net/splice_linux_test.go

    	clientDown, serverDown := spawnTestSocketPair(t, "tcp")
    	defer clientDown.Close()
    	defer serverDown.Close()
    	// If splice called poll.Splice here, we'd get err == syscall.EINVAL
    	// and handled == false.  If poll.Splice gets an EINVAL on the first
    	// try, it assumes the kernel it's running on doesn't support splice
    	// for unix sockets and returns handled == false. This works for our
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:49:26 UTC 2024
    - 14.5K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/walk/builtin.go

    	nif.Likely = true
    
    	// then { s = s[:n] }
    	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(s.ptr, n, s.cap, a, T) }
    	nif.Else = []ir.Node{
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 22:35:22 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  7. src/encoding/gob/enc_helpers.go

    	// Can only slice if it is addressable.
    	if !v.CanAddr() {
    		return false
    	}
    	return encBoolSlice(state, v.Slice(0, v.Len()))
    }
    
    func encBoolSlice(state *encoderState, v reflect.Value) bool {
    	slice, ok := v.Interface().([]bool)
    	if !ok {
    		// It is kind bool but not type bool. TODO: We can handle this unsafely.
    		return false
    	}
    	for _, x := range slice {
    		if x != false || state.sendZero {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Mar 10 17:50:11 UTC 2018
    - 9.9K bytes
    - Viewed (0)
  8. pkg/kubelet/cm/dra/plugin/noderesources.go

    			// like this in an existing slice.
    			continue
    		}
    
    		if numObsoleteSlices > 0 {
    			// Update one existing slice.
    			slice := obsoleteSlices[numObsoleteSlices-1]
    			numObsoleteSlices--
    			slice = slice.DeepCopy()
    			slice.ResourceModel = *resource
    			logger.V(5).Info("Reusing existing node resource slice", "slice", klog.KObj(slice))
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 27 20:12:53 UTC 2024
    - 16.6K bytes
    - Viewed (0)
  9. 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)
  10. staging/src/k8s.io/apimachinery/pkg/util/errors/errors_test.go

    	if err != nil {
    		t.Errorf("expected nil, got %#v", err)
    	}
    
    	// Append a non-nil error
    	slice = append(slice, fmt.Errorf("err"))
    	agg = NewAggregate(slice)
    	if agg == nil {
    		t.Errorf("expected non-nil")
    	}
    	if s := agg.Error(); s != "err" {
    		t.Errorf("expected 'err', got %q", s)
    	}
    	if s := agg.Errors(); len(s) != 1 {
    		t.Errorf("expected one-element slice, got %#v", s)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Jul 24 13:16:21 UTC 2022
    - 12.7K bytes
    - Viewed (0)
Back to top