Commit Graph

2325 Commits

Author SHA1 Message Date
Dmitry Stefantsov 94b3a3f2ac [cfe] Don't reuse type parameters of FunctionNode in its functionType
Closes #37536.

Bug: http://dartbug.com/37536.
Change-Id: I7e5d2fc59a0cf53e67c43989cf806ca7dbcc307e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115368
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-12 11:12:52 +00:00
Konstantin Shcheglov 76e6325ae0 Remove unused methods of AnalysisContext.
Change-Id: Ie7f81ac09b51f7a4e70a32f962e6e15c81245820
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116724
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-11 17:09:47 +00:00
Mark Zhou fb446e5768 [dartdevc] Properly emitting JS interop anonymous classes
Fixes #38246

Change-Id: Ic82f663a886acab227d79a14959596251a85c084
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116040
Auto-Submit: Mark Zhou <markzipan@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2019-09-08 20:23:16 +00:00
Konstantin Shcheglov 46d7064108 Stop using resolutionMap in DDC.
Change-Id: Iab365fad9ab9a87a20bc684ea5e0ea866f09b7d8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114584
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-09-06 17:00:24 +00:00
Aske Simon Christensen 0242f0c724 [kernel] FileUriExpression node
Change-Id: I8ea3cbeb17d555cebd6d693fbf2bb3148e9f2db3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114321
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-06 12:22:09 +00:00
Vijay Menon ec6c6542a2 [dartdevc] escape all identifiers
Change-Id: I67b63ff55735989e5efb073442212c2029457632
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115011
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-05 14:56:08 +00:00
Johnni Winther 4122034ada [kernel] Make accept methods generic
Change-Id: I50f3c2b5c09a1266811e1fe5a5b2042c77584e43
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114514
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-09-05 07:46:10 +00:00
Jens Johansen 9f57cf71d7 Add a blacklist to spelling tests; spell-check all packages and sdk with blacklist
Change-Id: I5bf3d5784d2ba48568a2699bb09ae39a85be17c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115214
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-09-03 12:39:24 +00:00
Jens Johansen 8a670d773b [CFE/bazel/DDC] Match 'tags' to reuse compiler state
This CL introduces 'tags' as a way to distinguish different setups and
be able to throw away previous state when it cannot be used.
These tags are - for now - basically filled up with the roots used for
the multi root filesystem, the idea being, that if they have changed we
cannot reuse the old state.

Change-Id: I19e069513ce3836f5bc6abf047e4359836fc7e09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114945
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-30 12:06:41 +00:00
Vijay Menon d2ad7d1f91 [dartdevc] support compile-only/run-only on ddb tool
Note, there is already an option to specify a binary (-b).

Change-Id: I72bf8734e1919f3a6725a830aa96a54a5d0a6053
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114589
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
2019-08-27 14:23:55 +00:00
Johnni Winther 7dbf8eed3b [cfe] Support sharding in pkg/testing tests
Splits strong_test into 4 shards. This test took 4+ minutes locally with
the fast_strong_test and analyze_test ticking in at ~1:45. This change
makes local testing of frontend unittests take 2 instead of 4 minutes in
total.

Change-Id: Id6015de86d547b209a699b1e5196b3edad1e6977
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114501
Reviewed-by: Jens Johansen <jensj@google.com>
2019-08-27 09:56:53 +00:00
Aske Simon Christensen 202340f550 Reland "[dartdevc] Remove explicit calls of the constant evaluator in DDC."
Relands commit fb8df61606.

No changes. The call in Flutter engine that broke no longer exists, since
https://github.com/flutter/engine/pull/10814

Change-Id: I3f4824da512ff36b3757b05a3f3f5773e3b0135a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113980
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-08-27 09:26:43 +00:00
Jens Johansen 3f0f66cabc [DDC,bazel] Allow no digest when not in worker mode
Change-Id: Id4d2b385bc00e7dc4e20aefea9ba38e4839bbaca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114065
Reviewed-by: David Morgan <davidmorgan@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-22 11:15:19 +00:00
Konstantin Shcheglov a17959b5a0 Log the context in which analysis work is done.
R=brianwilkerson@google.com

Change-Id: Idb8c1296917053e802442ac87e8aa9e2fae0dee7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114040
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-08-21 21:33:24 +00:00
Ben Konyi 9f13d07670 Revert "[dartdevc] Remove explicit calls of the constant evaluator in DDC."
This reverts commit fb8df61606.

Reason for revert: Breaking Dart SDK -> Flutter engine build.

Original change's description:
> [dartdevc] Remove explicit calls of the constant evaluator in DDC.
> 
> These are unnecessary now that constant evaluation is performed as
> part of the front-end transformations.
> 
> Change-Id: I5de9bbf7ebab09528431f764895eb3e3b1b45379
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111430
> Commit-Queue: Aske Simon Christensen <askesc@google.com>
> Reviewed-by: Vijay Menon <vsm@google.com>

TBR=vsm@google.com,askesc@google.com

Change-Id: Ife7c6f207c38d86e390c98de8af81f9cc5b863c4
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113746
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2019-08-19 19:41:15 +00:00
Aske Simon Christensen fb8df61606 [dartdevc] Remove explicit calls of the constant evaluator in DDC.
These are unnecessary now that constant evaluation is performed as
part of the front-end transformations.

Change-Id: I5de9bbf7ebab09528431f764895eb3e3b1b45379
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111430
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2019-08-19 08:29:45 +00:00
Vijay Menon a981bfe47b [dartdevc] fix virtual method computation due to nsm
Fixes https://github.com/dart-lang/sdk/issues/37855

Change-Id: I468d66fb8e88fa92a92eb99716a1a2d2d00f54ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113124
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-08-14 22:07:41 +00:00
Aske Simon Christensen 85f7f4c453 [dartdevc] Workaround for constants with overridden fields
Workaround for https://github.com/dart-lang/sdk/issues/37839

This reverses the order of fields emitted in instance constants, making
field accesses to overridden fields hit the subclass field rather than
the superclass field.

This works as long as overridden fields in constants are not accessed
through super.

Change-Id: I8967af3265606e8a4f007b3c52957335ee2d1789
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113060
Auto-Submit: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2019-08-14 17:24:09 +00:00
Mark Zhou 88c43bbcc4 [dartdevc] Properly handling external constant tearoffs
Fixes #37825
Fixes #37822

Change-Id: I066a542edbc227fa8f87df41c734305543d26a27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112756
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2019-08-13 17:35:34 +00:00
Jens Johansen e47f354919 Allow ddc in kernel mode to output used inputs
This change basically consists of these steps:
* Enable the incremental compiler to trace used inputs.
* Translate used libraries into used dill inputs.
* Output the list of used dills.

Bug: #37788
Change-Id: Icbc3942226f50ba733196586fac8715e21d6ed34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112385
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2019-08-13 08:37:29 +00:00
Vijay Menon ab55923918 [dartdevc] ddb fix for d8
Change-Id: I3d50e0572f269d36e50d8236507090d0e9a5531a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112560
Auto-Submit: Vijay Menon <vsm@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2019-08-09 16:48:24 +00:00
Konstantin Shcheglov 804a338b5e Change recordScopeDependencies() to return true on type parameter of strict FunctionType.
Change-Id: I92e183baca876f11cf3edd4cb4f8e2059a6ec936
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112423
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-08-09 15:06:22 +00:00
Johnni Winther 19654f30d0 [cfe+vm+ddc] Return ClassHierarchy and CoreTypes together with Component
Users of the CFE often need the ClassHierarchy and may CoreTypes after
invoking the CFE. This CL extends the result of `kernelForProgram` and
`kernelForComponent` to a `CompilerResult` that includes these objects.

Change-Id: I08491198fe876b6514e49993ad794388d6662c9c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112259
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-08-09 13:02:12 +00:00
Johnni Winther 3312fe3d26 [cfe] Fully support expired flags in CFE
This ensures that we can prohibit the disabling of an enabled and
expired flag while still support the use of enum value in
implementation code.

Change-Id: Ib92c506365bb61853d6ff791461c5065acabcd4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99173
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-08-09 09:23:01 +00:00
Vijay Menon 7e486efea2 [dartdevc] fix lib name for ddb kernel
This appears related to recent kernel lib name changes.  I hit this if I run:
> ddb -k tests/language_2/some_test.dart

Looks like the lib name is now "tests__language_2__some_test".

Change-Id: I20a19c5542276df7321b0b4ea6284142fbcfd5d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112360
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2019-08-08 17:03:51 +00:00
Aske Simon Christensen 5121a2e831 [cfe] Read product mode directly from environment in async transform.
When we perform constant evaluation in the CFE, the async transform
runs after constant evaluation. Thus, it can no longer use const
bool.fromEnvironment("dart.vm.product") to query whether the VM is
in product mode.

Instead, it can read the product mode define directly from the
environment defines given to the CFE and generate different code
depending on the value.

Change-Id: I2aabc4a84b50a940d35d5664ff4ebdf0680ed5c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111645
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-07 08:28:25 +00:00
Konstantin Shcheglov a05ef7c0cc Store inferred type arguments for tear-off(s).
This change passes pre-submit run over google3.
https://test.corp.google.com/ui#id=OCL:260993915:BASE:261043007:1564632838252:e80ace42

Change-Id: Ibef739f241fdb60a574da971961b1abe6abde9c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111402
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-08-01 18:25:39 +00:00
Mark Zhou dbabe4dea6 [dartdevc] Imports/Exports are now aliased relative to the library root to disambiguate cross-module name conflicts.
Note: Changes in this CL will require some google3 changes (mostly in code related to test entrypoints).

We encountered an issue whereby cross-module programs importing files
with the same name (but separate identities/locations) were being
overridden throughout all of DDK's module builders. For example, a
module importing "x.dart" and "y/x.dart" would export {x: x, x: x$} -
the latter renamed module shadowing the first. DDC handles this by
prepending a formatted module-root-relative identifier string, so
"y/x.dart" becomes something like y__x, and the export becomes {x: x,
y__x: y__x}. However, this results in some code bloat, especially as
paths become deeply nested. More importantly, the $-renaming scheme is
not consistent across modules. Were we to export x$ instead of x, how
would the importing library know whether x or x$ referred to "y/x.dart"?

To have the best of both worlds, we're introducing the concept of a
module alias that exists at the boundary of module imports and exports.
We use this module-root-relative alias to differentiate modules with the
same name but use the shorter $-renaming scheme throughout the generated
code. Relevant points:

1) jsLibraryAlias has been introduced alongside jsLibraryName.
jsLibraryName no longer must be unique - that property having been
transferred to the alias. DDK no longer just outputs pathSegments.last,
instead adopting DDC's scheme of "creating" a special alias from the
module root. jsLibraryName's temporary IDs are renamed using the
existing DDK scheme.

2) Libraries are now associated with NameSpecifiers. The name and asName
fields represent jsName and jsAlias, respectively, for exports
(vice-versa for imports).

3) The test frameworks have been taking advantage of DDK's previous
naming scheme (throwing way the module root, keeping just the name). A
common pattern is to expect DDK's output symbol to be "someexport", then
forcing DDC's output (normally "some__path__someexport") to resemble
that with the deprecated "library-root" flag set to the path of the
output JS file. We resolve this by updating the scaffolding code to look
for the module-root-relative (long) name, which requires a bunch of
path-to-identifier subsitution logic. The "absoluteRoot" bool in the
sourcemap test runner is a way to reenable this DDC-specific deprecated
behavior. The test runner now requires this alias in the html generator.

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

Change-Id: Iaaa82f3350d424af195967b55c87cb32b30a3d85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108942
Reviewed-by: Nate Bosch <nbosch@google.com>
Reviewed-by: Bob Nystrom <rnystrom@google.com>
2019-08-01 17:24:59 +00:00
Nicholas Shahan 08553214ad [dartdevc] Fix optional and named params being detected as not nullable
When compiling the SDK, nullable inference was marking optional and named
parameters as not nullable when they had default values that are not nullable.

This is wrong because the caller could pass null at the call site if they want.

Fixes: #37700
Change-Id: I9d2baae9e4491587b25dcacda4b3df151b9a2754
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111602
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-08-01 15:24:19 +00:00
Vijay Menon 2390a25341 [dartdevc] emit base types (void/dynamic) eagerly
This is a somewhat roundabout way to prevent a hot restart from redefining these types.
This fixes the issues arising: https://github.com/dart-lang/sdk/issues/37259.
Should more cleanly separate fields reset on a hot restart from ones preserved.

