Commit Graph

1033 Commits

Author SHA1 Message Date
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
Ben Konyi 15b11b0183 [ VM / Service / Observatory ] The VM service now requires an authentication code by default.
Previously, a valid web socket connection would use the following URI:

`ws://127.0.0.1/ws`

Now, by default, the VM service requires a connection to be made with a
URI similar to the following:

`ws://127.0.0.1:8181/Ug_U0QVsqFs=/ws`

where `Ug_U0QVsqFs` is an authentication code generated and shared by the
service.

This behavior can be disabled with the `--disable-service-auth-codes`
flag.

Change-Id: I288aac58e3ba9d35dca8071f3f7e7a073896c271
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98433
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-04-09 22:57:29 +00:00
Dmitry Stefantsov 4a1b153fe1 [cfe] Enable type promotion in if-elements of literal collections
Closes #36396.

Bug: http://dartbug.com/36396
Change-Id: I223267cdee1aca38d69354e4f97df7dcc76e9553
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98461
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-04-02 13:33:19 +00:00
Aske Simon Christensen 0b57b67ecb [CFE] Move const set desugaring to constant evaluator.
To properly recognize control-flow constructs in sets, the constant
evaluator needs to get un-desugared set literals. This commit skips the
desugaring of const set literals if the constant evaluator is enabled
and adds a similar desugaring in the constant evaluator.

Doing the desugaring in the constant evaluator (which can be called
independently of Fasta) necessitates that dart:collection is indexed
in CoreTypes. We can remove this indexing again when the VM gains
native support for set constants.

Change-Id: Ibddafdcb182e4471012801745b51b529805b7b9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98008
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-03-28 15:00:58 +00:00
Jens Johansen a977273262 Re-allow the incremental compiler to load modules
This reverts commit 4d43abdd9f2f3026ccfabaa5495499b3ea220430 and adds a
fix.

Change-Id: Id80186aba02dd80171aac3843d63aa4f42c5ca17
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98017
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-03-28 12:53:01 +00:00
Jens Johansen 32a5fa0a83 Allow incremental compiler to just create outline
Change-Id: I996787821f01f21bb41be837e6d4c25a2114e017
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95384
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2019-03-28 08:44:56 +00:00
Jens Johansen 83e6e9f8e6 Allow the incremental compiler to load modules
Change-Id: I63bbbdfc94ac6ab0b7b8cce104fe38c4ba592f34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95382
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-28 08:39:41 +00:00
Vyacheslav Egorov c9ecdabe5d Revert "Combine override checks and override-based inference in one phase"
This reverts commit 9db4119b67.

Revert "Change default of 'keepFields' in constant transformation to true"

This reverts commit b1e14cbe5f.

Revert "[fasta] Don't create forwarding stub if there's already a member"

This reverts commit 51da94da76.

These commits are reverted to unblock rolls into Flutter.

b1e14cbe5f is reverted because it contained
changes that prevented clean revert of the other CLs.

Change-Id: I8d3c00f0c1b146f4debe7f1a1a7de75be154e265
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97802
Commit-Queue: Alexander Aprelev <aam@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
2019-03-25 19:40:26 +00:00
danrubel 466b6884dc add scanner/parser support for >>>=
Change-Id: I8bbf19e70f35aba600cb768fc3c7537f2aa604e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97602
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-22 23:38:51 +00:00
danrubel 485640df2e update scanner tests to use scanString
... rather than directly referencing the scanner classes

Change-Id: I4b42ef7318d66b412bb57c396c1b3980aad6c8fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-03-22 13:44:40 +00:00
Peter von der Ahé 9db4119b67 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>
2019-03-22 08:59:48 +00:00
danrubel 266d823f5c remove unused scanner error list
Change-Id: I3dd5d66dcf05ae2bf9f2087724801cae4f3b6036
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97542
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-03-21 22:33:02 +00:00
danrubel 1d7dcfff97 Cleanup scanner tests
Change-Id: I9d579b136c6ff8f83cea1715f3e698eeca8692f6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97446
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-03-21 15:01:18 +00:00
Jens Johansen eb344e2072 Keep live libraries and uri to source in sync
This CL removes the sources from uriToSource for libraries
the incremental compiler doesn't keep around.

This includes:
* Explicitly invalidated libraries, also if in a package.
* Transitively invalidated libraries, also if in a package.
* Libraries that are now no longer referenced in the resulting whole
  program, unless it's in a package.
* Libraries from packages that are implicitly invalidated by an
  updated .packages file (e.g. if the .packages file no longer
  reference it or reference a new version of it).

This does *NOT* include:
* Libraries from packages that are not invalidated and that are still
  mentioned in .packages, even if the actual libraries are no longer
  referenced in the resulting whole program. The reason is that these
  libraries are kept around in the incremental compiler.

Bug: 36197
Change-Id: I0ed41567ab54828585326ffd4dcb3722980bf874
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97201
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-03-21 10:08:30 +00:00
Jens Johansen e9e0daee5c Add importUri and fileUri to Source.
This will enable the VM to map URIs to package-URIs to solve problems
such as https://github.com/dart-lang/sdk/issues/35859

Change-Id: I15520325a5b81a99a7e3f56c2e35fd775d9da946
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96905
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2019-03-20 08:44:33 +00:00
Kevin Millikin 4daa9b94ea [cfe] Compile if elements in lists and sets
If elements are compiled to if statements.  The type inference rules
including insertion of runtime checks are not yet implemented.

Change-Id: Iaa7ab709a7acacf952887b17ac1081a9fecd7cef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97200
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-03-20 08:43:03 +00:00
Peter von der Ahé 479483ed13 Compute isGenericCovariantImpl in outline phase
Change-Id: I7ef6a39f66383a53c090cf5c47861cba84903271
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97084
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-03-20 06:52:13 +00:00
Dan Rubel 91b62553ce Make scanner reportErrors field final
Address comments in https://dart-review.googlesource.com/c/sdk/+/80509

Change-Id: Ifc19f283513f201c6d0935e4b20169a528feab20
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97047
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-03-18 17:24:06 +00:00
danrubel b2cb604b9d improve literal list/map/set control flow recovery
* new ExpectedElseOrComma parser error code
* update recovery tests to enable control flow recovery
* rework test to call parser.parseLiteralListSuffix rather than parser.parseLiteralListSuffix

Fix https://github.com/dart-lang/sdk/issues/36141

Change-Id: I5bdee19eb3828de8fbdc514a3820afaa1309df99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95980
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-03-08 17:31:33 +00:00
Daco Harkes 12fcb9136c [cfe] Make resolveInputUri available for pkg/vm
use function suggested by ahe


[gardening] fix incremental compiler file encoding on Windows

Change-Id: I50fd02389afabe4903d9d88d009d58330515f825
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95642
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2019-03-06 15:31:09 +00:00
Aske Simon Christensen 822ebdd1e0 [fasta] Wrap non-const variable accesses inside const expressions.
Change-Id: I8761031da2419a47a947a02721d4ffd86ac7c531
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/93504
Reviewed-by: Peter von der Ahé <ahe@google.com>
2019-03-05 09:23:57 +00:00
Jens Johansen 1a88421d39 Allow to change .package uri in incremental compiler
Change-Id: Ic36fd000e2a3ea2870460b68821c7404f6e62a1a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95140
Reviewed-by: Peter von der Ahé <ahe@google.com>
2019-03-05 07:39:31 +00:00