Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for makeslicecopy (0.24 sec)

  1. src/runtime/slice.go

    }
    
    func panicmakeslicecap() {
    	panic(errorString("makeslice: cap out of range"))
    }
    
    // makeslicecopy allocates a slice of "tolen" elements of type "et",
    // then copies "fromlen" elements of type "et" into that new allocation from "from".
    func makeslicecopy(et *_type, tolen int, fromlen int, from unsafe.Pointer) unsafe.Pointer {
    	var tomem, copymem uintptr
    	if uintptr(tolen) > uintptr(fromlen) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 29 16:25:21 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  2. src/cmd/internal/goobj/builtinlist.go

    	{"runtime.selectnbsend", 1},
    	{"runtime.selectnbrecv", 1},
    	{"runtime.selectsetpc", 1},
    	{"runtime.selectgo", 1},
    	{"runtime.block", 1},
    	{"runtime.makeslice", 1},
    	{"runtime.makeslice64", 1},
    	{"runtime.makeslicecopy", 1},
    	{"runtime.growslice", 1},
    	{"runtime.unsafeslicecheckptr", 1},
    	{"runtime.panicunsafeslicelen", 1},
    	{"runtime.panicunsafeslicenilptr", 1},
    	{"runtime.unsafestringcheckptr", 1},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 7.4K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/walk/builtin.go

    		init.Append(walkExpr(typecheck.Stmt(ncopy), init))
    
    		return s
    	}
    	// Replace make+copy with runtime.makeslicecopy.
    	// instantiate makeslicecopy(typ *byte, tolen int, fromlen int, from unsafe.Pointer) unsafe.Pointer
    	fn := typecheck.LookupRuntime("makeslicecopy")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 22:35:22 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/typecheck/_builtin/runtime.go

    func block()
    
    func makeslice(typ *byte, len int, cap int) unsafe.Pointer
    func makeslice64(typ *byte, len int64, cap int64) unsafe.Pointer
    func makeslicecopy(typ *byte, tolen int, fromlen int, from unsafe.Pointer) unsafe.Pointer
    func growslice(oldPtr *any, newLen, oldCap, num int, et *byte) (ary []any)
    func unsafeslicecheckptr(typ *byte, ptr unsafe.Pointer, len int64)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 10.6K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/typecheck/builtin.go

    	{"selectnbrecv", funcTag, 113},
    	{"selectsetpc", funcTag, 114},
    	{"selectgo", funcTag, 115},
    	{"block", funcTag, 9},
    	{"makeslice", funcTag, 116},
    	{"makeslice64", funcTag, 117},
    	{"makeslicecopy", funcTag, 118},
    	{"growslice", funcTag, 120},
    	{"unsafeslicecheckptr", funcTag, 121},
    	{"panicunsafeslicelen", funcTag, 9},
    	{"panicunsafeslicenilptr", funcTag, 9},
    	{"unsafestringcheckptr", funcTag, 122},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue May 21 21:08:03 UTC 2024
    - 16.2K bytes
    - Viewed (0)
  6. src/runtime/arena.go

    		s1 := s.(string)
    		s2, b := rawstring(len(s1))
    		copy(b, s1)
    		x = s2
    	case abi.Slice:
    		len := (*slice)(e.data).len
    		et := (*slicetype)(unsafe.Pointer(t)).Elem
    		sl := new(slice)
    		*sl = slice{makeslicecopy(et, len, len, (*slice)(e.data).array), len, len}
    		xe := efaceOf(&x)
    		xe._type = t
    		xe.data = unsafe.Pointer(sl)
    	case abi.Pointer:
    		et := (*ptrtype)(unsafe.Pointer(t)).Elem
    		e2 := newobject(et)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:44:56 UTC 2024
    - 37.9K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/typecheck/func.go

    		n.SetType(nil)
    		return n
    	}
    
    	nn.SetType(t)
    	return nn
    }
    
    // tcMakeSliceCopy typechecks an OMAKESLICECOPY node.
    func tcMakeSliceCopy(n *ir.MakeExpr) ir.Node {
    	// Errors here are Fatalf instead of Errorf because only the compiler
    	// can construct an OMAKESLICECOPY node.
    	// Components used in OMAKESCLICECOPY that are supplied by parsed source code
    	// have already been typechecked in OMAKE and OCOPY earlier.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 06 15:23:18 UTC 2024
    - 21.1K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/typecheck/typecheck.go

    		n := n.(*ir.SliceHeaderExpr)
    		return tcSliceHeader(n)
    
    	case ir.OSTRINGHEADER:
    		n := n.(*ir.StringHeaderExpr)
    		return tcStringHeader(n)
    
    	case ir.OMAKESLICECOPY:
    		n := n.(*ir.MakeExpr)
    		return tcMakeSliceCopy(n)
    
    	case ir.OSLICE, ir.OSLICE3:
    		n := n.(*ir.SliceExpr)
    		return tcSlice(n)
    
    	// call and call like
    	case ir.OCALL:
    		n := n.(*ir.CallExpr)
    		return tcCall(n, top)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Mar 20 19:08:34 UTC 2024
    - 30.5K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/walk/order.go

    		orderMakeSliceCopy(s[i:])
    		o.stmt(s[i])
    	}
    }
    
    // orderMakeSliceCopy matches the pattern:
    //
    //	m = OMAKESLICE([]T, x); OCOPY(m, s)
    //
    // and rewrites it to:
    //
    //	m = OMAKESLICECOPY([]T, x, s); nil
    func orderMakeSliceCopy(s []ir.Node) {
    	if base.Flag.N != 0 || base.Flag.Cfg.Instrumenting {
    		return
    	}
    	if len(s) < 2 || s[0] == nil || s[0].Op() != ir.OAS || s[1] == nil || s[1].Op() != ir.OCOPY {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 02:00:33 UTC 2024
    - 42.7K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/staticinit/sched.go

    			return true
    		}
    
    	// Only possible side effect is panic on invalid size.
    	// TODO(rsc): Merge with previous case (probably breaks toolstash -cmp).
    	case ir.OMAKESLICE, ir.OMAKESLICECOPY:
    		return true
    	}
    	return false
    }
    
    // AnySideEffects reports whether n contains any operations that could have observable side effects.
    func AnySideEffects(n ir.Node) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 17:16:14 UTC 2024
    - 30.7K bytes
    - Viewed (0)
Back to top