note: NativeBehavior also has a SideEffect property, which is only used for
foreign helpers. If we add annotations in the future, we could move the effects
there and consume them at this point in inference.
Change-Id: I3e62faa3d80c0ba96a2626972c332c27eb52c142
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130964
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
The test has invalid expectation that if the isolate has property 'paused' set to 'true', it means the isolate is paused at exit. In reality the 'paused' property can be set to 'true' if the isolate is not runnable yet.
Fixes dartbug.com/24174
Change-Id: I3a2c5519f0ae448fbcacff46c8aa8f64406ef796
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130980
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
Use NullCheck for inlining and remove 'isNullCheck' from HFieldGet.
Change-Id: Ic9908739a26367243002c1c71f9193660a8c08e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130222
Commit-Queue: Stephen Adams <sra@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Closes#38777
This was hardcoded to true and no longer needs to be read.
Change-Id: I1c2df0ac55776c842563f12a67d298a508156bd7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130822
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
* Correct mistake in the named configuration.
* Add missing test directories to the fileset.
* Add configurations for all operating systems (for local testing).
* Avoid duplicate experiments specified by both configuration and test.
* Pass experiment flags also to VM running the batch runner.
Change-Id: I47f2c1b07e91e2f8120a2712ce362689b68e9ce4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130900
Reviewed-by: Bob Nystrom <rnystrom@google.com>
Since the FixBuilder-based implementation is not yet fully baked, we
only enable the integration in api_test.dart for now. The remaining
failing test cases are marked with a `@FailingTest` annotation
pointing to https://github.com/dart-lang/sdk/issues/38472, which is
the tracking bug for the FixBuilder implementation.
Change-Id: I761350fff125cec8067a96fdfc593b381e5feb3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130882
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
This reverts commit f6ec68444f.
Reason for revert: the 'isControlFlow()' property did actally have a use orthogonal to 'isJsStatement'.
Original change's description:
> Remove HInstruction.isControlFlow()
>
> The use of this property was confused.
> It was not clear if it referred to HControlFlow instructions (the last instruction in a block),
> or whether it will be generated as JavaScript containing control-flow.
>
> We keep isJsStatement() for HInstructions that must be generated in statement position.
> If the instruction has an output, it must be one of the inputs and variable allocation
> makes the input/output available as a JavaScript variable.
>
>
> Change-Id: I8018335f42787727b14ae26297fd96fbf52adb7d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130640
> Reviewed-by: Sigmund Cherem <sigmund@google.com>
> Commit-Queue: Stephen Adams <sra@google.com>
TBR=sra@google.com,sigmund@google.com
Change-Id: I175a1112319fcc839076218f97b75425ee72d51b
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130888
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
Leaves the snapshot output location in root_out_dir so that it doesn't conflict, and hardcodes an exception for _full_sdk_snapshots to look in that directory.
Change-Id: I69cd5d87ba240052c039b7b8920092fd6a78ab08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130500
Commit-Queue: Jake Macdonald <jakemac@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Change-Id: I7769c21c357df9c9d6584638921bcc2afeff8d6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130841
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Karl Klose <karlklose@google.com>
The information is expressed in the signature now, previously the return
type was implicitly `dynamic`.
Change-Id: Ib4a0106c94dc394e8126773442cd0886f81e0c79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130739
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
After cl/128585 landed a app-jit failure started throwing an error:
>testee>err> kernel-service: Error: Unhandled exception:
>testee>err> Bad state: No element
>testee>err> #0 Iterable.first (dart:core/iterable.dart:520:7)
>testee>err> #1 MappedIterable.first (dart:_internal/iterable.dart:374:31)
>testee>err> #2 lookupOrBuildNewIncrementalCompiler (file:///b/s/w/ir/cache/builder/sdk/pkg/vm/bin/kernel_service.dart:400:45)
>testee>err> #3 _processLoadRequest (file:///b/s/w/ir/cache/builder/sdk/pkg/vm/bin/kernel_service.dart:679:22)
>testee>err> #4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:174:12)
>testee>err>
This is caused by the change ultimately adding scripts for the used
mixed in files in "LoadedScripts".
In this case "dart:collection/map.dart" (as I recall) was added to it.
When reloading the source, it runs through all libraries that
"isn't dart scheme", and for all of those libraries through all scripts
reported by LoadedScripts for that library (now including something from
the platform), and checking if it has been modified. Checking if it is
modified only works for file:/// uris through, which platform files aren't,
so it just reports true (i.e. the file is modified).
This is then passed to the kernel service which - based on the list of
one file modified - somehow concludes that it has a compiler already
(which it doesn't) and then crashes.
This CL fixes this specific issue by also skipping scripts that are
"dart scheme".
There's still an underlying issue that has nothing to do with cl/128585
though. I'll comment on that in the bug
(https://github.com/dart-lang/sdk/issues/39869).
Bug: 39869
Change-Id: I1a3f2de888ec53c40f4b6b46a369595abae5bb44
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130374
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This factory class serves three purposes:
- In a future CL, it will contain fields to customize the global
behavior of the edit plans that are created (e.g. whether code
should be removed or commented out).
- In a future CL, it will contain a pointer to the original (text)
contents of the source file. This will allow edit plans to make
more sophisticated changes such as adjusting indentation.
- In a future CL, it will contain methods for creating common kinds of
"extract" edit plans such as null-checking an expression or making a
type nullable. (Currently the client must create these edit plans
using EditPlanner.extract, which has an error-prone API).
Change-Id: I87ac75b73003d0e7b416e3d2121eadb2770da5ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129802
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
This will facilitate a follow-up CL that introduces a factory class
for creating EditPlans.
Change-Id: I4fa82371844388f3042107375eb1e7a7e9804647
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/129801
Reviewed-by: Mike Fairhurst <mfairhurst@google.com>
The use of this property was confused.
It was not clear if it referred to HControlFlow instructions (the last instruction in a block),
or whether it will be generated as JavaScript containing control-flow.
We keep isJsStatement() for HInstructions that must be generated in statement position.
If the instruction has an output, it must be one of the inputs and variable allocation
makes the input/output available as a JavaScript variable.
Change-Id: I8018335f42787727b14ae26297fd96fbf52adb7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130640
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
- opt-in NNBD all the patch files of core libraries.
- dart:io patch files are not yet opted in.
Change-Id: Iaef21d49f2949406450c41a878ede697f61556d4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130820
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
PushArgument instructions are removed from IL while it is constructed and
optimized. Before allocating registers, PushArgument instructions are
inserted immediately before call instructions. On ARM/ARM64 subsequent
PushArgument instructions are generated using store multiple (STM) / store
pair (STP) instructions which reduces size.
Flutter gallery in release mode after this CL and https://dart-review.googlesource.com/c/sdk/+/129324:
arm: instructions size -1.4%, total size -0.83%
arm64: instructions size -1.43%, total size -0.83%
Closes https://github.com/dart-lang/sdk/issues/39788
Closes https://github.com/dart-lang/sdk/issues/38354
Change-Id: I61493c72306c3ade4d9850e0dfc17e7e943a14c4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/128481
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
We were getting a static error in package:logging for
```dart
Zone recordingZone;
// ...
runZoned(() {
recordingZone = Zone.current;
// ...
});
// ...
expect(records.first.zone, equals(recordingZone));
```
That is a static error if we don't make `recordingZone` late or
nullable.
Change-Id: Iab5e47dd8df375c7dc5283ce4570ad1321ba919e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130738
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Mike Fairhurst <mfairhurst@google.com>
I believe this fixes `language_2/await/await_test`, but there might be other
tests affected.
Change-Id: I573beda1b40540691f58fb38bda56814b70a9343
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130730
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Sigmund Cherem <sigmund@google.com>
The code is pretty chaotic (evil) at the moment, and will require
more cleaning in following CL(s). Currently this is just what we had,
moved.
R=brianwilkerson@google.com
Change-Id: I9049521a1f3acaae8149e44cdcb83ad3a0742bb3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/130743
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>