Commit Graph

64479 Commits

Author SHA1 Message Date
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
Paul Berry b18b626d78 Remove deprecated AST structures related to the "UI as code" feature.
This constitutes a breaking change, so the analyzer major version
number is bumped to 36.  Clients that have stopped using the removed
data structures (and the methods associated with them) should be
unaffected.

Change-Id: Iab68ecf8d10a13013ebb6b1198c54755225d0eb7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95704
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-20 03:36:42 +00:00
Jenny Messerly 7fe4253a4e [analyzer] fix #36158, implicit cast missing on covariant return type
Due to API changes, the implicit cast visitor (CodeChecker) was not
finding the correct substituted member type, so the implicit return
type cast was not inserted.

Also fixes another issue that paulberry@ discovered: covariant return
type casts were overwriting the implicit casts from the context type.
The context type should always take priority; implicit covariance
checks are only needed when there isn't a type cast from the context.

Change-Id: I998e8f87371c15175c57864b7e334449268fe339
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97143
Reviewed-by: Paul Berry <paulberry@google.com>
2019-03-20 00:33:41 +00:00
Nate Bosch 7e14f2aded Removed mirror methods from DeferredLoadTask
These methods are not used and the only implementation throws.

Change-Id: I0174f9fd43447b8f49f63844a39aa90d40258f64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97348
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2019-03-20 00:15:12 +00:00
Nate Bosch dec7e65334 Delete Flags.enableExperimentalMirrors
Nothing is reading this option.

- Change the option handler to ignore to avoid breaking users passing it
  anyway.
- Remove the Flag constant.
- Remove the option.

Change-Id: I62f3b6ce7b3cf38ad310576b011d27ac78353fde
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97346
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2019-03-20 00:11:54 +00:00
Alan Knight 7eabbe70cd Make the --repl-compile option visible
Change-Id: I6da7062cf9357b2c8f53b980dc33827b7147f111
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97173
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Commit-Queue: Alan Knight <alanknight@google.com>
2019-03-20 00:04:13 +00:00
Mike Fairhurst 9c8e6dc42c [analyzer] rewrite mostSpecificTypeArgument to use asInstanceOf
Change-Id: If7c9e9e9cdc1999c6f7d3c74d081a457f9fc229e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97278
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-03-19 22:50:19 +00:00
Ryan Macnak 565e56dba6 [vm] Reduce cost of allocation tracing.
Remove separate table for predefined classes. The original allocation stats CL had this separate to allow directly embedding the table address into code, but we no longer embed addresses to support AppAOT and AppJIT.

Change-Id: Ida3d0764ac8ff179c0541ee73a3283c9c50affab
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97286
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-03-19 22:46:59 +00:00
pq eaf41e49bf Re-land Linter 0.1.83
Change-Id: Ie935ee8d96fb13afcb35a6a9f90198fc6945f452
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97274
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-03-19 22:05:39 +00:00
Mike Fairhurst 337a252c31 [analyzer] UI as code test cleanup
Change-Id: I73300a2aa5cfa1a9043454e462ac1df2840ee308
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97271
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
2019-03-19 22:00:29 +00:00
Liam Appelbe 89f00ab25f Add a build rule for bytecode version of kernel_service.dill
Bug: https://github.com/dart-lang/sdk/issues/36047
Change-Id: Ifc95ff270c33cce13699bda23c1b7c8fb6139e2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96835
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-03-19 21:29:29 +00:00
Ryan Macnak fadf9b5fb3 [vm] Account for direct code calls from unoptimized code for --reused_instructions.
For example, constructors directly reference an allocation stub.

Change-Id: I5779c476c7721d2cc4b6ceb9348a1ffeaa5e082d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97272
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2019-03-19 21:28:19 +00:00
Mike Fairhurst d0bdfee041 Fix DDC cast -- cast key/value/element individually & don't clobber names.
Change-Id: Id5175782667b760545dac15b02c2a41836137571
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97178
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
2019-03-19 21:06:48 +00:00
Konstantin Shcheglov 67243e0396 AstTextPrinter that prints AST tokens into their original positions.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I3ca2167c43408c535f61179ec7ea701acd65cc57
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95600
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-03-19 20:57:29 +00:00
Konstantin Shcheglov d214646d89 Remove TestAnalysisContext and related.
R=brianwilkerson@google.com

