Commit Graph

2004 Commits

Author SHA1 Message Date
Johnni Winther 0177076f2f [cfe] Merge KernelBodyBuilder into BodyBuilder
Change-Id: Ica7d23a54659606ef8d01c647dc8d89f10796bb3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109712
Reviewed-by: Dan Rubel <danrubel@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-07-23 08:02:18 +00:00
Johnni Winther b52328e528 [cfe] Remove unneeded indirect generator construction through Forest
Change-Id: Ic535bfe84395608c9b0764edf8646fd2606429b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109708
Reviewed-by: Dan Rubel <danrubel@google.com>
2019-07-22 16:00:28 +00:00
Johnni Winther 2a199f3993 [cfe] Merge KernelExpressionGenerator with ExpressionGenerator
We no longer need the distinction between *Generator and Kernel*Generator
so the Kernel*Generator classes are now merge into the *Generator classes.

Change-Id: I9f9650fc4ab88a0952b8d2bd346e1d416d68eac6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109707
Reviewed-by: Dan Rubel <danrubel@google.com>
2019-07-22 16:00:28 +00:00
Johnni Winther 948b60f8dc [cfe] Add test for extension member parameters
Change-Id: I6ceb66bbef561b0c86e6f529e9d90a35dd82f628
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109705
Reviewed-by: Dan Rubel <danrubel@google.com>
2019-07-22 16:00:28 +00:00
Johnni Winther 11755e537c [cfe] Add tests for extension members
+ Avoid creating default constructors.

Change-Id: Ie0ed967d9be4cf31a2eb6991767887de1f88149a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109702
Reviewed-by: Dan Rubel <danrubel@google.com>
2019-07-22 16:00:28 +00:00
Johnni Winther 610183d5f9 [cfe] Rename operator[] to getLocalMember on Library/ClassBuilder
Change-Id: I8d03cf939e15de53b3768ee946815cf31e3a1124
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109700
Reviewed-by: Dan Rubel <danrubel@google.com>
2019-07-22 16:00:28 +00:00
Johnni Winther b3b6533c3d [cfe] Create ClassBuilder for extension declarations
Change-Id: Ic372b89588ed9ec3afc43f7db7e3d38a81846ad5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109264
Reviewed-by: Dan Rubel <danrubel@google.com>
2019-07-22 16:00:28 +00:00
Johnni Winther dfa12c7456 [cfe+dart2js] Support library and error ids in annotated tests
Change-Id: Ife808a7d4aa1d4cf459ac3c04ee6ff02042442d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108810
Reviewed-by: Stephen Adams <sra@google.com>
2019-07-16 14:32:37 +00:00
Johnni Winther db7ab14167 [cfe] Handle invariance in non-covariant checks
To insert covariant checks, CFE was searching for covariance in
contravariant positions and _not_ for non-covariant
(=contravariant+invariant) positions of type parameters. This
let to the omission of needed checks when type parameteres were
used in invariant positions (in function type parameter bounds).

Closes #37476

Change-Id: Icb4a827e75aee1a679ef7175d36904bbfbf6aa0a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108815
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-07-15 07:34:15 +00:00
Jens Johansen 28f95fcd24 [cfe] Track dependencies in the incremental compiler
The objective of this CL is to allow the incremental compiler to track
which dill input libraries it actually used (in order to - in a modular
context - be able to ignore changes to dependencies we didn't really
use).

This is done by:
* Making the dill library builder lazy (and mark if it has been used).
* Making kernels class hierarchy record which classes it has been
  asked questions about.
* Add special handling to redirecting factory constructors as they
  bypass the fasta-builders and directly use the kernel ast.

Please note that:
* This has to be enabled, but kernels class hierarchy always records
  which classes it was asked about (even if disabled,
  or not running though the incremental compiler).
  There might potentially be some overhead to this (though setting
  a bool to true is probably comparably cheap - we did just do a
  map lookup).
