- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 17 for SetPos (0.32 sec)
-
src/cmd/compile/internal/rangefunc/rewrite.go
return n } // setPos walks the top structure of x that has no position assigned // and assigns it all to have position pos. // When setPos encounters a syntax node with a position assigned, // setPos does not look inside that node. // setPos only needs to handle syntax we create in this package; // all other syntax should have positions assigned already. func setPos(x syntax.Node, pos syntax.Pos) { if x == nil {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:05:44 UTC 2024 - 41.6K bytes - Viewed (0) -
src/cmd/compile/internal/walk/complit.go
for _, r := range entries { r := r.(*ir.KeyExpr) index, elem := r.Key, r.Value ir.SetPos(index) appendWalkStmt(init, ir.NewAssignStmt(base.Pos, tmpkey, index)) ir.SetPos(elem) appendWalkStmt(init, ir.NewAssignStmt(base.Pos, tmpelem, elem)) ir.SetPos(tmpelem) // typechecker rewrites OINDEX to OINDEXMAP
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/typecheck/typecheck.go
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/typecheck/expr.go
func tcCompLit(n *ir.CompLitExpr) (res ir.Node) { if base.EnableTrace && base.Flag.LowerT { defer tracePrint("tcCompLit", n)(&res) } lno := base.Pos defer func() { base.Pos = lno }() ir.SetPos(n) t := n.Type() base.AssertfAt(t != nil, n.Pos(), "missing type in composite literal") switch t.Kind() { default: base.Errorf("invalid composite literal type %v", t) n.SetType(nil)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 04 14:29:45 UTC 2024 - 23.1K bytes - Viewed (0) -
src/cmd/compile/internal/staticinit/sched.go
return true // discard } // Only worry about simple "l = r" assignments. The OAS2* // assignments mostly necessitate dynamic execution anyway. if len(lhs) > 1 { return false } lno := ir.SetPos(n) defer func() { base.Pos = lno }() nam := lhs[0].(*ir.Name) return s.StaticAssign(nam, 0, rhs, nam.Type()) } // like staticassign but we are copying an already // initialized value r.
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/switch.go
body.Append(ncase.Body...) if fall, pos := endsInFallthrough(ncase.Body); !fall { br := ir.NewBranchStmt(base.Pos, ir.OBREAK, nil) br.SetPos(pos) body.Append(br) } } sw.Cases = nil if defaultGoto == nil { br := ir.NewBranchStmt(base.Pos, ir.OBREAK, nil) br.SetPos(br.Pos().WithNotStmt()) defaultGoto = br } s.Emit(&sw.Compiled) sw.Compiled.Append(defaultGoto)
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/text/template/parse/node.go
func NewIdentifier(ident string) *IdentifierNode { return &IdentifierNode{NodeType: NodeIdentifier, Ident: ident} } // SetPos sets the position. [NewIdentifier] is a public method so we can't modify its signature. // Chained for convenience. // TODO: fix one day? func (i *IdentifierNode) SetPos(pos Pos) *IdentifierNode { i.Pos = pos return i }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 20:57:51 UTC 2024 - 24.2K bytes - Viewed (0) -
src/cmd/compile/internal/walk/order.go
// described in the comment at the top of the file. func order(fn *ir.Func) { if base.Flag.W > 1 { s := fmt.Sprintf("\nbefore order %v", fn.Sym()) ir.DumpList(s, fn.Body) } ir.SetPos(fn) // Set reasonable position for instrumenting code. See issue 53688. orderBlock(&fn.Body, map[string][]*ir.Name{}) } // append typechecks stmt and appends it to out. func (o *orderState) append(stmt ir.Node) {
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/typecheck/stmt.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 20 15:10:54 UTC 2023 - 17.8K bytes - Viewed (0) -
src/cmd/compile/internal/walk/range.go
// ha, hit: hidden aggregate, iterator // hn, hp: hidden len, pointer // hb: hidden bool // a, v1, v2: not hidden aggregate, val 1, 2 a := nrange.X t := a.Type() lno := ir.SetPos(a) v1, v2 := nrange.Key, nrange.Value if ir.IsBlank(v2) { v2 = nil } if ir.IsBlank(v1) && v2 == nil { v1 = nil } if v1 == nil && v2 != 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)