Commit Graph

1115 Commits

Author SHA1 Message Date
Ryan Macnak 98b9ff6a30 Fix reflective NoSuchMethodErrors to match their non-reflective counterparts when due to argument mismatches.
BUG=http://dartbug.com/23266
R=asiva@google.com

Review URL: https://codereview.chromium.org//1182613004.
2015-06-16 09:42:11 -07:00
Karl Klose 7f8fe44067 Update dart2js-cps_ir test expectations.
TBR=kmillikin@google.com

Review URL: https://codereview.chromium.org//1181063004.
2015-06-16 15:47:35 +02:00
Karl Klose 551fa1fdaa Do not mark type variables as needing a box inside try; they are immutable.
Closes #23650

R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1188103002.
2015-06-16 14:13:01 +02:00
Lasse R.H. Nielsen 80960767e9 Fix timing issue in stream_empty_test, and make analyzer expect it to pass.
Review URL: https://codereview.chromium.org//1188613008.
2015-06-16 13:33:53 +02:00
Lasse R.H. Nielsen fbedc2b86f Also iprove Future.value(null) and documentation of some Stream related classes.
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1177343004.
2015-06-16 11:38:07 +02:00
Karl Klose bb45376735 Update dart2js-cps_ir status files.
R=kmillikin@google.com

Review URL: https://codereview.chromium.org//1191433002.
2015-06-15 12:50:58 +02:00
Karl Klose e4b56654ff Update dart2js-cps_ir test expectations with better annotations.
R=asgerf@google.com

Review URL: https://codereview.chromium.org//1181613003.
2015-06-11 10:56:56 +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
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
Ryan Macnak 6545e8539e Fix isAssignableTo in VM mirrors to use subtype (<:) rather than moreSpecificThan (<<).
BUG=http://dartbug.com/22852
R=gbracha@google.com

Review URL: https://codereview.chromium.org//1156583005
2015-06-04 12:25:59 -07: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
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
William Hesse 49a94a6938 Update status for failing tests on MIPS hardware.
BUG=dartbug.com/23536, dartbug.com/22626
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1153243002
2015-05-27 16:33:57 +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
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
Ryan Macnak daf6fb6091 Ensure libraries always have at least one top-level class and therefore at least one script.
BUG=http://dartbug.com/23483
R=hausner@google.com

Review URL: https://codereview.chromium.org//1131793012
2015-05-19 08:58:23 -07: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
Rico Wind f247caaab2 Readd analyzer suppression for profiler/metrics_{test,num_test}, the files are still there
TBR=johnmccutchan@google.com
BUG=

Review URL: https://codereview.chromium.org//1142913002
2015-05-19 09:58:08 +02:00
Ryan Macnak 97c4f89e69 Temporarily suppress mirrors_reader_test crash.
BUG=http://dartbug.com/23483

Review URL: https://codereview.chromium.org//1136633003
2015-05-18 14:03:33 -07:00
John McCutchan 6e42aec4f6 Deprecate 'dart:profiler' and move functionality to 'dart:developer'
R=sgjesse@google.com

Review URL: https://codereview.chromium.org//1133713006
2015-05-18 11:31:20 -07:00
johnmccutchan@google.com f01c1490f7 Revert 45783
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45784 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-14 00:32:32 +00:00
johnmccutchan@google.com 95515238cc Move 'dart:profiler' contents into 'dart:developer' and remove 'dart:profiler'
BUG=
R=iposva@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45783 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-13 23:48:04 +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
floitsch@google.com 5c80ac5f40 Clean status files.
When I moved the deferred_in_isolte test, I didn't move the status-file updates.

R=karlklose@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45758 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-13 06:36:56 +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
floitsch@google.com f4a1b28077 Move isolate tests to lib/isolate.
Moves most tests that require dart:isolate to the isolate-directory in the tests section.

Also enables the string_from_environment_default_value_test which didn't have "_test" in its name.

