Closed
Bug 1048923
Opened 11 years ago
Closed 11 years ago
SIMD: Tidy up SIMD.{h,cpp} and better handle unary binary functions
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla34
People
(Reporter: bbouvier, Assigned: bbouvier)
Details
Attachments
(5 files)
|
8.72 KB,
patch
|
luke
:
review+
|
Details | Diff | Splinter Review |
|
4.70 KB,
patch
|
nmatsakis
:
review+
|
Details | Diff | Splinter Review |
|
9.26 KB,
patch
|
nmatsakis
:
review+
|
Details | Diff | Splinter Review |
|
21.76 KB,
patch
|
nmatsakis
:
review+
|
Details | Diff | Splinter Review |
|
19.63 KB,
patch
|
nmatsakis
:
review+
|
Details | Diff | Splinter Review |
No description provided.
| Assignee | ||
Comment 1•11 years ago
|
||
This patch renames js::Create<SimdType> into js::CreateSimd<SimdType>, as
asked in the SIMD odin bug.
Attachment #8467808 -
Flags: review?(luke)
| Assignee | ||
Comment 2•11 years ago
|
||
GetLane can actually take advantage of those helpers introduced in a former
patch.
Attachment #8467809 -
Flags: review?(nmatsakis)
| Assignee | ||
Comment 3•11 years ago
|
||
Another helper that creates the result object and stores it in args.rval().
Easy tidying up.
Attachment #8467810 -
Flags: review?(nmatsakis)
| Assignee | ||
Comment 4•11 years ago
|
||
The fact that unary and binary SIMD functions are handled the same way makes it
quite difficult to specialize for the number of arguments, leading to weird
possible uses. For instance, one can call an unary SIMD operator with two
arguments, and the second will be ignored. More fancy: one can also call a
binary SIMD op with only argument, and in this case the second argument will be
0 by default.
var x = SIMD.float32x4(1,2,3,4);
SIMD.float32x4.add(x); // returns x
SIMD.float32x4.mul(x); // returns 0 x 4
SIMD.float32x4.div(x); // returns Infinity x 4
Let's just split the logic into two functions, that makes it easier to follow
and less error prone.
Attachment #8467811 -
Flags: review?(nmatsakis)
| Assignee | ||
Comment 5•11 years ago
|
||
The last macro param in the functions list isn't used and probably won't be.
Attachment #8467812 -
Flags: review?(nmatsakis)
Comment 6•11 years ago
|
||
Comment on attachment 8467808 [details] [diff] [review]
Rename js::Create into js::CreateSimd
Review of attachment 8467808 [details] [diff] [review]:
-----------------------------------------------------------------
As mentioned in bug 992267, perhaps we can standardize on "SIMD" instead of "Simd".
Attachment #8467808 -
Flags: review?(luke) → review+
| Assignee | ||
Comment 7•11 years ago
|
||
Part 1: (we agreed on keeping on using the Simd form, to avoid forms like AsmJSSIMDSomething)
https://hg.mozilla.org/integration/mozilla-inbound/rev/044f81a162bf
Keywords: leave-open
Comment 8•11 years ago
|
||
Comment on attachment 8467809 [details] [diff] [review]
Use helpers in GetLane
Review of attachment 8467809 [details] [diff] [review]:
-----------------------------------------------------------------
Hard to object to this!
Attachment #8467809 -
Flags: review?(nmatsakis) → review+
Updated•11 years ago
|
Attachment #8467810 -
Flags: review?(nmatsakis) → review+
Updated•11 years ago
|
Attachment #8467811 -
Flags: review?(nmatsakis) → review+
Updated•11 years ago
|
Attachment #8467812 -
Flags: review?(nmatsakis) → review+
Comment 9•11 years ago
|
||
| Assignee | ||
Comment 10•11 years ago
|
||
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/1c1ddbed35d7
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/7f319e5651ab
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/52887ebdde3f
remote: https://hg.mozilla.org/integration/mozilla-inbound/rev/c46b85ce3816
Keywords: leave-open
Comment 11•11 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/1c1ddbed35d7
https://hg.mozilla.org/mozilla-central/rev/7f319e5651ab
https://hg.mozilla.org/mozilla-central/rev/52887ebdde3f
https://hg.mozilla.org/mozilla-central/rev/c46b85ce3816
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in
before you can comment on or make changes to this bug.
Description
•