- Sort Score
- Result 10 results
- Languages All
Results 1 - 9 of 9 for initConst (0.26 sec)
-
src/cmd/compile/internal/staticdata/data.go
objw.Global(sf, int32(types.PtrSize), obj.DUPOK|obj.RODATA) } } // InitConst writes the static literal c to n. // Neither n nor c is modified. func InitConst(n *ir.Name, noff int64, c ir.Node, wid int) { if n.Op() != ir.ONAME { base.Fatalf("InitConst n op %v", n.Op()) } if n.Sym() == nil { base.Fatalf("InitConst nil n sym") } if c.Op() == ir.ONIL { return } if c.Op() != ir.OLITERAL {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Sep 01 15:08:50 UTC 2023 - 10.3K bytes - Viewed (0) -
src/cmd/compile/internal/walk/complit.go
initConst // contains some constant values, which may be written into data symbols ) // getdyn calculates the initGenType for n. // If top is false, getdyn is recursing. func getdyn(n ir.Node, top bool) initGenType { switch n.Op() { default: if ir.IsConstNode(n) { return initConst } return initDynamic case ir.OSLICELIT:
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/staticinit/sched.go
} s.append(ir.NewAssignStmt(base.Pos, dst, typecheck.Conv(r, typ))) return true case ir.ONIL: return true case ir.OLITERAL: if ir.IsZero(r) { return true } staticdata.InitConst(l, loff, r, int(typ.Size())) return true case ir.OADDR: r := r.(*ir.AddrExpr) if a, ok := r.X.(*ir.Name); ok && a.Op() == ir.ONAME { staticdata.InitAddr(l, loff, staticdata.GlobalLinksym(a))
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/go/types/assignments.go
} else { check.errorf(x, code, "cannot use %s as %s value in %s", x, T, context) } x.mode = invalid } } func (check *Checker) initConst(lhs *Const, x *operand) { if x.mode == invalid || !isValid(x.typ) || !isValid(lhs.typ) { if lhs.typ == nil { lhs.typ = Typ[Invalid] } return } // rhs must be a constant
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Apr 03 18:48:38 UTC 2024 - 16.4K bytes - Viewed (0) -
src/cmd/compile/internal/types2/assignments.go
} else { check.errorf(x, code, "cannot use %s as %s value in %s", x, T, context) } x.mode = invalid } } func (check *Checker) initConst(lhs *Const, x *operand) { if x.mode == invalid || !isValid(x.typ) || !isValid(lhs.typ) { if lhs.typ == nil { lhs.typ = Typ[Invalid] } return } // rhs must be a constant
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Feb 23 21:21:43 UTC 2024 - 16.4K bytes - Viewed (0) -
src/cmd/compile/internal/types2/decl.go
// init expression evaluation since that is all we have // (see issues go.dev/issue/42991, go.dev/issue/42992). check.errpos = obj.pos } check.expr(nil, &x, init) } check.initConst(obj, &x) } func (check *Checker) varDecl(obj *Var, lhs []*Var, typ, init syntax.Expr) { assert(obj.typ == nil) // determine type, if any if typ != nil { obj.typ = check.varType(typ)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 29.6K bytes - Viewed (0) -
src/go/types/decl.go
// init expression evaluation since that is all we have // (see issues go.dev/issue/42991, go.dev/issue/42992). check.errpos = atPos(obj.pos) } check.expr(nil, &x, init) } check.initConst(obj, &x) } func (check *Checker) varDecl(obj *Var, lhs []*Var, typ, init ast.Expr) { assert(obj.typ == nil) // determine type, if any if typ != nil { obj.typ = check.varType(typ)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 30 19:19:55 UTC 2024 - 31K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/mkbuiltin.go
return "types.Types[types.TUNSAFEPTR]" case *ast.ArrayType: if t.Len == nil { return fmt.Sprintf("types.NewSlice(%s)", i.subtype(t.Elt)) } return fmt.Sprintf("types.NewArray(%s, %d)", i.subtype(t.Elt), intconst(t.Len)) case *ast.ChanType: dir := "types.Cboth" switch t.Dir { case ast.SEND: dir = "types.Csend" case ast.RECV: dir = "types.Crecv" }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Jan 26 21:56:49 UTC 2023 - 6K bytes - Viewed (0) -
src/cmd/compile/internal/rangefunc/rewrite.go
var thenList []syntax.Stmt if zeroNext { clr := &syntax.AssignStmt{ Lhs: r.next(), Rhs: r.intConst(0), } thenList = append(thenList, clr) } for _, then := range thens { thenList = append(thenList, then) } nif := &syntax.IfStmt{ Cond: r.cond(op, r.next(), r.intConst(c)), Then: &syntax.BlockStmt{ List: thenList, }, } return nif }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:05:44 UTC 2024 - 41.6K bytes - Viewed (0)