Change-Id: Id0c45cbeed67b574c3259e1f87a405137ae93575
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111315
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-07-31 16:04:34 +00:00
Dmitry Stefantsov 20e4c74f7f [fasta][nnbd] Print NNBD type modifiers in Kernel's text representation
Change-Id: I48c43858094e2b7264a15be05238bfc3dadd5ecb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108264
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-07-31 08:26:14 +00:00
Konstantin Shcheglov 1a0fe21fb2 Add ExecutableElement(s) based InheritanceManager3, and switch analyzer to it.
This reverts commit b8614ca613.

Change-Id: Ic31ee323b21311d8a89f50bcb533316eb55f75e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110941
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-07-29 19:02:24 +00:00
Paul Berry b8614ca613 Revert InheritanceManager3 changes.
These changes were inadvertenly rolled out in a way that breaks
clients, so we need to stage them out more gradually.  See discussion
at
https://dart-review.googlesource.com/c/sdk/+/110552/2/pkg/analyzer/lib/src/generated/resolver.dart#3768

This reverts commit 5b5ddeda92.
This reverts commit e76879acc4.
This reverts commit 27bec56744.

Change-Id: Ic80a577b1cdc4a6c89ca06afceae01af6621d3e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110841
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-07-28 13:54:09 +00:00
Nicholas Shahan 42769d3391 [dartdevc] Update error messages to use new label in github url
area-dev-compiler --> web-dev-compiler

Fixes: #37615
Change-Id: Iab0bb57ed0114bf6918d16d13bc6744bbfde1cc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110345
Auto-Submit: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-07-26 21:36:56 +00:00
Nicholas Shahan dceeadae53 [dartdevc] Fix unevaluated constants when building SDK with kernel
Passing an empty map signals that the environment is empty and constants should
be evaluated.

Change-Id: I5611a2be81786aa7d42e24022198d52c60558cc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110748
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-07-26 20:51:21 +00:00
Johnni Winther 78224f9b0c [cfe+analyzer+dart2js] Support union markers in id-testing
Supports markers like `cfe|analyzer.` to annotated that the expected
result is for both `cfe` and `analyzer`.

Change-Id: Ie69809db5f63a9ee9b87ff1513b819fe85ce0bce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110500
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-07-26 17:18:01 +00:00
Johnni Winther bcfe26cba0 [cfe] Fail early on unsupported evaluated constants
The many different entrypoints to the CFE have repeatedly shown problems
with targets that do not support unevaluated constants being used
without providing an environment.

