File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
compiler/natives/src/encoding/gob Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -26,15 +26,14 @@ func (x *atomicEncEnginePointer) Store(val *encEngine) { x.v = val }
2626
2727// temporarily replacement of growSlice[E any] for go1.20 without generics.
2828func growSlice (v reflect.Value , ps any , length int ) {
29- vps := reflect .ValueOf (ps )
30- vs := vps .Elem ()
31- zero := reflect .Zero (vs .Elem ().Type ())
29+ vps := reflect .ValueOf (ps ) // *[]E
30+ vs := vps .Elem () // []E
31+ zero := reflect .Zero (vs .Type ().Elem ())
3232 vs .Set (reflect .Append (vs , zero ))
3333 cp := vs .Cap ()
3434 if cp > length {
3535 cp = length
3636 }
3737 vs .Set (vs .Slice (0 , cp ))
3838 v .Set (vs )
39- vps .Set (vs .Addr ())
4039}
Original file line number Diff line number Diff line change @@ -105,3 +105,11 @@ func TestTypeRace(t *testing.T) {
105105 // cannot succeed when nosync is used.
106106 t .Skip ("using nosync" )
107107}
108+
109+ func TestCountEncodeMallocs (t * testing.T ) {
110+ t .Skip ("testing.AllocsPerRun not supported in GopherJS" )
111+ }
112+
113+ func TestCountDecodeMallocs (t * testing.T ) {
114+ t .Skip ("testing.AllocsPerRun not supported in GopherJS" )
115+ }
You can’t perform that action at this time.
0 commit comments