Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for PtrInit (0.13 sec)

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

    			cond = typecheck.TempAt(base.Pos, ir.CurFunc, types.Types[types.TBOOL])
    			fn := chanfn("selectnbrecv", 2, ch.Type())
    			call := mkcall1(fn, fn.Type().ResultsTuple(), r.PtrInit(), elem, ch)
    			as := ir.NewAssignListStmt(r.Pos(), ir.OAS2, []ir.Node{cond, n.Lhs[1]}, []ir.Node{call})
    			r.PtrInit().Append(typecheck.Stmt(as))
    		}
    
    		r.Cond = typecheck.Expr(cond)
    		r.Body = cas.Body
    		r.Else = append(dflt.Init(), dflt.Body...)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 01:53:41 UTC 2023
    - 7.8K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/walk/stmt.go

    			// Throw away the temp to avoid plain values as statements.
    			n = ir.NewBlockStmt(n.Pos(), init)
    			init = nil
    		}
    		if len(init) > 0 {
    			switch n.Op() {
    			case ir.OAS, ir.OAS2, ir.OBLOCK:
    				n.(ir.InitNode).PtrInit().Prepend(init...)
    
    			default:
    				init.Append(n)
    				n = ir.NewBlockStmt(n.Pos(), init)
    			}
    		}
    		return n
    
    	// special case for a receive where we throw away
    	// the value received.
    	case ir.ORECV:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 06 15:42:30 UTC 2023
    - 4.7K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/typecheck/typecheck.go

    		return
    	}
    
    	tmp := TempAt(base.Pos, ir.CurFunc, (*np).Type())
    	as := ir.NewAssignStmt(base.Pos, tmp, *np)
    	as.PtrInit().Append(Stmt(ir.NewDecl(n.Pos(), ir.ODCL, tmp)))
    	*np = tmp
    
    	n.PtrInit().Append(Stmt(as))
    }
    
    // RewriteMultiValueCall rewrites multi-valued f() to use temporaries,
    // so the backend wouldn't need to worry about tuple-valued expressions.
    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/assign.go

    	slice.SetBounded(true)
    	nif.Body = []ir.Node{ir.NewAssignStmt(base.Pos, s, slice)}
    
    	// else { s = growslice(oldPtr, newLen, oldCap, num, T) }
    	call := walkGrowslice(s, nif.PtrInit(), oldPtr, newLen, oldCap, num)
    	nif.Else = []ir.Node{ir.NewAssignStmt(base.Pos, s, call)}
    
    	nodes.Append(nif)
    
    	// Index to start copying into s.
    	//   idx = newLen - len(l2)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 08 17:09:06 UTC 2024
    - 20.3K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/walk/switch.go

    	// See issue 24937 for more discussion.
    	if cond.Op() == ir.OBYTES2STR && allCaseExprsAreSideEffectFree(sw) {
    		cond := cond.(*ir.ConvExpr)
    		cond.SetOp(ir.OBYTES2STRTMP)
    	}
    
    	cond = walkExpr(cond, sw.PtrInit())
    	if cond.Op() != ir.OLITERAL && cond.Op() != ir.ONIL {
    		cond = copyExpr(cond, cond.Type(), &sw.Compiled)
    	}
    
    	base.Pos = lno
    
    	s := exprSwitch{
    		pos:      lno,
    		exprname: cond,
    	}
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 30.1K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/walk/order.go

    								init = init[1:]
    							}
    						}
    						dcl := typecheck.Stmt(ir.NewDecl(base.Pos, ir.ODCL, n.(*ir.Name)))
    						ncas.PtrInit().Append(dcl)
    					}
    					tmp := o.newTemp(t, t.HasPointers())
    					as := typecheck.Stmt(ir.NewAssignStmt(base.Pos, n, typecheck.Conv(tmp, n.Type())))
    					ncas.PtrInit().Append(as)
    					r.Lhs[i] = tmp
    				}
    				do(0, recv.X.Type().Elem())
    				do(1, types.Types[types.TBOOL])
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 02:00:33 UTC 2024
    - 42.7K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/walk/range.go

    				body = append(body, rangeAssign2(nrange, hv1t, hv2))
    			} else {
    				// v1 = hv1t
    				body = append(body, rangeAssign(nrange, hv1t))
    			}
    		}
    	}
    
    	typecheck.Stmts(init)
    
    	nfor.PtrInit().Append(init...)
    
    	typecheck.Stmts(nfor.Cond.Init())
    
    	nfor.Cond = typecheck.Expr(nfor.Cond)
    	nfor.Cond = typecheck.DefaultLit(nfor.Cond, nil)
    	nfor.Post = typecheck.Stmt(nfor.Post)
    	typecheck.Stmts(body)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 20 14:52:33 UTC 2023
    - 17.6K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/typecheck/stmt.go

    	n.Post = Stmt(n.Post)
    	Stmts(n.Body)
    	return n
    }
    
    // tcGoDefer typechecks (normalizes) an OGO/ODEFER statement.
    func tcGoDefer(n *ir.GoDeferStmt) {
    	call := normalizeGoDeferCall(n.Pos(), n.Op(), n.Call, n.PtrInit())
    	call.GoDefer = true
    	n.Call = call
    }
    
    // normalizeGoDeferCall normalizes call into a normal function call
    // with no arguments and no results, suitable for use in an OGO/ODEFER
    // statement.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 15:10:54 UTC 2023
    - 17.8K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/walk/expr.go

    //
    //	n.Left = walkExpr(n.Left, init)
    func walkExpr(n ir.Node, init *ir.Nodes) ir.Node {
    	if n == nil {
    		return n
    	}
    
    	if n, ok := n.(ir.InitNode); ok && init == n.PtrInit() {
    		// not okay to use n->ninit when walking n,
    		// because we might replace n with some other node
    		// and would lose the init list.
    		base.Fatalf("walkExpr init == &n->ninit")
    	}
    
    	if len(n.Init()) != 0 {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 04 17:34:01 UTC 2024
    - 27.6K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/walk/builtin.go

    	nif.Body = []ir.Node{
    		ir.NewAssignStmt(base.Pos, s, slice),
    	}
    
    	// else { s = growslice(s.ptr, n, s.cap, a, T) }
    	nif.Else = []ir.Node{
    		ir.NewAssignStmt(base.Pos, s, walkGrowslice(s, nif.PtrInit(),
    			ir.NewUnaryExpr(base.Pos, ir.OSPTR, s),
    			newLen,
    			ir.NewUnaryExpr(base.Pos, ir.OCAP, s),
    			num)),
    	}
    
    	l = append(l, nif)
    
    	ls = n.Args[1:]
    	for i, n := range ls {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Mar 08 22:35:22 UTC 2024
    - 31.2K bytes
    - Viewed (0)
Back to top