Making the targets opt-in to supporting unevaluated constants will
give the users of CFE early notice that CFE is used inconsistently
(as opposed to the backends failing when they happen to see an
UnevaluatedConstant node that they don't support).

Change-Id: I98c80df3a551823598e413e2895f5649f22f7c22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110561
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-07-26 16:57:51 +00:00
Konstantin Shcheglov 27bec56744 Add ExecutableElement(s) based InheritanceManager3, and switch analyzer to it.
Initial: 5d6bab4ed2.
Reverted: 39afa4e555
Change-Id: If611f96e6b0156ec218831dd64305e6ccf02e312
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110552
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-07-26 16:16:11 +00:00
Mark Zhou 7d6024b0ff [dartdevc] Fix for DDC overzealously expanding nested constants
Fixes https://github.com/dart-lang/sdk/issues/37523
Change-Id: I140d7d8fdce836dc0f7f2961711d70ec965e46d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109640
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-07-25 22:21:31 +00:00
Nicholas Shahan 11f5b34f07 Reland "[dartdevc] Immediately throw when encountering an unevaluated constant"
This reverts commit 62674b977d.

Reason for revert: There is no reason we should ever encounter an unevaluated
constant in DDK and doing so implies there is an error in the constant evaluation.

We hope to find all such errors with this assertion. If this causes any more test
failures, feel free to revert this again and create an issue so we can fix.

A fix for the issue seen in the flutter-hhh bot has landed:
https://github.com/flutter/engine/pull/10069

Original change's description:
> Revert "[dartdevc] Immediately throw when encountering an unevaluated constant"
>
> This reverts commit fd38424fa4.
>
> Temporarily disabling this to get Flutter roll going.  See
> https://github.com/dart-lang/sdk/issues/37605
>
> TBR=nshahan@google.com
>
> Change-Id: I44dbb1d4aaf8d5f9cc05f096d26cade93a364f4c
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110120
> Reviewed-by: Vijay Menon <vsm@google.com>
> Commit-Queue: Vijay Menon <vsm@google.com>

TBR=vsm@google.com,nshahan@google.com

Change-Id: Ibcb719d3e6c0026b11a812bec853e158b338d51a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110185
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2019-07-23 23:18:15 +00:00
Vijay Menon 62674b977d Revert "[dartdevc] Immediately throw when encountering an unevaluated constant"
This reverts commit fd38424fa4.

Temporarily disabling this to get Flutter roll going.  See
https://github.com/dart-lang/sdk/issues/37605

TBR=nshahan@google.com

Change-Id: I44dbb1d4aaf8d5f9cc05f096d26cade93a364f4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110120
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-07-23 16:43:24 +00:00
Konstantin Shcheglov ccdddd2eee Parallel build-mode and DDC changes for summary2.
It does not enable summary2 yet, but makes it possible to flip
one flag AnalysisDriver.useSummary2 to switch between summary1
and summary2.

I run presubmit scripts, and it seems that it works for both.
https://test.corp.google.com/ui#id=OCL:255717824:BASE:259228828:1563746330268:5481d33a
https://test.corp.google.com/ui#id=OCL:255717824:BASE:258892260:1563515248201:2d5ce329

One thing that is not implemented yet is tracking used dependencies
for summary2. So, //dart/bazel_codegen_tests:dependencies_test_run fails.


Change-Id: Iec9f3852e9b91236ce98e87041031daa0cc71a88
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107689
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-07-23 15:07:11 +00:00
Nicholas Shahan fd38424fa4 [dartdevc] Immediately throw when encountering an unevaluated constant
Visiting an `UnevaluatedConstant` at this point is a signal something
has gone wrong in the constant evaluation. This should help us identify
hidden issues when flipping the constants-update-2018 flag back on.

Change-Id: Idd8db4c60785f00b22c29292db53783582ed8af1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109104
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-07-18 17:32:00 +00:00
Nicholas Shahan e1e3daa52d [dartdevc] Add --summarize-text flag to ddb script and pass through to DDK
Cleanup handling of paths with the aims to help the script work when run
from an arbitrary directory.

Change-Id: I1a319e7a16e5e021f06457d15807bc4c3245f677
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109521
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-07-18 16:35:35 +00:00
Vijay Menon d0cb753ebd [dartdevc] fix ddb directories and source maps
With this change, one can launch tests, e.g.,

> ddb -r chrome -d -k tests/compiler/dartdevc_native/subtype_test.dart

and step through Dart SDK code using source maps.

Change-Id: I1662a4df76d29e3ccb80a4754147839da784ebe6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107480
Auto-Submit: Vijay Menon <vsm@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-07-15 17:09:06 +00:00
Vijay Menon 45591cd123 [dartdevc] fix sdk source map paths
Change-Id: I5d508d64b8cb9e8cc9ca764ab34f57aebcc9146a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/109020
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Vijay Menon <vsm@google.com>
2019-07-15 16:11:04 +00:00
Vyacheslav Egorov e82ca2f366 [fasta] Unconditionally enable asserts in const constructors
Based on feedback from the language team (https://github.com/dart-lang/language/issues/447).

Removal of CompilerOptions.enableAsserts is pending cleanup in DDK.

Change-Id: Id515e91da3e31647941ce893b2cffc58894a1b1d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108813
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-07-12 15:42:43 +00:00
Jens Johansen 07a53a3cc9 Set onDiagnostic in DDCs incremental compiler code path
Change-Id: Iebff83658bb3b33a316de3f0719cdb44c14ca1b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108725
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-07-12 06:03:13 +00:00
Konstantin Shcheglov 464a5a640f Issue 37401. Support for const Set default values in mocks.
Bug: https://github.com/dart-lang/sdk/issues/37401
Change-Id: Ia65a0e6204f64a308dd27810759a8b7416244248
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108841
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Vijay Menon <vsm@google.com>
2019-07-12 04:16:33 +00:00
Nicholas Shahan 55078c0d2f [dartdevc] Fix emitting double constants from the SDK
Change-Id: I38c2f1fe6deca63c3a689503862c3a620017e091
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/108880
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2019-07-11 23:44:44 +00:00