- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for walkStmtList (0.16 sec)
-
src/cmd/compile/internal/walk/stmt.go
// to avoid confusion about what gets returned // in the presence of type assertions. } func walkStmtList(s []ir.Node) { for i := range s { s[i] = walkStmt(s[i]) } } // walkFor walks an OFOR node. func walkFor(n *ir.ForStmt) ir.Node { if n.Cond != nil { init := ir.TakeInit(n.Cond) walkStmtList(init) n.Cond = walkExpr(n.Cond, &init) n.Cond = ir.InitExpr(init, n.Cond) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Oct 06 15:42:30 UTC 2023 - 4.7K bytes - Viewed (0) -
src/cmd/compile/internal/walk/assign.go
for { // If an expression has init statements, they must be evaluated // before any of its saved sub-operands (#45706). // TODO(mdempsky): Disallow init statements on lvalues. init := ir.TakeInit(l) walkStmtList(init) early.Append(init...) switch ll := l.(type) { case *ir.IndexExpr: if ll.X.Type().IsArray() { save(&ll.Index) l = ll.X continue } case *ir.ParenExpr:
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/select.go
if sel.Walked() { base.Fatalf("double walkSelect") } sel.SetWalked(true) init := ir.TakeInit(sel) init = append(init, walkSelectCases(sel.Cases)...) sel.Cases = nil sel.Compiled = init walkStmtList(sel.Compiled) base.Pos = lno } func walkSelectCases(cases []*ir.CommClause) []ir.Node { ncas := len(cases) sellineno := base.Pos // optimization: zero-case select if ncas == 0 {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Aug 22 01:53:41 UTC 2023 - 7.8K bytes - Viewed (0) -
src/cmd/compile/internal/walk/walk.go
order(fn) if base.Errors() > errorsBefore { return } if base.Flag.W != 0 { s := fmt.Sprintf("\nbefore walk %v", ir.CurFunc.Sym()) ir.DumpList(s, ir.CurFunc.Body) } walkStmtList(ir.CurFunc.Body) if base.Flag.W != 0 { s := fmt.Sprintf("after walk %v", ir.CurFunc.Sym()) ir.DumpList(s, ir.CurFunc.Body) } // Eagerly compute sizes of all variables for SSA. for _, n := range fn.Dcl {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Feb 27 20:56:00 UTC 2024 - 10.4K bytes - Viewed (0) -
src/cmd/compile/internal/walk/builtin.go
ix.SetBounded(true) l = append(l, ir.NewAssignStmt(base.Pos, ix, n)) } typecheck.Stmts(l) walkStmtList(l) init.Append(l...) return s } // growslice(ptr *T, newLen, oldCap, num int, <type>) (ret []T) func walkGrowslice(slice *ir.Name, init *ir.Nodes, oldPtr, newLen, oldCap, num ir.Node) *ir.CallExpr {
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/expr.go
// 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 { walkStmtList(n.Init()) init.Append(ir.TakeInit(n)...) } lno := ir.SetPos(n) if base.Flag.LowerW > 1 { ir.Dump("before walk expr", n) } if n.Typecheck() != 1 {
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
br := ir.NewBranchStmt(base.Pos, ir.OBREAK, nil) br.SetPos(br.Pos().WithNotStmt()) defaultGoto = br } s.Emit(&sw.Compiled) sw.Compiled.Append(defaultGoto) sw.Compiled.Append(body.Take()...) walkStmtList(sw.Compiled) } // An exprSwitch walks an expression switch. type exprSwitch struct { pos src.XPos exprname ir.Node // value being switched on done ir.Nodes clauses []exprClause }
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/walk/complit.go
// confuses about variables lifetime. So making sure those expressions // are ordered correctly here. See issue #52673. orderBlock(&sinit, map[string][]*ir.Name{}) typecheck.Stmts(sinit) walkStmtList(sinit) } init.Append(sinit...) continue } case ir.OARRAYLIT, ir.OSTRUCTLIT: value := value.(*ir.CompLitExpr) fixedlit(ctxt, kind, value, a, init) continue }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 19:03:54 UTC 2023 - 19.5K bytes - Viewed (0)