-
-
Notifications
You must be signed in to change notification settings - Fork 17
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
Added WebAssembly features #452
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
4a3b4f3
Added WebAssembly features
MendyBerger 68b1469
Remove async/await; add JSDoc comment
queengooborg 63f08e9
Simplify adding scopes in doTests()
queengooborg 48330c4
Move wasm-feature-detect index
queengooborg 5674b30
Make WebAssembly its own exposure; load wasm-feature-detect in async
queengooborg 02a40f0
Fix ESLint issues
queengooborg File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"features": { | ||
"BigInt-to-i64-integration": { | ||
"wfd-key": "bigInt" | ||
}, | ||
"bulk-memory-operations": { | ||
"wfd-key": "bulkMemory" | ||
}, | ||
"extended-constant-expressions": { | ||
"wfd-key": "extendedConst" | ||
}, | ||
"multi-value": { | ||
"wfd-key": "multiValue" | ||
}, | ||
"mutable-globals": { | ||
"wfd-key": "mutableGlobals" | ||
}, | ||
"reference-types": { | ||
"wfd-key": "referenceTypes" | ||
}, | ||
"non-trapping-float-to-int-conversions": { | ||
"wfd-key": "saturatedFloatToInt" | ||
}, | ||
"sign-extension-operations": { | ||
"wfd-key": "signExtensions" | ||
}, | ||
"fixed-width-SIMD": { | ||
"wfd-key": "simd" | ||
}, | ||
"tail-calls": { | ||
"wfd-key": "tailCall" | ||
}, | ||
"exception-handling": { | ||
"wfd-key": "exceptions" | ||
}, | ||
"garbage-collection": { | ||
"wfd-key": "gc" | ||
}, | ||
"memory64": { | ||
"wfd-key": "memory64" | ||
}, | ||
"relaxed-SIMD": { | ||
"wfd-key": "relaxedSimd" | ||
}, | ||
"threads-and-atomics": { | ||
"wfd-key": "threads" | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// | ||
// mdn-bcd-collector: test-builder/webassembly.ts | ||
// Functions directly related to building all of the WebAssembly tests | ||
// | ||
// © Gooborg Studios, Google LLC, Mozilla Corporation, Apple Inc | ||
// See the LICENSE file for copyright details | ||
// | ||
|
||
import {compileTest} from './common.js'; | ||
|
||
const build = (customWasm) => { | ||
const features = Object.entries(customWasm.features) as any[]; | ||
|
||
const tests = {}; | ||
for (const [feature, details] of features) { | ||
const path = ['webassembly', 'features', feature].join('.'); | ||
tests[path] = compileTest({ | ||
raw: { | ||
// 'wfd-key' stands for 'wasm-feature-detect key' | ||
code: `bcd.testWasmFeature('${details['wfd-key']}')`, | ||
}, | ||
exposure: ['WebAssembly'], | ||
}); | ||
} | ||
return tests; | ||
}; | ||
export {build}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you think that we should just simplify this to be
"bcd-key": "wfd-key"
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No strong preference. I did it this way so that in the future, we can add more configuration fields, but that might not be necessary.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I figured that was the case, but I wasn't sure if you had any configuration options in mind -- I'll leave the format as-is just in case!