Commit Graph

435 Commits

Author SHA1 Message Date
Jens Johansen f91ef3afd7 [kernel] Deprecate Library.isExternal
We're deprecating kernels Library.isExternal as it wasn't used for
what it was originally intended. It will hopefully go away entirely
soon.

Change-Id: If363c50af5607febae68865875af452c106fff85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123721
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-11-04 09:24:02 +00:00
Johnni Winther a996783de5 [cfe+analyzer] Move StackListener to _fe_analyzer_shared
Change-Id: I7e0ebef15b904afc14ed3b1c0f72cde5389d9c59
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123730
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-02 11:21:49 +00:00
Johnni Winther 00c2962db8 [cfe+analyzer] Move messages, scanner and parser to package:_fe_analyzer_shared
Change-Id: I4fa87aee65f30a9868a6cf8f0342591869ece7ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123663
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-11-01 09:37:57 +00:00
Johnni Winther 6b61050d9c [cfe+analyzer] Split generated message files into shared and cfe-only
Change-Id: I71dff57403d236f6186d7e1b5fa01fa7149fd0f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/123661
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-10-31 14:39:04 +00:00
Dmitry Stefantsov 9910fa8454 [cfe] Implement the first part of NNBD-aware isSubtypeOf
This CL is a squashing of the following smaller CLs:

* https://dart-review.googlesource.com/c/sdk/+/120669/
* https://dart-review.googlesource.com/c/sdk/+/120670/
* https://dart-review.googlesource.com/c/sdk/+/121331/
* https://dart-review.googlesource.com/c/sdk/+/121381/
* https://dart-review.googlesource.com/c/sdk/+/121383/
* https://dart-review.googlesource.com/c/sdk/+/121620/
* https://dart-review.googlesource.com/c/sdk/+/121707/
* https://dart-review.googlesource.com/c/sdk/+/122144/
* https://dart-review.googlesource.com/c/sdk/+/122360/
* https://dart-review.googlesource.com/c/sdk/+/122381/
* https://dart-review.googlesource.com/c/sdk/+/122783/
* https://dart-review.googlesource.com/c/sdk/+/122787/

Change-Id: I9d850f531f0fce07055ff9b5cd39abb605752005
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/122868
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2019-10-25 16:37:39 +00:00
Karl Klose 74d0282179 [infra] Run test suites in pkg/front_end/test with custom test runner
Some tests in pkg/frontend/test are actually test suites written using the
pkg/testing framework.

This change runs these suites using a custom test runner instead of simply
running the test file, which makes the individual test results, timings and
logs available to the test system.

Change-Id: Iae5f37d9bd1b3e9b26c66443fe10e5cca6a6b6bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118540
Commit-Queue: Karl Klose <karlklose@google.com>
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-10-21 09:03:19 +00:00
Aske Simon Christensen dee64581ad [fasta] Option for controlling message debugging stack traces
Change-Id: Ib15be633f19e37d9d2c243f88ae36f4f589eacd8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/120663
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-10-08 12:40:12 +00:00
Alexander Markov 3edcf8f959 [vm/bytecode] Split AST and bytecode platform dill files
Currently Dart SDK has 2 platform dill files:
* vm_platform_strong.dill is used when compiling Dart sources (in kernel
  service and various kernel compilers).
* vm_platform_strong_stripped.dill is used to build core snapshot,
  so its contents is used for execution in the VM.

Before this change, if Dart SDK is built with bytecode, then both
vm_platform_strong.dill and vm_platform_strong_stripped.dill contain
bytecode and AST.

This change removes bytecode from vm_platform_strong.dill, and removes
AST from vm_platform_strong_stripped.dill.

Sizes:

Dart SDK is built without bytecode:

  5861400 out/ReleaseX64/vm_platform_strong.dill
  2819336 out/ReleaseX64/vm_platform_strong_stripped.dill
 32105720 out/ReleaseX64/dart-sdk/bin/dart

