- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 11 for NewConvExpr (0.48 sec)
-
src/cmd/compile/internal/walk/range.go
// with the pointer in hu. ptr := ir.NewUnaryExpr(base.Pos, ir.OSPTR, hs) ptr.SetBounded(true) huVal := ir.NewConvExpr(base.Pos, ir.OCONVNOP, types.Types[types.TUNSAFEPTR], ptr) huVal = ir.NewConvExpr(base.Pos, ir.OCONVNOP, types.Types[types.TUINTPTR], huVal) hu := typecheck.TempAt(base.Pos, ir.CurFunc, types.Types[types.TUINTPTR])
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/convert.go
arg = ir.NewConvExpr(pos, ir.OCONVNOP, argType, n) case fromType.IsInteger() && argType.IsInteger(): // can directly convert (e.g. int32 to uint32) arg = ir.NewConvExpr(pos, ir.OCONV, argType, n) default: // unsafe cast through memory arg = copyExpr(n, fromType, init) var addr ir.Node = typecheck.NodAddr(arg) addr = ir.NewConvExpr(pos, ir.OCONVNOP, argType.PtrTo(), addr)
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
return l, r, nil } types.CalcSize(l.Type()) if r.Type().IsInterface() == l.Type().IsInterface() || l.Type().Size() >= 1<<16 { l = ir.NewConvExpr(base.Pos, aop, r.Type(), l) l.SetTypecheck(1) } t = r.Type() converted = true } } if !converted && l.Type().Kind() != types.TBLANK { aop, _ = assignOp(r.Type(), l.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/walk/order.go
return typecheck.Expr(ir.NewConvExpr(pos, ir.OCONVNOP, kt, n)) case nt.IsInteger() && kt.IsInteger(): // can directly convert (e.g. int32 to uint32) if n.Op() == ir.OLITERAL && nt.IsSigned() { // avoid constant overflow error n = ir.NewConstExpr(constant.MakeUint64(uint64(ir.Int64Val(n))), n) n.SetType(kt) return n } return typecheck.Expr(ir.NewConvExpr(pos, ir.OCONV, kt, n)) default:
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/typecheck/func.go
} // pick off before type-checking arguments arg, ok := needOneArg(n, "conversion to %v", l.Type()) if !ok { n.SetType(nil) return n } n := ir.NewConvExpr(n.Pos(), ir.OCONV, nil, arg) n.SetType(l.Type()) return tcConv(n) } RewriteNonNameCall(n) typecheckargs(n) t := l.Type() if t == nil { n.SetType(nil) return n }
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/switch.go
// Call runtime to do switch // case, itab = runtime.interfaceSwitch(&descriptor, typeof(arg)) var typeArg ir.Node if s.srcName.Type().IsEmptyInterface() { typeArg = ir.NewConvExpr(base.Pos, ir.OCONVNOP, types.Types[types.TUINT8].PtrTo(), srcItab) } else { typeArg = itabType(srcItab) } caseVar := typecheck.TempAt(base.Pos, ir.CurFunc, types.Types[types.TINT])
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
return key } // mapaccess and mapdelete don't distinguish pointer vs. integer key. switch fast { case mapfast32ptr: return ir.NewConvExpr(n.Pos(), ir.OCONVNOP, types.Types[types.TUINT32], key) case mapfast64ptr: return ir.NewConvExpr(n.Pos(), ir.OCONVNOP, types.Types[types.TUINT64], key) default: // fast version takes key by value. return key } }
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/typecheck/typecheck.go
return n } n = ir.NewConvExpr(base.Pos, ir.OCONV, nil, n) n.SetType(t) n = Expr(n) return n } // ConvNop converts node n to type t using the OCONVNOP op // and typechecks the result with ctxExpr. func ConvNop(n ir.Node, t *types.Type) ir.Node { if types.IdenticalStrict(n.Type(), t) { return n } n = ir.NewConvExpr(base.Pos, ir.OCONVNOP, nil, n) n.SetType(t)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Mar 20 19:08:34 UTC 2024 - 30.5K bytes - Viewed (0) -
src/cmd/compile/internal/walk/builtin.go
} case types.TPTR: if n.Type().Elem().NotInHeap() { on = typecheck.LookupRuntime("printuintptr") n = ir.NewConvExpr(base.Pos, ir.OCONV, nil, n) n.SetType(types.Types[types.TUNSAFEPTR]) n = ir.NewConvExpr(base.Pos, ir.OCONV, nil, n) n.SetType(types.Types[types.TUINTPTR]) break } fallthrough case types.TCHAN, types.TMAP, types.TFUNC, types.TUNSAFEPTR:
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/ir/func.go
} var e Node = NewLinksymExpr(pos, name.LinksymABI(abi), types.Types[types.TUINTPTR]) e = NewAddrExpr(pos, e) e.SetType(types.Types[types.TUINTPTR].PtrTo()) e = NewConvExpr(pos, OCONVNOP, types.Types[types.TUINTPTR], e) e.SetTypecheck(1) return e } // fn is not a defined function. It must be ABIInternal. // Read the address from func value, i.e. *(*uintptr)(idata(fn)).
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:05:44 UTC 2024 - 21.1K bytes - Viewed (0)