Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 16 of 16 for makeslicecopy (0.21 sec)

  1. test/fixedbugs/notinheap2.go

    	sink = new(embed3)      // ERROR "can't be allocated in Go"
    	sink = new(embedAlias1) // ERROR "can't be allocated in Go"
    	sink = new(embedAlias2) // ERROR "can't be allocated in Go"
    
    	// Test for special case of OMAKESLICECOPY
    	x := make([]nih, n) // ERROR "can't be allocated in Go"
    	copy(x, z)
    	z = x
    }
    
    // Writes don't produce write barriers.
    
    var p *nih
    
    //go:nowritebarrier
    func h() {
    	y.next = p.next
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 02 17:46:15 UTC 2022
    - 1.8K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/reflectdata/helpers.go

    // type, and returns an expression that yields the *runtime._type
    // value representing that slice type's element type.
    func MakeSliceElemRType(pos src.XPos, n *ir.MakeExpr) ir.Node {
    	assertOp2(n, ir.OMAKESLICE, ir.OMAKESLICECOPY)
    	if hasRType(n, n.RType, "RType") {
    		return n.RType
    	}
    	return sliceElemRType(pos, n.Type())
    }
    
    // RangeMapRType asserts that n is a "range" loop over a map value,
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 12 04:50:32 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  3. 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)
  4. 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)
  5. 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)
  6. src/cmd/compile/internal/walk/expr.go

    		return walkMakeChan(n, init)
    
    	case ir.OMAKEMAP:
    		n := n.(*ir.MakeExpr)
    		return walkMakeMap(n, init)
    
    	case ir.OMAKESLICE:
    		n := n.(*ir.MakeExpr)
    		return walkMakeSlice(n, init)
    
    	case ir.OMAKESLICECOPY:
    		n := n.(*ir.MakeExpr)
    		return walkMakeSliceCopy(n, init)
    
    	case ir.ORUNESTR:
    		n := n.(*ir.ConvExpr)
    		return walkRuneToString(n, init)
    
    	case ir.OBYTES2STR, ir.ORUNES2STR:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 27.6K bytes
    - Viewed (0)
Back to top