Change-Id: I94030893b9c65e8f6c854a8453d12734ef08e690
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97270
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-03-19 20:34:29 +00:00
Jenny Messerly 22c535ac6e [dartdevc] simplify code for emitting constants
This moves the code into a shared location (instead of being copied to
both of the Analyzer/Kernel-based backends), and removes support for
detecting type parameters in constants, which was allowed by strong
mode but is not legal in Dart 2.

Change-Id: Ic8bcf0aa1107bbb7147fd15b648a45e39478cef5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96839
Commit-Queue: Jenny Messerly <jmesserly@google.com>
Auto-Submit: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-03-19 19:45:04 +00:00
Mike Fairhurst 040fa0f83c Add undefined identifier test for for loops
Change-Id: I590a76525c8f50b28dd3a4a4be448806e4b83027
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97264
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Auto-Submit: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-19 19:40:09 +00:00
Liam Appelbe 21810c2aa1 Include gen_kernel_bytecode in create_sdk so that it can be uploaded by the builders
Bug: https://github.com/dart-lang/sdk/issues/36047
Change-Id: Ibe599c00345ea7ed2007f3d16b4d417c9ee8d3f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96540
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
2019-03-19 19:36:59 +00:00
pq 5614f8d771 Revert "bump linter to 0.1.83"
This reverts commit 234a1726d3.

Change-Id: Id44fd1ff6c32c760e658f3b0eea618c6bdec03c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97273
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-03-19 19:06:34 +00:00
Konstantin Shcheglov 85e5684863 Remove OptionsWorkManager and GenerateOptionsErrorsTask is not a task.
R=brianwilkerson@google.com

Change-Id: Ic257c13a553835f78bd7bc0778dd33c327097af9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97284
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-03-19 19:03:03 +00:00
Nate Bosch 33100aa1ce Delete some copy/pasted doc comments
Where we have an `@override` which duplicate's the super types doc
comment it is not adding anything useful and can be removed.

Also do some minor comment cleanup where feasible:
- Introduce blank lines following the first sentence to follow effective
  dart guidelines.
- Change non-doc comments to use two slashes.
- Where comments were improved after being pasted, bring the improvement
  to the original comment.
- Move comments where there was no comment on the super type but the
  subtype comment clearly applied.

Change-Id: I61b5eca79f692641ce96c5c9d26fa3731c8e230e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97008
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2019-03-19 18:43:07 +00:00
Ryan Macnak 2c001aacc0 [vm] Address various quirks observed in Fuchsia profiling samples.
- Don't waste time scrubbing or qualifying function metadata names.
 - Don't waste time scrubbing or lib qualifying function names for timeline events.
 - Give intrinsic functions a grace usage counter.
 - Fix wrong flag guarding stack overflow name-based slow paths.

Change-Id: Ib78e7e4f8de51208266190fff2d1f7eb8d80c329
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97174
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2019-03-19 17:46:08 +00:00
Bob Nystrom 9910374c20 Fix mistakes in control flow ambiguity test.
Change-Id: I3e710b68c24e2896c55661fac0a59463b9240c53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97283
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2019-03-19 17:28:00 +00:00
Alexander Aprelev 87108efecb [gardening] Update flutter patch so flutter compile_test passes.
Change-Id: Ibf6a31308deac5e4ef388930308774b994feb46d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97285
Reviewed-by: Alexander Aprelev <aam@google.com>
2019-03-19 17:16:24 +00:00
Nicholas Shahan 55f3edadbe [dartdevc] Initial support for spread collections
- Only supports ddc with analyzer front end.
- Basic support for SpreadElement nodes used in collection literals.

