Commit Graph

678 Commits

Author SHA1 Message Date
William Hesse 72b58ee3b6 Fix corelib_strong/sort_test on dev_compiler
BUG=
R=jacobr@google.com, vsm@google.com

Review-Url: https://codereview.chromium.org/2683583009 .
2017-02-08 23:06:52 +01:00
Jennifer Messerly 5817ba47e2 fix #28642, handling of top and bottom types in DDC
in particular: void, Null, and combinations with FutureOr<T>

R=leafp@google.com

Review-Url: https://codereview.chromium.org/2671113002 .
2017-02-06 14:56:10 -08:00
Leaf Petersen a3b4366f11 Infer Null for return type of functions with empty returns.
This allows inference to infer Null as the return type of functions
which have no return statements, or which return with no value.

Also allows inference to propagate Null.

Fixes https://github.com/dart-lang/sdk/issues/28602
Fixes https://github.com/dart-lang/sdk/issues/28630

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

Review-Url: https://codereview.chromium.org/2667343005 .
2017-02-06 12:24:39 -08:00
Leaf Petersen 3fa3964a70 Suppress NO_DEFAULT_BOUND errors.
This suppresses the emission of NO_DEFAULT_BOUND errors, and makes the
default instantation for recursive bounds backwards (and possibly
forwards) compatible.  Also adds a couple of currently failing tests
for cases that should be made erroneous regardless of whether we
choose to support malbounded type constructor applications.

BUG=
R=scheglov@google.com

Review-Url: https://codereview.chromium.org/2662973005 .
2017-02-01 10:18:05 -08:00
Vijay Menon c88a17ff55 Some test cleanup
These tests occasionally time out on travis.  uri_test as well, but
there are two tests with that name, so I added code to disambiguate in
the logs.

R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2666593002 .
2017-01-31 10:23:26 -08:00
Vijay Menon 154cd39db8 Fix test status
Started breaking with leaf's cl on Fri.

Note, a	 very recent test (I think) is not strong clean any more.  Rewrite it?

TBR=leafp@google.com,rnystrom@google.com

Review-Url: https://codereview.chromium.org/2662873002 .
2017-01-30 08:08:16 -08:00
Vijay Menon 50ccf6d9b5 Fix DOM constructors in inline JS
R=jacobr@google.com

Review-Url: https://codereview.chromium.org/2659063002 .
2017-01-27 09:47:13 -08:00
Vijay Menon fd94337b42 Fix for Animation and other polyfills
The polyfill code needs to run before dart_sdk is loaded.  Otherwise, the registerExtension step on these types does not work.

Also fixes #27605

R=jacobr@google.com

Review-Url: https://codereview.chromium.org/2649613003 .
2017-01-25 16:18:49 -08:00
Vijay Menon a91cc9cc9e Use microtasks in dart.async
Not quite sure about this, but it makes ordering match for the example in  #28509

R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2653253002 .
2017-01-25 16:14:01 -08:00
Jennifer Messerly 0e00b3e5c8 fix #28008, fix #28009 implement FutureOr<T>
This implements FutureOr<T> in strong mode, otherwise it's ignored (treated as `dynamic`.

Also fixes strong mode's inference subtype function incorrectly treating `void` as a malformed type. This had the consequence of allowing `void` to be inferred as a type argument.

R=leafp@google.com, paulberry@google.com

Review-Url: https://codereview.chromium.org/2647833002 .
2017-01-25 15:32:57 -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 a27adee736 Update tests for FF 51
A handful of tests started working in FF 51.

TBR=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2655673003 .
2017-01-24 08:32:17 -08:00
Konstantin Shcheglov 5c722b4118 Issue 28478. Add new strong mode bounds failing tests.
R=brianwilkerson@google.com, vsm@google.com
BUG=

Review-Url: https://codereview.chromium.org/2651503004 .
2017-01-23 15:15:13 -08:00
Konstantin Shcheglov e8cf6b43a3 Mark dartbug/27526 tests as failing in DDC.
R=vsm@google.com
BUG=

