It will not happen strictly before, it happens together, because we
set _FunctionElementForLink_Initializer for fields, which will perform
field type inference when requested.
Found this while running over google3.
R=brianwilkerson@google.com, paulberry@google.com
Change-Id: I360dff7e815ba997680c4a719a3e82827368db42
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107780
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
We now wrap named argument types in `{}` and optional positional
argument types in `[]`.
A few unit tests have been added to verify this functionality; I
didn't exhaustively test the implementation of DecoratedType though.
Change-Id: I1e3135adc3abc966f8a41d90c1c6e95e9c7c1eda
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107747
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Correspondingly, I moved tests for definite assigned from unit-like
tests to the corresponding error reporting tests suite.
R=brianwilkerson@google.com, paulberry@google.com
Change-Id: I6d286a8b5335e88fe9f7376ed3c829a1e5c39019
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107561
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Two methods had names beginning with "visit", to reflect the name of
the visitor method they tested. But this was inconsistent with the
rest of the methods in EdgeBuilderTest, which are simply named after
the structure whose visitor method they test.
Change-Id: I4616eeff959f4ef84fc8a5da3263ab9c88d8fba2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107742
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
We can tell whether a decorated type needs to be created based on
whether the library is being migrated.
Change-Id: I440c9a310ad103c800de6409d717492bc539b838
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107660
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Also visit any annotations present in a variable declaration (we can't
yet test this part well but we might as well add the proper code now).
Change-Id: I1c8f19c9516d1e0f17f024fa136bd7d331ed8ae1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107643
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
An Isolate Group (IG) is a collection of isolates which were spawned from the
same source. This allows the VM to:
* have a guarantee that all isolates within one IG can safely exchange
structured objects (currently we rely on embedder for this
guarantee)
* hot-reload all isolates together (currently we only reload one
isolate, leaving same-source isolates in inconsistent state)
* make a shared heap for all isolates from the same IG, which paves
the way for faster communication and sharing of immutable objects.
All isolates within one IG will share the same IsolateGroupSource.
**Embedder changes**
This change makes breaking embedder API changes to support this new
concept of Isolate Groups: The existing isolate lifecycle callbacks
given to Dart_Initialize will become Isolate Group lifecycle callbacks.
A new callback `initialize_isolate` callback will be added which can
initialize a new isolate within an existing IG.
Existing embedders can be updated by performing the following renames
Dart_CreateIsolate -> Dart_CreateIsolateGroup
Dart_IsolateCreateCallback -> Dart_IsolateGroupCreateCallback
Dart_IsolateCleanupCallback -> Dart_IsolateGroupShutdownCallback
Dart_CreateIsolateFromKernel -> Dart_CreateIsolateGroupFromKernel
Dart_CurrentIsolateData -> Dart_CurrentIsolateGroupData
Dart_IsolateData -> Dart_IsolateGroupData
Dart_GetNativeIsolateData -> Dart_GetNativeIsolateGroupData
Dart_InitializeParams.create -> Dart_InitializeParams.create_group
Dart_InitializeParams.cleanup -> Dart_InitializeParams.shutdown_group
Dart_InitializeParams.shutdown -> Dart_InitializeParams.shutdown_isolate
By default `Isolate.spawn` will cause the creation of a new IG.
Though an embedder can opt-into supporting multiple isolates within one IG by
providing a callback to the newly added `Dart_InitializeParams.initialize_isolate`.
The responsibility of this new callback is to initialize an existing
isolate (which was setup by re-using source code from the spawning
isolate - i.e. the one which used `Isolate.spawn`) by setting native
resolvers, initializing global state, etc.
Issue https://github.com/dart-lang/sdk/issues/36648
Issue https://github.com/dart-lang/sdk/issues/36097
Original review: https://dart-review.googlesource.com/c/sdk/+/105241
Difference to original review:
* Give each isolate it's own [Loader] (for now)
* Sort classes during initialization for spawned isolates if app-jit is used (to match main isolate)
* Fix IsolateData memory leak if isolate startup fails
Change-Id: I98277d3d10fe275aa9b8a16b6bdd446bbea0b100
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107506
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
- Fix expectations for dart2js generic function types
- Split out Type canonicalization tests
- Do some partial checking for dart2js minification
Change-Id: Ifb6e38c1138311baf1a9852286e208c59aaa03fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107686
Reviewed-by: Leaf Petersen <leafp@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
This reverts commit b71d2d9996.
Reason for revert: Somehow this broke flutter because gclient doesn't seem to have generated the needed file
Original change's description:
> [llvm] Add initial scaffolding
>
> This change adds the gclient and GN changes needed to build
> an executable using LLVM in the Dart tree as well as a basic
> testing framework based on llvm-lit.
>
> Change-Id: I9009a98ff95043cc3754966f31697ba7f1712310
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106434
> Commit-Queue: Jake Ehrlich <jakehehrlich@google.com>
> Reviewed-by: Alexander Thomas <athom@google.com>
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
TBR=vegorov@google.com,kustermann@google.com,athom@google.com,phosek@google.com,ajcbik@google.com,jakehehrlich@google.com
Change-Id: I877abfe211dc6c3efd94cc2350d028bf54df9d9f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107688
Reviewed-by: Jake Ehrlich <jakehehrlich@google.com>
Commit-Queue: Jake Ehrlich <jakehehrlich@google.com>
They don't do anything yet, but the syntax is supported and tested.
Change-Id: I67e3c72babd8e272b28b434dfb0cf6028f472676
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107568
Commit-Queue: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
This change adds the gclient and GN changes needed to build
an executable using LLVM in the Dart tree as well as a basic
testing framework based on llvm-lit.
Change-Id: I9009a98ff95043cc3754966f31697ba7f1712310
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106434
Commit-Queue: Jake Ehrlich <jakehehrlich@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Vyacheslav Egorov <vegorov@google.com>
Substitution is now handled by _handleInvocationArguments.
Change-Id: Ife85444c6f224a48b2989ca6efe3796deae1cf10
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107642
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
All scopes must be visited to find the innermost one.
Change-Id: I97a292170bde9d19148489dd29d0dad40d1e2c2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107573
Commit-Queue: Régis Crelier <regis@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Fixes null pointer exception when running Flutter apps with
--full-dart-debug. Appears to be caused by a bad optimization being
applied to the hand written assembly.
Change-Id: I258a94f0dcdda8f5ca0a765cd0540214d0ed85fe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107571
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
This reverts commit 9fd914e450.
Reason for revert: There needs to be a check if this is an experimental job, or a tryjob, and accept blank fields in that case.
I meant to put it in if I made the code return 1, but forgot.
Even in this case, the results need to be returned, for tryjobs to work.
Original change's description:
> [infra] Add error check when adding builder data to test results.
>
> Change-Id: Ia59b8dcb711839e90d222679362d145b332c45b2
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107510
> Reviewed-by: Jonas Termansen <sortie@google.com>
TBR=whesse@google.com,sortie@google.com
Change-Id: I37a48d78265e9630a7c562a46083e5234abba1aa
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107512
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: William Hesse <whesse@google.com>
- Hook up allocation tracing.
- Fix off-by-one when mapping bcpcs to token positions.
- Fix missing class loading for predefined classes in Dart_Invoke type checks.
Change-Id: Id9177001d493725a0545c5948b7f7c6b4693027c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107564
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Régis Crelier <regis@google.com>
Moves a test that tries to allocate a too large amount of memory to a file which is not executed on asan.
Fixes: https://github.com/dart-lang/sdk/issues/37388
Change-Id: I91101c05be509b670ff9ba82ee25424554468ec5
Cq-Include-Trybots: luci.dart.try:vm-kernel-asan-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107508
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Auto-Submit: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Teagan Strickland <sstrickl@google.com>
This is a regression test for Dart 1.x behaviour on the pre-Kernel
front end.
TBR=fishythefish@google.com
Change-Id: I2cd9cb989ad70bd1765e74bb749c3f027668112b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107620
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Auto-Submit: Stephen Adams <sra@google.com>
For now stage this in the package:js README - that might not be the best
place for it long term since the details may change...
- Add a note that makes it explicit we expect all interop to use
`package:js` instead of `dart:js`.
- Add notes about known limitations and differences between dart2js and
DDC.
Change-Id: Ib4c967ea1435dd85f41f56646140352b125cee4c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/107560
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>