Commit Graph

4361 Commits

Author SHA1 Message Date
Konstantin Shcheglov cf3a034210 Implement promotion via initialization in flow analysis.
Change-Id: I10a5f6bfeb5a05dd144db5212c9f31796f5a2385
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145502
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2020-04-30 16:26:27 +00:00
Stephen Adams ef1528aa78 [js_runtime] Never is a bottom in legacy mode
Opt-in code can have Never types even with legacy subtyping.

Bug: 41675

Change-Id: I6dbdc064dceeedf0774d10faaca336561b41b7d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145561
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-04-30 01:41:02 +00:00
Joshua Litt e580dd8e84 [dart2js] Remove hardcoded paths in dart2js unit tests.
Change-Id: Ic223c44d917ca55f07f9f62752a91ef4db325444
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145180
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-04-29 18:24:24 +00:00
Joshua Litt 0b1451c5fd [dart2js] Trivial nnbd fix for no_such_method_forwarders_test.
Change-Id: Ib55e3c632c99e0700d239fe0c62e35aeadb0bf0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145301
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-04-29 14:21:03 +00:00
Joshua Litt ed6da1c899 [dart2js] NNBD changes for future_or_test.
Change-Id: I8911179c33f99fb604f0bee309140c85711ff536
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143880
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-04-28 19:01:22 +00:00
Mayank Patke 7ac53f1825 [dart2js] Treat Object as a top type in weak mode.
We were only treating Object as a top type if NNBD was disabled. This is
incorrect and we should be treating Object as a top type whenever legacy
subtyping is in effect. In particular, Object acts as a top type in weak
mode.

Change-Id: I76acc25e92fda2b9e2b7872fc72d319161318874
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144689
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-04-28 02:27:26 +00:00
Konstantin Shcheglov eada4d8d65 Implement Factor in flow analysis.
Bug: https://github.com/dart-lang/sdk/issues/40014
Change-Id: I8d21d3c3368495d9d0dbb1cd52317b053657a176
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144804
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2020-04-27 18:47:08 +00:00
Joshua Litt 02142fe49e [dart2js] Fix two type inference bugs with legacy subtyping.
Change-Id: Ie4ecd82f64b0ebebf65f7e2787881942762862dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144662
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-04-27 18:42:38 +00:00
Joshua Litt 32c3a2cde7 [dart2js] Rebase nnbd expectations for 3 tests.
cfe_constant_test
inlining_test
jfield_analysis

Change-Id: Ib2833507f4e19f3d6a1e5055977bccc962b2d791
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144494
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-04-24 18:30:03 +00:00
Joshua Litt 8495451a6b [dart2js] fix id testing labels.
Change-Id: I4d40cf9f0b99fa8534d3c6b98deaa4a9a1616231
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144620
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-04-24 15:30:13 +00:00
Joshua Litt 6f5f7ad05c [dart2js] rebase deferred_loading_test for nnbd.
Change-Id: Ia8cd18e19554afec57675bab64797984445556c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143820
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-04-23 01:17:58 +00:00
Joshua Litt 7f795b9f18 [dart2js] Rebase api_dynamic_test for nnbd.
Change-Id: I67106666574b0e11280ca8bc582665692c547208
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144342
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-04-22 19:47:59 +00:00
Stephen Adams e6baa97e9a [dart2js] Fix bug with unused generator type parameters
Ensure that a generator entry point only passes type arguments for
parameters that are not erased.

The generator header was passing too many arguments to the generator
body, causing the element type to be misaligned.

Change-Id: I062df5f7172ed8bb410c81013a3faee35d66ef1b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/144351
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-04-22 04:58:44 +00:00
Stephen Adams 7ee0e10bd5 [dart2js] specialize legacy primitive as-checks
Each primitive type T has three variant of 'as' check for 'as T' (strong),
'as T*' (weak) and 'as T?' (nullable).


Change-Id: I6ef3c41d73b384d7d16fa0da0c5b9a1e9791d43f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143884
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-04-18 01:47:37 +00:00
Mayank Patke 4e0c699cc4 [dart2js] Update DartType printing of generic function type parameter
bounds to match runtime behavior.

