- Sort Score
- Result 10 results
- Languages All
Results 41 - 50 of 50 for IndexExpr (0.32 sec)
-
src/cmd/compile/internal/ir/fmt.go
} fmt.Fprintf(s, ".%s", n.Sel.Name) case ODOTTYPE, ODOTTYPE2: n := n.(*TypeAssertExpr) exprFmt(n.X, s, nprec) fmt.Fprintf(s, ".(%v)", n.Type()) case OINDEX, OINDEXMAP: n := n.(*IndexExpr) exprFmt(n.X, s, nprec) fmt.Fprintf(s, "[%v]", n.Index) case OSLICE, OSLICESTR, OSLICEARR, OSLICE3, OSLICE3ARR: n := n.(*SliceExpr) exprFmt(n.X, s, nprec) fmt.Fprint(s, "[")
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 05 15:20:28 UTC 2023 - 26K bytes - Viewed (0) -
src/cmd/compile/internal/types2/resolver.go
if t.Op != syntax.Mul || t.Y != nil { break } ptr = true rtyp = t.X default: break L } } // unpack type parameters, if any if ptyp, _ := rtyp.(*syntax.IndexExpr); ptyp != nil { rtyp = ptyp.X if unpackParams { for _, arg := range syntax.UnpackListExpr(ptyp.Index) { var par *syntax.Name switch arg := arg.(type) { case *syntax.Name: par = arg
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Apr 18 14:10:44 UTC 2024 - 26.3K bytes - Viewed (0) -
src/go/types/resolver.go
case *ast.ParenExpr: rtyp = t.X case *ast.StarExpr: ptr = true rtyp = t.X default: break L } } // unpack type parameters, if any switch rtyp.(type) { case *ast.IndexExpr, *ast.IndexListExpr: ix := typeparams.UnpackIndexExpr(rtyp) rtyp = ix.X if unpackParams { for _, arg := range ix.Indices { var par *ast.Ident switch arg := arg.(type) { case *ast.Ident:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 17 16:22:59 UTC 2024 - 26.1K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/expr.go
} if !t.IsInterface() { base.Fatalf("OITAB of %v", t) } n.SetType(types.NewPtr(types.Types[types.TUINTPTR])) return n } // tcIndex typechecks an OINDEX node. func tcIndex(n *ir.IndexExpr) ir.Node { n.X = Expr(n.X) n.X = DefaultLit(n.X, nil) n.X = implicitstar(n.X) l := n.X n.Index = Expr(n.Index) r := n.Index t := l.Type() if t == nil || r.Type() == nil { 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/go/printer/nodes.go
p.setPos(x.Rparen) p.print(token.RPAREN) case *ast.IndexExpr: // TODO(gri): should treat[] like parentheses and undo one level of depth p.expr1(x.X, token.HighestPrec, 1) p.setPos(x.Lbrack) p.print(token.LBRACK) p.expr0(x.Index, depth+1) p.setPos(x.Rbrack) p.print(token.RBRACK) case *ast.IndexListExpr: // TODO(gri): as for IndexExpr, should treat [] like parentheses and undo // one level of depth
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Oct 17 18:53:17 UTC 2023 - 52.6K bytes - Viewed (0) -
src/cmd/compile/internal/staticinit/sched.go
case ir.ODOT: n := n.(*ir.SelectorExpr) if name, offset, ok = StaticLoc(n.X); !ok { break } offset += n.Offset() return name, offset, true case ir.OINDEX: n := n.(*ir.IndexExpr) if n.X.Type().IsSlice() { break } if name, offset, ok = StaticLoc(n.X); !ok { break } l := getlit(n.Index) if l < 0 { break } // Check for overflow.
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/ssagen/ssa.go
s.assign(left.X, new, false, 0) // TODO: do we need to update named values here? return } if left.Op() == ir.OINDEX && left.(*ir.IndexExpr).X.Type().IsArray() { left := left.(*ir.IndexExpr) s.pushLine(left.Pos()) defer s.popLine() // We're assigning to an element of an ssa-able array. // a[i] = v t := left.X.Type() n := t.NumElem()
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jun 10 19:44:43 UTC 2024 - 284.9K bytes - Viewed (0) -
src/cmd/cgo/gcc.go
if !p.isType(c.Fun) && !p.isUnsafeData(c.Fun, false) { break } x = c.Args[0] } u, ok := x.(*ast.UnaryExpr) if !ok || u.Op != token.AND { return false } index, ok := u.X.(*ast.IndexExpr) if !ok { return false } addr := "" deref := "" if p.isVariable(index.X) { addr = "&" deref = "*" }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 15:50:06 UTC 2024 - 97K bytes - Viewed (0) -
src/cmd/compile/internal/ssa/_gen/rulegen.go
case *ast.UnaryExpr: u.node(node.X) case *ast.BinaryExpr: u.node(node.X) u.node(node.Y) case *ast.StarExpr: u.node(node.X) case *ast.ParenExpr: u.node(node.X) case *ast.IndexExpr: u.node(node.X) u.node(node.Index) case *ast.TypeAssertExpr: u.node(node.X) u.node(node.Type) case *ast.Ident: if obj := u.scope.Lookup(node.Name); obj != nil { obj.numUses++
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sat Sep 02 22:09:21 UTC 2023 - 48.7K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/internal/stdlib/manifest.go
{"IncDecStmt", Type, 0}, {"IncDecStmt.Tok", Field, 0}, {"IncDecStmt.TokPos", Field, 0}, {"IncDecStmt.X", Field, 0}, {"IndexExpr", Type, 0}, {"IndexExpr.Index", Field, 0}, {"IndexExpr.Lbrack", Field, 0}, {"IndexExpr.Rbrack", Field, 0}, {"IndexExpr.X", Field, 0}, {"IndexListExpr", Type, 18}, {"IndexListExpr.Indices", Field, 18}, {"IndexListExpr.Lbrack", Field, 18},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 02:20:05 UTC 2024 - 534.2K bytes - Viewed (0)