Commit Graph

7 Commits

Author SHA1 Message Date
srdjan@google.com 1203f09650 More tests updated to optimize code (Part 2).
R=asiva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@24927 260f80e4-7a28-3924-810f-c04153c831b5
2013-07-11 20:12:37 +00:00
floitsch@google.com 8fd6d0aafd Remove Expect from core library.
Committed: https://code.google.com/p/dart/source/detail?r=19755
Reverted: http://code.google.com/p/dart/source/detail?r=19756

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20996 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-05 19:43:16 +00:00
fschneider@google.com 5e0ac1419e Use range analysis to improve constant propagation.
This CL runs a second round of constant propagation after range
analysis to eliminate additional unreachable code. Range analysis
is changed to mark branches as constant if the constraints they
generate are unsatisfiable.

The second pass of constant propagation only visits branches and
removes unreachable code, but does not do full constant propagation.

This proves useful when inlining array view operations where the
following pattern occurs:

for (i = 0; i < length; i++) {
  if (i < 0 || i >= length) {
    throw 123;
  }
  foo();
}

In this example the if-statement will be eliminated completely.

Also, fix a bug in range analyis where constraints of already
constrained values were missing.
Review URL: https://codereview.chromium.org//13469013

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20914 260f80e4-7a28-3924-810f-c04153c831b5
2013-04-04 12:42:17 +00:00
floitsch@google.com 5dc8107c53 Revert "Remove Expect from core library."
This reverts commit 19755.

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19756 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-09 03:19:07 +00:00
floitsch@google.com 12dbd2fd70 Remove Expect from core library.
Review URL: https://codereview.chromium.org//12212016

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@19755 260f80e4-7a28-3924-810f-c04153c831b5
2013-03-09 02:40:37 +00:00
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