- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 10 for NewAssignStmt (0.24 sec)
-
src/cmd/compile/internal/walk/range.go
hv1 := typecheck.TempAt(base.Pos, ir.CurFunc, t) hn := typecheck.TempAt(base.Pos, ir.CurFunc, t) init = append(init, ir.NewAssignStmt(base.Pos, hv1, nil)) init = append(init, ir.NewAssignStmt(base.Pos, hn, a)) nfor.Cond = ir.NewBinaryExpr(base.Pos, ir.OLT, hv1, hn) nfor.Post = ir.NewAssignStmt(base.Pos, hv1, ir.NewBinaryExpr(base.Pos, ir.OADD, hv1, ir.NewInt(base.Pos, 1))) if v1 != nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 20 14:52:33 UTC 2023 - 17.6K bytes - Viewed (0) -
src/cmd/compile/internal/walk/assign.go
slice := ir.NewSliceExpr(base.Pos, ir.OSLICE, s, nil, newLen, nil) 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) -
src/cmd/compile/internal/walk/complit.go
lhs.RType = n.RType zero := ir.NewAssignStmt(base.Pos, i, ir.NewInt(base.Pos, 0)) cond := ir.NewBinaryExpr(base.Pos, ir.OLT, i, ir.NewInt(base.Pos, tk.NumElem())) incr := ir.NewAssignStmt(base.Pos, i, ir.NewBinaryExpr(base.Pos, ir.OADD, i, ir.NewInt(base.Pos, 1))) var body ir.Node = ir.NewAssignStmt(base.Pos, lhs, rhs) body = typecheck.Stmt(body)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 19:03:54 UTC 2023 - 19.5K bytes - Viewed (0) -
src/cmd/compile/internal/walk/builtin.go
var l []ir.Node l = append(l, ir.NewAssignStmt(base.Pos, nl, n.X)) l = append(l, ir.NewAssignStmt(base.Pos, nr, n.Y)) nfrm := ir.NewUnaryExpr(base.Pos, ir.OSPTR, nr) nto := ir.NewUnaryExpr(base.Pos, ir.OSPTR, nl) nlen := typecheck.TempAt(base.Pos, ir.CurFunc, types.Types[types.TINT]) // n = len(to) l = append(l, ir.NewAssignStmt(base.Pos, nlen, ir.NewUnaryExpr(base.Pos, ir.OLEN, nl)))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 08 22:35:22 UTC 2024 - 31.2K bytes - Viewed (0) -
src/cmd/compile/internal/walk/convert.go
init.Append(ir.NewAssignStmt(base.Pos, typeWord, typecheck.Conv(typecheck.Conv(itab, types.Types[types.TUNSAFEPTR]), typeWord.Type()))) nif := ir.NewIfStmt(base.Pos, typecheck.Expr(ir.NewBinaryExpr(base.Pos, ir.ONE, typeWord, typecheck.NodNil())), nil, nil) nif.Body = []ir.Node{ir.NewAssignStmt(base.Pos, typeWord, itabType(typeWord))} init.Append(nif) // Build the result.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 09 17:28:22 UTC 2023 - 18.2K bytes - Viewed (0) -
src/cmd/compile/internal/walk/order.go
// Evaluate left-hand side. lhs := o.expr(n.X, nil) o.out = append(o.out, typecheck.Stmt(ir.NewAssignStmt(base.Pos, r, lhs))) // Evaluate right-hand side, save generated code. saveout := o.out o.out = nil t := o.markTemp() o.edge() rhs := o.expr(n.Y, nil) o.out = append(o.out, typecheck.Stmt(ir.NewAssignStmt(base.Pos, r, rhs))) o.popTemp(t) gen := o.out o.out = saveout
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 08 02:00:33 UTC 2024 - 42.7K bytes - Viewed (0) -
src/cmd/compile/internal/staticinit/sched.go
// use conv to ensure r is assignable to l (#13263). dst := ir.Node(l) if loff != 0 || !types.Identical(typ, l.Type()) { dst = ir.NewNameOffsetExpr(base.Pos, l, loff, typ) } s.append(ir.NewAssignStmt(base.Pos, dst, typecheck.Conv(r, typ))) return true case ir.ONIL: return true case ir.OLITERAL: if ir.IsZero(r) { return true }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 17:16:14 UTC 2024 - 30.7K bytes - Viewed (0) -
src/cmd/compile/internal/walk/expr.go
} return cheapExpr(n, init) } func copyExpr(n ir.Node, t *types.Type, init *ir.Nodes) ir.Node { l := typecheck.TempAt(base.Pos, ir.CurFunc, t) appendWalkStmt(init, ir.NewAssignStmt(base.Pos, l, n)) return l } func walkAddString(n *ir.AddStringExpr, init *ir.Nodes) ir.Node { c := len(n.List) if c < 2 { base.Fatalf("walkAddString count %d too small", c) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:34:01 UTC 2024 - 27.6K bytes - Viewed (0) -
src/cmd/compile/internal/walk/switch.go
base.Fatalf("unhandled type switch case %v", ncase.List[0]) } val.SetType(caseVar.Type()) val.SetTypecheck(1) } l := []ir.Node{ ir.NewDecl(ncase.Pos(), ir.ODCL, caseVar), ir.NewAssignStmt(ncase.Pos(), caseVar, val), } typecheck.Stmts(l) sw.Compiled.Append(l...) } sw.Compiled.Append(ncase.Body...) sw.Compiled.Append(br) } walkStmtList(sw.Compiled) sw.Tag = nil
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:34:01 UTC 2024 - 30.1K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/typecheck.go
if !ir.Any(*np, func(n ir.Node) bool { return n.Op() != ir.ONEW && callOrChan(n) }) { 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,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 20 19:08:34 UTC 2024 - 30.5K bytes - Viewed (0)