Commit Graph

19280 Commits

Author SHA1 Message Date
Stevie Strickland 650cd2ed1d [gardening] Fix multitest comments on this file.
Change-Id: I56560943c536d5f2a3358745f4b73e0660b3bd90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100361
Auto-Submit: Stevie Strickland <sstrickl@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Stevie Strickland <sstrickl@google.com>
2019-04-24 12:02:56 +00:00
Stevie Strickland 5ebb640a67 [vm] Finish adding support for ECMAScript 2018 features.
This work pulls in v8 support for these features with
appropriate changes for Dart and closes
https://github.com/dart-lang/sdk/issues/34935.

This adds support for the following features:

* Interpreting patterns as Unicode patterns instead of
  BMP patterns
* the dotAll flag (`/s`) for changing the behavior
  of '.' to also match line terminators
* Escapes for character classes described by Unicode
  property groups (e.g., \p{Greek} to match all Greek
  characters, or \P{Greek} for all non-Greek characters).

The following TC39 proposals describe some of the added features:

* https://github.com/tc39/proposal-regexp-dotall-flag
* https://github.com/tc39/proposal-regexp-unicode-property-escapes

These additional changes are included:

* Extends named capture group names to include the full
  range of identifier characters supported by ECMAScript,
  not just ASCII.
* Changing the RegExp interface to return RegExpMatch
  objects, not Match objects, so that downcasting is
  not necessary to use named capture groups from Dart

**Note**: The changes to the RegExp interface are a
breaking change for implementers of the RegExp interface.
Current users of the RegExp interface (i.e., code using Dart
RegExp objects) will not be affected.

Change-Id: I0709ed0a8d5db36680e32bbad585594857b9ace4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95651
Commit-Queue: Stevie Strickland <sstrickl@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
2019-04-24 09:24:16 +00:00
Aart Bik 2eb36e8879 [dart/vm] What's in a (register) name?
Rationale:
Under heavy register pressure, a Q register was
selected for which the corresponding D register
had no proper overlap with S registers, which
was required by integer division.

Test:
Real reproducer when use_integer_division=false.

Bug:
https://github.com/dart-lang/sdk/issues/36681
https://github.com/dart-lang/sdk/issues/34472

Change-Id: I54162f4d6aee6ef9827907d9e97f2a476e9cbe4a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100272
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-04-24 00:21:55 +00:00
Dan Rubel 174395a49e NNBD "late" modifier language_2 tests
Change-Id: Iffcd2ef8042576bcfc195ab72f2743f2c3e7be07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100261
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-23 20:58:31 +00:00
Régis Crelier 7c18fc0c3d Revert "[gardening] Mark ffi/function_stress_test/1 test as slow."
This reverts commit 7388c3e3db.

Reason for revert: Marking as Slow is not sufficient. Filed issue instead.

Original change's description:
> [gardening] Mark ffi/function_stress_test/1 test as slow.
> 
> Change-Id: Ic5130781a75250165f92d86729c2d83c436db30e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100280
> Reviewed-by: Régis Crelier <regis@google.com>
> Commit-Queue: Régis Crelier <regis@google.com>

TBR=sjindel@google.com,regis@google.com

Change-Id: I35afabb3207f094f37a9d4b32e027060070f2f91
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100284
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2019-04-23 20:14:56 +00:00
Régis Crelier 7388c3e3db [gardening] Mark ffi/function_stress_test/1 test as slow.
Change-Id: Ic5130781a75250165f92d86729c2d83c436db30e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100280
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
2019-04-23 17:40:31 +00:00
Brian Wilkerson b4d17f2eee Add diagnostics related to default values
Change-Id: I4b30580e34fbf302a53778010fada54a2e100409
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99887
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-04-23 17:16:50 +00:00
Aart Bik dbfcb97fa5 [dart/vm]: sometimes a smi is just a smi
Rationale:
The IA32 codegen has the concept of "safe smis", which
can actually be larger "mints" that can be constructed
in a safe way (e.g. shifting). However, at a few places,
this caused confusion, since following code assumed
that such values can be casted to "smis" always.
This CL fixes that. Found with DartFuzz.

https://github.com/dart-lang/sdk/issues/36589

