Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 19 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ jobs:
- ubuntu-latest
- macos-latest
go:
- '1.21'
- '1.22'
- '1.23'
- '1.24'

runs-on: ${{ matrix.os }}

Expand All @@ -30,29 +32,40 @@ jobs:

- run: go test -v -tags swiss_invariants

linux-noswissmap:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.24"

- run: GOEXPERIMENT=noswissmap go test -v

linux-race:
name: go-linux-race
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.23"
go-version: "1.24"

- run: go test -v -race


linux-32bit:
name: go-linux-32bit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "1.23"
go-version: "1.24"

- run: GOARCH=386 go test -v -tags swiss_invariants

Expand All @@ -75,8 +88,8 @@ jobs:
lscpu | grep Endian &&
apt-get update &&
apt-get install -y wget &&
wget -q https://go.dev/dl/go1.23.6.linux-s390x.tar.gz &&
tar xzf go1.23.6.linux-s390x.tar.gz -C /usr/local &&
wget -q https://go.dev/dl/go1.24.0.linux-s390x.tar.gz &&
tar xzf go1.24.0.linux-s390x.tar.gz -C /usr/local &&
export PATH="$PATH:/usr/local/go/bin" &&
cd /swiss &&
go version &&
Expand Down
15 changes: 7 additions & 8 deletions runtime_go1.20.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@
// bumping of the go versions supported by adjusting the build tags below. The
// way go version tags work the tag for goX.Y will be declared for every
// subsequent release. So go1.20 will be defined for go1.21, go1.22, etc. The
// build tag "go1.20 && !go1.24" defines the range [go1.20, go1.24) (inclusive
// on go1.20, exclusive on go1.24).
// build tag "go1.20 && !go1.25" defines the range [go1.20, go1.25) (inclusive
// on go1.20, exclusive on go1.25).

// The untested_go_version flag enables building on any go version, intended
// to ease testing against Go at tip.
//go:build (go1.20 && !go1.24) || untested_go_version
//go:build (go1.20 && !go1.25) || untested_go_version

package swiss

Expand Down Expand Up @@ -59,17 +59,16 @@ type rtEface struct {
}

// From internal/abi/type.go:MapType
// In go 1.24, this is a prefix of both abi.SwissMapType and abi.OldMapType.
type rtMapType struct {
rtType
Key *rtType
Elem *rtType
Bucket *rtType // internal type representing a hash bucket
// function for hashing keys (ptr to key, seed) -> hash
Hasher func(unsafe.Pointer, uintptr) uintptr
KeySize uint8 // size of key slot
ValueSize uint8 // size of elem slot
BucketSize uint16 // size of bucket
Flags uint32
Hasher func(unsafe.Pointer, uintptr) uintptr

// Other fields are not relevant.
}

type rtTFlag uint8
Expand Down