Dart SDK is built with bytecode, before this change:

 11146480 out/ReleaseX64/vm_platform_strong.dill
  4846488 out/ReleaseX64/vm_platform_strong_stripped.dill
 34219256 out/ReleaseX64/dart-sdk/bin/dart

Dart SDK is built with bytecode, after this change:

  5861400 out/ReleaseX64/vm_platform_strong.dill
  2027224 out/ReleaseX64/vm_platform_strong_stripped.dill
 28382456 out/ReleaseX64/dart-sdk/bin/dart

Change-Id: Ia7c61a9bce1c95edfd3b2810a67c0964fb37377f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/118371
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2019-09-23 23:08:41 +00:00
Johnni Winther 2c6f779a76 [cfe] Remove legacyMode
Change-Id: I9384631af94feaf1a345958ff23e6d35c2ba4049
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/116202
Reviewed-by: Jens Johansen <jensj@google.com>
2019-09-13 07:38:25 +00:00
Jens Johansen ce5556ab36 [kernel] Load classes lazily
This CL gives the option to load classes lazily (on by default),
meaning that fields, procedures, constructors and redirecting
factory constructors of classes are not initially read,
but instead read when (or if) needed.

The idea being that many classes aren’t needed, and that
spending time on reading them is thus just a waste of time.

This is especially true in modular compilation where a lot
of modules needs to be given as input as the compilation at
hand might technically rely on it, but in practice only very
few of the classes are actually needed (or very few classes
actually need their members).

The below numbers are comparing a VM without this change and without
the lazy class hierarchy member lists change with
b31566b297 (the base change for those
two changes).

For running a simple hello-world script, on my machine 500 times
and doing statistics on it I can measure the following differences:

