Looks like everyone has been keeping it neat and tidy, so there was
little to do. I added a very short blurb about extensions and then just
tweaked some formatting a little.
Change-Id: If4d7666a1ec10313a3b37f0b4eaa1b981e3f610b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127450
Reviewed-by: Vijay Menon <vsm@google.com>
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Auto-Submit: Bob Nystrom <rnystrom@google.com>
So, when we call DartType.getDisplayString() we know if the type
presentation should include nullability suffixes.
This fixes many, but not all places where we need to present types.
There are places where we don't go through ErrorReporter, but call
ErrorListener directly. I plan to replace all these with ErrorReporter.
R=brianwilkerson@google.com, paulberry@google.com
Bug: https://github.com/dart-lang/sdk/issues/39651
Change-Id: Ic77a556e7834d8f757c8b13eed37ed1d34f47348
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127744
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
We are temporarily building a smaller SDK platform to make progress building
applications against the forked sdk_nnbd sources. This is because some of the
libraries have not yet been ported and they don't compose well.
I needed to thread the status of the non-nullable experiment through the front
end entry point and into the target options, and native types.
Also includes some standardization of the flag name in DDC.
https://github.com/dart-lang/sdk/issues/39698
Change-Id: I4bdd503be694b28d7f95828d4af28d1d5fb3691f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127486
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This is the first step in deleting legacy DDC!
* Default all invocations of DDC to run the kernel version.
* Disable all tests that run analyzer DDC.
* Detect the most likely case when invoked with an analyzer
summary and print instruction to update build_web_compilers
dependency.
I will follow up with deletions, and a rename of the test configurations/
builders to reclaim the names (ddc vs ddk, dartdevc vs dartdevk).
Issue #38777
Change-Id: I1477f0274b6b7f345a5e19d2b3f93797c454a09e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127067
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
If the dst_type of an AssertAssignable is a type parameter, the AssertAssignable
implementation will load the value of the type parameter using
the (instantiator or function) type arguments. It will then call the
type testing stub (TTS) of that type.
If the TTS is not exhaustive (e.g. because `T = X<..>` wher `X` is
implemented), it can fall back to the slower SubTypeTestCache implementation.
Right now the STC fallback will get the loaded value of the type
parameter for `dst_type` instead of the type parameter. Doing so is
incorrect.
=> This CL ensures we preserve dst_type = TypeParameter for the STC
fallback.
Issue https://github.com/dart-lang/sdk/issues/39716
Change-Id: Idea2405efbdc01c031ee68dbb345820e721533eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127640
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
This prevents the following crash:
Bad state: Missing declarated type annotation in /home/test/lib/test.dart; for Object
package:nnbd_migration/src/variables.dart 68:7 Variables.decoratedTypeAnnotation
package:nnbd_migration/src/edge_builder.dart 1378:26 EdgeBuilder.visitTypeName
package:analyzer/src/dart/ast/ast.dart 10012:49 TypeNameImpl.accept
package:nnbd_migration/src/edge_builder.dart 844:10 EdgeBuilder.visitIsExpression
package:analyzer/src/dart/ast/ast.dart 6372:49 IsExpressionImpl.accept
Change-Id: I23ed49ccbd3625d9f9fbc7e07a69be3c580896ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127457
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
- Modify setter logic for late final local variables.
- Remove extra visitVariableDeclaration in late_var_init_transformer
that was causing nodes to be visited multiple times.
Bug: https://github.com/dart-lang/sdk/issues/38841
Change-Id: Id39925e4b9560a1da1b01e1cf14ef20c515f3928
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127720
Commit-Queue: Liam Appelbe <liama@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Having the method be private causes the interactive tool to be broken.
Change-Id: I9390de3b9510c38c69039f2df38a116802acdf89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127701
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
This will be needed for the NNBD migration engine.
Currently only used in checker.dart. Later CLs will convert the
resolver to use this abstraction layer as well.
The runtime overhead of this abstraction should be negligible, since
under normal analyzer operation, there will only be a single const
instance of this class, and no instances of any subclasses. So the VM
should be able to trivially inline all uses of the abstraction layer.
Change-Id: I0132b76238606e6e6b789169a62806d09f10f71d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127490
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
The nullability of runtimeType must be consistent with the nullability of
a class DeclarationType. Currently, it is always kLegacy. However, this
needs to be set to kNonNullable when the NNBD experiment is enabled.
Note that the nullability of the null instance remains kNullable.
Change-Id: I4ba974c2551c3a7fbd190b02175804090f9b48b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125721
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Régis Crelier <regis@google.com>
Legacy types are considered equal to their non-nullable variant.
Type hash is modified to be consistent with the new definition.
Change-Id: If90f7f13cf77e519d5b90b57d9dbf4988f71be13
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126283
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Arguments to simd type constructors were being checked in the bootstrap
natives entrypoint but not elsewhere. Checking for null in Dart code
ensures that we don't accidentally miss these checks in AOT.
The changes to sdk_nnbd are required in order to ensure the number of
arguments passed to native code match the number of arguments from the
non-NNBD implementation (we needed to remove the implicit type args
parameter).
Fixes https://github.com/dart-lang/sdk/issues/39518
Change-Id: Iaf7d8790c154f1e85db613b6dc84004c8013df9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/126905
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Removing puppet rules allows GCE VMs to be provisioned without Puppet.
This will reduce the startup time for new GCE VMs.
Bug: https://crbug.com/871818
Change-Id: I33d9ff9ccf423d5291b94b74b2e86a6cb757b976
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127241
Reviewed-by: William Hesse <whesse@google.com>
Analyzer has dropped its dependency on kernel, so we can no longer
share this code.
This will allow us to re-publish analyzer and address issue #39702.
Bug: https://github.com/dart-lang/sdk/issues/39702
Change-Id: I20c3505c450dddb1e833fa6e56291ab39c32fe0c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127560
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
This is the simplest fix until we have the DDC build actually working to
make get the analyzer test bot for nnbd working again.
Change-Id: I1357d0ef1509293649f32a01cd83c85398923c1e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127540
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Related to #37266, but doesn't address it.
Change-Id: I51114c2b67dcd6f62b5b237998eafab49d2fc369
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127543
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
There is one internal client that currently depends on such presentation.
This will unblock rolling analyzer, then we will fix the client, and
remove this skipping code in analyzer.
R=brianwilkerson@google.com, paulberry@google.com
Change-Id: I0d6387892d12326d658800069dd8a60faa589405
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127488
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Include major memory users known to the VM: isolate heaps, profiling buffers, timeline buffers.
Change-Id: I2580ad74b5d4d07c5c75fde28bb7a5d71fddb09b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127382
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Mechanically, this renames shallowSize to internalSize and redefines shallowSize as internalSize + externalSize.
Change-Id: I734f5714ad6dff341627e3d6e51e3bdcf26c63ad
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125993
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
We call it with `withNullability: false` almost everywhere.
My attempt to update all places turned out to be a long chain of
changes. So, instead I will make decisions and updates in separate
CLs, starting with ErrorReporter.
R=brianwilkerson@google.com, paulberry@google.com
Change-Id: I9d72475577ba2934bed1c06a4808ab620e92a20e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127441
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>