Review-Url: https://codereview.chromium.org/2641073006 .
2017-01-19 20:20:37 -08: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
Vijay Menon 5b34e47f40 Fix subtyping check on number
language_strong/null_is_test started failing on Konstantin's recent change.  Another test started passing.

Does this fix make sense to you guys?

TBR=leafp@google.com,scheglov@google.com

Review-Url: https://codereview.chromium.org/2638393004 .
2017-01-18 13:27:27 -08:00
Vijay Menon 21e1ebc3aa Fixes to status
TBR=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2643793002 .
2017-01-18 06:16:56 -08:00
Vijay Menon c83dac537f Throw TypeError on arg mismatch
Improvement on #28286 - this is still not quite right as we'll throw a
TypeError instead of a NSM in certain cases depending on the order.
The spec will only throw a TypeError if NSM doesn't apply.

R=leafp@google.com

Review-Url: https://codereview.chromium.org/2636313002 .
2017-01-17 16:26:22 -08:00
Vijay Menon 83f8ca4652 Fix status
See #27259

TBR=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2634303002 .
2017-01-17 06:01:04 -08:00
Vijay Menon 14cf17d898 Fix FF tests
TBR=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2638493002 .
2017-01-13 15:17:39 -08:00
Vijay Menon 1f5562e29c More test refactoring to catch failures
Skip fewer tests.  Many are now passing.  Mark the rest as fail and test that they're still failing.

R=rnystrom@google.com

Review-Url: https://codereview.chromium.org/2634433002 .
2017-01-13 09:02:45 -08:00
Vijay Menon 0703ec5b1a Track crashing tests
tbr'ing to fix bots

TBR=brianwilkerson@google.com,rnystrom@google.com

Review-Url: https://codereview.chromium.org/2629173003 .
2017-01-12 16:00:15 -08: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 be95523221 Cleanup references to the old DDC repo
Reachable issues migrated over.

R=jmesserly@google.com

Review-Url: https://codereview.chromium.org/2621543004 .
2017-01-10 12:56:29 -08:00
Vijay Menon 33c8f425b6 Disable auto "debugger" call for tests
R=jacobr@google.com

Review-Url: https://codereview.chromium.org/2621823002 .
2017-01-09 15:42:42 -08:00
Vijay Menon 038a66b305 Regen DDC error expectations
Is this due to recent inference changes?

TBR=jmesserly@google.com,leafp@google.com

Review-Url: https://codereview.chromium.org/2619923002 .
2017-01-09 15:32:05 -08:00
Bob Nystrom d1030e9be0 Don't hardcode 'dart' as the executable name to spawn.
I don't think it's on the PATH on the buildbots.

R=vsm@google.com

Review-Url: https://codereview.chromium.org/2617013003 .
2017-01-05 16:44:09 -08:00
Dan Rubel 55ef6e193c support --options flag and other analysis options flags in DDC
This updates DDC options processing to support:
* --options /path/to/analysis/options/file.yaml
* --enable-strict-call-checks
* --supermixin
* --no-implicit-casts
* --no-implicit-dynamic

As well as general refactoring and cleanup of DDC options processing

R=vsm@google.com

Review-Url: https://codereview.chromium.org/2598593003 .
2017-01-04 18:15:21 -05:00
Jacob Richman 93fb5d8119 Fix cross-window JS interop on FireFox.
BUG=
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2610813003 .
2017-01-04 14:15:20 -08:00
Vijay Menon 77cd33722b Mark test failing on FF
Jacob: looks like you changed the test just before the holidays?

TBR=jacobr@google.com

Review-Url: https://codereview.chromium.org/2610843002 .
2017-01-04 05:53:57 -08:00
Bob Nystrom dca3e74882 blob_constructor_test is passing now.
R=jacobr@google.com