Change-Id: I6bf308897abfb0aad965c7fbaf8f374a1ba30d41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100089
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-04-23 16:39:02 +00:00
Dan Rubel 293c0f42f7 NNBD "required" modifier language_2 tests
Change-Id: I2c0d53fd321dea7ed74cf9fac422ec32f9dea641
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100260
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-23 15:28:12 +00:00
Alexander Markov 5ee20c99ac [vm/aot/tfa] Workaround for crash in getStaticType
Issues: b/131091988, https://github.com/dart-lang/sdk/issues/34496
Change-Id: I9ef8edfff39848e6f240402682d119fe35f7f776
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99972
Reviewed-by: Aart Bik <ajcbik@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-04-22 22:49:24 +00:00
Jenny Messerly 2c304d997f [dartdevc] fix #36372, make JS Array constructor property usable from JS
The `new array.constructor()` pattern is occasionally used in JS
(presumably, to get the array subtype if one is available). GopherJS in
particular does this. This fixes DDC's generic `JSArray<T>` to support
this pattern, for all values of T. This also makes JSArray work like
all other "native" types in DDC, where the "constructor" property
is the JS constructor for that native type.

Change-Id: I5270bd648d3d60cf07b8548fcd8c9b9d1a3018d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99940
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2019-04-22 22:43:14 +00:00
Paul Berry 17db9f986a Simplify type tests in nullable_type_ambiguous_test.dart
Change-Id: I6612a83550acf5f1920bb0467425cfb2977ea2e0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99882
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-22 18:50:11 +00:00
Ryan Macnak 9d376de55a [vm] Remove code collection.
Code collection interacts badly with
 - warming up compiled code
 - retaining pre-compiled code
 - code coverage
 - hot reload (deopting to an old version of a function)

Change-Id: Id269a6c3281e577d4f600f0c158af9e62f6b49ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99722
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-04-18 20:12:09 +00:00
Aart Bik 3cf3e4edde [dart/vm] Reduce trip count of osr test
Rationale:
Test was borderline timeout. The reduced tripcount
still triggers OSR consistently, but runs a lot faster.

https://github.com/dart-lang/sdk/issues/36421
https://github.com/dart-lang/sdk/issues/36218
https://github.com/dart-lang/sdk/issues/36214

Change-Id: I60917bb6bdd51dee6bd11d1fe5beede4753c2147
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99783
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Aart Bik <ajcbik@google.com>
2019-04-18 19:52:20 +00:00
Brian Wilkerson 836efd6520 Add a language_2 test for having an invalid type in an on clause
Change-Id: Ia073e6a85f6f5cc54ecb45ab5d4e11e7976c3134
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99701
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-17 18:35:20 +00:00
Paul Berry 37285467db Improvements to null_assertion_ambiguous_test
Change-Id: I164d0815262d9c861c3b4ad3532808409004ea0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99660
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-17 15:36:26 +00:00
Paul Berry bc99f1ca28 Test a few more uses of the nullable type decorator
Change-Id: I902caac00961514637b77f70200103618662b325
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99621
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-17 12:15:35 +00:00
Nicholas Shahan 9d15138c91 [tests] Revert the previous deletion of UI-as-Code const tests
Returning since they should be valid with the `constant-update-2018` experiment
flag:
* control_flow_collections/if_const_test.dart
* control_flow_collections/if_const_error_test.dart
* spread_collections/const_test.dart
* spread_collections/const_error_test.dart

Should be deleted when UI-as-Code is supported in constant collections:
* control_flow_collections/if_const_syntax_error_test.dart
* spread_collections/const_syntax_error_test.dart

Change-Id: I595333782630122ae4f3d021841b062b27e1cccb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99600
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-04-16 23:04:37 +00:00
Sigmund Cherem 8e73b3c006 Enable ui-as-code features.
Change-Id: I97781ffe5144c4b959cb3cb720e9cd06c22928ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99283
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-04-16 21:29:55 +00:00
Sigmund Cherem 4b7d256a06 Revert "Enable constant-update-2018 by default." and "Update .expect files in pkg/front_end after e9ca6a53"
This reverts commit e9ca6a5335 and d3e00fd35e.

