Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(245)

Issue 11066053: Better value range propagation by supporting negating ranges. (Closed)

Created:
8 years, 2 months ago by ngeoffray
Modified:
8 years, 2 months ago
Reviewers:
Søren Gjesse
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Better value range propagation by supporting negating ranges. Committed: https://code.google.com/p/dart/source/detail?r=13358

Patch Set 1 : #

Total comments: 8

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+231 lines, -39 lines) Patch
M lib/compiler/implementation/ssa/value_range_analyzer.dart View 1 8 chunks +171 lines, -37 lines 0 comments Download
M tests/compiler/dart2js/value_range2_test.dart View 1 3 chunks +60 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
ngeoffray
8 years, 2 months ago (2012-10-08 13:11:44 UTC) #1
Søren Gjesse
lgtm https://codereview.chromium.org/11066053/diff/2001/lib/compiler/implementation/ssa/value_range_analyzer.dart File lib/compiler/implementation/ssa/value_range_analyzer.dart (right): https://codereview.chromium.org/11066053/diff/2001/lib/compiler/implementation/ssa/value_range_analyzer.dart#newcode14 lib/compiler/implementation/ssa/value_range_analyzer.dart:14: Value operator -(Value other); Don't you want to ...
8 years, 2 months ago (2012-10-08 14:00:42 UTC) #2
ngeoffray
8 years, 2 months ago (2012-10-08 14:16:39 UTC) #3
Thanks Soren

https://codereview.chromium.org/11066053/diff/2001/lib/compiler/implementatio...
File lib/compiler/implementation/ssa/value_range_analyzer.dart (right):

https://codereview.chromium.org/11066053/diff/2001/lib/compiler/implementatio...
lib/compiler/implementation/ssa/value_range_analyzer.dart:14: Value operator
-(Value other);
On 2012/10/08 14:00:42, Søren Gjesse wrote:
> Don't you want to add unary minus here as well?

Yes. Done.

https://codereview.chromium.org/11066053/diff/2001/lib/compiler/implementatio...
lib/compiler/implementation/ssa/value_range_analyzer.dart:245: Value operator
-() => -left - right;
On 2012/10/08 14:00:42, Søren Gjesse wrote:
> Maybe -(left + right) instead.

Calling -(left + right) will actually yield -left - right, after a few more
indirections. I'd rather not play with parenthesized expressions just yet :)

https://codereview.chromium.org/11066053/diff/2001/lib/compiler/implementatio...
lib/compiler/implementation/ssa/value_range_analyzer.dart:323: bool isNegative()
=> false;
On 2012/10/08 14:00:42, Søren Gjesse wrote:
> Isn't this negative if left is negative and right is positive - or am I
missing
> something here?

You're right. Done.

https://codereview.chromium.org/11066053/diff/2001/tests/compiler/dart2js/val...
File tests/compiler/dart2js/value_range2_test.dart (right):

https://codereview.chromium.org/11066053/diff/2001/tests/compiler/dart2js/val...
tests/compiler/dart2js/value_range2_test.dart:47: // Create a bound just like
the algorithm does.
On 2012/10/08 14:00:42, Søren Gjesse wrote:
> Which algorithm? (add more context to the reference).

Done.

Powered by Google App Engine
This is Rietveld 408576698