Bug 65397 - LayoutTests does not have a test for array speculation pathologies in the JavaScriptCore DFG JIT
Summary: LayoutTests does not have a test for array speculation pathologies in the Jav...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-29 15:07 PDT by Filip Pizlo
Modified: 2011-07-29 19:07 PDT (History)
3 users (show)

See Also:


Attachments
the patch (4.65 KB, patch)
2011-07-29 15:12 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2011-07-29 15:07:57 PDT
The JavaScriptCore DFG JIT may speculate that a value is an array.  The code is relatively tricky, since a distinction is made between speculating that a variable is an array throughout the entire procedure, versus speculating that a variable happens to reference an array during the course of a particular array access.  The latter code path has not been exercised in existing tests, so a new test is needed.
Comment 1 Filip Pizlo 2011-07-29 15:12:41 PDT
Created attachment 102404 [details]
the patch
Comment 2 Darin Adler 2011-07-29 18:06:36 PDT
Comment on attachment 102404 [details]
the patch

View in context: https://bugs.webkit.org/attachment.cgi?id=102404&action=review

> LayoutTests/fast/js/array-type-speculation-expected.txt:6
> +PASS result is "foo"

When possible, it's better to construct the test so that you can see what is being tested in the test output. Just seeing "result" is not so great. One way to do that is to make sure that the argument to shouldBe itself contains arguments that make it clear which test is which.

But I know that with JavaScript testing it can be tricky to achieve that since different ways of executing code exercise different code paths.
Comment 3 WebKit Review Bot 2011-07-29 19:07:12 PDT
Comment on attachment 102404 [details]
the patch

Clearing flags on attachment: 102404

Committed r92040: <http://trac.webkit.org/changeset/92040>
Comment 4 WebKit Review Bot 2011-07-29 19:07:17 PDT
All reviewed patches have been landed.  Closing bug.