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

Add SIMD test suite and utility functions. #442

Merged
merged 1 commit into from
Apr 18, 2016

Conversation

dtig
Copy link
Contributor

@dtig dtig commented Nov 10, 2015

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.

numerical: true,
lanes: 4,
laneSize: 4,
interestingValues: [0, -0, 1, -1, 1.414, 0x7F, -0x80, -0x8000, -0x80000000, 0x7FFF, 0x7FFFFFFF, Infinity, -Infinity, NaN],
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This worth wrapping?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@flagxor
Copy link

flagxor commented Nov 10, 2015

lgtm with some formatting nits

@@ -0,0 +1,57 @@
// Copyright (C) 2015
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed Copyright boilerplate.

@dtig dtig force-pushed the ecmascript_simd branch 2 times, most recently from a6bbc4d to a40a670 Compare January 16, 2016 01:10
@goyakin
Copy link
Member

goyakin commented Jan 19, 2016

In addition to my inline comments, I have two more regarding general organization:

  • Since the tests are under the Simd directory, we should remove the Simd. prefix from filenames
  • We should add es7id: pending to the test frontmatters

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This call should pass.

Copy link
Contributor Author

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);
Copy link
Contributor

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.

@dtig dtig changed the title Adding initial SIMD test suite and utility functions. Add SIMD test suite and utility functions. Mar 22, 2016
@dtig dtig force-pushed the ecmascript_simd branch 2 times, most recently from 1a99a96 to c8ee653 Compare March 22, 2016 23:05
@dtig
Copy link
Contributor Author

dtig commented Mar 22, 2016

The following general organization updates were made as well.

  • Simd. prefix from filenames removed.
  • Added es7id: pending to the test frontmatters
  • AUTHORS file added, test files updated with the correct license boiler plate

@littledan
Copy link
Member

@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.

@goyakin
Copy link
Member

goyakin commented Mar 23, 2016

@littledan We don't use es7id anymore. My es7id comment was from before we switched to esid. Since the SIMD proposal is in Stage 3 and section IDs should now be stable, we should use the format you suggest sans the # instead. If you think section IDs aren't stable yet, we can keep them as pending for now and update later.

@littledan
Copy link
Member

I think section IDs are stable.

@dtig
Copy link
Contributor Author

dtig commented Apr 11, 2016

Fixed to use esid instead of es7id.

@leobalter leobalter merged commit 20d37a6 into tc39:master Apr 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants