- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 131 for ptrmap (0.24 sec)
-
src/cmd/compile/internal/syntax/dumper.go
p.printf("*") // Fields may share type expressions, and declarations // may share the same group - use ptrmap to keep track // of nodes that have been printed already. if ptr, ok := x.Interface().(Node); ok { if line, exists := p.ptrmap[ptr]; exists { p.printf("(Node @ %d)", line) return } p.ptrmap[ptr] = p.line n = ptr } p.dump(x.Elem(), n) case reflect.Slice: if x.IsNil() {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri Jan 08 17:32:14 UTC 2021 - 4.5K bytes - Viewed (0) -
src/go/ast/print.go
case reflect.Pointer: p.printf("*") // type-checked ASTs may contain cycles - use ptrmap // to keep track of objects that have been printed // already and print the respective line number instead ptr := x.Interface() if line, exists := p.ptrmap[ptr]; exists { p.printf("(obj @ %d)", line) } else { p.ptrmap[ptr] = p.line p.print(x.Elem()) } case reflect.Array:
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Mar 28 21:32:41 UTC 2024 - 5.9K bytes - Viewed (0) -
src/cmd/vendor/golang.org/x/tools/go/types/typeutil/map.go
// memo, but it would require detecting whether types are 'tainted' by // references to type parameters. memo: make(map[types.Type]uint32), // Re-using ptrMap ensures that pointer identity is preserved in this // hasher. ptrMap: h.ptrMap, sigTParams: tparams, } } for i := 0; i < tparams.Len(); i++ { tparam := tparams.At(i) hash += 7 * h.Hash(tparam.Constraint()) }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Fri May 03 02:38:00 UTC 2024 - 13.9K bytes - Viewed (0) -
src/reflect/abi.go
// next n integer registers. // // Bit i in ptrMap indicates whether the i'th value is a pointer. // n must be <= 8. // // Returns whether assignment succeeded. func (a *abiSeq) assignIntN(offset, size uintptr, n int, ptrMap uint8) bool { if n > 8 || n < 0 { panic("invalid n") } if ptrMap != 0 && size != goarch.PtrSize {
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue May 07 17:08:32 UTC 2024 - 15K bytes - Viewed (0) -
src/reflect/makefunc.go
func methodValueCall() // This structure must be kept in sync with runtime.reflectMethodValue. // Any changes should be reflected in all both. type makeFuncCtxt struct { fn uintptr stack *bitVector // ptrmap for both stack args and results argLen uintptr // just args regPtrs abi.IntArgRegBitmap } // moveMakeFuncArgPtrs uses ctxt.regPtrs to copy integer pointer arguments
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 15:20:05 UTC 2024 - 5.9K bytes - Viewed (0) -
src/reflect/benchmark_test.go
} if ptrToThis.Int() != 0 { b.Fatalf("%v.ptrToThis unexpectedly nonzero", t) } b.ResetTimer() // Now benchmark calling PointerTo on it: we'll have to hit the ptrMap cache on // every call. b.RunParallel(func(pb *testing.PB) { for pb.Next() { PointerTo(t) } }) } type B1 struct { X int Y int Z int }
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Sun Nov 19 17:09:03 UTC 2023 - 8.8K bytes - Viewed (0) -
src/runtime/stkframe.go
if size > minsize { stackid := pcdata stkmap := (*stackmap)(funcdata(f, abi.FUNCDATA_LocalsPointerMaps)) if stkmap == nil || stkmap.n <= 0 { print("runtime: frame ", funcname(f), " untyped locals ", hex(frame.varp-size), "+", hex(size), "\n") throw("missing stackmap") } // If nbit == 0, there's no work to do. if stkmap.nbit > 0 { if stackid < 0 || stackid >= stkmap.n { // don't know where we are
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Tue Apr 02 15:10:48 UTC 2024 - 9.9K bytes - Viewed (0) -
src/reflect/type.go
return toType(abi.TypeOf(i)) } // rtypeOf directly extracts the *rtype of the provided value. func rtypeOf(i any) *abi.Type { return abi.TypeOf(i) } // ptrMap is the cache for PointerTo. var ptrMap sync.Map // map[*rtype]*ptrType // PtrTo returns the pointer type with element t. // For example, if t represents type Foo, PtrTo(t) represents *Foo. //
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed May 29 17:58:53 UTC 2024 - 85.5K bytes - Viewed (0) -
test/escape2n.go
f.xx = &f.x } var ptrSlice []*int func foo50(i *int) { // ERROR "leaking param: i$" ptrSlice[0] = i } var ptrMap map[*int]*int func foo51(i *int) { // ERROR "leaking param: i$" ptrMap[i] = i } func indaddr1(x int) *int { // ERROR "moved to heap: x$" return &x } func indaddr2(x *int) *int { // ERROR "leaking param: x to result ~r0 level=0$"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Dec 14 17:22:18 UTC 2023 - 35.1K bytes - Viewed (0) -
test/escape2.go
f.xx = &f.x } var ptrSlice []*int func foo50(i *int) { // ERROR "leaking param: i$" ptrSlice[0] = i } var ptrMap map[*int]*int func foo51(i *int) { // ERROR "leaking param: i$" ptrMap[i] = i } func indaddr1(x int) *int { // ERROR "moved to heap: x$" return &x } func indaddr2(x *int) *int { // ERROR "leaking param: x to result ~r0 level=0$"
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Thu Dec 14 17:22:18 UTC 2023 - 35.1K bytes - Viewed (0)