- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for SetPos (0.14 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/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/go/internal/load/test.go
if err != nil { ptestErr = &PackageError{ ImportStack: stk.Copy(), Err: err, } incomplete = true embedErr := err.(*EmbedError) ptestErr.setPos(p.Internal.Build.TestEmbedPatternPos[embedErr.Pattern]) } stk.Pop() stk.Push(p.ImportPath + "_test") pxtestNeedsPtest := false var pxtestIncomplete bool rawXTestImports := str.StringList(p.XTestImports)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 14:01:23 UTC 2024 - 28.2K bytes - Viewed (0) -
src/text/template/parse/parse.go
case itemIdentifier: checkFunc := t.Mode&SkipFuncCheck == 0 if checkFunc && !t.hasFunction(token.val) { t.errorf("function %q not defined", token.val) } return NewIdentifier(token.val).SetTree(t).SetPos(token.pos) case itemDot: return t.newDot(token.pos) case itemNil: return t.newNil(token.pos) case itemVariable: return t.useVar(token.pos, token.val) case itemField:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Feb 26 20:57:51 UTC 2024 - 21.3K bytes - Viewed (0) -
src/cmd/compile/internal/walk/expr.go
// 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 { base.Fatalf("missed typecheck: %+v", n) } if n.Type().IsUntyped() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:34:01 UTC 2024 - 27.6K bytes - Viewed (0)