Change-Id: I745a6a84b6d9fc1e0d9c3cc0ded673bafa6ddcd6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143863
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-04-17 11:14:36 +00:00
Joshua Litt 1ffc11c7dc [dart2js] Fix for generic_method_type_test.
Change-Id: Icfe460e2abd01a6e2cd4b0bf67709ab44be3881f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143560
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2020-04-15 19:42:04 +00:00
Johnni Winther da95c79901 [cfe] Handle nnbd is-test in constant evaluation
+ detect ~/ evaluation errors

Change-Id: Ic3f979c7516ed9aa2da0eab8b8d902987107c189
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142982
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-04-15 17:29:43 +00:00
Johnni Winther dc97454b63 [analyzer,cfe,dart2js] Add pretty printing to id testing
Adds support for pretty printing verbose annotations.
Adds support for force updating annotation texts useful for applying
the pretty printing to valid annotations.

Change-Id: I8fe9b6d2f8198bd5e160854053c8d964ef832a8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129710
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-04-14 13:24:09 +00:00
Stephen Adams 9e2c8ef000 [dart2js] Add --dump-ssa option
The dart2js option --dump-ssa=pattern outputs the SSA CFGs for methods
with names matching the RegExp 'pattern' to a '.cfg' file alongside
the javascript output, e.g. 'main.js.cfg'.

To dump all CFGs, use --dump-ssa=.

Change-Id: I8227232d9950bf3d30df0c87709b0c24e8944759
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/143082
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-04-10 21:02:14 +00:00
Nicholas Shahan 8064c1c342 [ddc] Add typeRep<T>() to inline an unwrapped type directly
Also add `legacyTypeRep<T>()` that is similar but performs
a shallow conversion to a legacy type.

Using this in compiler/dartdevc_native/ tests gives a better usability
instead of constantly wrapping and unwrapping types. It allows us to
avoid stripping off the legacy from a type when calling `wrapType()`.

Issue: https://github.com/dart-lang/sdk/issues/40266
Change-Id: I07225f18c253222b31203b0b110233a3e018a7d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142547
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-04-08 00:03:38 +00:00
Nicholas Shahan 652dc2d0d6 [ddc] Rename test so it actually runs as a test
This test isn't running in any configuration because the filename
doesn't end with "_test.dart".

Change-Id: Idf38c9dd643da36ce6b6cc587d609d7d9e707af2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/142781
Reviewed-by: Riley Porter <rileyporter@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-04-07 23:41:18 +00:00
Nicholas Shahan 765ddbe3be [ddc] Prep variance tests for unfork changes
- Apply formatter.
- Use Expect.listEquals() to compare lists. Reverse the order of
  arguments to account for the expected value coming first.

Issue: https://github.com/dart-lang/sdk/issues/40266
Change-Id: I35961729bdc4aad5337361e5df445a11ac03b2bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141909
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-04-01 17:34:47 +00:00
Nicholas Shahan 2750e0e618 [ddc] Test cleanup prep for unfork
Add helper to check for mutual subtypes.

Issue: https://github.com/dart-lang/sdk/issues/40266
Change-Id: Iccd664034f5a4f2adc13d8ba78d356ae3fabc2be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141907
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-04-01 17:33:37 +00:00
Stephen Adams 1a0df5bc66 [dart2js] Late-binding of 'const String.fromEnvironment'
Defer evaluating 'fromEnvironment' values while building
dart2js_platform.dill.

