Commit Graph

3219 Commits

Author SHA1 Message Date
Asger Feldthaus ff104736f2 dart2js cps: Handle type variables in factory constructors.
BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1179503002.
2015-06-10 15:04:43 +02:00
Rico Wind 149e832c81 Remove suppression for LibTest/math/sin_A01_t02 on v8
The rolll to 4.4 has eliminated this issue

R=sra@google.com
BUG=

Review URL: https://codereview.chromium.org//1173023002
2015-06-10 14:26:27 +02:00
Karl Klose 6cffe227fe Update dart2js-cps_ir test expectations after bac7481d3d.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//1171773004.
2015-06-09 15:12:18 +02:00
Sigmund Cherem 3ad612cdb2 Mark a couple co19 tests as passing now (didn't notice these on the initial CL
that made stacktraces identical)

TBR=sigurdm@google.com

Review URL: https://codereview.chromium.org//1168163002
2015-06-08 13:11:57 -07:00
Asger Feldthaus d01d394af7 dart2js cps: Type casts and related changes to type propagation.
We now optimize type casts that always fail or always pass.
Type propagation has been refactored a bit to make this work.

A new IR node Unreachable has been added. This is an node that is known
to be unreachable and is ultimately compiled to an empty statement.

BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1153603006
2015-06-08 17:02:47 +02:00
Paul Berry e8fe98ecb6 Update status file to work around bug #23595
BUG=dartbug.com/23595
TBR=pquitslund@google.com

Review URL: https://codereview.chromium.org//1170593003
2015-06-05 09:33:14 -07:00
Asger Feldthaus c442bf5697 dart2js cps: Do not propagate impure expressions across null receiver.
If the receiver is null, the arguments are not evaluated.

Example:

Dart:
    var x = null;
    var y = bar();
    x.foo(y);

JS before:
    null.foo$1(bar());

JS after:
    var y = bar();
    null.foo$1(y);

If the receiver is known not be null, we still propagate into the
arguments, and "pure" expressions can always propagate even if the
receiver might be null.

InvokeMethod now has a field isReceiverNotNull, which carries a bit of
static type information. Another field like this is InvokeStatic.isPure.

I intentionally chose to pass along the *least* amount of information
that is sufficient for what we need in the tree optimizations.

That CPS type propagation was not very good at proving when things are
not null, so a couple of things missing from it have been filled in.

BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1159643005
2015-06-02 15:06:29 +02:00
Karl Klose 95a46fb177 Adjust cps_ir test expectations.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//1167673009
2015-06-02 11:26:26 +02:00
Johnni Winther 411246ccc7 Handle .fromEnvironment and incompatible constructor invocations
BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1161823004
2015-06-02 10:44:19 +02:00
Asger Feldthaus bd4e1d726f dart2js cps: Track underlying value of interceptors in type propagation.
BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1154173002
2015-06-01 11:19:36 +02:00
Karl Klose b1c1c34029 Update dart2js-cps_ir test expectations.
TBR=johnniwinther@google.com

Review URL: https://codereview.chromium.org//1165703002
2015-06-01 11:00:02 +02:00
Karl Klose 993338408e cps_ir: Handle malformed type arguments and type checks.
R=asgerf@google.com

Review URL: https://codereview.chromium.org//1156373008
2015-05-29 09:53:35 +02:00
Asger Feldthaus c29b7c6461 dart2js cps: 'is'-check directly against type variables.
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1160763002
2015-05-28 12:30:00 +02:00
Asger Feldthaus f1bbc3bb2d dart2js cps: 'is' checks on types with type arguments.
R=karlklose@google.com

Committed: https://github.com/dart-lang/sdk/commit/00c33fb1347fc5c44a324f9503c7c57969e88ca3

Reverted: https://github.com/dart-lang/sdk/commit/f0c4e31174996e6259fab283af14c49aa8faf28c

