diff options
| author | qiulaidongfeng <2645477756@qq.com> | 2024-01-24 02:54:56 +0000 |
|---|---|---|
| committer | Cherry Mui <cherryyz@google.com> | 2024-02-20 16:10:05 +0000 |
| commit | ff4e45fbc2ab7980087c0ae882a36803f6bc248f (patch) | |
| tree | 68484e5f4c30ed77d26a1f135b17b1ba3c957364 /src/reflect | |
| parent | af3f94ce646201914a62145821630cc232c1d014 (diff) | |
| download | go-ff4e45fbc2ab7980087c0ae882a36803f6bc248f.tar.xz | |
cmd/compile/internal/reflectdata,reflect: merge MaxPtrmaskBytes const into internal/abi
For #59670
Change-Id: I5c0a463f54208db215683f11e6454d0178edda3c
GitHub-Last-Rev: 6963f3c8fb9cf34cdc8dda7ee92a58c71ca65520
GitHub-Pull-Request: golang/go#64904
Reviewed-on: https://go-review.googlesource.com/c/go/+/553275
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Diffstat (limited to 'src/reflect')
| -rw-r--r-- | src/reflect/type.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/reflect/type.go b/src/reflect/type.go index 9a2e41f0b2..55d339fa39 100644 --- a/src/reflect/type.go +++ b/src/reflect/type.go @@ -2621,9 +2621,6 @@ func typeptrdata(t *abi.Type) uintptr { } } -// See cmd/compile/internal/reflectdata/reflect.go for derivation of constant. -const maxPtrmaskBytes = 2048 - // ArrayOf returns the array type with the given length and element type. // For example, if t represents int, ArrayOf(5, t) represents [5]int. // @@ -2692,7 +2689,7 @@ func ArrayOf(length int, elem Type) Type { array.GCData = typ.GCData array.PtrBytes = typ.PtrBytes - case typ.Kind_&kindGCProg == 0 && array.Size_ <= maxPtrmaskBytes*8*goarch.PtrSize: + case typ.Kind_&kindGCProg == 0 && array.Size_ <= abi.MaxPtrmaskBytes*8*goarch.PtrSize: // Element is small with pointer mask; array is still small. // Create direct pointer mask by turning each 1 bit in elem // into length 1 bits in larger mask. |
