Commit Graph

21 Commits

Author SHA1 Message Date
Vijay Menon 986a1c2775 keep null check on virtual field
We weren't correctly blocking the opt if the field was marked virtual

R=leafp@google.com

Review-Url: https://codereview.chromium.org/2693593002 .
2017-02-10 16:00:13 -08:00
Vijay Menon 093c607092 Test for ddc async call timing
Forgot to add this to the last CL.

R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2661623002 .
2017-01-30 05:47:19 -08:00
Jacob Richman d90ed8c295 Fix noSuchMethod handling of methods that are also extension methods. Fix noSuchMethod handling of methods with names that are rewritten in DDC e.g. "_get" instead of "[]" Fix some mirror system handling of symbols with names that are rewritten in DDC
BUG=
R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2623053004 .
2017-01-24 11:16:21 -08:00
Vijay Menon 863052c586 Change @checked to covariant in strong tests
Per #28168

R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2653493004 .
2017-01-23 12:46:32 -08:00
Asger Feldthaus e6793f76ee Improvements to the kernel tree shaker.
- Use strong-mode types for more precise tree shaking.
- Bail out nicely if dart:mirrors is used.
- Run the tree shaker in the VM target.

The initial tree-shaking pass could be combined with the type checking
pass (inserting implicit down casts) but for now they remain separate.

R=kmillikin@google.com

Committed: https://github.com/dart-lang/sdk/commit/71efbad90c07bece4010162b77d3b51e79b0a34d
Review-Url: https://codereview.chromium.org/2627723003 .
2017-01-20 10:52:27 +01:00
Asger Feldthaus deedd39f04 Revert "Improvements to the kernel tree shaker."
This reverts commit 71efbad90c.

BUG=

Review-Url: https://codereview.chromium.org/2644543004 .
2017-01-19 16:02:48 +01:00
Asger Feldthaus 71efbad90c Improvements to the kernel tree shaker.
- Use strong-mode types for more precise tree shaking.
- Bail out nicely if dart:mirrors is used.
- Run the tree shaker in the VM target.

The initial tree-shaking pass could be combined with the type checking
pass (inserting implicit down casts) but for now they remain separate.

R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2627723003 .
2017-01-19 14:00:31 +01:00
Bob Nystrom 590a188066 Use "Object" as the reified type of covariant override parameters.
This ensures the runtime type is of the tear-off expression's static
type, even when accessed through a superclass.

I also moved the two tests into a subdirectory so they are easier to
find. (It is inscrutable to me why we would have a single directory
with 1,868 test files in it.) That involved enabling recursive
directory listing in codegen_test, which exposed a couple of things.

Fix #27484.

R=leafp@google.com

Review-Url: https://codereview.chromium.org/2641543003 .
2017-01-18 14:48:42 -08:00
Asger Feldthaus 2fc333c93d Fix dispatch name of covariance-checked calls.
BUG=
R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2623333005 .
2017-01-16 12:43:38 +01:00
Vijay Menon 580186a655 Defend against false positives
If a seemingly non-async test returns a Future, wait on it.  I noticed this on an earlier CL today related to the await_in_cascade_test - the test was broken, but we were falsely passing.

This still doesn't handle false negatives (e.g., tests that are expected to fail).  That's why many of these are marked skip_fail.  If the exception happens after main returns, we currently don't see it.

R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2629023002 .
2017-01-11 14:34:07 -08:00
Vijay Menon df45dacb88 Fixes #28338
Fix await/cascade bug and corresponding test.

R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2628053002 .
2017-01-11 12:37:18 -08:00
Vijay Menon 46b7f79fd5 Defer all recursive mixins
This defers mixins along with the supertype.  It passes Leaf's example on the bug.  Will add that as a proper test.

Fixes #28334

R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2625913003 .
2017-01-11 10:32:23 -08:00
Asger Feldthaus 8dd2b15951 Insert implicit downcasts in kernel strong mode.
This is implemented as a separate pass, although going forward
I would like the new frontend to insert these checks.

R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2619193003 .
2017-01-11 13:47:40 +01:00
Asger Feldthaus 492c6c5b13 Skip language_strong/generic_tearoff_test.
The test passes a generic function value of type <T>(T,T)=>T as argument
to a parameter that expects (int,int)=>int.

DDC implicitly instantiates the function, but this is not seen as the
correct behavior by the language team, so we will not try to reproduce
it.

BUG=
R=floitsch@google.com

Review-Url: https://codereview.chromium.org/2610923008 .
2017-01-06 13:11:19 +01:00
Bob Nystrom 45b771f946 Remove tests for generalized tear-offs.
R=mit@google.com

Review-Url: https://codereview.chromium.org/2608363002 .
2017-01-04 10:14:41 -08:00
Jennifer Messerly 77f53f609f fixes #27385, implement virtual fields in DDC
If a field is marked @virtual in Analyzer, DDC will allow it to be overridden as well

also fixes #28114, abstract getters/setters broke generation of forwarding getters/setters

R=vsm@google.com

Review-Url: https://codereview.chromium.org/2571363002 .
2016-12-15 11:39:25 -08:00
Asger Feldthaus 31d5860c81 Enable strong-mode test suite for dartk.
This adds status files for skipping tests that are not yet strong, and
a status file with the tests that fail with the dartk-vm configuration.

To test:

  tools/test.py -cdartk --strong {language,lib,corelib}_strong

BUG=
R=kmillikin@google.com

Review-Url: https://codereview.chromium.org/2583453002 .
2016-12-15 12:50:08 +01:00
Vijay Menon 392c242df9 Add dart:io stubs to ddc sdk, define dart.library.html
Fixes #27302

R=brianwilkerson@google.com, jmesserly@google.com, rnystrom@google.com

Review-Url: https://codereview.chromium.org/2578573003 .
2016-12-14 12:34:33 -08:00
Bob Nystrom b900a39620 Implement messages in assert() in dev_compiler.
Fix #27342.

R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2568313002 .
2016-12-13 13:31:56 -08:00
Bob Nystrom d5acd26b1d Restore line endings of files that should be CRLF. 2016-12-09 11:09:55 -08:00
Bob Nystrom 6c757957db Move the dev_compiler strong mode tests into sdk/tests/.
DDC's codegen test copies those files to a local "gen" directory so
that it can do stuff like splitting out the multitests before it
compiles them to JS.

I left all of that alone, so the rest of DDC's test infrastructure is
unchanged. The very first step that builds the "gen" directory just
copies from sdk/tests/..._strong/... instead and the rest is good to go.

I did not move not_yet_strong_tests.dart somewhere more accessible yet
because I'm not sure if kernel needs it or where it should go.

I did not create any status files because DDC doesn't need them and
there are no test suites for the new directories for the other
platforms.
2016-12-09 11:09:55 -08:00