Commit Graph

143 Commits

Author SHA1 Message Date
Johnni Winther a76f4d5c34 [cfe] Rename InlineClass to ExtensionTypeDeclaration
This renames InlineClass to ExtensionTypeDeclaration, and InlineType
to ExtensionType. Members of extension type declarations are called
extension type members instead of extension type declaration members
for "brevity".

TEST=existing

Change-Id: I91ed62533ddd345644492f04dc3310d007460288
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316780
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2023-08-01 09:04:38 +00:00
Jens Johansen 39b8f7bef4 [kernel] Shift up specialized kernel tags
Before this CL kernel tags had specialized tags that was marked by the
single high bit, then using the three lowest bits for a value:

128 + value = 0b10000xxx
136 + value = 0b10001xxx
144 + value = 0b10010xxx

So the numbers from 128 to 151 is taken by this scheme, but because of
the high bit marking stuff being special we can't really use 152-256.

This CL shifts the specialized tags up so it instead uses the 3 highest
bits as a marker while still using the lower 3 bits for the value:

224 + value = 0b11100xxx
232 + value = 0b11101xxx
240 + value = 0b11110xxx

This takes up 224-247 and leave 248-255 unused. It would let us use
128-223 though.
(If we eventually need more we can probably remove one of the
specialized ranges (SpecializedVariableSet isn't used very much in
previously sampled dill files) and use 4 bits for tagging).

Additionally, a tool to print free tags has been added (via binary.md),
and the "binary version is in sync with VM" test has been prepared
for version > 99.

TEST=Existing tests.

Change-Id: If77b12cee6fc3801628dd67dc40afbb018ec8a61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/284302
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2023-02-21 15:21:38 +00:00
Johnni Winther 81845864ca [kernel] Rename View* to Inline*
TEST=existing

Change-Id: I8726c936261ceb770b489f264d14fff02a1b4998
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/275243
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2022-12-14 08:36:57 +00:00
Jens Johansen 00caf79873 [kernel] Order switch cases when reading dill according to (sampled) usage
I've sampled (eagerly) reading the VM platform, a compilation of
dart2js, a compilation of "flutter gallery" and a compilation of a big
internal app, and reordered switch cases accordingly.

I can't measure any difference in runtime, but have a hard time
thinking it's not better.

I've included the tool that does the sampling.

Change-Id: If61c5a95265229c238020264010553f281fec49c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/267362
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-11-07 09:20:59 +00:00
Johnni Winther d380ae8d48 [cfe] Run commands of tool/fasta.dart in the same VM
This changes tool/fasta.dart to run the subcommand in the same VM when
no VM arguments are specified. This speeds up the tool and as a
consequence speeds up the tool/update_all.dart and
tool/update_expectation.dart tools.

Change-Id: I80b61a692a3ac2e15a7d1d097e65e1efbf9e4aee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/236560
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-10 15:23:15 +00:00
Jens Johansen 1044d83ab7 [kernel] Spell check kernel/bin
Change-Id: I1433d7940f9a20b70793c8e0ea801d16aa3f9eb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231201
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-02-02 12:20:46 +00:00
Jens Johansen 0794821969 [kernel] Add tool for comparing class hierarchies of two dills
This CL adds a tool that can compare the class hierarchies of two dill files.
Currently it only checks for public classes and their public supertypes.
We could extend the tool later if needed.

Currently it gives this for flutter:

```
$ out/ReleaseX64/dart pkg/kernel/bin/compare_hierarchies.dart /path/to/flutter/bin/cache/flutter_web_sdk/kernel/flutter_ddc_sdk_sound.dill /path/to/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/platform_strong.dill "dart:nativewrappers#NativeFieldWrapperClass1"
(1): /path/to/flutter/bin/cache/flutter_web_sdk/kernel/flutter_ddc_sdk_sound.dill
(2): /path/to/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/platform_strong.dill

Missing classes in lib dart:_internal
In (2) but not in (1): [VMLibraryHooks, Lists, VMInternalsForTesting, ClassID]

Missing classes in lib dart:ui
In (1) but not in (2): [PlatformViewRegistry]

Class(ColorFilter) in dart.ui from (2) has these extra supertypes: [ImageFilter (dart:ui)]
```

where the last line is https://github.com/dart-lang/sdk/issues/48245

It gives this for the dart sdk:
```
$ out/ReleaseX64/dart pkg/kernel/bin/compare_hierarchies.dart out/ReleaseX64/vm_platform_strong.dill out/ReleaseX64/ddc_platform_sound.dill "dart:nativewrappers#NativeFieldWrapperClass1"
(1): out/ReleaseX64/vm_platform_strong.dill
(2): out/ReleaseX64/ddc_platform_sound.dill

Missing classes in lib dart:_internal
In (1) but not in (2): [VMLibraryHooks, Lists, VMInternalsForTesting, ClassID]
```

