In kernel files assertion conditions are specified as a range of source
positions. Sometimes source texts are not available and VM cannot
extract assertion condition text, so Script::GetSnippet returns null.
With null safety it is no longer valid to pass null as a non-nullable
argument '_failedAssertion' of _AssertionError._create constructor,
so we should provide a valid String. This change converts 'null'
assertion condition text to "<optimized out>", similarly to AOT mode.
Issue https://github.com/flutter/flutter/issues/63513
Issue https://github.com/dart-lang/sdk/issues/34586
Change-Id: I9c5791e98fdef358068f3f5ddc4cfe98e8c7ed36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158162
Reviewed-by: Régis Crelier <regis@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
The number of CFE-generated member signatures can be quite large (see buganizer #162073826).
CFE now provides a reference from member signatures to their origin (see https://dart-review.googlesource.com/c/sdk/+/157498).
This CL bypasses loading of member signatures in JIT mode and uses their origin as target in interface calls. AOT mode is not modified.
Fix the implementation of --print-classes flag.
Change-Id: Ief3e4e58a67bc3321a55d184b3c62ce62cd78689
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158145
Reviewed-by: Alexander Markov <alexmarkov@google.com>
The VM assumes parents appear before children when iterating loading units in id order. Normally this happens as a side-effect of sources being loaded in import order, but this might not happen in environments that combine separately produced kernel files.
Bug: https://github.com/dart-lang/sdk/issues/42985
Change-Id: Ice9e2e07cf2aa89e91ab313951cc33c1924f17ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158066
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
We have MockPackages in DAS, although implementation is quite
different. At some point we might want to unify them. But for now
just name it similarly.
R=brianwilkerson@google.com
Change-Id: Id4bb2b16b845368d99260200f1172562362a8beb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158148
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
External fields whose type is non-nullable don't need to be
initialized (in fact they can't be initialized), so we shouldn't
report "uninitialized field" errors for them.
This CL also adds some basic tests of the functionality of external
fields, making sure that the getters and setters they introduce are
properly resolved and that their types are properly respected by
inheritance checks.
Change-Id: I9b08727ab0d45d24801af3721e332c7ec21d08bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157840
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Change-Id: I74c0031eacc5c93a4e3b146f516baafcb972fdb4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158141
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This change adjusts the organize imports logic, to keep any comments
written in the line above an import statement attached when
organizing the imports, while being smart about what comments to keep.
Closes https://github.com/dart-lang/sdk/issues/42515
Change-Id: Ibcca4f24411ac16bcdb17f66fb6d2b9c45f7d367
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157743
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
The tests incremental_dart2js_test and incremental_compiler_leak_test
- taking ~1 minute each locally - often times out at 4 minutes (after
almost being done) on the bots. This CL gives them a little more time
hopefully allowing them to finish.
Fixes https://github.com/dart-lang/sdk/issues/43000
Change-Id: Ic6309ebc1a0c77300f1b4f5262f8d48f4de3e0be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157982
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Updates the dependency on package charcode to to a version
of the package with language version 2.10. The package_config.json
file gave its language version as 2.10, enabling null safety,
but this was inconsistent with the package spec in charcode,
and would be overwritten by running tools/generate_package_config.
Bug: https://github.com/dart-lang/sdk/issues/43004
Change-Id: If41861485ca99a150152c72e0f0fcccc7c4780cc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158008
Auto-Submit: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Moves the file check after the stderr and exitCode check to show any
process error before checking for success output from the process.
In effect we'll now see the error message from the compiler when the
binary isn't created.
Change-Id: I2fb5c87caf6b87f5cff5c89eccaebd2690b20408
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158009
Auto-Submit: Clement Skau <cskau@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Add information about the saved arguments descriptor for dispatcher
functions to Function::ToCString and information about both the
function kind and the saved arguments descriptor (when appropriate)
to the flow graph printer and the disassembler.
Change-Id: I41f5db2d80039cb397447eb9b9db47e60469b284
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/158007
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Tess Strickland <sstrickl@google.com>
Cleanup handwritten code now that we do have a generator.
We don't need package:ffigen in the DEPS, because we don't run it
anywhere in the SDK build or tests. It is a dev dependency and the
generated file is checked in.
Change-Id: I02784ca5895b4e878a0fed696a34c546a71c2702
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/152141
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Adds a member signature origin to member signatures and includes
an additional reference to these in MethodInvocation, PropertyGet,
PropertySet, etc.
This enables the VM to bypass the member signatures when loading the
AST.
Change-Id: I5cae11f4434bc052d0ba0acf0670dd002c6f3df1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157498
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Update CFE tests (and a few analyzer tests) to match the new world
of the syntax being unsupported.
Fixes https://github.com/dart-lang/sdk/issues/42681
Change-Id: I71bc973f36dfb978ddb825edb68530d8e260a58a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157980
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
I would have prefered to have renamed them all to undefined_super_member,
but that would have broken existing links. Some day we should add the
support necessary to allow for forwarding so that we can rename codes.
Change-Id: I81e416407e3464b5b60a4dbbfe60a375eb47bb84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157921
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
In follow-up CLs I will update error reporting logic.
Change-Id: Id07b861aa117b93e0c869ad0b52c048085706ee6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/157801
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>