Change-Id: I346d6156be19c4fceffa202a7ce9bfa931c7c14b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99560
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-04-16 20:20:12 +00:00
Nicholas Shahan 6dc209e858 [tests] UI-as-Code in const collections is a compile time error
* Update tests to expect compilation errors when `if` `for` or `...` are used in
  const collections.
* Remove constant-update-2018 flag from tests.

Change-Id: I477c30f07c7e3da6139f263e1855c3908c1bce2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99485
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-04-16 20:02:29 +00:00
Aart Bik 9070d6ae61 [dart/vm] Inspect shift constant in absence of range analysis
Rationale:
Queries the constant of a shift operation to determine if it
is in range when range analysis has not run. This seems in general
a good idea, since some optimizations occur *after* range analysis,
and we were missing those cases. In this particular case, it also
avoids an assert fail on a shift by one without env() that was
introduced by a pass that has no subsequent range analysis. In
this case, it is unclear whether not having an env() was an
accident, or on purpose since the shift factor is known to
be well-behaved. Please have a careful look!

https://github.com/dart-lang/sdk/issues/36587

Change-Id: I12b4cb773f31899e17bfce8506bce599ccbef8ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99382
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-04-16 19:07:15 +00:00
Johnni Winther 5af34ea93d [CFE] Handle invalid constant string interpolation in unevaluated constant expressions
Non-primitive constants were incorrectly stringified in an unevaluated
context. These are now, as with unevaluated constants, checked when the
string concatenation is fully evaluated.

Closes #36609

Change-Id: Ia3266ebcb9d497b277690244569812f7cd3e30c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99461
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
2019-04-16 16:05:05 +00:00
Paul Berry 4b19ca1489 Add language_2 tests for NNBD null-assertion operator (!)
Change-Id: I06ffbfae376210ca0428181f567be3702defbe5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99185
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-16 15:16:44 +00:00
Johnni Winther 58ff41ad33 Add test for static tear-off
- to document the change (for the better) with CFE constant

Change-Id: I9b6673497fe07ccd4f92fc4c22df0ae3205f72a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99152
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-04-16 07:06:12 +00:00
Brian Wilkerson 0314d86af4 Add errors when a nullable type is used as a supertype
Change-Id: I82471ba67dd74db6425bb2081bd761eb2b490333
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99284
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2019-04-12 21:13:21 +00:00
Sigmund Cherem 1ca57fc729 Update cfe_constant_evaluation_test and remove old constant-expression tests now that constant-update-2018 is on by default
Fixes https://github.com/dart-lang/sdk/issues/36597

Change-Id: Iaaadbacb71fdaddb5486bf0cf85188a30d088e50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99280
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-04-12 19:46:50 +00:00
Aske Simon Christensen e9ca6a5335 Enable constant-update-2018 by default.
Fixes https://github.com/dart-lang/sdk/issues/32517
Fixes https://github.com/dart-lang/sdk/issues/34189
Fixes https://github.com/dart-lang/sdk/issues/34192
Fixes https://github.com/dart-lang/sdk/issues/34205

Unskipping the skipped tests is tracked by
https://github.com/dart-lang/sdk/issues/36433 and
https://github.com/dart-lang/sdk/issues/36595.

Expectation files for front-end tests will need to be updated to make
front-end builders green. They are part of unapprovable suites.

Change-Id: I311f449af6feff5bf40740227a95aa06e0a9d84f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99169
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-04-12 13:30:15 +00:00
Paul Berry d81783ff5f Begin writing language_2 tests for NNBD.
These tests validate simple uses of trailing `?` syntax, and exercise
the ambiguous cases mentioned in the draft spec.

Change-Id: If2526c7f4c898495d667d7e16a2005bd8432f8df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99183
Reviewed-by: Leaf Petersen <leafp@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-12 12:42:48 +00:00
Johnni Winther 394f88d5cf Create source information from ConstantExpression
(now that it has a fileOffset)

Change-Id: I057ca3cf04a941ccdb03a6d8ca58947650b1cbec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99161
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-04-12 07:37:17 +00:00
Jenny Messerly fe6897ab7f [dartdevc] fix #36252, export private name symbols
This adds support to DDC's Kernel backend for instance constants
inlined across module boundaries, by saving private name symbols
so they can be referred to from outside of the current module.