Future step is to make it work for the Flutter (See https://github.com/flutter/flutter/issues/53284)

Change-Id: Ieef8739364c47540766201332769876cba9f0a35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/141467
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-03-31 16:57:40 +00:00
Stephen Adams d5e8cf7dbd [dart2js] Specialize is- and as- tests for nullable types
- '_as' is now specialized on first use, like '_is'.
- '_is' specialization on `T?` that uses `T._is`
- recognize legacy versions of simple type tests (e.g. is int*)

The T? specialization makes a 2x improvement on some of the ListCopy
benchmarks on 'spec-mode' dart2js because some iterators have a T?
check.

Change-Id: I434a43de9e1322b34c3a5e11199415a75b7ed2c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140944
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-03-28 02:15:31 +00:00
Kevin Moore b3522564d9 Remove unused package-root option and configuration from dart2js
Related to https://github.com/dart-lang/sdk/issues/41197

Change-Id: I4681139b5fe9d2d3d49c69796cf8a3c277753bee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140980
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
2020-03-26 16:49:34 +00:00
Erik Ernst e3af7e724f Update usage of int/String fromEnvironment
Breaking change 40678 requires the constructors int.fromEnvironment and
String.fromEnvironment to get new default values for the named
parameter `defaultValue`. This CL changes usages of these constructors
such that they do not depend on the default value, such that it
becomes a non-breaking change for code in the SDK repo to perform the
change in sdk and in sdk_nnbd.

Change-Id: I82af0e1f92d6cd3618b65c0c50d754ae8c39eb0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140284
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Erik Ernst <eernst@google.com>
2020-03-24 11:19:14 +00:00
Johnni Winther b8544e8220 [cfe] Don't report nnbd errors/warnings in top level inference
Closes #41102

Change-Id: Ieede171d92aa28b0ad9478a1b4293ddf35418d7e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140040
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-03-23 16:39:03 +00:00
Joshua Litt b69e1fd96f [dart2js] Manually opt out tests/compilers/dart2js*.
Change-Id: I6a8a20e9ae58a56bd7e99a714ab94e73cae2f315
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140252
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
2020-03-21 16:12:36 +00:00
Nicholas Shahan 9b26e2dbff [tests] Add language version comment ddc tests
Change-Id: I95910c308728a395e99521e7d9da1c9aa9fa454c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140010
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-03-20 22:59:06 +00:00
Nate Bosch 4c1eaf727c Fix static errors in nnbd_js_interop_test
Add explicit casts and make a non-null named argument required.

Change-Id: I9a61b0613fa2fb98e5dbc69cd8fd6bd121c08a5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140247
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2020-03-20 18:40:28 +00:00
Sigmund Cherem 98e9b32d84 Fix how variance experiment is enabled in dart2js_extra test
The test runner has logic to merge experiments from shared-options, but not from dart2js-options.

Change-Id: I73fd0f4440edb11750b2d9ee78746bd13d260869
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140200
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2020-03-20 04:50:30 +00:00
Leaf Petersen 7aace6fa60 Make StackTrace generally not nullable in migrated NNBD library.
Bug: https://github.com/dart-lang/sdk/issues/40130
Change-Id: I13aba0c2a3fa5b1c3d3995f075ffd38f03aca897
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139880
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2020-03-19 23:31:30 +00:00
Joshua Litt a680dd8b1d [dart2js] Make switch_equals_test nnbd.
Change-Id: I10d0c6b7c2de3b151978ce38a060694fef5b895c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139947
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-19 20:34:28 +00:00
Stephen Adams 37d1d69f61 [dart2js] Remove _CastError and Rti._check
CastError is deprecated and _TypeError now implements CastError, so
it is possible to remove the distinction in generated code.

All checks now go via Rti._as(x) to some _asXXXX method.

Change-Id: I4ce6735b6c904bcbc366de92ed149716caf9ae81
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139959
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2020-03-19 18:43:33 +00:00
Joshua Litt f1d57374ae [dart2js] Move a bunch of references from objectType to topType.
Change-Id: Ia57b3604f26c8a92c53180d58ea5b41265965252
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138613
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-03-16 21:54:21 +00:00
Dmitry Stefantsov 928f9fc932 [cfe] Remove flag --force-nnbd-checks
The checks are now always enabled for the "non-nullable" experiment

Closes #40980.

Bug: https://github.com/dart-lang/sdk/issues/40980
Change-Id: I32a141a93f0ba86ebdab554e1f312c2147927993
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139440
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-03-16 15:01:38 +00:00
Sigmund Cherem 2c68152847 [ddc] cleanup: use Never direclty in nnbd tests
Change-Id: I67aceaccb819ad6033bdb9c7d9870b05859c1064
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138900
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2020-03-10 19:13:33 +00:00
Mayank Patke 81c3208c10 [dart2js] Special case null is T.
Change-Id: Iec5212db2d4493797257753f9eaa63799d047253
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138574
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-03-06 21:33:53 +00:00
Mayank Patke de0fcd71d4 [dart2js] Assign the correct type to super tearoffs.
Bug: https://github.com/dart-lang/sdk/issues/40902
Fixes: https://github.com/dart-lang/sdk/issues/40902
Change-Id: Ie2c58e5dab9902cbabd7c2ef9aae5b6c1773c7e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138663
Reviewed-by: Stephen Adams <sra@google.com>
2020-03-06 21:33:53 +00:00
Nate Bosch d3c0d59706 Disallow non-external generative JS constructors
Towards #40434
Towards #38875
Fixes #33834

- Add a shared error message for a non-external constructor.
- Check for non-external non-factory constructors constructors in the JS interop
  checks.
- Remove commented out code in Dart2JS that used to handle this check.
- Clean up skipped tests due to the missing static error. The status in
  `legacy_status_dart2js.csv` has no behavior impact but is removed for
  completeness.
- Add `external` to a few test cases.
- Remove unused dart2js error message.
- Add `annotating` to hardcoded spelling list.
- Ignore missing example for web specific error message.
- Switch some dart2js error expectations to GENERIC since the message is no
  longer defined with other dart2js errors.

Non-external synthetic constructors are ignored for now. An upcoming change will
automatically convert these to external.

Change-Id: I3b4a042392826c528689d81c4255f5369a0a7a90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138043
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-03-06 17:06:39 +00:00
Joshua Litt 55b4a240a4 [dart2js] Fix type promotion bug in static_type.dart.
Change-Id: I481020289df611ed09fe4093021e875e6c4f6871
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138333
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
2020-03-05 18:56:22 +00:00
Jens Johansen 6b4c4faf28 [CFE] Combine 'inputSummaries' and 'linkedDependencies'
The two fields are already treated the same, so having two is just
confusing.

Change-Id: I649db2a77bced62429dfd94ab300673cf886e367
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138291
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2020-03-05 12:38:34 +00:00
Mayank Patke 6f4876849b [dart2js] Add flag to enable printing '*' on legacy types.
Change-Id: Ie0b191e6da39fa6e48601caeeadc492699f07045
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138326
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2020-03-04 20:22:26 +00:00
Nicholas Shahan ab30452db5 [dartdevc] Add normalization of FutureOr types
These changes are also being back ported into the existing SDK
with minimal differences that will be gone when we unfork the
dart:_runtime library. In the current back port:
* FutureOr<Null>? is normalized to Future<Null>* instead of
  Future<Null>?.
* There is no runtime normalization of FutureOr<T?>?. This
  should have no effect since nullable types can not yet
  appear.

Fixes: #40611, #40720
Change-Id: Ib3ddffbf3778f0f571cf95f58b6142d3ee0bf59b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136160
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2020-03-03 16:59:56 +00:00
Mayank Patke 01064e7b6c [dart2js] Migrate DartTypes to use a wrapper representation for
nullability instead of a field/getter.

Change-Id: I2ca61d1b3a789f2ee4f34a99f66ae237bf9687ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/137283
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2020-02-27 09:08:47 +00:00
Johnni Winther 5829fc7829 [analyzer,cfe,dart2js] Add marker.options files to automate running id tests on all configurations
Change-Id: Ib5eb7f3967634721047f8dcc57b9e6c350b91a41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136226
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-02-21 08:34:26 +00:00
Dmitry Stefantsov b7aff59973 [cfe] Report errors on case expressions without primitive equality
Bug: http://dartbug.com/40425
Change-Id: Ied2da91cc32b84f6e64c0b76541e020d1a2447b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136227
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-02-20 13:39:09 +00:00
Johnni Winther 17d8b6b015 [cfe] Do not hoist this expressions
Change-Id: I3ffa0ad7c5c8e98a23c28281ac7840480fd366ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136223
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2020-02-19 11:31:59 +00:00
Johnni Winther a9485e8b14 [cfe] Encode getter/field invocation as .call on property get
Current semantics with respect to evaluation order is retained.

Change-Id: I6794c8a720237536696afab2fe056042f8464ec8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129702
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-02-17 13:52:45 +00:00