Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove threads support #1487

Merged
merged 2 commits into from
May 22, 2023
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
2 changes: 0 additions & 2 deletions .github/workflows/spectest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ jobs:
spec-version:
- "v1"
- "v2"
- "threads"

steps:
- uses: actions/checkout@v3
Expand All @@ -62,7 +61,6 @@ jobs:
spec-version:
- "v1"
- "v2"
- "threads"

steps:
- uses: actions/checkout@v3
Expand Down
22 changes: 1 addition & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,11 @@ spectest_v2_dir := $(spectest_base_dir)/v2
spectest_v2_testdata_dir := $(spectest_v2_dir)/testdata
# Latest draft state as of Dec 16, 2022.
spec_version_v2 := 1782235239ddebaf2cb079b00fdaa2d2c4dedba3
spectest_threads_dir := $(spectest_base_dir)/threads
spectest_threads_testdata_dir := $(spectest_threads_dir)/testdata
spec_version_threads := cc01bf0d17ba3fb1dc59fb7c5c725838aff18b50

.PHONY: build.spectest
build.spectest:
@$(MAKE) build.spectest.v1
@$(MAKE) build.spectest.v2
@$(MAKE) build.spectest.threads

.PHONY: build.spectest.v1
build.spectest.v1: # Note: wabt by default uses >1.0 features, so wast2json flags might drift as they include more. See WebAssembly/wabt#1878
Expand Down Expand Up @@ -169,21 +165,9 @@ build.spectest.v2: # Note: SIMD cases are placed in the "simd" subdirectory.
wast2json --debug-names $$f; \
done

.PHONY: build.spectest.threads
build.spectest.threads:
@mkdir -p $(spectest_threads_testdata_dir)
@cd $(spectest_threads_testdata_dir) \
&& curl -sSL 'https://api.github.com/repos/WebAssembly/threads/contents/test/core?ref=$(spec_version_threads)' | jq -r '.[]| .download_url' | grep -E "atomic.wast" | xargs -Iurl curl -sJL url -O
# Fix broken CAS spectests
# https://github.com/WebAssembly/threads/issues/195#issuecomment-1318429506
@cd $(spectest_threads_testdata_dir) && patch < ../atomic.wast.patch
@cd $(spectest_threads_testdata_dir) && for f in `find . -name '*.wast'`; do \
wast2json --enable-threads --debug-names $$f; \
done

.PHONY: test
test:
@go test $(go_test_options) $$(go list ./... | grep -vE '$(spectest_v1_dir)|$(spectest_v2_dir)|$(spectest_threads_dir)')
@go test $(go_test_options) $$(go list ./... | grep -vE '$(spectest_v1_dir)|$(spectest_v2_dir)')
@cd internal/version/testdata && go test $(go_test_options) ./...

.PHONY: coverage
Expand All @@ -197,17 +181,13 @@ coverage: ## Generate test coverage
spectest:
@$(MAKE) spectest.v1
@$(MAKE) spectest.v2
@$(MAKE) spectest.threads

spectest.v1:
@go test $(go_test_options) $$(go list ./... | grep $(spectest_v1_dir))

spectest.v2:
@go test $(go_test_options) $$(go list ./... | grep $(spectest_v2_dir))

spectest.threads:
@go test $(go_test_options) $$(go list ./... | grep $(spectest_threads_dir))

golangci_lint_path := $(shell go env GOPATH)/bin/golangci-lint

$(golangci_lint_path):
Expand Down
5 changes: 0 additions & 5 deletions api/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ const (
// Note: The instruction list is too long to enumerate in godoc.
// See https://github.com/WebAssembly/spec/blob/wg-2.0.draft1/proposals/simd/SIMD.md
CoreFeatureSIMD

// Update experimental/features.go when adding elements here.
)

// SetEnabled enables or disables the feature or group of features.
Expand Down Expand Up @@ -209,9 +207,6 @@ func featureName(f CoreFeatures) string {
case CoreFeatureSIMD:
// match https://github.com/WebAssembly/spec/blob/wg-2.0.draft1/proposals/simd/SIMD.md
return "simd"
case CoreFeatureSIMD << 1: // Defined in experimental/features.go
// match https://github.com/WebAssembly/threads/blob/main/proposals/threads/Overview.md
return "threads"
}
return ""
}
14 changes: 0 additions & 14 deletions experimental/features.go

This file was deleted.

94 changes: 0 additions & 94 deletions experimental/features_example_test.go

This file was deleted.

18 changes: 0 additions & 18 deletions experimental/testdata/pthread.c

This file was deleted.

Binary file removed experimental/testdata/pthread.wasm
Binary file not shown.
Loading