Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for CalcSize (0.16 sec)

  1. src/cmd/compile/internal/types/size.go

    }
    
    // CalcSize calculates and stores the size, alignment, eq/hash algorithm,
    // and ptrBytes for t.
    // If CalcSizeDisabled is set, and the size/alignment
    // have not already been calculated, it calls Fatal.
    // This is used to prevent data races in the back end.
    func CalcSize(t *Type) {
    	// Calling CalcSize when typecheck tracing enabled is not safe.
    	// See issue #33658.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 25 19:53:03 UTC 2024
    - 15K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apiserver/plugin/pkg/audit/truncate/truncate.go

    	var errors []error
    	var impacted []*auditinternal.Event
    	var batch []*auditinternal.Event
    	var batchSize int64
    	success := true
    	for _, event := range events {
    		size, err := b.calcSize(event)
    		// If event was correctly serialized, but the size is more than allowed
    		// and it makes sense to do trimming, i.e. there's a request and/or
    		// response present, try to strip away request and response.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Mar 29 00:03:53 UTC 2022
    - 4.7K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/test/abiutilsaux_test.go

    	}
    	return ""
    }
    
    func nrtest(t *testing.T, ft *types.Type, expected int) {
    	types.CalcSize(ft)
    	got := configAMD64.NumParamRegs(ft)
    	if got != expected {
    		t.Errorf("]\nexpected num regs = %d, got %d, type %v", expected, got, ft)
    	}
    }
    
    func abitest(t *testing.T, ft *types.Type, exp expectedDump) {
    
    	types.CalcSize(ft)
    
    	// Analyze with full set of registers.
    	regRes := configAMD64.ABIAnalyze(ft, false)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 13 18:34:00 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/pkginit/initAsanGlobals.go

    		nfield(nxp, fname("sourceLocation"), up),
    		nfield(nxp, fname("odrIndicator"), up),
    	})
    	types.CalcSize(asanGlobal)
    
    	asanLocation := types.NewStruct([]*types.Field{
    		nfield(nxp, fname("filename"), up),
    		nfield(nxp, fname("line"), i32),
    		nfield(nxp, fname("column"), i32),
    	})
    	types.CalcSize(asanLocation)
    
    	defString := types.NewStruct([]*types.Field{
    		types.NewField(nxp, fname("data"), up),
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 17 19:36:24 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/typecheck/dcl.go

    	}
    	if typ == nil {
    		base.FatalfAt(pos, "TempAt called with nil type")
    	}
    	if typ.Kind() == types.TFUNC && typ.Recv() != nil {
    		base.FatalfAt(pos, "misuse of method type: %v", typ)
    	}
    	types.CalcSize(typ)
    
    	sym := &types.Sym{
    		Name: autotmpname(len(curfn.Dcl)),
    		Pkg:  types.LocalPkg,
    	}
    	name := curfn.NewLocal(pos, sym, typ)
    	name.SetEsc(ir.EscNever)
    	name.SetUsed(true)
    	name.SetAutoTemp(true)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 14 13:15:50 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  6. src/runtime/internal/sys/nih.go

    // Copyright 2014 The Go Authors. All rights reserved.
    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package sys
    
    // NOTE: keep in sync with cmd/compile/internal/types.CalcSize
    // to make the compiler recognize this as an intrinsic type.
    type nih struct{}
    
    // NotInHeap is a type must never be allocated from the GC'd heap or on the stack,
    // and is called not-in-heap.
    //
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Sep 02 18:24:50 UTC 2022
    - 1.7K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/types/alg.go

    		base.Fatalf("ambiguous priority %s and %s", a, t.alg)
    	}
    }
    
    // AlgType returns the AlgKind used for comparing and hashing Type t.
    func AlgType(t *Type) AlgKind {
    	CalcSize(t)
    	return t.alg
    }
    
    // TypeHasNoAlg reports whether t does not have any associated hash/eq
    // algorithms because t, or some component of t, is marked Noalg.
    func TypeHasNoAlg(t *Type) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 18 15:30:00 UTC 2024
    - 2.4K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/typecheck/expr.go

    					base.Errorf("invalid operation: %v (operator %v not defined on %s)", n, op, typekind(l.Type()))
    					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
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 04 14:29:45 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/typecheck/syms.go

    // successive occurrences of the "any" placeholder in the
    // type syntax expression n.Type.
    func substArgTypes(old *ir.Name, types_ ...*types.Type) *ir.Name {
    	for _, t := range types_ {
    		types.CalcSize(t)
    	}
    	n := ir.NewNameAt(old.Pos(), old.Sym(), types.SubstAny(old.Type(), &types_))
    	n.Class = old.Class
    	n.Func = old.Func
    	if len(types_) > 0 {
    		base.Fatalf("SubstArgTypes: too many argument types")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 22 21:17:13 UTC 2023
    - 3.7K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/walk/walk.go

    	if base.Flag.W != 0 {
    		s := fmt.Sprintf("after walk %v", ir.CurFunc.Sym())
    		ir.DumpList(s, ir.CurFunc.Body)
    	}
    
    	// Eagerly compute sizes of all variables for SSA.
    	for _, n := range fn.Dcl {
    		types.CalcSize(n.Type())
    	}
    }
    
    // walkRecv walks an ORECV node.
    func walkRecv(n *ir.UnaryExpr) ir.Node {
    	if n.Typecheck() == 0 {
    		base.Fatalf("missing typecheck: %+v", n)
    	}
    	init := ir.TakeInit(n)
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 27 20:56:00 UTC 2024
    - 10.4K bytes
    - Viewed (0)
Back to top