Issue: #36006
Change-Id: I9b78c6ff34847625c8013a8e7af9a0f05a67541b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97045
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2019-03-19 16:56:08 +00:00
Konstantin Shcheglov 2ceaccf5f6 Report EQUAL_ELEMENTS_IN_CONST_SET.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: I6f358c4f78deabc575479070d3ff23efb438ae64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97177
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-19 15:55:18 +00:00
Dan Rubel 0c34bf13ea update ElementResolver postfix NNBD bang processing
Change-Id: I700bedc55c42da914fab6d25f4f3620a6ce0b022
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97266
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-03-19 15:35:26 +00:00
Paul Berry 9788949db8 Run dartfmt on pkg/analyzer/test/dart/ast/ast_test.dart
Change-Id: Id7388677356bc2af20278eb9e8f5df459fe4df85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97282
Commit-Queue: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-03-19 15:25:16 +00:00
Aske Simon Christensen d012972c8d [CFE] Fold the asExpression call into the unique function.
Change-Id: I9518c0dd9a76e23795ec80a69f1b304a6833d373
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97085
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-19 15:23:36 +00:00
Aske Simon Christensen ee1e036adf [CFE] Lazy constant evaluation for maybe-evaluated expressions.
Change-Id: I21d21b33902b63a4769d6f4b342ec285c9ab46ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96783
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-19 15:23:36 +00:00
Aske Simon Christensen 330b958e20 [CFE] Check for null in constant evaluation.
Reland of https://dart-review.googlesource.com/c/sdk/+/95520

Change-Id: Ide2243edc1c32db0d55580a98f2de62be23b912b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97226
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-03-19 15:23:36 +00:00
Konstantin Shcheglov ca5ac975fe Fix for crash in _DartNavigationComputerVisitor._addUriDirectiveRegion when part has invalid URI.
R=brianwilkerson@google.com

Change-Id: Ia6c62c344cd195449168e5971165a3d37ffc7f67
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97280
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-03-19 14:53:17 +00:00
Konstantin Shcheglov 70e3e67dd7 Expect different errors depending on the state of the spread_collections experiment.
R=brianwilkerson@google.com, paulberry@google.com

Change-Id: Ia12ea33be90ef1d390fd0a6c38fd421c317e6562
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97179
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2019-03-19 14:37:26 +00:00
Dan Rubel c85108d2f9 Fix parse expression "a ~ b"
This fixes an infinite loop that I introduced in the parser
on Wed Feb 27 commit 8f12d634fe
when adding support for the "!" NNBD postfix assert non-null operator.

To the best of my knowledge, this problem only manifests
when parsing the expression "a ~ b".

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

Change-Id: If20f45620eee0f7cf9b4b6a93640bd3b921d23b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97265
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-03-19 14:15:06 +00:00
Paul Berry f890800fb0 Rework tracking of variables in scope while resynthesizing expressions.
The new formulation allows easy popping of variables when leaving
nested scopes.  This should make it easier to support "for" collection
elements that declare variables.

Change-Id: Ie1dbb11c50677936973acef804b2496a0d00a84a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97172
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-03-19 14:14:46 +00:00
Erik Ernst e830338919 Updated spec_parser such that it runs with ANTLR v4
Change-Id: Ib0711ebc125f4fadb5a526c3538d5c3a35f11234
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97320
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2019-03-19 14:06:26 +00:00
William Hesse 37c7992ac3 [testing] Make tests with multiple VMOptions have multiple names.
Change-Id: I16abe0cd68e5af5ee68eaff8b1702aec2a4bf5a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97227
Reviewed-by: Jonas Termansen <sortie@google.com>
2019-03-19 11:39:59 +00:00
Stevie Strickland af5fc2d4d2 [VM] Partial support for named regexp captures.
See https://github.com/tc39/proposal-regexp-named-groups
for a high-level description of the feature and examples.  This is one of the
features requested in https://github.com/dart-lang/sdk/issues/34935.

This is a partial implementation because while there is a way to retrieve
groups via Dart by name, it requires casting the returned Match to the
new RegExpMatch interface to avoid changing the RegExp interface.
Changing the RegExp interface will happen in a future update, since there
are other planned changes to the RegExp interface coming soon and that way
we only change it once. See https://github.com/dart-lang/sdk/issues/36171
for more details on the planned changes.

Also, since only BMP regular expressions are supported, not full
Unicode ones (i.e., those with the /u flag in ECMAscript), \k<NAME>
will only be parsed as a named back reference if there are named
captures in the string. Otherwise, the \k will be parsed as the identity
escape for backwards compatibility. The new tests illustrate this
difference.

