This change fixes vm/cc/** unit tests for sound null safety.
Also, type propagation is slightly improved for int operations to
help AOT unit tests which don't run TFA and don't have type feedback.
TEST=tested with sound null safety enabled
Change-Id: I6c42b377d4fa8035c99e5fabf1de2ae52272b994
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212862
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
This change improves elimination of dead ParameterInstr instructions
by skiping over Unbox instructions when tracing for real uses.
Previously, ParameterInstr were removed if they we used only by other
dead Parameters or as inputs to dead phis. Now, Unbox instructions
are also allowed as long as they are also dead.
TEST=vm/cc/TryCatchOptimizer_DeadParameterElimination_Cyclic1
(with sound null safety)
Change-Id: Iba807ce43d10ff6e400abd614cc749d60f2454e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212900
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
We regularly get FileSystemException(s) like:
at _PhysicalFile.readAsStringSync (physical_file_system.dart:184)
at _OverlayFile.readAsStringSync (overlay_file_system.dart:206)
at FileSource.contentsFromFile (source_resource.dart:68)
at FileSource.contents (source_resource.dart:55)
at MoveFileRefactoringImpl._isPackageReference (move_file.dart:183)
So, instead we could use already recorded source content from which
the element model was built.
Alternatively we could record different kinds of references into
the index, e.g. IS_REFERENCED_BY_PACKAGE_URI or IS_REFERENCED_BY.
Change-Id: Ic4aa839f706f37c9df2504f866dfca7c7581c347
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This should have been a warning since null safety
(or arguably since 2.0), but analyzer and compilers
didn't display the warning.
Prepare the package for such usage now being enforced and a warning
or even an error.
Change-Id: I73a852b88dabcaa1396aeec08f33856668e31fe9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212830
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Danny Tuppeny <danny@tuppeny.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Bug : request headers were not captured because finishRequest was
called to early (before headers was fully initialised)
Fixes#47115
TEST=pkg/vm_service/test/get_http_profile_test.dart
Change-Id: I544101c6f37d20e2ddfe7086698c0925f8f5bd09
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212561
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Simply adds the new location to the sys.path so it can be found
and filters idl files within idl_parser so it doesn't affect
codegen. Also removes a stale comment to finalize the python3
migration.
Change-Id: I31d93fd8de22e38a0e968587149546565f86e3ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212630
Reviewed-by: Riley Porter <rileyporter@google.com>
Removes idl_parser dependency as it's now in WebCore and updates
the revision to point to the latest WebCore revision, which includes
the Python 3 migration and idl_parser migration.
Change-Id: Ie24bad3258c44fcfe8ef98ca4dae8846a323a1b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212629
Reviewed-by: Riley Porter <rileyporter@google.com>
Migrates syntax and semantics from python 2.7.
Major changes include:
- filters
- sorting
- print statements
- higher-order functions
- hashing and comparison
and other misc changes. go.sh consistently gives the libraries
in this and the previous commits with these changes.
Change-Id: I66365739887158d8f321015d36e556447da1bcd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211542
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Riley Porter <rileyporter@google.com>
This is an initial step to get the modular analysis in place, it
includes:
* flag to emit modular data
* flag to load modular data
* new modular strategy that uses serialized modular data
* serialization of part of the modular data
- currently only impact-builder-data
* new flag in our modular test suite to play with the new feature. This
flag is off by default and will not be tested in the bots
unless we enable it by default or add a test matrix step for it.
(See original https://dart-review.googlesource.com/c/sdk/+/105702)
Change-Id: I951ab68567f907117a1e868aaf673841ae948484
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210061
Commit-Queue: Joshua Litt <joshualitt@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
The compiler will in certain cases eliminate write barriers and the runtime will compensate by adding certain objects to a deferred marking stack. These objects will be revisited when marking is finalized. There is no header bit indicating an object has already been added to the deferred marking stack. The same object may be seen by markers multiple times: once as part of ordinary marking and several times as part of deferred marking.
When visiting a WeakProperty, if the fate of its key is not yet known, it is placed in a (worker-local) delayed weak properties list, which is a linked list threaded through the WeakProperties themselves. If more than one worker adds the same WeakProperty to its list, or a single worker does so multiple times, the lists will be corrupted. A previous fix (40cd5fc5f6) attempted to avoid this by ensuring only the worker which marked the WeakProperty would add it to a delayed weak properties list, but this can result in no worker adding the WeakProperty if the WeakProperty is allocated marked and added to the deferred marking stack.
This CL changes the processing of the deferred marking stack to treat WeakProperties as strong references. This ensures a WeakProperty will only be added to a delayed weak properties list by the single worker that encounters it during ordinary marking. This is also very similar to what would happen if the write barrier had not been eliminated: the writes into the marked WeakProperty would cause the new key and value to also become marked.
This CL also fixes another bug where when processing the delayed weak properties lists, the worker would try to ask whether a new-space object was marked.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/47128
Change-Id: Id9abaeb4dd52538ebc22ac58e48abcb7ed760854
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212612
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
- dart:_builtin is only available in the standalone embedder, and should have never been referenced by the VM proper.
- dart:profiler was long ago renamed to dart:developer.
TEST=build
Change-Id: I0743f52efc3331a8500494b2d87f621190566b62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212680
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
As part of deprecating support for native extensions we are also
migrating away from legacy VM-specific `native 'name'` syntax
towards metadata based encoding which does not require any special
syntax.
This CL is a step 1 in migration:
- introduces support for `@pragma('vm:external-name', 'name')`
which serves as a direct replacement for `native 'name'`;
- all core libraries and tests are migrated to use the annotation;
Once this CL lands and rolls we will edit internal and external embedders
to eliminate uses of the native keyword (step 2) and finally remove
support for native keyword across our parsers (step 3).
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/28791
Change-Id: Id6dea878db82dd4fd81149243c425b5c5dc6df86
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212461
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>