Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 36 for slicelit (0.33 sec)

  1. src/cmd/compile/internal/staticinit/sched.go

    			return true
    		}
    
    	case ir.OPTRLIT:
    		r := r.(*ir.AddrExpr)
    		switch r.X.Op() {
    		case ir.OARRAYLIT, ir.OSLICELIT, ir.OSTRUCTLIT, ir.OMAPLIT:
    			// copy pointer
    			staticdata.InitAddr(l, loff, staticdata.GlobalLinksym(s.Temps[r]))
    			return true
    		}
    
    	case ir.OSLICELIT:
    		r := r.(*ir.CompLitExpr)
    		// copy slice
    		staticdata.InitSlice(l, loff, staticdata.GlobalLinksym(s.Temps[r]), r.Len)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 17:16:14 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  2. test/indirect.go

    		panic("fail")
    	}
    
    	x =
    		len(a0) +
    			len(a2)
    	if x != 20 {
    		println("wrong arraylen")
    		panic("fail")
    	}
    
    	x =
    		len(b0) +
    			len(b3)
    	if x != 3 {
    		println("wrong slicelen")
    		panic("fail")
    	}
    
    	x =
    		cap(b0) +
    			cap(b3)
    	if x != 3 {
    		println("wrong slicecap")
    		panic("fail")
    	}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Feb 23 07:47:26 UTC 2012
    - 1.4K bytes
    - Viewed (0)
  3. src/encoding/gob/debug.go

    		fmt.Fprintf(os.Stderr, "%skey id=%d\n", indent+1, wire.MapT.Key)
    		fmt.Fprintf(os.Stderr, "%selem id=%d\n", indent+1, wire.MapT.Elem)
    	case wire.SliceT != nil:
    		deb.printCommonType(indent, "slice", &wire.SliceT.CommonType)
    		fmt.Fprintf(os.Stderr, "%selem id=%d\n", indent+1, wire.SliceT.Elem)
    	case wire.StructT != nil:
    		deb.printCommonType(indent, "struct", &wire.StructT.CommonType)
    		for i, field := range wire.StructT.Field {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jan 20 09:34:41 UTC 2023
    - 18.3K bytes
    - Viewed (0)
  4. test/noinit.go

    type SA struct{ a, b, c [3]int }
    type SC struct{ a, b, c []int }
    
    var (
    	zero                      = 2
    	one                       = 1
    	pi                        = 3.14
    	slice                     = []byte{1, 2, 3}
    	sliceInt                  = []int{1, 2, 3}
    	hello                     = "hello, world"
    	bytes                     = []byte("hello, world")
    	four, five                = 4, 5
    	x, y                      = 0.1, "hello"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 14 17:57:36 UTC 2023
    - 6.8K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/_gen/dec.rules

    (Store dst (StringMake ptr len) mem) =>
      (Store {typ.Int}
        (OffPtr <typ.IntPtr> [config.PtrSize] dst)
        len
        (Store {typ.BytePtr} dst ptr mem))
    
    // slice ops
    (SlicePtr (SliceMake ptr _ _ )) => ptr
    (SliceLen (SliceMake _ len _)) => len
    (SliceCap (SliceMake _ _ cap)) => cap
    (SlicePtrUnchecked (SliceMake ptr _ _ )) => ptr
    
    (Load <t> ptr mem) && t.IsSlice() =>
      (SliceMake
        (Load <t.Elem().PtrTo()> ptr mem)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 00:48:31 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  6. pkg/controller/endpointslice/endpointslice_controller_test.go

    	expectActions(t, client.Actions(), 1, "create", "endpointslices")
    
    	sliceList, err := client.DiscoveryV1().EndpointSlices(ns).List(context.TODO(), metav1.ListOptions{})
    	assert.Nil(t, err, "Expected no error fetching endpoint slices")
    	assert.Len(t, sliceList.Items, 1, "Expected 1 endpoint slices")
    	slice := sliceList.Items[0]
    	assert.Regexp(t, "^"+serviceName, slice.Name)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 08:33:32 UTC 2024
    - 65.5K bytes
    - Viewed (0)
  7. test/typeparam/sliceimp.dir/a.go

    		return zero
    	}
    	return Reduce(s[1:], s[0], Max[Elem])
    }
    
    // Min returns the minimum element in a slice of some ordered type.
    // If the slice is empty it returns the zero value of the element type.
    func SliceMin[Elem Ordered](s []Elem) Elem {
    	if len(s) == 0 {
    		var zero Elem
    		return zero
    	}
    	return Reduce(s[1:], s[0], Min[Elem])
    }
    
    // Append adds values to the end of a slice, returning a new slice.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Aug 30 01:55:58 UTC 2021
    - 3.3K bytes
    - Viewed (0)
  8. src/encoding/gob/type.go

    	const unknown = "unknown type"
    	if w == nil {
    		return unknown
    	}
    	switch {
    	case w.ArrayT != nil:
    		return w.ArrayT.Name
    	case w.SliceT != nil:
    		return w.SliceT.Name
    	case w.StructT != nil:
    		return w.StructT.Name
    	case w.MapT != nil:
    		return w.MapT.Name
    	case w.GobEncoderT != nil:
    		return w.GobEncoderT.Name
    	case w.BinaryMarshalerT != nil:
    		return w.BinaryMarshalerT.Name
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 02:00:26 UTC 2024
    - 27.2K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ir/fmt.go

    	if OpPrec[n.Op()] < 0 {
    		stmtFmt(n, s)
    		return
    	}
    
    	exprFmt(n, s, 0)
    }
    
    var OpPrec = []int{
    	OAPPEND:           8,
    	OBYTES2STR:        8,
    	OARRAYLIT:         8,
    	OSLICELIT:         8,
    	ORUNES2STR:        8,
    	OCALLFUNC:         8,
    	OCALLINTER:        8,
    	OCALLMETH:         8,
    	OCALL:             8,
    	OCAP:              8,
    	OCLEAR:            8,
    	OCLOSE:            8,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 15:20:28 UTC 2023
    - 26K bytes
    - Viewed (0)
  10. api/go1.23.txt

    pkg os, func CopyFS(string, fs.FS) error #62484
    pkg path/filepath, func Localize(string) (string, error) #57151
    pkg reflect, func SliceAt(Type, unsafe.Pointer, int) Value #61308
    pkg reflect, method (Value) Seq() iter.Seq[Value] #66056
    pkg reflect, method (Value) Seq2() iter.Seq2[Value, Value] #66056
    pkg reflect, type Type interface, CanSeq() bool #66056
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Jun 05 20:48:49 UTC 2024
    - 8.4K bytes
    - Viewed (0)
Back to top