Only from nodes for now.
Change-Id: I2fe9419590b78b4cf87d1d30587845c362f6129d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341822
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This reverts commit 885457e1d3.
[analyzer] new warning for nullable '==' parameter type
This rule checks that a parameter to an `operator ==` implementation has
a non-nullable type.
I intentionally did not enforce, in this rule, that the parameter is
exactly `Object`. It is legal to narrow the parameter type to a
different non-nullable type, like `int`. I can't imagine doing it, but
it seems to be unrelated to whether the type should be nullable or not.
Fixes https://github.com/dart-lang/linter/issues/3441
Replaces https://github.com/dart-lang/linter/pull/3923
Change-Id: Ic0be2bfebaf59b0336e9a3a58e5b7f5359eb8646
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/291042
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
With deferred loading, the number of image pages can be arbitrarily large. The compactor already has the analogous change.
TEST=ci
Change-Id: Ie5a1ff0902e56aaebf1d1c679ce26b35e8a03ec3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341781
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
We want to be able to emit variance information in DDC and this flag was gating the variance checking logic in `rti.dart`.
Set to `true` by default since we can't use the feature without the experiment enabled anyways.
Change-Id: I69a0691e9fbe6f0f355fc7319151c19bbffc1961
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341640
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Kallen Tu <kallentu@google.com>
This used to be used solely by field promotion, to recognize when a
getter arose from a declaration of an abstract field, so that abstract
fields would be promotable but explicitly declared abstract getters
would not be.
However, with the adoption of
https://github.com/dart-lang/language/issues/3328, both abstract
fields and abstract getters are now considered promotable, so there is
no longer any need to distinguish them.
Bug: https://github.com/dart-lang/language/issues/3328
Change-Id: Idc14512568eb0a11dae4e364df453d117adff2e3
Tested: standard presubmit bots
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/338643
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Change-Id: Iba7bb2b1e2a1f63a228154be2a9ce23d46da54cf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341382
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
STW marking is no longer O(new-space), so there's no longer a reason to delay finalizing marking hoping for a scavenge to make new-space mostly empty.
TEST=ci
Change-Id: Ie782e88852714d30e0c75aa9aecac62e56c434ce
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/319880
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
This reverts commit 49f6657c37.
Reason for revert: This caused a performance regression in Android startup time.
Original change's description:
> Call tzset() in OS::Init() on Android so localtime_r() has populated timezone information.
>
> POSIX and glibc do not guarantee that timezone setup is done by localtime_r().
>
> Android <= 7.1.1 did *not* do timezone setup in localtime_r(), which means that users will see their timezone as "GMT".
>
> macOS/iOS seem to guarantee that timezone setup is done in localtime_r() but the wording is vague:
>
> localtime_r() and gmtime_r() functions provide the same functionality
> as localtime() and gmtime()...
>
> N.B.: localtime() is guaranteed to do timezone setup
>
> Bug:https://github.com/dart-lang/sdk/issues/53276
> Change-Id: I8f6abfbfcf07a61cb341c1dbbd8323440cb8f581
> Tested: manually tested on Android 7.1.1
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/340281
> Reviewed-by: Siva Annamalai <asiva@google.com>
> Commit-Queue: Brian Quinlan <bquinlan@google.com>
Bug: https://github.com/dart-lang/sdk/issues/53276
Change-Id: I02ae79d5c3a3f5a3a9003fae71b81ff5a10ac272
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341338
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Derek Xu <derekx@google.com>
--suppress-analytics is implicitly set when we detect we're running in a
CI environment, but providing --{disable,enable}-analytics conjunction
with --suppress analytics was considered an error.
This change allows for --{disable,enable}-analytics to be provided when
running in a CI environment without causing a fatal error to be thrown.
Change-Id: I07fbbe7aeb8632c6f432d4feeb79d8ee3cf190c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341401
Reviewed-by: Kenzie Davisson <kenzieschmoll@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Elias Yishak <eliasyishak@google.com>
```
% DART_CONFIGURATION=ReleaseX64 pkg/dart2wasm/tool/compile_benchmark --
CompileFluteComplex.CompileTime.Total(CompileTime): 34.48 s
CompileFluteComplex.CompileTime.Dart2Wasm(CompileTime): 12.74 s
CompileFluteComplex.CompileTime.Wasm2WasmOpt(CompileTime): 21.74 s
CompileFluteComplex.CodeSize.mjs(CodeSize): 11333 bytes
CompileFluteComplex.CodeSize.mjs.gz(CodeSize): 3144 bytes
CompileFluteComplex.CodeSize.wasm(CodeSize): 3462517 bytes
CompileFluteComplex.CodeSize.wasm.gz(CodeSize): 1019112 bytes
CompileFluteComplex.CodeSize.wasm.opt(CodeSize): 1500111 bytes
CompileFluteComplex.CodeSize.wasm.opt.gz(CodeSize): 477204 bytes
CompileFluteComplexMemoryUse.Max(MemoryUse): 574341120 bytes
CompileFluteComplexMemoryUse.Dart2Wasm(MemoryUse): 574341120 bytes
CompileFluteComplexMemoryUse.Wasm2WasmOpt(MemoryUse): 487387136 bytes
```
We measure all metrics (compile-time, code size, memory use) separately
for dart2wasm and wasm-opt/binaryen. We also report total compilation
time as well as maximum memory usage across the tools.
Change-Id: I94c190475443b52d437a21ba85d5c5433f03dc50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341486
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Change-Id: Ib1743494eeaf203049b0710dd0149b6dafe83764
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341462
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Using `expectStaticType` is a more effective test, because it verifies
that the type is _exactly_ what is expected. It also makes the test
easier to read.
Change-Id: I4b0a22f32601a5dca830a182ff4d37cddd657776
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/340580
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Fixes: b/316131537
Change-Id: I68cfe2a987a11f1bf750dfdd021cfc0924667570
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341541
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
This CL breaks the dependency cycles in typedefs, allowing the
subsequent phases of compilation to rely on typdefs no longer being cyclic.
Closes https://github.com/dart-lang/sdk/issues/54269
Change-Id: Id5e2d579c65019ad7072913ccf586ea2a1963ef9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341180
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
This updates the handling of method/setter conflict between declared
and inherited members in extension types. Declared member now precludes
the conflicting members from being inherited, thus avoid the compile
time error.
Closes#53720
Change-Id: Ie185fa5f378d3bca64ebf77480e2fcefa767bc30
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341560
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
This makes the output more compact.
This also allows to introspect declarations that are otherwise hard
to reference, such as functions. I will add more in following CLs.
Change-Id: I4775beca6aac5e642028b05f40aac31b079ba9de
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341391
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Makes the error messages consistent between stable and canary mode.
Change-Id: I2e7e0b78e2f81dedd24b6ef7cdd034dfe0c4b6a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341390
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Stop running expression evaluation and module symbols tests on legacy
code. These still run with unsound null safety, just on migrated code.
Change-Id: Ifb602c058ebcc3fbd8254e8c2f431f8b18146a64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337615
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
dart2js previously syntactically matched on `Iterable<T>` and
`Stream<T>` exactly and did not compute the union-free type. The new
computation is a direct translation of the specified semantics.
Change-Id: Iaf916c6ba65e626181663ca554c38c90cdd88899
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/341337
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
Since we are no longer testing legacy mode this can be changed to
be non-nullable.
Change-Id: I092b24e055f8fa0f9c183477699a301ffb176660
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337920
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>