Change-Id: I28d45d1844f5351f506cc7606dd1c4803037304e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98926
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2019-04-11 23:45:17 +00:00
Samir Jindel 4be9357966 [vm] Harden function_stress_test.dart
Change-Id: I0aa9600f79be608881b450fb976bd5f2c958d479
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99146
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Auto-Submit: Samir Jindel <sjindel@google.com>
2019-04-11 19:46:12 +00:00
Samir Jindel a7a87df513 [vm/ffi] Replicate transition to/from native code around FFI calls.
Change-Id: I49be874b47b63a0863ed58d26f417cb957b89380
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98463
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-04-11 11:59:54 +00:00
Mayank Patke ab66a3808b Add more JS subtyping semantics to CFE constant evaluator.
If we're targeting a JS backend, `isSubtype` considers every int to be a
double. We need to additionally allow any integer-valued double to be an
int. This mainly allows us to handle signed zeroes correctly.

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

Change-Id: I00d1e693bb3f1268ac100a76c9bec8fcc612b182
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99101
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-04-10 21:09:03 +00:00
Aart Bik 9876e92c7d [dart/vm] Support OSR on non-empty expression stack
Rationale:
This enables OSR even in the presence of block expressions,
which are introduced by the new CFE control-flow collections
and spread operations. Faster is better!

https://github.com/dart-lang/sdk/issues/36421
https://github.com/dart-lang/sdk/issues/36218
https://github.com/dart-lang/sdk/issues/36214

Change-Id: I363a0b0a5becbbd5743f8fb47ff24dcebc0e4d64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98744
Commit-Queue: Aart Bik <ajcbik@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-04-10 19:40:49 +00:00
Samir Jindel f4e63990cb [vm/ffi] Support FFI on ARM32.
Fixes dartbug.com/36311.
Addresses dartbug.com/35760.

Change-Id: Ib6c4db69f31dfb5317e4162b80d3e30a996e3a2e
Cq-Include-Trybots: luci.dart.try:vm-ffi-android-debug-arm-try,vm-ffi-android-release-arm-try,vm-ffi-android-product-arm-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97631
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2019-04-10 13:15:16 +00:00
Sergey G. Grekhov 66477b9fcf [co19] DEPS file updated
Change-Id: Iba9bb0fcffa27730cbceb0970177323503151ab7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98851
Reviewed-by: Alexander Thomas <athom@google.com>
2019-04-10 08:22:32 +00:00
Mayank Patke 919461badd Ensure boolified SSA nodes are non-null first.
Fixes https://github.com/dart-lang/sdk/issues/34147.

The Dart language specification says we should ensure booleans are
non-null in the following (non-exhaustive) situations:
* (ternary) conditional expressions - this includes the `!` operator
since `!x` is equivalent to `x ? false : true`
* arguments to logical boolean expressions (`||` and `&&`), modulo
short-circuiting
* `if` conditions
* `for` loop conditions
* `while` conditions
* `do`/`while` conditions

With control-flow-collections enabled, this CL will also cover
conditions in `if` elements and `for` elements. Tests for these already
exist in
language_2/control_flow_collections/{if,for}_null_condition_test.dart.

Change-Id: I2ce9a30adeb16a0a68411f358f69aeca08656dab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98780
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-04-10 00:28:10 +00:00
Johnni Winther 45a5349175 Track constant field initializers for field analysis.
Change-Id: I536975d235cbf7722b03aa7b0e2c9edd7c206484
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98852
Commit-Queue: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-04-09 16:30:27 +00:00
Johnni Winther 4fc0e1f13d Use .nullType as type of null and fix null type handling in getStaticTypeAsInstanceOf
The .getStaticType results for NullLiteral and NullConstant are inconsistent. The former returns `const BottomType()` and the latter return `TypeEnvironment.nullType`.

To avoid this inconsistency and since `const BottomType()` is really the "unreachable" type, used for instance of for the type of a throw expression, the implementation is changed to consistently use the .nullType.

For this to work, getStaticTypeAsInstanceOf (and the equivalent dart2js implementation), and the `Type.fromStaticType` constructor in the VM type flow analysis have to special case the .nullType.

