- Sort Score
- Result 10 results
- Languages All
Results 1 - 8 of 8 for CheckSize (0.29 sec)
-
src/cmd/compile/internal/types/size.go
// is needed immediately. CheckSize makes sure the // size is evaluated eventually. var deferredTypeStack []*Type func CheckSize(t *Type) { if t == nil { return } // function arg structs should not be checked // outside of the enclosing function. if t.IsFuncArgStruct() { base.Fatalf("CheckSize %v", t) } if defercalc == 0 { CalcSize(t)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Mar 25 19:53:03 UTC 2024 - 15K bytes - Viewed (0) -
src/os/os_test.go
defer Remove(f.Name()) defer f.Close() checkSize(t, f, 0) f.Write([]byte("hello, world\n")) checkSize(t, f, 13) f.Truncate(10) checkSize(t, f, 10) f.Truncate(1024) checkSize(t, f, 1024) f.Truncate(0) checkSize(t, f, 0) _, err := f.Write([]byte("surprise!")) if err == nil { checkSize(t, f, 13+9) // wrote at offset past where hello, world was. } }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu May 23 01:00:11 UTC 2024 - 83.1K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/expr.go
base.Errorf("cannot use promoted field %v in struct literal of type %v", strings.Join(ep, "."), typ) return nil } // tcConv typechecks an OCONV node. func tcConv(n *ir.ConvExpr) ir.Node { types.CheckSize(n.Type()) // ensure width is calculated for backend n.X = Expr(n.X) n.X = convlit1(n.X, n.Type(), true, nil) t := n.X.Type() if t == nil || n.Type() == nil { n.SetType(nil) return n }
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/func.go
n.SetType(l.Type()) return tcConv(n) } RewriteNonNameCall(n) typecheckargs(n) t := l.Type() if t == nil { n.SetType(nil) return n } types.CheckSize(t) switch l.Op() { case ir.ODOTINTER: n.SetOp(ir.OCALLINTER) case ir.ODOTMETH: l := l.(*ir.SelectorExpr) n.SetOp(ir.OCALLMETH)
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/expr.go
// Eagerly compute sizes of all expressions for the back end. if typ := n.Type(); typ != nil && typ.Kind() != types.TBLANK && !typ.IsFuncArgStruct() { types.CheckSize(typ) } if n, ok := n.(*ir.Name); ok && n.Heapaddr != nil { types.CheckSize(n.Heapaddr.Type()) } if ir.IsConst(n, constant.String) { // Emit string symbol now to avoid emitting // any concurrently during the backend.
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/regexp/syntax/parse.go
delete(p.height, re) } re.Sub0[0] = p.free p.free = re } func (p *parser) checkLimits(re *Regexp) { if p.numRunes > maxRunes { panic(ErrLarge) } p.checkSize(re) p.checkHeight(re) } func (p *parser) checkSize(re *Regexp) { if p.size == nil { // We haven't started tracking size yet. // Do a relatively cheap check to see if we need to start.
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 13:59:01 UTC 2024 - 52.1K bytes - Viewed (0) -
src/cmd/compile/internal/typecheck/typecheck.go
switch t.Kind() { case types.TFUNC, // might have TANY; wait until it's called types.TANY, types.TFORW, types.TIDEAL, types.TNIL, types.TBLANK: break default: types.CheckSize(t) } } return n } // indexlit implements typechecking of untyped values as // array/slice indexes. It is almost equivalent to DefaultLit
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/link/internal/ld/data.go
// we skip size comparison and do the name comparison instead // (conveniently, .got sorts before .toc). checkSize := symn != sym.SELFGOT for k, s := range syms { ss := ldr.SymSize(s) sl[k] = symNameSize{sz: ss, sym: s} if !checkSize { sl[k].name = ldr.SymName(s) } ds := int64(len(ldr.Data(s))) switch { case ss < ds:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Jun 12 15:10:50 UTC 2024 - 100.5K bytes - Viewed (0)