- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for NewBlockStmt (0.22 sec)
-
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
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
n.Rhs = []ir.Node{r} return n } init.Append(r) ll := ascompatet(n.Lhs, r.Type()) return ir.NewBlockStmt(src.NoXPos, ll) } // walkAssignList walks an OAS2 node. func walkAssignList(init *ir.Nodes, n *ir.AssignListStmt) ir.Node { init.Append(ir.TakeInit(n)...) return ir.NewBlockStmt(src.NoXPos, ascompatee(ir.OAS, n.Lhs, n.Rhs)) } // walkAssignMapRead walks an OAS2MAPR node.
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
var r ir.Node if cond != nil { cond = typecheck.Expr(cond) cond = typecheck.DefaultLit(cond, nil) r = ir.NewIfStmt(base.Pos, cond, list, nil) } else { r = ir.NewBlockStmt(base.Pos, list) } init = append(init, r) } if dflt != nil { ir.SetPos(dflt) dispatch(ir.NewBinaryExpr(base.Pos, ir.OLT, chosen, ir.NewInt(base.Pos, 0)), dflt) }
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
} func mkcallstmt1(fn ir.Node, args ...ir.Node) ir.Node { var init ir.Nodes n := vmkcall(fn, nil, &init, args) if len(init) == 0 { return n } init.Append(n) return ir.NewBlockStmt(n.Pos(), init) } func chanfn(name string, n int, t *types.Type) ir.Node { if !t.IsChan() { base.Fatalf("chanfn %v", t) } switch n { case 1: return typecheck.LookupRuntime(name, t.Elem())
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
switch { case typ.IsSlice(): if n := arrayClear(n.X.Pos(), n.X, nil); n != nil { return n } // If n == nil, we are clearing an array which takes zero memory, do nothing. return ir.NewBlockStmt(n.Pos(), nil) case typ.IsMap(): return mapClear(n.X, reflectdata.TypePtrAt(n.X.Pos(), n.X.Type())) } panic("unreachable") } // walkClose walks an OCLOSE node.
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/range.go
huVal = ir.NewConvExpr(base.Pos, ir.OCONVNOP, types.Types[types.TUINTPTR], huVal) as := ir.NewAssignStmt(base.Pos, hu, ir.NewBinaryExpr(base.Pos, ir.OADD, huVal, ir.NewInt(base.Pos, elem.Size()))) nfor.Post = ir.NewBlockStmt(base.Pos, []ir.Node{nfor.Post, as}) case k == types.TMAP: // order.stmt allocated the iterator for us. // we only use a once, so no copy needed. ha := a hit := nrange.Prealloc
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/typecheck/typecheck.go
return n case ir.OLABEL: if n.Sym().IsBlank() { // Empty identifier is valid but useless. // Eliminate now to simplify life later. // See issues 7538, 11589, 11593. n = ir.NewBlockStmt(n.Pos(), nil) } return n case ir.ODEFER, ir.OGO: n := n.(*ir.GoDeferStmt) n.Call = typecheck(n.Call, ctxStmt|ctxExpr) tcGoDefer(n) return n case ir.OFOR:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 20 19:08:34 UTC 2024 - 30.5K bytes - Viewed (0) -
src/cmd/compile/internal/walk/order.go
func orderStmtInPlace(n ir.Node, free map[string][]*ir.Name) ir.Node { var order orderState order.free = free mark := order.markTemp() order.stmt(n) order.popTemp(mark) return ir.NewBlockStmt(src.NoXPos, order.out) } // init moves n's init list to o.out. func (o *orderState) init(n ir.Node) { if ir.MayBeShared(n) { // For concurrency safety, don't mutate potentially shared nodes.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 08 02:00:33 UTC 2024 - 42.7K bytes - Viewed (0)