Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for walkClosure (0.18 sec)

  1. src/cmd/compile/internal/walk/closure.go

    //		println(byval)
    //		(*&byref)++
    //	}(byval, &byref, 42)
    func directClosureCall(n *ir.CallExpr) {
    	clo := n.Fun.(*ir.ClosureExpr)
    	clofn := clo.Func
    
    	if ir.IsTrivialClosure(clo) {
    		return // leave for walkClosure to handle
    	}
    
    	// We are going to insert captured variables before input args.
    	var params []*types.Field
    	var decls []*ir.Name
    	for _, v := range clofn.ClosureVars {
    		if !v.Byval() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 15:56:08 UTC 2023
    - 6.5K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/typecheck/expr.go

    				// But if this is an instantiated function, then
    				// the function has already been typechecked. In
    				// that case, don't do the test, since it can fail
    				// for the closure structs created in
    				// walkClosure(), because the instantiated
    				// function is compiled as if in the source
    				// package of the generic function.
    				if !(ir.CurFunc != nil && strings.Contains(ir.CurFunc.Nname.Sym().Name, "[")) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/walk/expr.go

    	case ir.OARRAYLIT, ir.OSLICELIT, ir.OMAPLIT, ir.OSTRUCTLIT, ir.OPTRLIT:
    		return walkCompLit(n, init)
    
    	case ir.OSEND:
    		n := n.(*ir.SendStmt)
    		return walkSend(n, init)
    
    	case ir.OCLOSURE:
    		return walkClosure(n.(*ir.ClosureExpr), init)
    
    	case ir.OMETHVALUE:
    		return walkMethodValue(n.(*ir.SelectorExpr), init)
    	}
    
    	// No return! Each case must return (or panic),
    	// to avoid confusion about what gets returned
    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