- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 28 for indexExpr (0.22 sec)
-
src/go/types/index.go
"go/internal/typeparams" . "internal/types/errors" ) // If e is a valid function instantiation, indexExpr returns true. // In that case x represents the uninstantiated function value and // it is the caller's responsibility to instantiate the function. func (check *Checker) indexExpr(x *operand, e *typeparams.IndexExpr) (isFuncInst bool) { check.exprOrType(x, e.X, true) // x may be generic switch x.mode { case invalid:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 22 16:17:05 UTC 2024 - 11.2K bytes - Viewed (0) -
src/cmd/compile/internal/types2/call.go
return inst } func (check *Checker) callExpr(x *operand, call *syntax.CallExpr) exprKind { var inst *syntax.IndexExpr // function instantiation, if any if iexpr, _ := call.Fun.(*syntax.IndexExpr); iexpr != nil { if check.indexExpr(x, iexpr) { // Delay function instantiation to argument checking, // where we combine type and value arguments for type // inference.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 31.5K bytes - Viewed (0) -
src/cmd/compile/internal/types2/index.go
"go/constant" . "internal/types/errors" ) // If e is a valid function instantiation, indexExpr returns true. // In that case x represents the uninstantiated function value and // it is the caller's responsibility to instantiate the function. func (check *Checker) indexExpr(x *operand, e *syntax.IndexExpr) (isFuncInst bool) { check.exprOrType(x, e.X, true) // x may be generic switch x.mode { case invalid:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 15 16:16:58 UTC 2023 - 11.5K bytes - Viewed (0) -
src/cmd/compile/internal/walk/expr.go
n.X = walkExpr(n.X, init) return n case ir.ODIV, ir.OMOD: n := n.(*ir.BinaryExpr) return walkDivMod(n, init) case ir.OINDEX: n := n.(*ir.IndexExpr) return walkIndex(n, init) case ir.OINDEXMAP: n := n.(*ir.IndexExpr) return walkIndexMap(n, init) case ir.ORECV: base.Fatalf("walkExpr ORECV") // should see inside OAS only panic("unreachable") case ir.OSLICEHEADER:
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/order.go
a.X = l return typecheck.Expr(a) case ir.OINDEX, ir.OINDEXMAP: n := n.(*ir.IndexExpr) var l ir.Node if n.X.Type().IsArray() { l = o.safeExpr(n.X) } else { l = o.cheapExpr(n.X) } r := o.cheapExpr(n.Index) if l == n.X && r == n.Index { return n } a := ir.Copy(n).(*ir.IndexExpr) a.X = l a.Index = r return typecheck.Expr(a) default:
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/walk/assign.go
left, right = n.X, n.Y } // Recognize m[k] = append(m[k], ...) so we can reuse // the mapassign call. var mapAppend *ir.CallExpr if left.Op() == ir.OINDEXMAP && right.Op() == ir.OAPPEND { left := left.(*ir.IndexExpr) mapAppend = right.(*ir.CallExpr) if !ir.SameSafeExpr(left, mapAppend.Args[0]) { base.Fatalf("not same expressions: %v != %v", left, mapAppend.Args[0]) } } left = walkExpr(left, init)
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/go/types/call.go
// unchanged. // // If an error (other than a version error) occurs in any case, it is reported // and x.mode is set to invalid. func (check *Checker) funcInst(T *target, pos token.Pos, x *operand, ix *typeparams.IndexExpr, infer bool) ([]Type, []ast.Expr) { assert(T != nil || ix != nil) var instErrPos positioner if ix != nil { instErrPos = inNode(ix.Orig, ix.Lbrack)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 33.5K bytes - Viewed (0) -
src/go/ast/ast.go
} // A SelectorExpr node represents an expression followed by a selector. SelectorExpr struct { X Expr // expression Sel *Ident // field selector } // An IndexExpr node represents an expression followed by an index. IndexExpr struct { X Expr // expression Lbrack token.Pos // position of "[" Index Expr // index expression Rbrack token.Pos // position of "]" }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 28 21:32:41 UTC 2024 - 35.6K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/ast/astutil/enclosing.go
tok(n.If, len("if"))) case *ast.ImportSpec: // TODO(adonovan): ImportSpec.{Doc,EndPos}? case *ast.IncDecStmt: children = append(children, tok(n.TokPos, len(n.Tok.String()))) case *ast.IndexExpr: children = append(children, tok(n.Lbrack, len("[")), tok(n.Rbrack, len("]"))) case *ast.IndexListExpr: children = append(children, tok(n.Lbrack, len("[")), tok(n.Rbrack, len("]")))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Dec 18 21:28:13 UTC 2023 - 15.9K bytes - Viewed (0) -
src/go/types/typexpr.go
case invalid: // ignore - error reported before case novalue: check.errorf(&x, NotAType, "%s used as type", &x) default: check.errorf(&x, NotAType, "%s is not a type", &x) } case *ast.IndexExpr, *ast.IndexListExpr: ix := typeparams.UnpackIndexExpr(e) check.verifyVersionf(inNode(e, ix.Lbrack), go1_18, "type instantiation") return check.instantiatedType(ix, def) case *ast.ParenExpr:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 16.3K bytes - Viewed (0)