Closed
Bug 809390
Opened 13 years ago
Closed 13 years ago
IonMonkey: improve range analysis of bitand
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla19
People
(Reporter: h4writer, Assigned: h4writer)
References
Details
Attachments
(1 file, 2 obsolete files)
1.49 KB,
patch
|
mjrosenb
:
review+
|
Details | Diff | Splinter Review |
In a bitand the upper range is only as big as the minimum of both upper ranges.
(We compute it by taking the maximum of both)
Assignee | ||
Comment 1•13 years ago
|
||
Assignee: general → hv1989
Attachment #679100 -
Flags: review?(mrosenberg)
Assignee | ||
Comment 2•13 years ago
|
||
Comment on attachment 679100 [details] [diff] [review]
Patch
Jandem pointed me to #799793. I'll create a better patch ;)
Attachment #679100 -
Flags: review?(mrosenberg) → review-
Assignee | ||
Comment 3•13 years ago
|
||
This should do it. Now we compute the range of x & 5 being between 0 and 5 correctly. But still do the right thing for x & -1.
Attachment #679100 -
Attachment is obsolete: true
Attachment #679113 -
Flags: review?(mrosenberg)
Assignee | ||
Comment 4•13 years ago
|
||
Sorry, part of another patch was included. Now only the right stuff.
Attachment #679113 -
Attachment is obsolete: true
Attachment #679113 -
Flags: review?(mrosenberg)
Attachment #679114 -
Flags: review?(mrosenberg)
Comment 5•13 years ago
|
||
Comment on attachment 679114 [details] [diff] [review]
Patch
Review of attachment 679114 [details] [diff] [review]:
-----------------------------------------------------------------
::: js/src/ion/RangeAnalysis.cpp
@@ +407,5 @@
> + // EXCEPT when upper bound of non negative number is max value,
> + // because negative value can return the whole max value.
> + // -1 & 5 = 5
> + if (lhs->lower_ < 0)
> + upper = rhs->upper_;
this and the next one should probably be Max(upper, rhs->upper_).
Attachment #679114 -
Flags: review?(mrosenberg) → review+
Assignee | ||
Comment 6•13 years ago
|
||
(In reply to Marty Rosenberg [:mjrosenb] from comment #5)
> Comment on attachment 679114 [details] [diff] [review]
> Patch
>
> Review of attachment 679114 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: js/src/ion/RangeAnalysis.cpp
> @@ +407,5 @@
> > + // EXCEPT when upper bound of non negative number is max value,
> > + // because negative value can return the whole max value.
> > + // -1 & 5 = 5
> > + if (lhs->lower_ < 0)
> > + upper = rhs->upper_;
>
> this and the next one should probably be Max(upper, rhs->upper_).
Yes, but simplified that is "upper = rhs->upper_" ;).
Assignee | ||
Comment 7•13 years ago
|
||
Comment 8•13 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/7fa5f6815e08
Should this have a test?
Status: NEW → RESOLVED
Closed: 13 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Target Milestone: --- → mozilla19
Assignee | ||
Comment 9•13 years ago
|
||
(In reply to Ryan VanderMeulen from comment #8)
> https://hg.mozilla.org/mozilla-central/rev/7fa5f6815e08
>
> Should this have a test?
No, this wasn't actually wrong. We now calculate better bounds for the range. I've updated the title to reflect the patch.
Summary: IonMonkey: range analysis computes range of bitand wrong → IonMonkey: improve range analysis of bitand
Updated•13 years ago
|
Flags: in-testsuite? → in-testsuite-
You need to log in
before you can comment on or make changes to this bug.
Description
•