Commit Graph

2 Commits

Author SHA1 Message Date
vegorov@google.com 774187fb8c Ensure that LowerBound and UpperBound return overflow marker when overflow occurs.
R=fschneider@google.com
BUG=dart:7617

Review URL: https://codereview.chromium.org//11779017

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@16711 260f80e4-7a28-3924-810f-c04153c831b5
2013-01-07 15:33:36 +00:00
vegorov@google.com 6560f5c84b Fix convergence issues in range analysis.
Split it into three phases: initialization, widening and narrowing.

During widening and narrowing phi-ranges change according to classical widening and narrowing operators defined as:

Widening:
  [_|_, _|_] v [a, b] = [a, b]
  [a, b] v [c, d] = [c < a ? -inf : a, d > b ? +inf : b]

Narrowing:
  [a, b] ^ [c, d] = [(a == -inf) ? c : min(a, c), (b == +inf) ? d : max(b, d)]

R=fschneider@google.com

Review URL: https://codereview.chromium.org//10972003

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@12772 260f80e4-7a28-3924-810f-c04153c831b5
2012-09-24 12:00:19 +00:00