Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for sliceptr1 (0.19 sec)

  1. src/cmd/cgo/internal/testerrors/ptr_test.go

    		name:    "sliceptr1",
    		c:       `void f7(void **p) {}`,
    		imports: []string{"unsafe"},
    		body:    `i := 0; s := []unsafe.Pointer{unsafe.Pointer(&i)}; C.f7(&s[0])`,
    		fail:    true,
    	},
    	{
    		// Passing the address of a slice with a Go pointer,
    		// where we are passing the address of an element that
    		// is not a Go pointer.
    		name:    "sliceptr2",
    		c:       `void f8(void **p) {}`,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 03 16:07:49 UTC 2023
    - 21.2K bytes
    - Viewed (0)
  2. src/cmd/cgo/internal/testshared/testdata/exe/exe.go

    	var c *C
    	if reflect.TypeOf(F).Out(0) != reflect.TypeOf(c) {
    		panic("bad reflection results, see golang.org/issue/18252")
    	}
    
    	sp := reflect.New(reflect.TypeOf(slicePtr).Elem())
    	s := sp.Interface()
    
    	if reflect.TypeOf(s) != reflect.TypeOf(slicePtr) {
    		panic("bad reflection results, see golang.org/issue/18729")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 12 11:59:56 UTC 2023
    - 906 bytes
    - Viewed (0)
  3. src/cmd/cgo/internal/testshared/testdata/depBase/dep.go

    	if !depBaseInternal.Initialized {
    		panic("depBaseInternal not initialized")
    	}
    	if os.Stdout == nil {
    		panic("os.Stdout is nil")
    	}
    
    	Initialized = true
    }
    
    var Initialized bool
    
    var SlicePtr interface{} = &[]int{}
    
    var V int = 1
    
    var HasMask []string = []string{"hi"}
    
    type HasProg struct {
    	array [1024]*byte
    }
    
    type Dep struct {
    	X int
    }
    
    func (d *Dep) Method() int {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 07 14:52:41 UTC 2024
    - 1K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/ssa/_gen/dec.rules

          mem))
    (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
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 00:48:31 UTC 2023
    - 6.9K bytes
    - Viewed (0)
  5. pkg/scheduler/framework/runtime/framework.go

    type extensionPoint struct {
    	// the set of plugins to be configured at this extension point.
    	plugins *config.PluginSet
    	// a pointer to the slice storing plugins implementations that will run at this
    	// extension point.
    	slicePtr interface{}
    }
    
    func (f *frameworkImpl) getExtensionPoints(plugins *config.Plugins) []extensionPoint {
    	return []extensionPoint{
    		{&plugins.PreFilter, &f.preFilterPlugins},
    		{&plugins.Filter, &f.filterPlugins},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 17 09:07:27 UTC 2024
    - 60.9K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ssa/_gen/genericOps.go

    	{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.
    	// SlicePtr values are assumed non-nil, because they are guarded by bounds checks.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 15:49:20 UTC 2024
    - 42.6K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/ssa/nilcheck.go

    			// value, or a value constructed from an offset of a
    			// non-nil ptr (OpAddPtr) implies it is non-nil
    			// We also assume unsafe pointer arithmetic generates non-nil pointers. See #27180.
    			// We assume that SlicePtr is non-nil because we do a bounds check
    			// before the slice access (and all cap>0 slices have a non-nil ptr). See #30366.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Oct 31 20:45:54 UTC 2023
    - 11.3K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/ssa/rewritedec.go

    	return false
    }
    func rewriteValuedec_OpSlicePtr(v *Value) bool {
    	v_0 := v.Args[0]
    	b := v.Block
    	// match: (SlicePtr (SliceMake ptr _ _ ))
    	// result: ptr
    	for {
    		if v_0.Op != OpSliceMake {
    			break
    		}
    		ptr := v_0.Args[0]
    		v.copyOf(ptr)
    		return true
    	}
    	// match: (SlicePtr x:(Load <t> ptr mem))
    	// cond: t.IsSlice()
    	// result: @x.Block (Load <t.Elem().PtrTo()> ptr mem)
    	for {
    		x := v_0
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 12 00:48:31 UTC 2023
    - 24.9K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/ssa/_gen/generic.rules

    // so we need only compare the first word (interface type or slice ptr).
    (EqInter x y)  => (EqPtr  (ITab x) (ITab y))
    (NeqInter x y) => (NeqPtr (ITab x) (ITab y))
    (EqSlice x y)  => (EqPtr  (SlicePtr x) (SlicePtr y))
    (NeqSlice x y) => (NeqPtr (SlicePtr x) (SlicePtr y))
    
    // Load of store of same address, with compatibly typed value and same size
    (Load <t1> p1 (Store {t2} p2 x _))
    	&& isSamePtr(p1, p2)
    	&& t1.Compare(x.Type) == types.CMPeq
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 22:21:05 UTC 2024
    - 135.3K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssa/rewritegeneric.go

    			break
    		}
    		v.copyOf(newLen)
    		return true
    	}
    	return false
    }
    func rewriteValuegeneric_OpSlicePtr(v *Value) bool {
    	v_0 := v.Args[0]
    	// match: (SlicePtr (SliceMake (SlicePtr x) _ _))
    	// result: (SlicePtr x)
    	for {
    		if v_0.Op != OpSliceMake {
    			break
    		}
    		v_0_0 := v_0.Args[0]
    		if v_0_0.Op != OpSlicePtr {
    			break
    		}
    		x := v_0_0.Args[0]
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Apr 22 18:24:47 UTC 2024
    - 812.2K bytes
    - Viewed (0)
Back to top