R=lrn@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45701 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-11 17:59:51 +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
karlklose@google.com 6abb79a95b cps-ir: Implement type tests for interface types without type arguments.
R=sigurdm@google.com, kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45484 260f80e4-7a28-3924-810f-c04153c831b5
2015-05-04 07:58:38 +00:00
karlklose@google.com f59e077911 Update dart2js-cps_ir test expectations for new tests committed in r45444.
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45448 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-29 07:27:39 +00:00
rmacnak@google.com fd8e2db578 Fix status for Dartium (can't distinguish compile-time errors).
Review URL: https://codereview.chromium.org//1112783002

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45446 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-29 03:52:25 +00:00
rmacnak@google.com a6e42c48b5 Deal with deferred loading in the VM mirrors.
- Invalidate MirrorSystem.libraries when a load completes.
- Recheck if a deferred import's target has been loaded before failing.
- Allow loading libraries from a LibraryDepedencyMirror.
- Propogate compile-time error when attempting to reflect a deferred type.

BUG=http://dartbug.com/22592
R=asiva@google.com, gbracha@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45444 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-28 23:47:45 +00:00
asiva@google.com 49d1dc7252 Address issue 13719, cleanup the status file to reflect reality.
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45383 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-23 20:42:28 +00:00
kmillikin@google.com 4f7c1d3d54 Clean up handling of constants in the CPS backend.
Before: constant-valued expressions were usually compiled by the JS constant
compiler task, which surprisingly produces a Dart (not JS) constant.

After: use the already computed constant value of a constant-valued
expression.  This is looked up in one of two ways depending on whether the
expression is an identifier or not.  For primitive constants (Booleans,
doubles, integers, strings, and null) simply construct them as they have not
had a value computed.

Also, fix a variety of small bugs.  In some case the fix is disabling an
incorrect code path and bailing out of the compiler.

BUG=
R=johnniwinther@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45335 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-22 10:59:03 +00:00
rmacnak@google.com 1ed911f4c2 Skip spawn_function_root_library_test on Dartium.
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45246 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-17 17:44:38 +00:00
karlklose@google.com 7dd2608820 Adjust test expectations for dart2js-cps-ir.
R=kmillikin@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45236 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-17 11:45:51 +00:00
kmillikin@google.com 00e4ba52ea CPS implementation of throw and rethrow.
Throw and rethrow are implemented as CPS expressions in tail position.

The CPS translation assumes that all expressions translate to a primitive
that is the value of the expression, and throw is an expression in Dart.
For simplicity of the translation, a non-tail throw Primitive is sometimes
used as a placeholder during the translation and removed immediately
afterward.

Both throw and rethrow are represented in the Tree IR.  In the Dart backend,
throw translates to throw and rethrow translates to rethrow.  In the JS
backend, throw translates to JS throw of a wrapped value.  Rethrow is not
currently implemented for the JS backend, it bails out of the compiler.

R=asgerf@google.com
BUG=

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45235 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-17 11:15:45 +00:00
zra@google.com 86bfd7cb30 Adds a simarmv5te build and test target.
Also:
- Removes command line flags to choose simulated arm version.
  I think we should use build targets instead, like in this change,
  to make building and testing more obvious.
- Skips pkg tests on all simulators.

R=regis@google.com, ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45181 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-15 20:44:43 +00:00
karlklose@google.com d839c64766 Establish test expectations for dart2js running with the CPS based backend.
R=ricow@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45162 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-15 11:44:02 +00:00
floitsch@google.com 46fa5bf3d0 Fix mirrors/invocation_fuzz_test.
BUG= http://dartbug.com/15566
R=ahe@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45075 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-10 18:21:30 +00:00
johnniwinther@google.com 16bfae7b27 Handle setter without getter for compounds in SemanticSendVisitor
+ fix status of dart2dart new_backend.

BUG=
R=asgerf@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@45065 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-10 14:00:15 +00:00
rmacnak@google.com b3f4ce9bd8 Deal with type arguments of generic local functions in VM mirrors.
BUG=http://dartbug.com/14913
R=regis@google.com

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

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@44983 260f80e4-7a28-3924-810f-c04153c831b5
2015-04-08 21:40:51 +00:00