Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 7 of 7 for SliceLen (0.41 sec)

  1. 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)
  2. 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)
  3. src/cmd/compile/internal/ssa/_gen/generic.rules

    // a more comprehensive set.
    (SliceLen (SliceMake _ (Const64 <t> [c]) _)) => (Const64 <t> [c])
    (SliceCap (SliceMake _ _ (Const64 <t> [c]))) => (Const64 <t> [c])
    (SliceLen (SliceMake _ (Const32 <t> [c]) _)) => (Const32 <t> [c])
    (SliceCap (SliceMake _ _ (Const32 <t> [c]))) => (Const32 <t> [c])
    (SlicePtr (SliceMake (SlicePtr x) _ _)) => (SlicePtr x)
    (SliceLen (SliceMake _ (SliceLen x) _)) => (SliceLen x)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 22:21:05 UTC 2024
    - 135.3K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ssa/rewritedec.go

    	v_0 := v.Args[0]
    	b := v.Block
    	config := b.Func.Config
    	typ := &b.Func.Config.Types
    	// match: (SliceLen (SliceMake _ len _))
    	// result: len
    	for {
    		if v_0.Op != OpSliceMake {
    			break
    		}
    		len := v_0.Args[1]
    		v.copyOf(len)
    		return true
    	}
    	// match: (SliceLen x:(Load <t> ptr mem))
    	// cond: t.IsSlice()
    	// result: @x.Block (Load <typ.Int> (OffPtr <typ.IntPtr> [config.PtrSize] ptr) mem)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 00:48:31 UTC 2023
    - 24.9K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/_gen/genericOps.go

    	// Slices
    	{name: "SliceMake", argLength: 3},                // arg0=ptr, arg1=len, arg2=cap
    	{name: "SlicePtr", argLength: 1, typ: "BytePtr"}, // ptr(arg0)
    	{name: "SliceLen", argLength: 1},                 // len(arg0)
    	{name: "SliceCap", argLength: 1},                 // cap(arg0)
    	// SlicePtrUnchecked, like SlicePtr, extracts the pointer from a slice.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 15:49:20 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssa/rewritegeneric.go

    		c := auxIntToInt32(v_0_1.AuxInt)
    		v.reset(OpConst32)
    		v.Type = t
    		v.AuxInt = int32ToAuxInt(c)
    		return true
    	}
    	// match: (SliceLen (SliceMake _ (SliceLen x) _))
    	// result: (SliceLen x)
    	for {
    		if v_0.Op != OpSliceMake {
    			break
    		}
    		_ = v_0.Args[1]
    		v_0_1 := v_0.Args[1]
    		if v_0_1.Op != OpSliceLen {
    			break
    		}
    		x := v_0_1.Args[0]
    		v.reset(OpSliceLen)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 18:24:47 UTC 2024
    - 812.2K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ssa/opGen.go

    	},
    	{
    		name:    "SliceMake",
    		argLen:  3,
    		generic: true,
    	},
    	{
    		name:    "SlicePtr",
    		argLen:  1,
    		generic: true,
    	},
    	{
    		name:    "SliceLen",
    		argLen:  1,
    		generic: true,
    	},
    	{
    		name:    "SliceCap",
    		argLen:  1,
    		generic: true,
    	},
    	{
    		name:    "SlicePtrUnchecked",
    		argLen:  1,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 15:49:20 UTC 2024
    - 1M bytes
    - Viewed (0)
Back to top