- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for NewUnaryExpr (0.35 sec)
-
src/cmd/compile/internal/walk/assign.go
elemtype := s.Type().Elem() // Decompose slice. oldPtr := ir.NewUnaryExpr(base.Pos, ir.OSPTR, s) oldLen := ir.NewUnaryExpr(base.Pos, ir.OLEN, s) oldCap := ir.NewUnaryExpr(base.Pos, ir.OCAP, s) // Number of elements we are adding num := ir.NewUnaryExpr(base.Pos, ir.OLEN, l2) // newLen := oldLen + num
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/walk/range.go
hn := typecheck.TempAt(base.Pos, ir.CurFunc, types.Types[types.TINT]) init = append(init, ir.NewAssignStmt(base.Pos, hv1, nil)) init = append(init, ir.NewAssignStmt(base.Pos, hn, ir.NewUnaryExpr(base.Pos, ir.OLEN, ha))) nfor.Cond = ir.NewBinaryExpr(base.Pos, ir.OLT, hv1, hn) nfor.Post = ir.NewAssignStmt(base.Pos, hv1, ir.NewBinaryExpr(base.Pos, ir.OADD, hv1, ir.NewInt(base.Pos, 1)))
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Sep 20 14:52:33 UTC 2023 - 17.6K bytes - Viewed (0) -
src/cmd/compile/internal/walk/builtin.go
l = append(l, ir.NewAssignStmt(base.Pos, nr, n.Y)) nfrm := ir.NewUnaryExpr(base.Pos, ir.OSPTR, nr) nto := ir.NewUnaryExpr(base.Pos, ir.OSPTR, nl) nlen := typecheck.TempAt(base.Pos, ir.CurFunc, types.Types[types.TINT]) // n = len(to) l = append(l, ir.NewAssignStmt(base.Pos, nlen, ir.NewUnaryExpr(base.Pos, ir.OLEN, nl))) // if n > len(frm) { n = len(frm) }
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/compare.go
// l.tab != nil && l.tab._type == type(r) // // TODO(mdempsky): For non-empty interface comparisons, just // compare against the itab address directly? var eqtype ir.Node tab := ir.NewUnaryExpr(base.Pos, ir.OITAB, l) rtyp := reflectdata.CompareRType(base.Pos, n) if l.Type().IsEmptyInterface() { tab.SetType(types.NewPtr(types.Types[types.TUINT8])) tab.SetTypecheck(1)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 24 21:55:14 UTC 2023 - 16.2K bytes - Viewed (0) -
src/cmd/compile/internal/walk/walk.go
if c != n || len(init) != 0 { base.Fatalf("backingArrayPtrLen not cheap: %v", n) } ptr = ir.NewUnaryExpr(base.Pos, ir.OSPTR, n) if n.Type().IsString() { ptr.SetType(types.Types[types.TUINT8].PtrTo()) } else { ptr.SetType(n.Type().Elem().PtrTo()) } ptr.SetTypecheck(1) length = ir.NewUnaryExpr(base.Pos, ir.OLEN, n) length.SetType(types.Types[types.TINT]) length.SetTypecheck(1) return ptr, length
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/convert.go
// var res *uint8 // res = (*uint8)(unsafe.Pointer(itab)) // if res != nil { // res = res.type // } // Grab its parts. itab := ir.NewUnaryExpr(base.Pos, ir.OITAB, c) itab.SetType(types.Types[types.TUINTPTR].PtrTo()) itab.SetTypecheck(1) data := ir.NewUnaryExpr(n.Pos(), ir.OIDATA, c) data.SetType(types.Types[types.TUINT8].PtrTo()) // Type is generic pointer - we're just passing it through. data.SetTypecheck(1)
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/walk/switch.go
// Get interface descriptor word. // For empty interfaces this will be the type. // For non-empty interfaces this will be the itab. srcItab := ir.NewUnaryExpr(base.Pos, ir.OITAB, s.srcName) srcData := ir.NewUnaryExpr(base.Pos, ir.OIDATA, s.srcName) srcData.SetType(types.Types[types.TUINT8].PtrTo()) srcData.SetTypecheck(1) // For empty interfaces, do: // if e._type == nil {
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/complit.go
} a = initStackTemp(init, x, vstat) } else if n.Esc() == ir.EscNone { a = initStackTemp(init, typecheck.TempAt(base.Pos, ir.CurFunc, t), vstat) } else { a = ir.NewUnaryExpr(base.Pos, ir.ONEW, ir.TypeNode(t)) } appendWalkStmt(init, ir.NewAssignStmt(base.Pos, vauto, a)) if vstat != nil && n.Prealloc == nil && n.Esc() != ir.EscNone {
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/stmt.go
// For "go/defer iface.M()", if iface is nil, we need to panic at // the point of the go/defer statement. if call.Op() == ir.OCALLINTER { iface := as.Lhs[0] init.Append(Stmt(ir.NewUnaryExpr(stmtPos, ir.OCHECKNIL, ir.NewUnaryExpr(iface.Pos(), ir.OITAB, iface)))) } } // Move call into the wrapper function, now that it's safe to // evaluate there. wrapperFn.Body = []ir.Node{call}
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Nov 20 15:10:54 UTC 2023 - 17.8K bytes - Viewed (0) -
src/cmd/compile/internal/ir/func.go
if wantABI != obj.ABIInternal { base.ErrorfAt(pos, 0, "internal/abi.FuncPC%s does not accept func expression, which is ABIInternal", wantABI) } var e Node = NewUnaryExpr(pos, OIDATA, n) e.SetType(types.Types[types.TUINTPTR].PtrTo()) e.SetTypecheck(1) e = NewStarExpr(pos, e) e.SetType(types.Types[types.TUINTPTR]) e.SetTypecheck(1) return e }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:05:44 UTC 2024 - 21.1K bytes - Viewed (0)