Closed Bug 1154705 Opened 9 years ago Closed 9 years ago

Clone shared-memory test functions in order to test inlining properly

Categories

(Core :: JavaScript Engine: JIT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla40
Tracking Status
firefox40 --- fixed

People

(Reporter: lth, Assigned: lth)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The test cases in jit-test/tests/atomics/basic-tests.js call test functions on a variety of shared array types.  This plethora of type information confuses the JIT's call optimizer during testing runs; as the tests are written now, only the Int8 primitives are inlined properly, the others are shunted to the interpreter.  The result is poor test coverage (for --ion-eager --ion-offthread-compile=off).

The most reliable fix here is to clone the test function for each type, and this is easily done.
Component: JavaScript Engine → JavaScript Engine: JIT
Using function.toSource() and eval seemed expedient, but I'm happy to change that if there's a different canonical, reliable way to do this.
Attachment #8592804 - Flags: review?(jdemooij)
Comment on attachment 8592804 [details] [diff] [review]
Clone functions that are applied to different array types

Review of attachment 8592804 [details] [diff] [review]:
-----------------------------------------------------------------

Seems ok if it makes the test more useful.
Attachment #8592804 - Flags: review?(jdemooij) → review+
Yeah, the cloned test cases show their value: more diverse jitted code is being generated, which means that a missing instruction in the ARM simulator (UXTH) is being hit, I have that fix in a later patch but I guess I'll move it :)
Depends on: 1156386
Try is green for this patch on top of bug 1156386, which implements UXTH:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=ecb70a782d4f
https://hg.mozilla.org/mozilla-central/rev/1ff8096ab54b
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: