- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for OBYTES2STR (0.14 sec)
-
src/cmd/compile/internal/walk/order.go
hasbyte := false haslit := false for _, n1 := range n.List { hasbyte = hasbyte || n1.Op() == ir.OBYTES2STR haslit = haslit || n1.Op() == ir.OLITERAL && len(ir.StringVal(n1)) != 0 } if haslit && hasbyte { for _, n2 := range n.List { if n2.Op() == ir.OBYTES2STR { n2 := n2.(*ir.ConvExpr) n2.SetOp(ir.OBYTES2STRTMP) } } } return n
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/ir/fmt.go
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/convert.go
} args = []ir.Node{arg} } call := ir.NewCallExpr(base.Pos, ir.OCALL, fn, nil) call.Args = args return safeExpr(walkExpr(typecheck.Expr(call), init), init) } // walkBytesRunesToString walks an OBYTES2STR or ORUNES2STR node. func walkBytesRunesToString(n *ir.ConvExpr, init *ir.Nodes) ir.Node { a := typecheck.NodNil() if n.Esc() == ir.EscNone { // Create temporary buffer for string on stack.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Oct 09 17:28:22 UTC 2023 - 18.2K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/expr.go
// generated code and compiler memory footprint is better without it. case ir.OSTR2BYTES: // ok case ir.OSTR2RUNES: if n.X.Op() == ir.OLITERAL { return stringtoruneslit(n) } case ir.OBYTES2STR: if t.Elem() != types.ByteType && t.Elem() != types.Types[types.TUINT8] { // If t is a slice of a user-defined byte type B (not uint8 // or byte), then add an extra CONVNOP from []B to []byte, so
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/subr.go
// and dst is a string type. if src.IsInteger() && dst.IsString() { return ir.ORUNESTR, "" } if src.IsSlice() && dst.IsString() { if src.Elem().Kind() == types.ByteType.Kind() { return ir.OBYTES2STR, "" } if src.Elem().Kind() == types.RuneType.Kind() { return ir.ORUNES2STR, "" } } // 7. src is a string and dst is []byte or []rune. // String to slice.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Oct 05 19:45:58 UTC 2023 - 20.2K bytes - Viewed (0) -
src/cmd/compile/internal/staticinit/sched.go
case ir.ONAME, ir.ONONAME, ir.OTYPE, ir.OLITERAL, ir.ONIL, ir.OADD, ir.OSUB, ir.OOR, ir.OXOR, ir.OADDSTR, ir.OADDR, ir.OANDAND, ir.OBYTES2STR, ir.ORUNES2STR, ir.OSTR2BYTES, ir.OSTR2RUNES, ir.OCAP, ir.OCOMPLIT, ir.OMAPLIT, ir.OSTRUCTLIT, ir.OARRAYLIT, ir.OSLICELIT, ir.OPTRLIT, ir.OCONV, ir.OCONVIFACE,
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
// Do this before calling walkExpr on cond, // because walkExpr will lower the string // conversion into a runtime call. // See issue 24937 for more discussion. if cond.Op() == ir.OBYTES2STR && allCaseExprsAreSideEffectFree(sw) { cond := cond.(*ir.ConvExpr) cond.SetOp(ir.OBYTES2STRTMP) } cond = walkExpr(cond, sw.PtrInit()) if cond.Op() != ir.OLITERAL && cond.Op() != ir.ONIL {
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/cmd/compile/internal/walk/expr.go
case ir.OMAKESLICECOPY: n := n.(*ir.MakeExpr) return walkMakeSliceCopy(n, init) case ir.ORUNESTR: n := n.(*ir.ConvExpr) return walkRuneToString(n, init) case ir.OBYTES2STR, ir.ORUNES2STR: n := n.(*ir.ConvExpr) return walkBytesRunesToString(n, init) case ir.OBYTES2STRTMP: n := n.(*ir.ConvExpr) return walkBytesToStringTemp(n, init) case ir.OSTR2BYTES:
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
// isByteCount reports whether n is of the form len(string([]byte)). func isByteCount(n ir.Node) bool { return base.Flag.N == 0 && !base.Flag.Cfg.Instrumenting && n.Op() == ir.OLEN && (n.(*ir.UnaryExpr).X.Op() == ir.OBYTES2STR || n.(*ir.UnaryExpr).X.Op() == ir.OBYTES2STRTMP) } // isChanLenCap reports whether n is of the form len(c) or cap(c) for a channel c. // Note that this does not check for -n or instrumenting because this
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 08 22:35:22 UTC 2024 - 31.2K bytes - Viewed (0)