which seems fine (dart:_internal after all)

Change-Id: I03c0dbcc3e5058a0c7d6a996b511cf6d449dd4f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/231100
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-02-02 10:47:25 +00:00
Sam Rawlins 8d04e49078 Remove redundant imports
Each of these imports removed is redundant with
'package:kernel/ast.dart'.

Bug: https://github.com/dart-lang/sdk/issues/44569
Change-Id: Ia9bc08b4ffd863572c84fe8a4fa465d2e8e04f7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213845
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-09-20 15:25:01 +00:00
Johnni Winther 4ff04f641b [kernel] Add always_declare_return_types lint
Change-Id: Icdcc648f42393b28daf648f752e3b4d61f51aa10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212043
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-09-01 16:50:27 +00:00
Johnni Winther 097a511d9f [kernel] Add annotate_overrides lint
Change-Id: I1fffd60eeb14ecd6d5ba30cd584a75ddd4a8acfc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212005
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-09-01 11:45:17 +00:00
Jens Johansen c0a9d571ce [kernel] Add 'dill_forensic' tool
Tool will try to extract useful information from invalid (e.g. partial
or wrong version) dill.
This is a first stab and could possibly be extended and improved in the
future.

Change-Id: Ib381794a3fe80036bb845800488fa0e1a7f04f83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211241
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-08-25 11:37:42 +00:00
Johnni Winther efe0ddccab [kernel] Reland: Migrate remaining bin/lib libraries in package:kernel
Change-Id: I5eacb92ea6ce00d83b3440a473cca8dad0892a87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197165
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-04-28 14:36:53 +00:00
Johnni Winther 3c83032c60 [kernel] Avoid using List.length= to grow lists in ast_from_binary
+ some additional changes needed for sound null safety

Change-Id: Icab02486109b38b6dec269a65d705126efa88622
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195517
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-04-28 09:59:23 +00:00
Johnni Winther 7e6692b20c Revert "[kernel] Migrate remaining bin/lib libraries in package:..."
Revert submission 195268

