- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for makeExpr (0.15 sec)
-
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:
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
safeExpr(n.X, init) con := ir.NewConstExpr(constant.MakeInt64(t.NumElem()), n) con.SetTypecheck(1) return con } return n } // walkMakeChan walks an OMAKECHAN node. func walkMakeChan(n *ir.MakeExpr, init *ir.Nodes) ir.Node { // When size fits into int, use makechan instead of // makechan64, which is faster and shorter on 32 bit platforms. size := n.Len fnname := "makechan64"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Mar 08 22:35:22 UTC 2024 - 31.2K bytes - Viewed (0) -
src/cmd/compile/internal/walk/assign.go
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 // of variable y needs to fit into a uint.
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/ir/fmt.go
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 } fmt.Fprintf(s, "make(%v)", n.Type()) case OMAKESLICECOPY: n := n.(*MakeExpr)
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
// we want as.X and cp.X to be the same name, // but we want the initial data to be coming from a different name. return } mk := as.Y.(*ir.MakeExpr) if mk.Esc() == ir.EscNone || mk.Len == nil || mk.Cap != nil { return } mk.SetOp(ir.OMAKESLICECOPY) mk.Cap = cp.Y // Set bounded when m = OMAKESLICE([]T, len(s)); OCOPY(m, s)
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/complit.go
// make the map var args := []ir.Node{ir.TypeNode(n.Type()), ir.NewInt(base.Pos, n.Len+int64(len(n.List)))} a := typecheck.Expr(ir.NewCallExpr(base.Pos, ir.OMAKE, nil, args)).(*ir.MakeExpr) a.RType = n.RType a.SetEsc(n.Esc()) appendWalkStmt(init, ir.NewAssignStmt(base.Pos, m, a)) entries := n.List // The order pass already removed any dynamic (runtime-computed) entries.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 08 19:03:54 UTC 2023 - 19.5K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/func.go
base.Errorf("too many arguments to make(%v)", t) n.SetType(nil) return n } nn.SetType(t) return nn } // tcMakeSliceCopy typechecks an OMAKESLICECOPY node. func tcMakeSliceCopy(n *ir.MakeExpr) ir.Node { // Errors here are Fatalf instead of Errorf because only the compiler // can construct an OMAKESLICECOPY node. // Components used in OMAKESCLICECOPY that are supplied by parsed source code
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/staticinit/sched.go
return true } // Only possible side effect is panic on invalid size, // but many makechan and makemap use size zero, which is definitely OK. case ir.OMAKECHAN, ir.OMAKEMAP: n := n.(*ir.MakeExpr) if !ir.IsConst(n.Len, constant.Int) || constant.Sign(n.Len.Val()) != 0 { return true } // Only possible side effect is panic on invalid size.
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/typecheck/typecheck.go
n := n.(*ir.SliceHeaderExpr) return tcSliceHeader(n) 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)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 20 19:08:34 UTC 2024 - 30.5K bytes - Viewed (0)