* This was designed to be used together with modules
  (e.g. setModulesToLoadOnNextComputeDelta) - as used via for instance
  api_unstable/bazel_worker.dart. It might not function the way you'd
  expect in other circumstances.
* The incremental compiler (potentially) gives you the full kernel tree
  despite not having marked all of those libraries as 'used'. If a
  client use such libraries it is the clients responsibility to take
  that into account when answering any questions about this
  libraries/dill files was used.
* This feature works on the library level. In practice it is most likely
  needed at the dill-filename level. A translation from library to
  dill-filename is up to the client.
* This is a new feature, and we cannot promise that 100% of actually
  used libraries are marked. If you find used but un-marked libraries
  please report a bug.

Change-Id: I01d7ff95b9baac9550b77d8e09ea772d43173641
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107280
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-07-12 10:40:55 +00:00
Johnni Winther 4686393ccb [cfe] Add test for the id testing system.
Change-Id: Ie4f3042d4fd0f78e55cd672947fde3fab7950fb3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108802
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-07-12 07:54:28 +00:00
Vyacheslav Egorov 09b93b7ea0 [fasta] Tweak fasta unit tests setup in anticipation of constant update 2018
- Pass empty environment defines into CompilerOptions - to ensure that
there are no unevaluated constants in the output. VM does not expect
those.
- Include constant table when comparing expectations

Change-Id: I276e8bf8ce1f4f39c63265e4ae2650953649e41f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108800
Auto-Submit: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-07-11 19:59:59 +00:00
Johnni Winther f40aac1b75 [cfe] Move general testcases into general/ subfolder
Change-Id: I9bc98033babcf887cca2267606cfe9fadd527b5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108605
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-07-11 14:10:17 +00:00
Samir Jindel 24725a8559 [cfe] Fix handling of private names in expression evaluation.
Issue: dartbug.com/35505

Change-Id: Ia1d211247852ef116139f8b509c21410fc8629d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108606
Commit-Queue: Samir Jindel <sjindel@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-07-11 11:40:03 +00:00
Johnni Winther bae176b073 [cfe+dart2js] Add shared constant evaluation test.
Change-Id: I11fa0f576c5d177d85d3c17cfa075b7dd91326b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108604
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-07-11 10:49:23 +00:00
Johnni Winther 910064b416 [cfe] Prepare compiler_common for use in annotated code tests
Change-Id: I99b52ad25fdbde7b2211f29795cfaad32b90c09f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108405
Reviewed-by: Jens Johansen <jensj@google.com>
2019-07-11 10:49:23 +00:00
Vyacheslav Egorov a86db84e0a [fasta] Preserve information about const constructors in outline.
- for classes with const constructors parse field initializers;
- for const constructions parse initializer lists and default parameter
values;

Fixes issue https://github.com/dart-lang/sdk/issues/37357
Fixes issue https://github.com/dart-lang/sdk/issues/36635

Change-Id: Iff0e47f8bd2925cee9f42a2b309de4de84e99cad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108279
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-07-09 14:02:01 +00:00
Johnni Winther b8a8cfdcda [cfe] Use InvalidExpression for await on non-async context.
CFE failed to replace an invalid AwaitExpression in a non-async context
with an InvalidExpression. The lead to untransformed (and thus unexpected)
await expressions crashing the hot reload.

Closes #37108

Change-Id: I4457925b20749d231cbf9dac80203ee9b381a312
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107501
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-07-04 08:30:45 +00:00
Dmitry Stefantsov ddc85dd83c [fasta][nnbd] Create DartTypes with nullability from parsed types
Parsed types are auxiliary representation of types from the type test
framework in CFE.

Change-Id: Icd7f1aa4d0711d4a83813a8584ac8d1a5826f6c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105422
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-06-27 08:34:08 +00:00
Johnni Winther 133a577867 [cfe] Add test for issue 37108
Change-Id: Ib027812341cec8b2ed7b69709432a3940f470848
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107287
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2019-06-27 08:17:49 +00:00
Dmitry Stefantsov bce89db6a5 Reland "Combine override checks and override-based inference in one phase"
Original CL description:

> Combine override checks and override-based inference in one phase
>
> Change-Id: I2760f72f4eaa44bd192747179e843f017db30874
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97301
> Commit-Queue: Peter von der Ahé <ahe@google.com>
> Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>

Change-Id: I8408b35819a89336d10bb11e36c7b1bee707994d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100580
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-06-25 08:02:46 +00:00
Jens Johansen 153683b1be [cfe] Get rid of 'strong' in incremental compiler tests
Fixes #37302.

Change-Id: Id8e83dfa86dcd188e5541e0465fab08a51e39882
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106900
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-06-21 09:53:36 +00:00
Kevin Millikin 5ade5079b1 [cfe] Remove the set-literals experimental flag
This flag has been enabled since Dart 2.2.0.

Change-Id: I18e77e1659d4be1aaf06e1c2a6262ae9e8c7f922
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104760
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2019-06-19 15:06:05 +00:00
Jens Johansen b9e005f4b9 [fasta] messages_test automatically wraps examples in part
Update the message_test to automatically create an example that wrappes
all already defined examples in a part.
For instance, if the example is

main.dart: main() { print("hello world"); }

create an additional example that is basically

main_wrapped.dart: part 'main.dart';
main.dart: part of 'main_wrapped.dart'; main() { print("hello world"); }
(as well as some additional comments to push any actual positions in the
main file ot of scope for valid positions in the wrapper file.

This doesn't work for everything, e.g. if the original main imports or
exports anything, the new test will fail. That's okay, the status file
has been updated accordingly.

The reason for adding it is that we currently have some bugs that causes
us to crash in situations like this, i.e. situations where a message is
coming from a position in a part where the same position doesn't exist
in the non-part file.
The status file has been updated for that too, although not in sorted order.

Change-Id: Ib67f85fca5e81e0b9e93cf2d79ab50c38cae4936
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106082
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-06-18 10:01:58 +00:00
danrubel 6bd64ff8b2 cleanup StringScanner references
Change-Id: Ic75305c7a76860c5b96032d4f8c8fff695006f22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106004
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-06-14 13:39:47 +00:00
Sigmund Cherem 7c7160f022 Move isRedirectingFactory to CFE and add unit test for it.
Eventually it should be handled by Procedure.isRedirectingFactoryConstructor, but that is
currently broken for patch files.

It appears the VM has no patches of that kind, but dart2js does.

Change-Id: I0b64379f16089ad0d98ecd4df1ed9282ed6bc0e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98523
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-06-11 22:00:10 +00:00
Jens Johansen 5eff2a0374 Split CanonicalNameError, no warning if CanonicalNameSdkError
Prior to this CL, we would issue a warning whenever a CanonicalNameError
was encountered.
This is in principal a good thing, but because we currently have no way
to detect if the sdk we get is the one we expect
(by any other measure than when it issues a CanonicalNameError) we often
issue these warnings for no "real reason" whenever, for instance,
the flutter sdk changes.

This CL splits the CanonicalNameError in two such that errors with
references to the sdk ("dart:" libraries) issue CanonicalNameSdkError
instead, an we then handle that differently. Namely we silently ignore
the error (i.e. don't issue a warning) and just don't initialize from
dill.

This should remedy the situation and be strictly better than to always
swallow CanonicalNameErrors.

Bug: 36032
Change-Id: Idbae0b5ee5b9843a5dbeb49b3c65ae25f5962e36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/105240
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-06-06 10:10:46 +00:00
Vijay Menon 3b5a187726 [dartdevc] move ddc internal libraries under sdk
Note, this has the effect of including all DDC Dart sources with the
shipped SDK: we ship everything under sdk/lib.

This should enable https://github.com/dart-lang/build/issues/2262

Change-Id: If66bc7c620034e7f2acf7d2c3e9524a408417681
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104383
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2019-06-04 13:47:29 +00:00
Jens Johansen eb131c3d68 [kernel worker] Don't do unnecessary computeCanonicalNames
This was a left-over from when unbinding, and should no longer be needed.
An internal benchmark of lots of outline calculations in worker mode with
reuse and the incremental compiler goes from ~248 seconds to ~215 seconds.

Change-Id: Iedb6a3fb11504610c061503efb741e35919f0d32
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103629
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-05-27 10:46:18 +00:00
Sam Rawlins b22cd05c51 Reland fix for #28233: add hint for missing returns to function expressions
The bulk of this change is actually correcting missing returns in the Dart SDK.

Bug: https://github.com/dart-lang/sdk/issues/28233
Change-Id: I52bcbc6c6f4a129d3fc22003f4448a7c3d4487ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100301
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-05-22 18:12:30 +00:00
danrubel 7983fac33b add "extension" built-in keyword for extension methods
Change-Id: I6529fff31f681fd24c22f8c7579d2a35097f4d07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102940
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-05-17 22:24:15 +00:00
danrubel c33f1a079e revise scanner api so that error tokens are always prepended
This CL revises the scanner API so that tokens are always prepended
to the beginning of the token stream. This allows the parser handling
of error tokens to be simplified. Any clients using the scanner directly
rather than through the scanner API should call scannerRecovery
if the scanner has detected errors in the content.

Change-Id: I32510da10205bd964f80898a238489d1508733e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102680
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-05-17 20:59:51 +00:00
Dan Rubel bc34b65a13 cleanup tests
* fix TokenType.IDENTIFIER name
* fix utf8 scanner tests to actually test the utf8 scanner

Change-Id: Ib87d322cf30402f9f95bae0e66a07e13192ed368
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102404
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-05-14 19:30:23 +00:00
danrubel a83fbc5edb remove unused enable lazyAssignmentOperators flag
Change-Id: I4112fe4ad5a08916d124216753a995d607a9892d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101485
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-05-07 13:06:39 +00:00
danrubel 7ec4621108 cleanup scanner configuration flags
* rename enableGtGtGt to enableTripleShift
* remove unused enableGtGtGtEq field

Change-Id: I0fa881c45619067ec3a292acbff984db555aa43e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/101362
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-05-04 17:14:46 +00:00
danrubel a62ab22c48 remove languageVersionField and update scanner tests
Change-Id: I5fbb25d5f743fc00fe188da02390a67ded8b1c69
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-05-01 18:01:19 +00:00
Dan Rubel b9c87ebbda Add scanner languageVersionChanged callback
Change-Id: I64835e303efd83ac1f7cb0015407be8c196a5249
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100925
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-05-01 13:07:15 +00:00
Dan Rubel a20e7eee15 update scanner config based on language comment
... and add ScannerConfiguration.nonNullable const

Change-Id: I6917c535e40e94cb591f2c4f5582dc0127be17f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100884
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-30 21:28:02 +00:00
Dan Rubel aebc542801 update scanner to process language version comment
This CL is the next step in moving the language version comment
detecting from parser to scanner.

* update the scanner to produce a new LanguageVersionToken
* expose the languageVersion in the scanner result
* include languageVersion as a comment if includeComments == true
* rename languageVersionToken to languageVersion

Change-Id: Ie6be6e95e2fa6b7d3b9123bea556bcd5e89888f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-30 18:36:31 +00:00
Dan Rubel 4d7217016e encapsulate scanner configuration in ScannerConfiguration
... and update TypeInfoTest to use ScannerConfiguration

Change-Id: I637d6fbeecd0b6d16c37e57cfd8ba9fc1fba494a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100791
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-30 14:00:28 +00:00
Jens Johansen 43937aa9ca Don't let expression compilation bleed into real library
If an expression compilation issues problems of any sort, they are saved
in the target-libraries problemsAsJson field. That's not ideal,
as it means that they can be re-issued later, as well as possibly being
serialized into the dill file.

This CL resets the problemsAsJson field of the real library,
thus fixing the issue.

Change-Id: I765c2cc50059c6bcda6a56bb749869dd4b181876
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96800
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-04-30 11:38:48 +00:00
Jens Johansen ed8e4255a4 Proposed fix to #36644
TL;DR: Unbind canonical names doesn't do what you think it does and
probably shouldn't (ever) be used. This CL stops using it in a few places.

Longer version:

When loading a dill file it:
- First loads the table of canonical names. These have no references yet.
- When a canonical name is asked for its reference it creates one if it
  doesn't yet have one.
- When loading, for instance, a library, it asks for the reference.

When unbinding a canonical name:
- It removes itself (the canonical name) from the reference
- It removes the reference in itself
- Note: Whatever has a pointer to the reference keeps it, and the
  reference points to whatever node it already pointed to.

This also means, that if we have a dill file that's split in two and:
- Load #1
- Load #2
that works fine, but if we
- Load #1
- Unbind canonical names
- Binds canonical names
- Load #2
stuff is not bound correctly (and an error is thrown).

And - the cause of this bug:
- Load #1
- Load #2
everything is fine
- Unbind canonical names
- Binds canonical names
- Load #2'
stuff is not bound correctly --- references points to stuff loaded as #2,
not as #2'. On top of being weird, wrong and confusing it also caused wrong
things to be but into the class hierarchy which ultimatly caused the crash.

This CL fixes it by not calling unbind and force loading of dill files
(at specific call sites) to create new libraries
(and in the process overwriting references ".node").

Revert "[dartdevc] Retry ddc incremental compile on crash"

This reverts commit ecdbdf00b8.

Revert "[kernel_worker] retry on failure"

This reverts commit 43eebea5a3.

Fixes #36644

Bug: #36644
Change-Id: Id8f548179e6a409b01f2ebfa3219f94cb64b1c05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100380
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-04-26 07:18:28 +00:00
Dan Rubel 08832508ec Forward "late" modifier to parser listeners
... and update parser tests to use preNonNullable feature set
to address comments in https://dart-review.googlesource.com/c/sdk/+/99963

Change-Id: I3a3293d65805807b7b95e887f829f3f0080ae3b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99964
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-22 17:20:10 +00:00
Dan Rubel fd48001ace Put NNBD modifiers behind a flag
Fix https://github.com/dart-lang/sdk/issues/36691

Change-Id: I48aa72eb6a4aa63d072089baaf99d249763095fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99963
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-22 15:31:09 +00:00
danrubel a2e06eafff allow built-in keywords as identifier in for-in loop
Fix https://github.com/dart-lang/sdk/issues/36678

Change-Id: I2af3a21e96c5654b12c199fc71d87f088e9d739d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99904
Auto-Submit: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-19 19:07:11 +00:00
danrubel f3703c1bce change "late" from built-in to keyword
Change-Id: I851bc1a6db305c6fa7f5be001af1632d6d69aa2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99739
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-18 16:42:28 +00:00
Dan Rubel ca28e2c8ce forward "required" modifier to parser listeners
... and have each report an error by default

Change-Id: If818a7bb207becbed95a97890632a1803917d285
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99720
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-17 21:19:51 +00:00
Dan Rubel dd3530450d make "late" and "required" builtin keywords
Change-Id: Ia352ec979bc04edcb1e9ee9733a3f86d8e5ce1a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99644
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-17 18:51:01 +00:00
Dan Rubel ebdefa3f5f add new "late" and "required" modifiers
Change-Id: Iec0acac1bb4280f31bd32297543eceb54f87f1ab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99641
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-04-17 15:01:36 +00:00
Kevin Millikin e42a8032fb [cfe] Remove uninferred initializers from outlines
When performing top-level type inference based on overrides for fields
that have initializers, we never perform type inference for the
initializers.  Since type inference is the thing that rewrites shadow
AST nodes with their Kernel translation, we are left with
untransformed shadow nodes that cannot be serialized.

Instead, remove these initializers.  Fixes
https://github.com/dart-lang/sdk/issues/36498

Change-Id: I044fadd897e9f2d0e37f5ce0e5adaadb0e42a992
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99120
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-04-15 16:17:35 +00:00