- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for OMAKESLICE (0.15 sec)
-
src/cmd/compile/internal/reflectdata/helpers.go
// type, and returns an expression that yields the *runtime._type // value representing that slice type's element type. func MakeSliceElemRType(pos src.XPos, n *ir.MakeExpr) ir.Node { assertOp2(n, ir.OMAKESLICE, ir.OMAKESLICECOPY) if hasRType(n, n.RType, "RType") { return n.RType } return sliceElemRType(pos, n.Type()) } // RangeMapRType asserts that n is a "range" loop over a map value,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Sep 12 04:50:32 UTC 2023 - 7.1K bytes - Viewed (0) -
src/cmd/compile/internal/ir/fmt.go
fmt.Fprintf(s, "%v", n.ReturnVars[0]) return } fmt.Fprintf(s, "(.%v)", n.ReturnVars) case OMAKEMAP, OMAKECHAN, OMAKESLICE: n := n.(*MakeExpr) if n.Cap != nil { fmt.Fprintf(s, "make(%v, %v, %v)", n.Type(), n.Len, n.Cap) return } if n.Len != nil && (n.Op() == OMAKESLICE || !n.Len.Type().IsUntyped()) { fmt.Fprintf(s, "make(%v, %v)", n.Type(), n.Len) return }
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/walk/order.go
func (o *orderState) stmtList(l ir.Nodes) { s := l for i := range s { orderMakeSliceCopy(s[i:]) o.stmt(s[i]) } } // orderMakeSliceCopy matches the pattern: // // m = OMAKESLICE([]T, x); OCOPY(m, s) // // and rewrites it to: // // m = OMAKESLICECOPY([]T, x, s); nil func orderMakeSliceCopy(s []ir.Node) { if base.Flag.N != 0 || base.Flag.Cfg.Instrumenting { return }
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/staticinit/sched.go
return true } // Only possible side effect is panic on invalid size. // TODO(rsc): Merge with previous case (probably breaks toolstash -cmp). case ir.OMAKESLICE, ir.OMAKESLICECOPY: return true } return false } // AnySideEffects reports whether n contains any operations that could have observable side effects. func AnySideEffects(n ir.Node) bool {
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/assign.go
base.Fatalf("missing typecheck: %+v", n) } if n.Op() != ir.OAPPEND { return false } call := n.(*ir.CallExpr) if !call.IsDDD || len(call.Args) != 2 || call.Args[1].Op() != ir.OMAKESLICE { return false } mk := call.Args[1].(*ir.MakeExpr) if mk.Cap != nil { return false } // y must be either an integer constant or the largest possible positive value
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/cmd/compile/internal/typecheck/expr.go
// Errors here are Fatalf instead of Errorf because only the compiler // can construct an OSLICEHEADER node. // Components used in OSLICEHEADER that are supplied by parsed source code // have already been typechecked in e.g. OMAKESLICE earlier. t := n.Type() if t == nil { base.Fatalf("no type specified for OSLICEHEADER") } if !t.IsSlice() { base.Fatalf("invalid type %v for OSLICEHEADER", n.Type()) }
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/typecheck/func.go
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 06 15:23:18 UTC 2024 - 21.1K bytes - Viewed (0) -
src/cmd/compile/internal/walk/expr.go
return walkClose(n, init) case ir.OMAKECHAN: n := n.(*ir.MakeExpr) return walkMakeChan(n, init) case ir.OMAKEMAP: n := n.(*ir.MakeExpr) return walkMakeMap(n, init) case ir.OMAKESLICE: n := n.(*ir.MakeExpr) return walkMakeSlice(n, init) case ir.OMAKESLICECOPY: n := n.(*ir.MakeExpr) return walkMakeSliceCopy(n, init) case ir.ORUNESTR: n := n.(*ir.ConvExpr)
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/builtin.go
} fn := typecheck.LookupRuntime(fnname, hmapType, t.Key(), t.Elem()) return mkcall1(fn, n.Type(), init, reflectdata.MakeMapRType(base.Pos, n), typecheck.Conv(hint, argtype), h) } // walkMakeSlice walks an OMAKESLICE node. func walkMakeSlice(n *ir.MakeExpr, init *ir.Nodes) ir.Node { l := n.Len r := n.Cap if r == nil { r = safeExpr(l, init) l = r } t := n.Type() if t.Elem().NotInHeap() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 08 22:35:22 UTC 2024 - 31.2K bytes - Viewed (0)