With verbose, from kernel_service startup to compile complete:
Difference at 95.0% confidence
        -17.8 +/- 0.555817
        -24.3455% +/- 0.760206%
        (Student's t, pooled s = 4.48379)

With verbose, total runtime measure by `time`
Difference at 95.0% confidence
        -19.346 +/- 0.905217
        -12.0333% +/- 0.563051%
        (Student's t, pooled s = 7.30242)

Without verbose, total runtime measure by `time`
Difference at 95.0% confidence
        -17.862 +/- 0.842905
        -12.0635% +/- 0.569276%
        (Student's t, pooled s = 6.79974)

For running a number of modular compilations I’ve recorded an
improvement in actual runtime in the order of 20-37% depending
on the circumstance. In a real build system, though, the
difference seems to be more in the order of around 5%.

Change-Id: Id329bcf2b01d12c12d7a49f2b8abacd9c2447f05
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115703
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-12 08:08:33 +00:00
Jens Johansen a01dd3655f [CFE] Let compile platform include more required libraries"
That should allow us to "implement"
6f85cb83cf again in two steps:
* first we remove the dart:profiler as a required library, but retain it in the platform
* (we wait for stuff to roll, both in flutter and in google3)
* we remove it completely (i.e. not retaining it in the platform, removing the source etc)

Change-Id: Ieb77c2ba909300c05f3923c2edba7cab7d34fae6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/115244
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-09-04 06:57:10 +00:00
Jens Johansen 8e7812fee5 [CFE] Ability to low-level compare dill bytes
Output from a comparison could be something like

Integers differ: 2 vs 3
Map with key 'nullability' has different values (tag 95, likely 'TypeParameterType')
Lists have different values at index 0
Map with key 'items' has different values
Map with key 'typeArguments' has different values (tag 93, likely 'InterfaceType')
Map with key 'returnType' has different values (tag 3, likely 'FunctionNode')
Map with key 'value' has different values (tag 1, likely 'Something<1>')
Map with key 'function' has different values (tag 6, likely 'Procedure')
Lists have different values at index 0
Map with key 'items' has different values
Map with key 'procedures' has different values (tag 2, likely 'Class')
Lists have different values at index 6
Map with key 'items' has different values
Map with key 'classes' has different values
Lists have different values at index 458
Map with key 'libraries' has different values

Which should be read bottom up as something like
Component -> the 458th library -> the 6th class ->
    the 0th procedure -> function -> returnType (a InterfaceType) ->
    0th type argument (a TypeParameterType) ->
    nullability has value 2 in one input and 3 in the other.

Change-Id: I49007a80ddb53a0ba1fae04b22d6efeae3687724
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114602
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-30 07:43:30 +00:00
Jens Johansen 751059b246 [CFE] Explicit creation; add test to force it
Change-Id: I5d5598e8ac84cedc5aa6cbadd088c30c5bc4a22f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114515
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-30 07:41:40 +00:00
asiva 45b85e12d2 [VM] - Remove rules to build vm_legacy_platform
Change-Id: If79375d73e24f99017cbeafd3357e03001925162
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114924
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
2019-08-29 15:57:54 +00:00
Jens Johansen 9c707d7639 [CFE] Add lint that checks fastas own dependencies
Change-Id: I439fce7065e277b8aba2bae05b60e73c470b3fd0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114075
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-23 07:42:53 +00:00
Alexander Markov 922c2bfbb0 [vm/bytecode] Include source info and asserts into platform with bytecode
* Include source positions, source text (if provided by front-end, which is
  controlled by a separate option) and assertions into platform with bytecode.
  Also use environment defines if provided.

* Omit bytecode for synthetic static fields '_redirecting#' injected
  by front-end, as they contain invalid AST nodes (taking tear-off of
  a constructor). This is needed to avoid emitting bytecode which cannot be
  loaded.

* Correctly merge source information such as source text and line numbers
  in bytecode generator if the script was originally created for an
  anonymous mixin application without such information.

* Always include import URIs into source information, even if other information is
  excluded (for members in anonymous mixin applications / noSuchMethod forwarders /
  forwarding stubs).

* Set native resolvers for vm/cc/PrintJSON test, as printing all objects to JSON
  involves collecting token positions, which may read bytecode from platform and
  need native resolvers to process native method entries.

Change-Id: I971e880c25439c0ec69db3a231a0085ccd5d15ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113780
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
2019-08-21 01:08:24 +00:00
Johnni Winther 2fda7f8002 [cfe] Handle qualified name as an AmbiguousBuilder.
+ strengthen checkState invariants in the path of the error.

Handles problem brought out by #37776

Change-Id: I55165a1bdaa3a8a0910d71c6d56472bdbfe592c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113183
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-08-16 16:12:58 +00:00
Jens Johansen 7136d9e4e7 [CFE] Add a 'tool' that runs a quick smoke test
Runs a number of tests that are quick, currently:
* Messages test in a new fast mode which skips compilation
* The spelling tests
* The custom CFE lint test

Change-Id: I7b444e5be1cf2397d6d776aac96dd7c2ad2b302d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113320
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-16 11:14:07 +00:00
Jens Johansen 9552646dc4 [CFE] First batch of fixes for requiring explicit types
Change-Id: Ic27f8508bc95409a5ee8f90b72f34a73d0f8e2e7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113034
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-15 13:13:20 +00:00
Jens Johansen cae08c6813 [CFE] Apply lines_longer_than_80_chars lint
Change-Id: I35b62b34d3ccc7098c21a680a80612c0bb927123
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113030
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-15 10:01:20 +00:00
Johnni Winther 54f26e3554 [cfe+ddc] Support --target=dartdevc in _fasta/compile.dart
Change-Id: I7288dd3dd03fb58188e3652d9b86e5751c104142
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113037
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-08-15 09:08:40 +00:00
Jens Johansen c4727fddf4 [CFE] Apply unawaited_futures lint
Change-Id: I1d783a883c7be84f743724d9eaadc390f84d4b33
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113028
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-14 13:42:13 +00:00
Jens Johansen 48af666c9f [CFE] apply curly_braces_in_flow_control_structures lint
Change-Id: Id6c7e60b40f7dd0ffd68d007fe86abb785ac0dba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/113025
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-14 13:00:44 +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
Jens Johansen 5601eabda6 [CFE] Spell check messages and dart code
This CL adds a simple spell-checker, adds a spell-checking-phase to
messages_test to spell-check our messages, adds a new test that
spell-check our dart-code and fixes a lot of spelling mistakes / typos.

Change-Id: I8943a5bd67970e9a8a775251ae0aa97799eab097
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112346
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2019-08-09 08:47:00 +00:00
Johnni Winther 972d4e9a75 [cfe] Move relativize code from dart2js to cfe
Change-Id: I2e07dcf91adf65965583189972b0c27cc0aee526
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/111427
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2019-08-01 21:07:50 +00:00
Johnni Winther fe2f82650b [cfe] Remove generics from Loader and UnresolvedType
+ cleanup raw types to remove severity rewrite for codeMissingExplicitTypeArguments

Change-Id: I30af950db640cb15ddeeb86e17d9e9cb960a76d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/110902
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-07-31 11:19:52 +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
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
Paul Berry a2e1434603 Breaking changes for analyzer version 0.37
Change-Id: I65a16ab2d2ca05de701c27f08300de85a6316b41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99880
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-07-02 03:59:49 +00:00
danrubel 8d705089ba remove retired experimental flags from kernel
Change-Id: Id0f5e64ad7431e42a10c09fdaf1fae70b73a6d68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104900
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
2019-06-27 18:19:55 +00:00
Todd Volkert c92af46433 Update HttpRequest and HttpClientResponse to be Stream<Uint8List>
Bug: https://github.com/dart-lang/sdk/issues/36900
Change-Id: I1306b2df7c789597e49d2033b660a3ea62d6c1a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104525
Commit-Queue: Todd Volkert <tvolkert@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2019-06-27 00:21:07 +00:00
Johnni Winther 6e77e52dbd [CFE] Port fasta script to dart
Change-Id: I826d3c5f87c6469473358ca59d89127d66630004
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106907
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-06-25 10:18:47 +00:00
Jens Johansen 31599c1e64 No --mode=legacy in incremental_perf_test
Fixes #37302.

Change-Id: I69f07848ab20922628df0d01ea7b9c75fe8a5bb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106905
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-06-24 13:45:52 +00:00
danrubel 1a9801e9fa mark ExperimentalFeature bogus_enabled and bogus_disabled as deprecated
... and update comment and test output to indicate how files should be
regenerated from tools/experimental_features.yaml

Change-Id: I369b93c35b91f7a93c915f0abf9cebdd00c13f8e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106003
Commit-Queue: Paul Berry <paulberry@google.com>
Auto-Submit: Dan Rubel <danrubel@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
2019-06-13 21:30:05 +00:00
Dan Rubel 4a27605fdc generate kernel experimental flags
Change-Id: I9430d95c012b752bc4ca0530d79252b8b032a26b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104841
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
Auto-Submit: Dan Rubel <danrubel@google.com>
2019-06-06 14:03:29 +00:00
Kevin Millikin 907f31e6de Reland "[cfe] Build some annotations during outlining"
Reland the change to build some annotations during outlining, with a
bug fix.  Annotations from patch classes and procedures were not
applied to the actual class or procedure, which is fixed.

The original commit was reviewed at
https://dart-review.googlesource.com/c/sdk/+/103806

The revert was reviewed at
https://dart-review.googlesource.com/c/sdk/+/104220

The original commit message was:

    During the outline phase, after top-level type inference, compile
    annotations for libraries, classes, fields, procedures, and
    constructors.

Change-Id: I836160ddad4114ded72701e8a3938f703228931c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104560
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-06-03 10:20:15 +00:00
Vyacheslav Egorov 39ec9fc4f3 Revert "[cfe] Build some annotations during outlining"
This reverts commit 1df5fb3d57.

Reason for revert: large regressions on Flutter microbenchmarks. Reverting to prevent this reaching Flutter.

Original change's description:
> [cfe] Build some annotations during outlining
> 
> During the outline phase, after top-level type inference, compile
> annotations for libraries, classes, fields, procedures, and
> constructors.
> 
> Change-Id: I95ca65fd58ad88d9452a28d5a0652bee44aeda3a
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103806
> Commit-Queue: Kevin Millikin <kmillikin@google.com>
> Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>

TBR=alexmarkov@google.com,dmitryas@google.com,askesc@google.com,kmillikin@google.com

Change-Id: I67c0719f9175c1bd75b609d7d5c0cea5c294bd6d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/104220
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
2019-05-30 08:46:55 +00:00
Kevin Millikin 1df5fb3d57 [cfe] Build some annotations during outlining
During the outline phase, after top-level type inference, compile
annotations for libraries, classes, fields, procedures, and
constructors.

Change-Id: I95ca65fd58ad88d9452a28d5a0652bee44aeda3a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103806
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-05-30 07:29:12 +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
Paul Berry e2d0f5a50b Add featureSet parameter to Parser constructor.
And deprecate old parser configuration setters.

Change-Id: Ib1507b8d2b20be7c883061e2a92ec9205d6a378f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100664
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
2019-04-29 16:42:19 +00:00
Paul Berry 3d0cdc8956 Switch perf.dart completely over to Fasta parser.
The only remaining code in perf.dart that was using the legacy
analyzer parser was in parseDirectives, which is part of setup, and
not part of the code being performance tested, so there should be no
effect on the benchmark.

Change-Id: I4676b10c367d477499c96f5220e622bb390752a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100680
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-04-29 13:04:38 +00:00
asiva 98dddc9daa [tests] Ensure that --enable-asserts is used whereever checked was used previously
Change-Id: Ia88c03a8dd36237f3c819a3a892f8f17ecf7f00b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97604
Commit-Queue: Alexander Aprelev <aam@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
2019-03-22 19:51:41 +00:00
asiva 1bab46b06f [vm] Remove support for '-c', '--checked' flags and '--enable-checked-mode'
1. Remove support for the following flags '-c', '--checked' and '--enable-checked-mode'
2. Cleanup some of the tests and test scripts where these options were being passed.

https://github.com/dart-lang/sdk/issues/34660

Change-Id: I4d8aa0d14bd054cfba08d78a411a0df4fc829df1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97550
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2019-03-22 17:08:56 +00:00
Sigmund Cherem a8c94d0b52 Remove tools we no longer need to manage status files
Change-Id: Ia106c48cdbecaa8eec722ee11cbc9b6813989477
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96860
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
2019-03-14 19:16:24 +00:00
Aske Simon Christensen dbea5c6884 [fasta] Commandline option to leave environment constants unevaluated.
Also, outdated description of -D option corrected.

Change-Id: Ie1dc011adc3ce2f5293826c96f22700a6528c9a7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96880
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-03-14 11:30:07 +00:00
Peter von der Ahé f200c37553 Enable extra VM options in fasta script
Change-Id: Ib7f68bee7155dcf4ad49d6b17bea6eb071f31f8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96646
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-03-13 06:46:21 +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 120328aff7 [fasta] Commandline option to enable asserts
Since Fasta is only concerned with compile-time behavior, the option
only affects asserts in initializers in const constructors when
evaluated during constant evaluation.

Change-Id: I534cc7cc1f33f9b34d15550d38ea930ed7ac6709
Reviewed-on: https://dart-review.googlesource.com/c/94740
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Peter von der Ahé <ahe@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Auto-Submit: Aske Simon Christensen <askesc@google.com>
2019-02-28 12:11:16 +00:00