Change-Id: If6b806d4a39ef7b906275c43fa2089b9d140523b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98563
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-04-09 06:49:17 +00:00
Sergey G. Grekhov 4ca7401604 [co19] Roll to 7e743ef29b4c06f1a2b8b9dc70ead60b31aab526
Change-Id: I6d52b5820139e83df157e00114b51c0d53a990a3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98674
Reviewed-by: Alexander Thomas <athom@google.com>
2019-04-08 14:17:43 +00:00
Aske Simon Christensen d75a49a44f [CFE] Ignore abstract methods when looking for operator '=='.
Fixes https://github.com/dart-lang/sdk/issues/36515

Change-Id: I7e6717b8cde7341c482e5eeb52c2ab4fe8fdcb9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98842
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Auto-Submit: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-04-08 11:11:08 +00:00
Stevie Strickland 50f3a6c960 [gardening] Make deferred imports part of the corresponding tests.
See https://github.com/dart-lang/sdk/issues/36418 for more info.

Change-Id: I5e26b295699c52db2e542330c23f8ec3095d78e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98840
Reviewed-by: Stevie Strickland <sstrickl@google.com>
Commit-Queue: Stevie Strickland <sstrickl@google.com>
2019-04-08 09:58:27 +00:00
Jenny Messerly da4ccd0855 [analyzer] fix #32918, eliminate type variables during const inference
This brings Analyzer's type inference in line with the language spec.
Similar to CFE, the inference function now takes an isConst parameter,
which if set, tells it to eliminate type variables from the context
type.

Change-Id: Ied67bac39d73c9ecd7e0a482a0c8db77272637cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98707
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Jenny Messerly <jmesserly@google.com>
2019-04-05 19:30:54 +00:00
Alexander Markov 07482eeb5e [bots] Run all tests on vm-dartkb-* bots
Bytecode configurations should have the same test coverage as default mode.

The following tests are excluded in dartkb mode as there are too many crashes:
 - service/* (debugging capabilities are not supported);
 - lib_2/mirrors/* (mirrors are not supported);
 - vm/cc/* (bytecode modes are not wired up in run_vm_tests).

Change-Id: I11eead94b96f43ab454acd6e6f6861af943c0488
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97847
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-04-05 18:25:34 +00:00
Alexander Markov 652a8be7a7 [Tests] Fix inifinite replication of Dart processes in tests
When tests are executed on certain configurations like dartkb or simarm,
the test script is first compiled into a dill file, so the VM command
line for running a test looks like

dart .../generated_compilations/dartkb/foo_test/out.dill

Certain tests have the logic to replace '_test.dart' in Platform.script
with '_test_body.dart' and execute the resulting script.
However, as out.dill does not contain '_test.dart', the script remains
the same after replacement. As a result, test was infinitely re-executing
itself, overloading bots and not making any progress.

Change-Id: I7257d3553a7f0a0de2f6d8218a9eb5c8981af17d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98685
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-04-04 19:14:44 +00:00
Martin Kustermann a112b11e2e [gardening] Disable dwarf_stack_trace_test on product mode because symbols can be wrong
Change-Id: I4e3a7fd12afddf44f69e4da066585866e8770e47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98671
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Auto-Submit: Martin Kustermann <kustermann@google.com>
2019-04-04 14:47:20 +00:00
Aske Simon Christensen 313e0f5410 [CFE] Check if set element or map key overrides operator '=='.
Fixes https://github.com/dart-lang/sdk/issues/36444

Change-Id: I38b485ca538c65072e2ec3386e30c5ce49671fe4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98666
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-04-04 14:39:50 +00:00
Aske Simon Christensen a069ddda21 [CFE] Produce InstanceCreation from unevaluated constructor invocation.
Thread assert enable flag through in dart2js to make the dart2js cfe
constant evaluation unit test properly pass the flag.

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

Change-Id: Ie4ac86ce96feda1548120fed54ece9ca03387496
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98570
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-04-04 12:22:50 +00:00
Mayank Patke 2f77af1c6f Fold identical(double.nan, double.nan) => false in dart2js.
Change-Id: Idc6b064e330af71bbc8525a48874d332d84f404a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98607
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2019-04-03 21:14:31 +00:00