Review URL: https://codereview.chromium.org//1161683002
2015-05-27 14:14:07 +02:00
Asger Feldthaus f0c4e31174 Revert "dart2js cps: 'is' checks on types with type arguments."
This reverts commit 00c33fb134.

TBR=karlklose@google.com

BUG=

Review URL: https://codereview.chromium.org//1161793002
2015-05-27 13:54:07 +02:00
Asger Feldthaus 00c33fb134 dart2js cps: 'is' checks on types with type arguments.
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1161683002
2015-05-27 13:45:39 +02:00
Asger Feldthaus f42a0ef25c dart2js cps: Always use interceptors and type tags for 'is' checks.
"x is Foo" will become getInterceptor(x).$isFoo

Testing against a type with type arguments is still a giveup().

This test always works, but is not very fast. For instance, testing
against an int should be "typeof x === 'number' && Math.floor(x) === x".

Following an offline discussion with Karl, the plan is to rewrite
'is'-checks to more fine-grained tests in a CPS optimization pass,
probably the type propagator.

Concretely, we plan to introduce IR nodes like TypeOfTest, FloorTest,
InstanceofTest, etc, which optimization phases can introduce under the
right circumstances. That way, the code generation phase remains simple.

BUG=
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1144163004
2015-05-26 17:50:48 +02:00
Johnni Winther 45ec43770d Create SendStructure for unary and binary in resolution.
BUG=http://dartbug.com/21137
R=karlklose@google.com

Review URL: https://codereview.chromium.org//1152903003
2015-05-26 11:11:46 +02:00
William Hesse 565bf6e0d3 Update status for Chrome 43 on Windows and Mac OS X.
BUG=dartbug.com/23506,23507,23508
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1142373004
2015-05-22 14:39:09 +02:00
Karl Klose 36d3e0d0e6 Update cps-ir test expectations.
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org//1152133003
2015-05-22 09:58:58 +02:00
William Hesse c3dde9a8e1 Update co19 status for Firefox update on Windows.
BUG=
R=ricow@google.com

Review URL: https://codereview.chromium.org//1133693004
2015-05-19 11:41:22 +02:00
Asger Feldthaus ccee558a5b dart2js cps: Access to lazily initialized fields.
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1136843006
2015-05-19 10:05:09 +02:00
alanknight@google.com 34bf1903fa Update tests for Firefox 38, now on Windows bots
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45828 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-15 22:19:49 +00:00
alanknight@google.com 320fcaee61 Safari mobile, a couple more suppressions
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45827 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-15 22:06:42 +00:00
alanknight@google.com 15f33fd124 Hopefully final tweaking of suppressions for appendHtml
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45820 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-15 19:58:16 +00:00
alanknight@google.com 74ef09f4bc Update Dartium suppressions to match dart2js for appendHtml fix
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45819 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-15 18:28:31 +00:00
alanknight@google.com 1f20842389 Another try at appendHtml and insertAdjacentHtml should be consistently sanitized
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45818 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-15 17:59:23 +00:00
alanknight@google.com bfa61f62e0 "Reverting 45815"
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45816 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-15 17:04:53 +00:00
alanknight@google.com 1c69173804 Test Dartium with appendHtml sanitizing. Will immediately revert.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45815 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-15 16:30:17 +00:00
alanknight@google.com 90a31f8fea "Reverting 45807"
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45808 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-15 01:29:49 +00:00
alanknight@google.com 2faa58eb4c Testing for appendHtml and insertAdjacentHtml should be consistently sanitized
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45807 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-15 01:10:19 +00:00
alanknight@google.com e1c798b0fd "Reverting 45790"
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45791 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-14 19:04:23 +00:00
alanknight@google.com 9453809937 appendHtml and insertAdjacentHtml should be consistently sanitized
BUG=
R=terry@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45790 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-14 18:04:17 +00:00
alanknight@google.com 6583ec4887 Safari suppressions
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45773 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-13 19:54:32 +00:00
alanknight@google.com 380e195ba1 Carefully suppress remaining IE and safari mobile sim failures
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45769 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-13 17:36:34 +00:00
karlklose@google.com 9b32c9e673 Implement raw list checks.
R=asgerf@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45762 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-13 11:58:45 +00:00
alanknight@google.com db8c4efadf Don't put syntax errors in test status files
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45756 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-13 01:27:23 +00:00
alanknight@google.com e8cdb495bc Even more tweaking of IE suppressions
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45755 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-13 00:31:39 +00:00
alanknight@google.com ac3a2ea130 IE Event test suppressions
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45750 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 22:56:28 +00:00
alanknight@google.com 3b42e30397 Remove more co19 suppressions
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45749 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 22:32:53 +00:00
alanknight@google.com c8d15026d8 Another analyzer static warning that now passes for WheelEvent
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45746 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 21:30:56 +00:00
alanknight@google.com 92082307e9 Test suppressions and fixes for WheelEvent and related changes.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45745 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 21:07:53 +00:00
asgerf@google.com f5f1eb643d dart2js cps: Introduce GetStatic/SetStatic.
The GetStatic is used for reading static fields and tearing off
static methods.