Reason for revert: Implicitly triggers running bin/* in sound null safety, revealing an unsafe use of List.length=

Reverted Changes:
I026ace4fd:[cfe] Migrate front_end libraries from wave 3-4
I9ba1f809b:[kernel] Migrate remaining bin/lib libraries in pa...

Change-Id: I3535c45d6eaf970dc5a17b6d7274cd9d6aa16ae2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195507
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-04-15 14:55:37 +00:00
Johnni Winther 9feb5330b9 [kernel] Migrate remaining bin/lib libraries in package:kernel
Change-Id: I9ba1f809b0340b6d45471d856f2a31cff9534de8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195264
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2021-04-15 12:04:28 +00:00
Johnni Winther af4757dd0b [kernel] Migrate ast_from_binary.dart
TEST=existing tests

Change-Id: Ie6b3baa9233e2f02179d0eaf31224e628436495e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/188282
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-03-02 12:11:12 +00:00
Johnni Winther 34fb48bb8a [kernel,front_end] Migrate first wave of pkg/kernel and pkg/front_end
Migrates libraries dependent only on already migrated libraries.

Change-Id: I0e85ee8dbc2afce031b92e0009e71c206a55af28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/179502
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-01-18 15:40:21 +00:00
Jens Johansen 739393b290 [kernel] Fix and test readComponentSource
This was broken after constant coverage was recorded in dill because
reading the source then needed to have the link table too (which it
doesn't have when using readComponentSource).

Fixes https://github.com/flutter/flutter/issues/71851.

Change-Id: I90b6a185abd133c7d08fd335f69faf634684738b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175724
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-12-11 11:57:58 +00:00
Johnni Winther e7d0947811 [kernel] Delete bin/transform.dart
Change-Id: I92b9f13d4e541c080fa29c9a79df0c925eebcc7a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/159241
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2020-08-19 13:07:41 +00:00
jlcontreras 0f0e04ec3a Add empty value class transformer.
Change-Id: I8e532c1699785ed75c7eff7a3187a4ca3a2032e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/156880
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Javier López-Contreras <jlcontreras@google.com>
2020-08-03 14:14:42 +00:00
Johnni Winther e637f7054e [cfe] Add support for keeping const locals during constant evaluation
With this CL backends can opt in to retain constant local variables
in the AST that would otherwise have been removed through inlining.

Change-Id: I377a8679c89fe012d2ec4c7e087274a8052979ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153965
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-07-14 12:17:39 +00:00
Johnni Winther 3a021a6545 [cfe] Remove EvaluationMode.legacy
This is no longer valid. Since the SDK is agnostic we should default to weak mode.

Change-Id: Ia9fbf911e7ebb595c93a71afe3bb8de7495cebba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/149065
Reviewed-by: Jens Johansen <jensj@google.com>
2020-05-30 09:47:02 +00:00
Dmitry Stefantsov 928f9fc932 [cfe] Remove flag --force-nnbd-checks
The checks are now always enabled for the "non-nullable" experiment

Closes #40980.

Bug: https://github.com/dart-lang/sdk/issues/40980
Change-Id: I32a141a93f0ba86ebdab554e1f312c2147927993
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/139440
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
2020-03-16 15:01:38 +00:00
Jens Johansen 70b4ffae4b [kernel] Delete limited_ast_to_binary.dart
Change-Id: I11277942cd8bb9f3f3b875233934ec0281c0369b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/138085
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-03-04 11:45:55 +00:00
Dmitry Stefantsov b7aff59973 [cfe] Report errors on case expressions without primitive equality
Bug: http://dartbug.com/40425
Change-Id: Ied2da91cc32b84f6e64c0b76541e020d1a2447b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/136227
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-02-20 13:39:09 +00:00
Johnni Winther 88635446ec [cfe] Implement weak mode constants semantics
Closes #40124

Change-Id: Ia54490d9f5162a27e52c4e9c4d74c5cfaa28472b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134284
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2020-02-05 07:07:07 +00:00
Jens Johansen 128771af8a [CFE] Version 2 of incremental compiler invalidation strategy
Change-Id: Iff860e2665dee64fc005a50237ae890986ddb0f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127896
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2020-01-16 07:50:39 +00:00
Johnni Winther 818ec6db92 [cfe] Implement nnbd-top-merge
+ and use nnbd-top-merge and legacy erasure in hierarchy computation

Change-Id: I4bf06ce8d3c68a9926865ebf84b24b4029828d73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128065
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-12-13 17:19:59 +00:00
Jens Johansen db525fe0f9 [kernel] Remove old unused 'method call' transformer
Change-Id: I20afd79daa0d3668c96d52fcc83c78fb5e3fb4bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127620
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-12-09 10:14:57 +00:00
Johnni Winther 970c164826 [cfe] Use correct types in transformations and start verifying getStaticType
With this fix Expression.getStaticType no longer throws on any known cases.
Users of getStaticType can therefore avoid enclosing static type computation
in try-catch.

Closes #38597

Change-Id: I52eaacd30256333d7c368e5d14f4e4956bafc96f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/121988
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2019-11-21 22:15:58 +00:00
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
Jens Johansen 9613e15a50 [kernel] Delete old Coq stuff
This is unused. If this is something we want to do again at some point
we can revert this cl.

Change-Id: Ia54b4c31a39f88dfb8837cb70960650320511151
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/114845
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2019-08-28 11:06:41 +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
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
Aske Simon Christensen a069ddda21 [CFE] Produce InstanceCreation from unevaluated constructor invocation.
Thread assert enable flag through in dart2js to make the dart2js cfe
constant evaluation unit test properly pass the flag.

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

Change-Id: Ie4ac86ce96feda1548120fed54ece9ca03387496
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98570
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-04-04 12:22:50 +00:00
Aske Simon Christensen c10ee9971f [CFE] Move constant evaluator to Fasta.
Reland of https://dart-review.googlesource.com/c/sdk/+/96081

Change-Id: Ie9e6a0d26703469396fa6ea4803f49ce387f495b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97224
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-18 15:42:05 +00:00
William Hesse 3b2e368376 Revert 5 changes with failures
TBR=askesc@google.com

Revert "[CFE] Move constant evaluator to Fasta."

This reverts commit 845b5b2df1.

Revert "[CFE] Always call the constant evaluator by the evaluate method."

This reverts commit 91bc4ec2b9.

Revert "[CFE] Use Fasta diagnostics in the constant evaluator."

This reverts commit c7b572aa29.

Revert "[CFE] Check for null in constant evaluation"

This reverts commit e6d2751e9c.

Revert "Rename import after moving file."

This reverts commit a6e2c5eb4c.

Change-Id: Iadfe087c0110f6f331b82d990213f95d3ef4541b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/97223
Reviewed-by: William Hesse <whesse@google.com>
2019-03-18 12:25:32 +00:00
Aske Simon Christensen 845b5b2df1 [CFE] Move constant evaluator to Fasta.
This is in preparation for recognizing Fasta-specific nodes in the
constant evaluator, and for using the Fasta diagnostics framework.

Change-Id: I8535fbb68e622f1814a1d577c348d87e573b6b34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96081
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-03-18 10:42:14 +00:00
Peter von der Ahé ceb998ecc0 Remove unused TargetFlags
Change-Id: I33f1ffaec5bb9a936639424b78393cd187344ff9
Reviewed-on: https://dart-review.googlesource.com/c/94210
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2019-02-25 12:17:54 +00:00
Aske Simon Christensen ac95355fdb Compiler option for environment defines
Change-Id: I50f0085ebbc2c9a3af26769a0004bfb8361d85f2
Reviewed-on: https://dart-review.googlesource.com/c/91340
Commit-Queue: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
2019-02-07 16:15:52 +00:00
Aske Simon Christensen 8a45b5eb57 Move environment handling into the front-end constant evaluator.
Change-Id: Id01bad9d9dbb7d5f6104a0f633d8303fecfa29db
Reviewed-on: https://dart-review.googlesource.com/c/91227
Reviewed-by: Kevin Millikin <kmillikin@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-02-04 13:31:30 +00:00
Aske Simon Christensen d8c221524d Remove obsolete legacyMode parameter from ConstantEvaluator
Change-Id: I9db2e7b28c436fafebc4b414c63243fc761fbf6e
Reviewed-on: https://dart-review.googlesource.com/c/90400
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2019-01-23 12:17:48 +00:00
Kevin Millikin d9944433af [Kernel] Clean up error reporting in constant evaluation
Make the constant evaluator take an explicit error reporter so we have
to opt in to using the "simple" one that reports errors in an ad hoc
way.  This is the start of a change to use Fasta-controlled error
messages throughout and eventually get rid of the simple error
handler, and to continue constant evaluation after the first constant
error.

Change-Id: If6b1801edab6063754b642cf4a603abf9d63103a
Reviewed-on: https://dart-review.googlesource.com/c/89501
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Auto-Submit: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Peter von der Ahé <ahe@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2019-01-15 11:34:42 +00:00
Kevin Millikin d0c2cdcd4c [Kernel] Remove the syncAsync flag
This flag was always true so we can remove it and specialize the
remaining code that used it.  The only code that used it was in the
Dart VM's async transformation.

Specializing that code led to some unused fields in the async helper
class which were removed.  This triggered me to look at core types
which seems to have a lot of unused stuff.

Change-Id: I7da800ca17ac05478149f4c90337a38d2c2b1459
Reviewed-on: https://dart-review.googlesource.com/c/87960
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Kevin Millikin <kmillikin@google.com>
2018-12-21 10:07:04 +00:00
asiva dff358223e [VM/Runtime] Delete flag --sync-async and it's uses.
Remove all references to the --sync-async flag which was added as a transition step
when the feature was being introduced.

Change-Id: Ic5b1c8c8b3e2d92a70d954d401afeddfd43f5e92
Reviewed-on: https://dart-review.googlesource.com/c/87381
Commit-Queue: Siva Annamalai <asiva@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2018-12-20 23:37:45 +00:00
Peter von der Ahé e45e334548 Rename strong mode to legacy mode in package:kernel
Change-Id: Ia4a8a9cac7817a8db5771ec82541b556c705f7c8
Reviewed-on: https://dart-review.googlesource.com/c/86353
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com>
2018-12-20 18:06:34 +00:00
Jens Johansen f0b26ca685 Add offsets to kernel size breakdown
Change-Id: If61195da74aa97fb1891cdee95ac1f964894058c
Reviewed-on: https://dart-review.googlesource.com/c/85100
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2018-11-22 07:31:11 +00:00
Peter von der Ahé 5b32ab3be6 Remove the word "strongMode" from some package:kernel libraries.
Temporarily using "legacyMode" instead, but I plan to rid these soon.

Change-Id: Iff8bcde03b6ebe4ad95f963f456c855e73e58926
Reviewed-on: https://dart-review.googlesource.com/c/79042
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-10-11 08:50:43 +00:00
Peter von der Ahé f942af451b Remove kernel interpreter
The test isn't normally run, and all 12 testcases caused a crash.

Change-Id: Ie1576e32b70f01aa775c3305bff2bc992eebf86f
Reviewed-on: https://dart-review.googlesource.com/c/78940
Auto-Submit: Peter von der Ahé <ahe@google.com>
Reviewed-by: Kevin Millikin <kmillikin@google.com>
2018-10-10 08:42:21 +00:00
Kevin Millikin 796d628ab6 Improve error reporting from Kernel scripts
* Ensure that we have a .dill file and it has the correct version before
  we start decoding it in dump.dart.

* Throw errors, not strings.  Ensure that they have a useful
  toString().

* Do not print usage except when the command is invoked
  incorrectly (wrong number of arguments).  Once we get into the
  command it's less likely that it's been invoked incorrectly and more
  likely that something else has gone wrong.

  Because these utilities are invoked from other scripts (like the
  fasta command), printing their usage for problems other than
  invoking them correctly doesn't match the way that they were invoked
  and it's confusing.

Change-Id: I7832383594d2b3719a0a7a7392ba4685717a79d2
Reviewed-on: https://dart-review.googlesource.com/c/78206
Commit-Queue: Kevin Millikin <kmillikin@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2018-10-05 12:19:01 +00:00