Change-Id: Ieeb0374813db78924c9aa8ac3e652dfb6d4a5934
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/95461
Commit-Queue: Stevie Strickland <sstrickl@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-03-19 10:40:15 +00:00
Bob Nystrom efb3f85c7e Fix for element type inference tests.
Change-Id: I17a924126e0f9294f1ad212ebd12c81abca05d16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97170
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
2019-03-19 00:57:11 +00:00
Alexander Markov f5c16512cc [Tests] Pass VM options (Platform.executableArguments) to sub-processes
When testing runs with certain set of VM options and tests launch
new Dart processes, VM options should be also forwarded to child
processes.

Change-Id: I7207fe87672cd61fd50d7ac77ef1da67744af183
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97169
Auto-Submit: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-03-18 23:20:41 +00:00
pq 234a1726d3 bump linter to 0.1.83
Change-Id: Ib54dd37d319825e6916d9b2b56e44e1883db296c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97261
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Phil Quitslund <pquitslund@google.com>
2019-03-18 22:06:45 +00:00
Stephen Adams eda9ccb744 Early exit on VM String.replaceAll
Change-Id: I2578200444935d221fab7f9fb4d515a9b2e75937
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97145
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2019-03-18 22:04:10 +00:00
Paul Berry 527b10879e Begin adding summary support for for elements.
Change-Id: Icdcfba5caaac34375b65c838dabc97e9b9201ee9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97120
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2019-03-18 21:13:10 +00:00
Mike Fairhurst 42ab0a6a63 Handle downcasts for spreads
Change-Id: If87a384a29399123951384b7474cfc8632a7ad0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97144
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
2019-03-18 20:57:10 +00:00
Alexander Markov fc7d25e0e3 Revert "[vm] Add data field to TypedData"
This reverts commit d1085e80be.

Reason for revert: performance regressions.

Original change's description:
> [vm] Add data field to TypedData
> 
> This is the first step towards unification of TypedData and
> ExternalTypedData.
> 
> Issue: https://github.com/dart-lang/sdk/issues/34796
> Change-Id: I8aec72030e251f9cd9f00fc5073f8e42b83a8d17
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/79430
> Commit-Queue: Alexander Markov <alexmarkov@google.com>
> Reviewed-by: Martin Kustermann <kustermann@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>

TBR=vegorov@google.com,kustermann@google.com,rmacnak@google.com,alexmarkov@google.com,regis@google.com

# Not skipping CQ checks because original CL landed > 1 day ago.

Issue: https://github.com/dart-lang/sdk/issues/34796
Change-Id: Ia11d8c3af0af29d49c3dbf36a3fe7041fbf9aae3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97166
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-03-18 18:53:36 +00:00
Johnni Winther 9c9ab11450 Reland "Handle ir constants in field analysis and impact tests"
Include initial handling of unevaluated constants from environment.

Change-Id: I288801b42a9e25e440baa3eac9ce88263acea0a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97241
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
2019-03-18 17:57:55 +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
Paul Berry 1c685bf370 Sort declarations in pkg/analyzer/lib/src/dart/ast/ast.dart
Change-Id: Ic03f94f3e7a2a64d0f19f2240363718082e703f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97164
Auto-Submit: Paul Berry <paulberry@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-03-18 16:31:05 +00:00
Stevie Strickland 231061c15a [gardening] Moving patch to be based on dart hash.
Change-Id: I220a3be123d976d8de062deea6c48003d8521f72
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97119
Auto-Submit: Stevie Strickland <sstrickl@google.com>
Reviewed-by: Stevie Strickland <sstrickl@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Stevie Strickland <sstrickl@google.com>
2019-03-18 16:18:55 +00:00
Aske Simon Christensen 1ea717f1c9 [CFE] Use Fasta diagnostics in constant evaluator.
The constant evaluator now generates all errors as Fasta diagnostic
messages. The ErrorReporter is simplified to just accept a diagnostic
message, or a notification that the constant evaluator encountered an
invalid expression (presumably put there due to an earlier error).

Also, the flow of control between the error reporter and the internal
abort exceptions is reversed, so the error reporter is now called as a
result of an abort exception being caught by the evaluate method.

Reland of https://dart-review.googlesource.com/c/sdk/+/96300

Change-Id: I7d32b6e98962b6ee781a6c96b593b00ee7fd8a89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97225
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-18 15:42:05 +00:00