Commit Graph

3964 Commits

Author SHA1 Message Date
Regis Crelier 508b876ec8 Report wrong async function result type as type error in checked mode (Fixes #26133).
Add regression test.

R=hausner@google.com

Review URL: https://codereview.chromium.org/1847953002 .
2016-05-09 15:06:45 -07:00
Erik Ernst a9d90f4a09 Revert "Adds DartOptions to generic method syntax tests."
This reverts commit ae31db041d,
which seemed to cause failures on dart2js-d8-minified.

BUG=

Review URL: https://codereview.chromium.org/1960193002 .
2016-05-09 18:06:34 +02:00
Erik Ernst ae31db041d Adds DartOptions to generic method syntax tests.
This CL adds a `DartOptions` comment to the '--generic-method-syntax'
related tests specifying that option, and changes the entries for these
tests in status files to expect success for dart2js except when running
in a browser (where the option gets dropped rather than passed on to
the compiler).

BUG=
R=floitsch@google.com

Review URL: https://codereview.chromium.org/1962633002 .
2016-05-09 17:15:33 +02:00
Brian Wilkerson 8c244f03ad Report when members indirectly inherited through a mixin are not implemented (issue 26411)
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1951363003 .
2016-05-06 11:29:44 -07:00
Erik Ernst d55adbed81 Add unit test on dart2js static analysis of method type parameters.
The new test is specifically for `dart2js --generic-method-syntax ..`,
executed programmatically using 'memory_compiler.dart'.
It verifies that each method type variable is treated as if it had
been an alias for `dynamic` (so the static analysis allows almost
all usages of these type variables, silently). Note that this behavior
is unlikely to be available with any other tools, and even `dart2js`
will behave differently when generic methods are implemented fully.
Hence, the new test will only be useful as-is during a transitional
period.

R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/1939053002 .
2016-05-04 15:21:17 +02:00
Florian Schneider 174121435a Fix handling of negative exit codes in test.dart on Android.
BUG=dartbug.com/26375
R=kustermann@google.com

Review URL: https://codereview.chromium.org/1940213003 .
2016-05-03 16:47:22 +02:00
Florian Schneider b349c2cbd6 Temporarily update test status for Android
BUG=
R=kustermann@google.com, rmacnak@google.com

Review URL: https://codereview.chromium.org/1924833003 .
2016-05-02 11:19:43 +02:00
Zachary Anderson 3d7202bad3 DBC: Adds simdbc64 target, adds arm64 arithmetic overflow logic
There were differences between linux gcc, android gcc,
MacOS clang, and 32 vs. 64-bit w.r.t the __builtin
functions for detecting arithmetic overflow. I couldn't get
them all working at the same time. Instead, I removed them,
and changed to always use the inline assembly. This works
in all the configurations above.

This change also adds a simdbc64 target for building simdbc
for 64-bit, and sets up the android targets. simdbc targets
arm, and simdbc64 targets arm64. You can build them with:

$ ./tools/build.py -m release -a simdbc{64} --os=android runtime

R=iposva@google.com

Review URL: https://codereview.chromium.org/1904153003 .
2016-04-25 12:48:34 -07:00
Vyacheslav Egorov ee0f608ce4 Dart Byte Code interpreter.
This version is Clang/GCC only and does not support Windows because it uses computed goto's.

Only unoptimized mode is supported.

Architecture is described in constants_dbc.h and stack_frame_dbc.h.

R=fschneider@google.com, zra@google.com

Review URL: https://codereview.chromium.org/1858283002 .
2016-04-18 23:02:01 +02:00
Florian Loitsch bcd8ef3dea Enable conditional directives by default.
R=brianwilkerson@google.com, iposva@google.com, sigmund@google.com

Review URL: https://codereview.chromium.org/1851753002 .
2016-04-14 19:02:41 +02:00
Erik Ernst 377b806bbc Adds support for remaining generic method syntax constructs.
CL https://codereview.chromium.org/1863053003/ added support for most
syntactic constructs in relation to generic methods/functions, and
this one adds the missing ones: Declarations of function typed arguments
with type parameters, declarations of generic local functions, and
declarations of generic literal function expressions. It also adds
support for `super` bounds, because they were discussed recently and
may be quite useful (and it turns out to be no problem to parse them).
Finally, a new test file is added to tests the additional constructs.

BUG=
R=johnniwinther@google.com

Review URL: https://codereview.chromium.org/1878253002 .
2016-04-14 15:25:44 +02:00
Regis Crelier b8bcb5587b Properly handle unfinalized type parameters of generic mixins (fixes #26230).
Finalize upper bounds of unfinalized classes earlier in order to reduce the
number of BoundedType allocations.
Add regression test.

R=fschneider@google.com

Review URL: https://codereview.chromium.org/1886633002 .
2016-04-13 10:04:53 -07:00
Terry Lucas f247fecb14 Updated status files to make Dartium bots green.
TBR=jacobr@google.com

Review URL: https://codereview.chromium.org/1880353003 .
2016-04-13 07:32:14 -07:00
William Hesse f46e1647d0 Update status for regress_23996 on jsshell, which has no repeating timers.
BUG=https://github.com/dart-lang/sdk/issues/26060
BUG=https://github.com/dart-lang/sdk/issues/7728
R=kustermann@google.com

Review URL: https://codereview.chromium.org/1871043002 .
2016-04-08 15:47:51 +02:00
William Hesse daeb7cc3bb Replace broken language/async_star_await_pauses_test
BUG=https://github.com/dart-lang/sdk/issues/23996
R=ahe@google.com, hausner@google.com

Review URL: https://codereview.chromium.org/1869583003 .
2016-04-08 14:21:10 +02:00
Kevin Millikin 0a28c3b94d Fix the Dart VM build.
I always forget that import 'dart:async' is needed for class Future.

TBR=kustermann@google.com
BUG=

Review URL: https://codereview.chromium.org/1875493003 .
2016-04-08 09:55:42 +02:00
Kevin Millikin 6f3707f3c1 Dart VM: Fix an order-of-evaluation bug in async code.
Reading and writing local and static variables is a side effect that
might be observable from a Future, so such reads and writes cannot be
scheduled after the Future completes when they should be performed
before.

The same is true for throwing an exception.

Closes https://github.com/dart-lang/sdk/issues/26175

R=hausner@google.com
BUG=

Review URL: https://codereview.chromium.org/1861963007 .
2016-04-08 09:40:14 +02:00
William Hesse 0bad11c4e7 Remove multitests from language/async_await_test. Skip on linux x64 dartium
BUG=https://github.com/dart-lang/sdk/issues/26198
BUG=https://github.com/dart-lang/sdk/issues/22695
R=kustermann@google.com

Review URL: https://codereview.chromium.org/1864973003 .
2016-04-07 10:26:13 +02:00
Florian Schneider 2783afd607 VM: Fix receiver type propagation in presence of try-catch.
With catch blocks appearing as additional function entry blocks,
there can be phis for the receiver (parameter 0).

This CL fixes the problem that the receiver type information
was lost in the presence of try-catch.

BUG=
R=vegorov@google.com

Review URL: https://codereview.chromium.org/1841073003 .
2016-03-30 15:55:11 -07:00
Florian Schneider 15f23eedc9 VM: Fix --no-use-field-guards.
Fields read from the snapshot must be initialized in the same way
as when allocated with Field::New.

BUG=https://github.com/dart-lang/sdk/issues/25957
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1842853002 .
2016-03-29 17:40:58 -07:00
Paul Berry 8835741088 Fix a corner case of constant evaluation cycle detection.
R=scheglov@google.com

Review URL: https://codereview.chromium.org/1841523003 .
2016-03-28 18:50:14 -07:00
Regis Crelier 9d50701d50 Fix language test that failed on mips hardware, because the created NaN happened
to be identical to the NaN resulting of a division of 0.0 by 0.0.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1830563003 .
2016-03-23 15:59:44 -07:00
Ryan Macnak 3bd5a3317f Update status for noopt and precomp.
R=asiva@google.com

Review URL: https://codereview.chromium.org/1826553002 .
2016-03-22 14:30:25 -07:00
Siva Annamalai 8364da0e1b Adjust status files for product mode to skip tests that require checked mode as we do not support the flags --enable_asserts and --enable_type_checks in product mode.
tools/test.py -mproduct -cdart2app -rdart_product

should run clean after this CL

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1817623003 .
2016-03-21 11:09:38 -07:00
Terry Lucas c59f43a42d Correctly mark generic failures as RuntimeError for Dartium
TBR=alanknight@google.com,leafp@google.com

Review URL: https://codereview.chromium.org/1795123005 .
2016-03-13 18:51:54 -07:00
Erik Ernst 4dd22a87bb Adds tests for syntactic support for generic methods.
This CL adds tests for syntactic support for declaration of type
parameters on methods and named functions, and for passing actual type
parameters in invocations.

The status files declare all the tests to be `CompiletimeError`s
(there is no support for `// AnalyzerOptions=`, so no `--options=..`
can be passed to `dartanalyzer`, even though it does succeed with
`--options=tests/language/X.options` where `X` is the name of the
test).

BUG=
R=brianwilkerson@google.com, leafp@google.com, regis@google.com

Review URL: https://codereview.chromium.org/1779173003 .
2016-03-11 10:27:37 +01:00
Regis Crelier ea7929d2fb Ignore bounds in compile time type tests, since they will have been checked at
run time (fixes issue 25935).
Add regression test.

R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1780333002 .
2016-03-10 14:22:44 -08:00
Bob Nystrom cb7aa02116 Type check for-in statements.
This does nominal checking on the iterable expression used in a for-in
statement:

1. It must implement Iterable.
2. The type argument to Iterable must be assignable to the variable's
   type.

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

Review URL: https://codereview.chromium.org/1771153002 .
2016-03-08 11:25:49 -08:00
Ryan Macnak c6d3ff0098 More MIPS status cleanup.
R=regis@google.com

Review URL: https://codereview.chromium.org/1774693002 .
2016-03-07 16:37:48 -08:00
Sigmund Cherem 385f3350c5 Update status of cpsir tests in checked mode: skipping for now, since more than
75% fail for one reason, once we fix that we can triage in more detail.

Review URL: https://codereview.chromium.org/1771893002 .
2016-03-07 10:20:41 -08:00
William Hesse 7f9e4b7456 Update status for dart2js --cps_ir --host_checked.
BUG=https://github.com/dart-lang/sdk/issues/25911
BUG=https://github.com/dart-lang/sdk/issues/24485
R=sgjesse@google.com

Review URL: https://codereview.chromium.org/1773523002 .
2016-03-07 11:35:11 +01:00
Ryan Macnak 167616b83e Skip mirror tests more generally for $mode == product instead of $runtime == dart_product.
Reduces failures in tools/test.py -mproduct.

R=asiva@google.com

Review URL: https://codereview.chromium.org/1760043002 .
2016-03-03 10:06:59 -08:00
Srdjan Mitrovic b3405d5ebc Add --no-background-compilation to tests that expect to run code in optimized form
BUG=
R=asiva@google.com

Review URL: https://codereview.chromium.org/1759973002 .
2016-03-02 16:30:58 -08:00
Matthias Hausner 5a0a097188 Fix issues in name resolution
Looking up a name x in the library scope or in a prefix can also return
the setter name x=. There were several situations that were not handled
right.

- a getter x and a setter x= should not result in a duplicate name
  error (and thus a resolution error at runtime).

- when looking for an untangled name x but a setter x= is found first,
  keep looking for x.

BUG=25625
R=regis@google.com

Review URL: https://codereview.chromium.org/1752203002 .
2016-03-02 10:44:28 -08:00
Ryan Macnak 7adcf94b75 Adjust expectations of library_env_test to take into account noopt, precompiled and product mode.
R=iposva@google.com

Review URL: https://codereview.chromium.org/1748153003 .
2016-02-29 17:11:07 -08:00
Ryan Macnak ad01f0fb41 Don't expand inline frames in stacktraces under noopt to match full precompiled behavior.
R=fschneider@google.com

Review URL: https://codereview.chromium.org/1748793002 .
2016-02-29 13:28:09 -08:00
Florian Loitsch 55630a5e90 Support 'dart.library.X' env variables in the VM.
BUG= http://dartbug.com/24587
R=iposva@google.com, johnmccutchan@google.com

Committed: https://github.com/dart-lang/sdk/commit/c2a06e22cb83f491fd3accc33d7738c87490c26d
Reverted: https://github.com/dart-lang/sdk/commit/5eb5b429895987519a00daa81b5ab261debbca3f

Review URL: https://codereview.chromium.org/1640853004 .
2016-02-29 20:58:32 +01:00
Siva Annamalai 5c53e14d55 - Skip tests which use dart:mirrors in product mode
Review URL: https://codereview.chromium.org/1728663002 .
2016-02-24 18:13:20 -08:00
Ryan Macnak f3fda729cc Skip more resource-hogging tests on arm64.
R=zra@google.com

Review URL: https://codereview.chromium.org/1726123002 .
2016-02-24 12:56:31 -08:00
Ryan Macnak 0b9d63b04e Update noopt status.
R=fschneider@google.com

Review URL: https://codereview.chromium.org/1729793002 .
2016-02-23 15:59:28 -08:00
Jacob Richman 6a0b321026 Allow factory constructors on mixin classes.
This mitigates a breaking change impacting real users caused by 851b4a995c.
The spec will be updated to allow factory constructors on mixins.

R=gbracha@google.com, iposva@google.com

Review URL: https://codereview.chromium.org/1699233002 .
2016-02-22 10:19:49 -08:00
William Hesse 270ad3f552 Remove ContentShellOnAndroid from status files
Dartium and content_shell are no longer built or tested on Android.
A separate issue is filed to remove support from the test scripts:
https://github.com/dart-lang/sdk/issues/25832

BUG=
R=ricow@google.com

Review URL: https://codereview.chromium.org/1720813002 .
2016-02-22 10:20:22 +01:00
Ivan Posva c822c34af6 - Add DEBUG_ONLY and NOT_IN_PRODUCT macros.
- Remove user_name_ field from RawClass using macros.
- Consolidate "#ifndef PRODUCT" and "#ifdef DEBUG" code using macros.

BUG=
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1715123003 .
2016-02-19 17:48:08 -08:00
Siva Annamalai 64a5845d19 Fix status files to account for dart_product runtime.
R=rmacnak@google.com

Review URL: https://codereview.chromium.org/1688423002 .
2016-02-17 12:22:35 -08:00
Asger Feldthaus 1c698c183b dart2js cps: Fix inlining of stringify.
The rewrite Stringify(x) -> x.toString() is only safe when the toString
method is known to return a string.

BUG=
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1697373002 .
2016-02-17 10:57:58 +01:00
Asger Feldthaus 0d02f5ccca dart2js cps: Update status files.
BUG=

Review URL: https://codereview.chromium.org/1696323002 .
2016-02-16 11:03:58 +01:00
Sigmund Cherem 5aa0c33e52 update status files to make bots green
TBR=het@google.com

Review URL: https://codereview.chromium.org/1691223002 .
2016-02-11 18:51:03 -08:00
Florian Loitsch 310385aeb2 More tests for async* functions.
An async* stream may only be canceled at yield-points.

R=hausner@google.com

Review URL: https://codereview.chromium.org/1677063003 .
2016-02-11 14:53:44 +01:00
Florian Loitsch d8467b7e2d Don't allow to iterate over strings.
BUG= https://github.com/dart-lang/dart-pad/issues/716
R=sigmund@google.com

Review URL: https://codereview.chromium.org/1689783002 .
2016-02-10 23:21:56 +01:00
Regis Crelier 21cad16fac A type should be a subtype of Function if its class declares a call function,
even if call is abstract (fixes #25550).
Add regression test.

R=hausner@google.com

Review URL: https://codereview.chromium.org/1683113003 .
2016-02-10 10:54:00 -08:00