- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 12 for IsSlice3 (0.15 sec)
-
src/cmd/compile/internal/ir/fmt.go
fmt.Fprintf(s, "[%v]", n.Index) case OSLICE, OSLICESTR, OSLICEARR, OSLICE3, OSLICE3ARR: n := n.(*SliceExpr) exprFmt(n.X, s, nprec) fmt.Fprint(s, "[") if n.Low != nil { fmt.Fprint(s, n.Low) } fmt.Fprint(s, ":") if n.High != nil { fmt.Fprint(s, n.High) } if n.Op().IsSlice3() { fmt.Fprint(s, ":") if n.Max != nil { fmt.Fprint(s, n.Max) } }
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/typecheck/expr.go
} else { n.SetType(types.NewPtr(t.Elem())) } return n } // tcSlice typechecks an OSLICE or OSLICE3 node. func tcSlice(n *ir.SliceExpr) ir.Node { n.X = DefaultLit(Expr(n.X), nil) n.Low = indexlit(Expr(n.Low)) n.High = indexlit(Expr(n.High)) n.Max = indexlit(Expr(n.Max)) hasmax := n.Op().IsSlice3() l := n.X if l.Type() == nil { n.SetType(nil) return n } if l.Type().IsArray() {
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/types/index.go
case nil: check.errorf(x, NonSliceableOperand, invalidOp+"cannot slice %s: %s has no core type", x, x.typ) x.mode = invalid return case *Basic: if isString(u) { if e.Slice3 { at := e.Max if at == nil { at = e // e.Index[2] should be present but be careful } check.error(at, InvalidSliceExpr, invalidOp+"3-index slice of string") x.mode = invalid return
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Jan 22 16:17:05 UTC 2024 - 11.2K bytes - Viewed (0) -
tests/upsert_test.go
} } } func TestUpsertSlice(t *testing.T) { langs := []Language{ {Code: "upsert-slice1", Name: "Upsert-slice1"}, {Code: "upsert-slice2", Name: "Upsert-slice2"}, {Code: "upsert-slice3", Name: "Upsert-slice3"}, } DB.Clauses(clause.OnConflict{DoNothing: true}).Create(&langs) var langs2 []Language if err := DB.Find(&langs2, "code LIKE ?", "upsert-slice%").Error; err != nil {
Registered: Wed Jun 12 16:27:09 UTC 2024 - Last Modified: Mon Sep 05 07:39:19 UTC 2022 - 11.4K bytes - Viewed (0) -
src/cmd/compile/internal/walk/walk.go
default: base.FatalfAt(n.Pos(), "mayCall %+v", n) case ir.OCALLFUNC, ir.OCALLINTER, ir.OUNSAFEADD, ir.OUNSAFESLICE: return true case ir.OINDEX, ir.OSLICE, ir.OSLICEARR, ir.OSLICE3, ir.OSLICE3ARR, ir.OSLICESTR, ir.ODEREF, ir.ODOTPTR, ir.ODOTTYPE, ir.ODYNAMICDOTTYPE, ir.ODIV, ir.OMOD, ir.OSLICE2ARR, ir.OSLICE2ARRPTR: // These ops might panic, make sure they are done
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/expr.go
n := n.(*ir.SliceHeaderExpr) return walkSliceHeader(n, init) case ir.OSTRINGHEADER: n := n.(*ir.StringHeaderExpr) return walkStringHeader(n, init) case ir.OSLICE, ir.OSLICEARR, ir.OSLICESTR, ir.OSLICE3, ir.OSLICE3ARR: n := n.(*ir.SliceExpr) return walkSlice(n, init) case ir.ONEW: n := n.(*ir.UnaryExpr) return walkNew(n, init) case ir.OADDSTR:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 04 17:34:01 UTC 2024 - 27.6K bytes - Viewed (0) -
test/escape_reflect.go
// Unfortunate: x doesn't need to escape to heap, just to result. func slice2(x string) string { // ERROR "leaking param: x$" v := reflect.ValueOf(x) // ERROR "x escapes to heap" return v.Slice(1, 2).String() } func slice3(x [10]byte) []byte { v := reflect.ValueOf(x) // ERROR "x escapes to heap" return v.Slice(1, 2).Bytes() } func elem1(x *int) int { // ERROR "x does not escape" v := reflect.ValueOf(x)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 18:50:24 UTC 2023 - 13.1K bytes - Viewed (0) -
src/text/template/funcs.go
return item.Slice(idx[0], idx[1]), nil } // given item[i:j:k], make sure i <= j <= k. if idx[1] > idx[2] { return reflect.Value{}, fmt.Errorf("invalid slice index: %d > %d", idx[1], idx[2]) } return item.Slice3(idx[0], idx[1], idx[2]), nil } // Length // length returns the length of the item, with an error if it has no defined length. func length(item reflect.Value) (int, error) { item, isNil := indirect(item)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 24 22:23:55 UTC 2024 - 20.9K bytes - Viewed (0) -
src/go/parser/parser_test.go
{name: "dot", format: "package main; var x = «x.»x"}, {name: "index", format: "package main; var x = x«[1]»"}, {name: "slice", format: "package main; var x = x«[1:2]»"}, {name: "slice3", format: "package main; var x = x«[1:2:3]»"}, {name: "dottype", format: "package main; var x = x«.(any)»"}, {name: "callseq", format: "package main; var x = x«()»"},
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jan 31 20:26:14 UTC 2024 - 24.6K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/typecheck.go
case ir.OSTRINGHEADER: n := n.(*ir.StringHeaderExpr) return tcStringHeader(n) case ir.OMAKESLICECOPY: n := n.(*ir.MakeExpr) return tcMakeSliceCopy(n) case ir.OSLICE, ir.OSLICE3: n := n.(*ir.SliceExpr) return tcSlice(n) // call and call like case ir.OCALL: n := n.(*ir.CallExpr) return tcCall(n, top) case ir.OCAP, ir.OLEN: n := n.(*ir.UnaryExpr)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 20 19:08:34 UTC 2024 - 30.5K bytes - Viewed (0)