Review-Url: https://codereview.chromium.org/2598853002 .
2016-12-21 17:11:22 -08:00
Jacob Richman 7f26211c26 Correct handling of cross-frame functions in ddc.
Misc fixes of dart:js support on ddc.
Work around issue with Blob constructor on ddc.
Fix incorrect dart:js test on dart2js (fixes https://github.com/dart-lang/sdk/issues/26197)

BUG=
R=alanknight@google.com, leafp@google.com, rnystrom@google.com

Review-Url: https://codereview.chromium.org/2587203002 .
2016-12-19 15:00:55 -08:00
Dan Rubel 13bd1ad0bf DDC/AnalyzerCLI common cmdline option processing
Refactor DDC and Analyzer CLI command line option processing
to use common createContextBuilderOptions method
and ContextBuilderOptions to hold common options.

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2584293003 .
2016-12-19 16:24:20 -05: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
danrubel e321439470 cleanup Analyzer CLI and DDC arg parsing
This removes the need to split arguments on '='
before calling the extractDefinedVariables method.

R=brianwilkerson@google.com

Review-Url: https://codereview.chromium.org/2581723002 .
2016-12-15 12:16:20 -05:00
danrubel 5b84611856 refactor DDC to support --ignore-unrecognized-flags
* add --ignore-unrecognized-flags to DDC
* refactor Analyzer CLI to use same filterUnknownArguments functionality
* remove now unused CommandLineParser and associated tests

R=brianwilkerson@google.com, vsm@google.com

Review-Url: https://codereview.chromium.org/2578113002 .
2016-12-15 10:46:09 -05:00
danrubel eea098a315 fix DDC codegen test
TBR

Review-Url: https://codereview.chromium.org/2579693002 .
2016-12-14 22:24:39 -05:00
danrubel 1d4334739c update DDC to use analyzer extractDefinedVariables
R=vsm@google.com

Review-Url: https://codereview.chromium.org/2578463004 .
2016-12-14 20:43:53 -05: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 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
Vijay Menon e0e7efc351 Support callable classes where call is inherited
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/2560983002 .
2016-12-08 12:04:10 -08:00
Jennifer Messerly ef4baafae5 fixes #28032, await in cascade
R=vsm@google.com

Review URL: https://codereview.chromium.org/2559883002 .
2016-12-07 14:00:18 -08:00
Vijay Menon 94e4a98671 Migrate tests for initializing formals
BUG=#27894
R=eernst@google.com

Review URL: https://codereview.chromium.org/2534293002 .
2016-12-07 10:58:02 -08:00
Vijay Menon 69f0218802 Mark test pass on Chrome 55
TBR=alanknight@google.com

Review URL: https://codereview.chromium.org/2554523002 .
2016-12-05 05:55:44 -08:00
Vijay Menon 201c5b9297 Fix runtime strong mode error in ListMixin
R=jacobr@google.com

Review URL: https://codereview.chromium.org/2544163002 .
2016-12-01 15:41:46 -08:00
Vijay Menon ec81359fc0 Fixes #27960
For "m.call(..)", the function is "m".

R=jmesserly@google.com

Review URL: https://codereview.chromium.org/2539033004 .
2016-12-01 15:38:46 -08:00
Alan Knight 1ff09b431f Keep only a single active stack trace, enables traces for thrown non-exceptions
BUG=
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/2545923002 .
2016-12-01 13:41:08 -08:00
Vijay Menon 88c5dd5745 Better mirrors support for mixins and private fields
This is generally motivated by pageloader usage.

R=rnystrom@google.com

Review URL: https://codereview.chromium.org/2535273002 .
2016-11-29 14:00:01 -08:00
Jacob Richman 1370b6bb46 Fix handling of static names for JS interop and improve test coverage.
BUG=
R=jmesserly@google.com

Review URL: https://codereview.chromium.org/2536823003 .
2016-11-29 13:33:19 -08:00
Vijay Menon 22f85df76e Fix expectation
I copied over the new version of the test for sdk/tests and dropped the 'negative'.

R=brianwilkerson@google.com

Review URL: https://codereview.chromium.org/2536903005 .
2016-11-29 10:28:27 -08:00