Invoking a static getter/setter (not from a field) is still an
InvokeStatic, which IMO is the way it should remain.

BUG=
R=karlklose@google.com

Committed: https://code.google.com/p/dart/source/detail?r=45735

Reverted: https://code.google.com/p/dart/source/detail?r=45737

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45738 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 14:19:40 +00:00
asgerf@google.com 961c805398 Revert "dart2js cps: Introduce GetStatic/SetStatic."
This reverts commit 28e4518df87c72cb8e23fe6d73b7750ad0f2183a.

TBR=karlklose@google.com

BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45737 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 13:53:15 +00:00
asgerf@google.com 2c90643171 dart2js cps: Introduce GetStatic/SetStatic.
The GetStatic is used for reading static fields and tearing off
static methods.

Invoking a static getter/setter (not from a field) is still an
InvokeStatic, which IMO is the way it should remain.

BUG=
R=karlklose@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45735 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 13:35:49 +00:00
karlklose@google.com 1c0ac94810 Mark two co19/Layout tests as flaky on dartium.
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45730 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-12 07:52:02 +00:00
karlklose@google.com 0eaa4d4717 cps-ir: Support compilation of methods that use interceptor calling convention.
This is a modified version of sra@'s CL https://codereview.chromium.org/1020243002/ with kmillikin@'s comments addressed.

R=sigurdm@google.com, kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45680 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 12:38:14 +00:00
asgerf@google.com 9630163eaf dart2js cps: Handle error cases.
A new IR node CreateInvocationMirror has been introduced, which is
needed for creating calls to noSuchMethod. The main reason for this node
is that the JS constructor for Invocation objects require the internal
(minified) name of the target, which the builder does not know.
I don't think the IR pipeline should depend on the Namer, so the IR node
is preserved all the way to codegen.

R=floitsch@google.com, kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45678 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 09:06:12 +00:00
kmillikin@google.com 638a5ba35f Support 'on T' catch clauses and multiple clauses.
The sequence of clauses is translated into the corresponding nested if-else
statements.  The last else is the catch-all clause (no 'on T') if there is
one or implicitly 'rethrow' otherwise.

If there is a catch-all clause (no 'on T'), then any clauses after it
are unreachable.  The language specification allows such unreachable
clauses without an error.

R=asgerf@google.com, karlklose@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45634 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-08 08:49:26 +00:00
ricow@google.com e92f697236 Remove dart2dart support from testing scripts and status files
I will leave it to the dart2js people to remove the support from the dart2js tools (there is also a bunch of comments still in code, do a git grep)

R=kustermann@google.com, floitsch@google.com, kmillikin@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45588 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-07 11:29:55 +00:00