-
Notifications
You must be signed in to change notification settings - Fork 460
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
Add SIMD test suite and utility functions. #442
Conversation
numerical: true, | ||
lanes: 4, | ||
laneSize: 4, | ||
interestingValues: [0, -0, 1, -1, 1.414, 0x7F, -0x80, -0x8000, -0x80000000, 0x7FFF, 0x7FFFFFFF, Infinity, -Infinity, NaN], |
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.
This worth wrapping?
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.
Done
lgtm with some formatting nits |
@@ -0,0 +1,57 @@ | |||
// Copyright (C) 2015 |
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.
Copyright boilerplate should follow guidelines from CONTRIBUTING.md.
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.
Fixed Copyright boilerplate.
a6bbc4d
to
a40a670
Compare
In addition to my inline comments, I have two more regarding general organization:
Also, there is an ongoing discussion on how to use templates for test generation (issue #470). I think it's okay to loop through the SIMD types for now, but we should consider converting them to the new format once #470 is resolved. |
testIndexCheck(null); | ||
testIndexCheck(undefined); | ||
testIndexCheck({}); | ||
testIndexCheck(true); |
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.
This call should pass.
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.
Removed this check and the ones below as they should pass as per the specification.
Open issue for reference - tc39/ecmascript_simd#237. Tests fixed, polyfill update in progress.
} | ||
testIndexCheck(type.lanes); | ||
testIndexCheck(13.37); | ||
testIndexCheck(null); |
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.
This call shouldn't throw per the current spec.
1a99a96
to
c8ee653
Compare
The following general organization updates were made as well.
|
@goyakin What is the purpose of the es7id tag? SIMD is actually not included in ES2016 (which would be ES7, if ES7 were a thing). Maybe esid: #id-in-the-simd-js-spec would be more appropriate. |
@littledan We don't use |
I think section IDs are stable. |
Fixed to use esid instead of es7id. |
Add SIMD test suite - #441
Tests the SIMD operations as per the SIMD.js specification - http://tc39.github.io/ecmascript_simd/.
Generic utility functions ported to harness/simdUtilities.js
Value semantics tests are not currently included as there has to be a way to disable them based on whether the tests are running with the polyfill.