Nicholas Shahan
a9f3c66bd8
Revert "[ddc] Verify null safety modes of modules agree"
...
This reverts commit fda897a423 .
Reason for revert: Breaks all the flutter web tests here:
https://ci.chromium.org/ui/p/dart/builders/ci.sandbox/flutter-engine-linux-web_tests/1089/overview
This indicates we still have a misconfiguration in flutter web dev
builds where artifacts with different null safety modes are being
mixed.
Original change's description:
> [ddc] Verify null safety modes of modules agree
>
> Checks that the null safety mode of every module loaded matches the mode
> of the SDK.
>
> Change-Id: I50543d10fbea22a61bd7f12d51d6e9c8f8286890
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173120
> Commit-Queue: Nicholas Shahan <nshahan@google.com >
> Reviewed-by: Mark Zhou <markzipan@google.com >
TBR=sigmund@google.com ,nshahan@google.com ,markzipan@google.com
Change-Id: I0d09efde53f268b353cb842286b11bb3f375e754
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173440
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Commit-Queue: Nicholas Shahan <nshahan@google.com >
2020-11-21 17:42:25 +00:00
Nicholas Shahan
fda897a423
[ddc] Verify null safety modes of modules agree
...
Checks that the null safety mode of every module loaded matches the mode
of the SDK.
Change-Id: I50543d10fbea22a61bd7f12d51d6e9c8f8286890
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/173120
Commit-Queue: Nicholas Shahan <nshahan@google.com >
Reviewed-by: Mark Zhou <markzipan@google.com >
2020-11-21 00:51:14 +00:00
Sam Rawlins
e228483736
dev_compiler: remove unused imports with shared prefixes
...
Bug: https://github.com/dart-lang/sdk/issues/38784
Change-Id: Ia29967ae40332db2e09d45b620acc7cbda4bbb7c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172741
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Commit-Queue: Samuel Rawlins <srawlins@google.com >
2020-11-18 17:31:10 +00:00
Johnni Winther
887ab360e5
Revert "[kernel] Ensure that visitors don't implicitly returns null"
...
This reverts commit 4a3f121341 .
The changes broke flutter/engine
TEST=It's a revert!
Change-Id: I1e65e6cfab03795a21a64a96fe3ed72e6ba8ecd9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172760
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2020-11-18 14:51:30 +00:00
Johnni Winther
4a3f121341
[kernel] Ensure that visitors don't implicitly returns null
...
This is in preparation to migrate package:kernel to null safety.
For the visitor interfaces to support non-nullable return types, the
implementations must avoid using `null` as return value in its base case.
TEST=Refactoring
Change-Id: I9f9b318982148d844be9826a5f8c88374a9fc402
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172180
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2020-11-18 11:54:30 +00:00
Nicholas Shahan
7878baf1eb
[dart:html] Remove casts in cancel() method
...
Casts in _EventStreamSubscription.cancel() are causing unwanted failures
in ddc when we turn weak null safety warnings into errors via a flag. By
removing the casts more apps can run when the weak mode errors are
enabled. The null value is used inside the SDK to signal synchronous
behavior.
This is a temporary fix until we can resolve the larger issue with the
API in dart:html. See https://github.com/dart-lang/sdk/issues/44157 .
Change-Id: Ic9651779a394a03f092a5b4b7944c1306afcb826
Issue: https://github.com/dart-lang/sdk/issues/41653
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171660
Reviewed-by: Mark Zhou <markzipan@google.com >
Commit-Queue: Nicholas Shahan <nshahan@google.com >
2020-11-16 22:52:10 +00:00
Nicholas Shahan
a6b76a610a
[ddc] Optimize list control flow operations
...
Allows spread, collection for and collection if in list literals to
avoid unnecessary checks that the list is growable/modifiable and type
checks when adding the elements to the list.
Use a `push()` on the underlying JavaScript Array rather than calling
the exposed `add()` method.
The related ListCopy benchmarks show a performance increases between
10-40%.
https://golem.corp.goog/Comparison?repository=dart&team=dartdevc#targetA%3Ddartdevc%3BmachineTypeA%3Dlinux-x64%3BrevisionA%3D89256%3BpatchA%3Dnshahan-optimize-list-add%3BtargetB%3Ddartdevc%3BmachineTypeB%3Dlinux-x64%3BrevisionB%3D89253%3BpatchB%3DNone
Change-Id: I7e3ac3044d2af319a7ea40bbceef1d65ecec8261
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/172082
Reviewed-by: Mark Zhou <markzipan@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
Commit-Queue: Nicholas Shahan <nshahan@google.com >
2020-11-16 20:31:46 +00:00
Anna Gringauze
9c54996510
Fix issues in expression evaluation in google3
...
- Define private symbols load without reloading the module
and knowing module format
- Remove libraryName->moduleName map from ExpressionCompiler's
compileExpressionToJs API as a result of above
- Make ddc tolerate null locations on kernel loaded from dill
during assert insertions for nullability
- Disable asserts in expression compilation worker
due to ddc reading source for assert statement compilation
- Remove unused test configuration for expression compiler worker
- Add and update expression compiler tests
Part of: https://github.com/dart-lang/webdev/issues/1174
Change-Id: Idf8f508308915a5487fa0e9810b5674140393fed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170028
Commit-Queue: Anna Gringauze <annagrin@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
2020-11-14 01:34:16 +00:00
Johnni Winther
7b89827956
[cfe] Support bit mask for enabling specific late lowerings
...
TEST=pkg/front_end/testcases/late_lowering/late_lowering_bitmasks.dart
Closes #43993
Change-Id: I47d238dd7cf0ea22983a38bed86e415330070596
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/171580
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-11-11 14:06:30 +00:00
Nicholas Shahan
03bf11e1d9
[ddc] Add nullability to JS interop types
...
This should get the current behavior closer to dart2js and more of the
tests passing found in
https://dart-review.googlesource.com/c/sdk/+/170660
Change-Id: I67bd647d12ff9db7ec9b884680c2b42e260b732e
Fixes: https://github.com/dart-lang/sdk/issues/44084
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170746
Reviewed-by: Srujan Gaddam <srujzs@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Nicholas Shahan <nshahan@google.com >
2020-11-10 18:03:54 +00:00
Dmitry Stefantsov
d54e2bb568
[cfe,ddc,dart2js,vm] Add NullType
...
This CL is the sum of the following 5 CLs:
* https://dart-review.googlesource.com/c/sdk/+/170342/
* https://dart-review.googlesource.com/c/sdk/+/170344/
* https://dart-review.googlesource.com/c/sdk/+/170345/
* https://dart-review.googlesource.com/c/sdk/+/170346/
* https://dart-review.googlesource.com/c/sdk/+/170347/
The reason for landing the 5 CLs as one CL is to prevent potential
troubles with bisecting over the branch because the change is fully
functional only with all 5 CLs.
Closes #40122 .
TEST=Verified by changes in .expect files in pkg/vm/.
Bug: https://github.com/dart-lang/sdk/issues/40122
Change-Id: Ib8197802fdc69694387ae47ac990c58b3aaab7a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170689
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-11-06 12:43:52 +00:00
Vijay Menon
f346cb7f77
Fix ddc debugger_test
...
This CL:
- Fixes https://github.com/dart-lang/sdk/issues/43987 (an exception in custom formatting code)
- Restores (most of) debugger_test.dart to passing (which tests above)
- Fixes a type caching error also exposed by the above test
Note, this skips the golden file comparison. That appears to be very broken
(see comment).
Change-Id: I283b66a710f17765faed47aa099b0b8570e6cac1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170022
Reviewed-by: Gary Roumanis <grouma@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Commit-Queue: Vijay Menon <vsm@google.com >
2020-11-02 23:31:30 +00:00
Nicholas Shahan
ab7dc265d7
[ddc] Avoid weak mode warning in FutureOr casts
...
This is not intended to change the result of the cast in any mode.
An optimization for casting null in weak mode accidentally added
warnings when casting to a FutureOr (non-nullable) of a legacy
type.
Also moves the `is` and `as` methods for FutureOr types from being
hard-coded in the compiler to the runtime method that builds the
type.
Tested on golem and found no attributable performance regressions:
https://golem.corp.goog/Comparison?team=dartdevc#targetA%3Ddartdevc-null%3BmachineTypeA%3Dlinux-x64%3BrevisionA%3D88970%3BpatchA%3Dnshahan-FutureOr-Fix%3BtargetB%3Ddartdevc-null%3BmachineTypeB%3Dlinux-x64%3BrevisionB%3D88964%3BpatchB%3DNone
Change-Id: I44a23c7e2e1d15bc6c383fc95b19f99b584a3f7a
Fixes: https://github.com/dart-lang/sdk/issues/43990
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/170001
Reviewed-by: Mark Zhou <markzipan@google.com >
Commit-Queue: Nicholas Shahan <nshahan@google.com >
2020-11-02 21:45:09 +00:00
Anna Gringauze
42dc617ee8
Emit constants during expression compilation to js
...
Closes: https://github.com/dart-lang/sdk/issues/43963
Change-Id: Ic8af046b2cf1506984b84ea66b2676b3cc0f1771
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169580
Commit-Queue: Anna Gringauze <annagrin@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
2020-11-02 20:03:14 +00:00
Srujan Gaddam
2fd4b4f562
[dart2js, ddc] Emit native null checks in sound mode only
...
Bug: https://github.com/dart-lang/sdk/issues/42536
Bug: https://github.com/dart-lang/sdk/issues/42535
Since ddc would require a potentially breaking change to emit these
checks in unsound mode without opt-in and it's currently not possible
to emit these checks only in opt-in with dart2js, both are changed
to only emit checks in sound mode. In ddc, calling convention is
changed conditionally on sound mode as well to avoid emitting
unnecessary code in unsound mode.
Change-Id: I42f7bb5a53550f4ee5412fbbbfb6ca533c393e96
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/169247
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Commit-Queue: Srujan Gaddam <srujzs@google.com >
2020-10-28 21:35:45 +00:00
Srujan Gaddam
8b68bb4191
Revert "Revert "[ddc] Move native null-checks to definitions""
...
This reverts commit 9dade7fd21 .
With changes further in the relation chain, specifically around
making native null assertions tied to sound null-safety only,
the failure which caused the original revert should no longer occur.
Change-Id: I5a6074304d08e6e8f168bea678439b1ab3e90d0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168998
Reviewed-by: Nicholas Shahan <nshahan@google.com >
2020-10-28 21:35:45 +00:00
Srujan Gaddam
ed009afc4c
[package:js] Add static errors for invalid extends
...
Bug: https://github.com/dart-lang/sdk/issues/37896
dart2js disallows JS interop classes from extending Dart classes,
and ddc does not work as expected. Dart classes that extends JS
interop classes can't be declared in ddc and throw an error on
usage in dart2js. This CL adds static errors for both cases.
Change-Id: I72001d2e8bec046c0e1ab4c06fed8fcf84ade259
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/164840
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Srujan Gaddam <srujzs@google.com >
2020-10-28 16:04:15 +00:00
Johnni Winther
c5f478dfa8
[ddc] Don't remove covariance bits on injected members
...
The covariance optimization assumed that private members only occur
in the library in which they are private. This is not the case. The
CFE injects member signatures, forwarding stubs and noSuchMethod
forwarders for private members into other libraries.
This change takes that into account by only removing covariant bits
on members private to the enclosing library.
This hopefully a fix for https://github.com/flutter/flutter/issues/66122
Change-Id: I5070cee9eea8e785622cef33fdc7138a0a90f53a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168950
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
2020-10-24 11:30:23 +00:00
Srujan Gaddam
d201c33f69
[ddc, dartj2s] Exclude null checks on non-web native members
...
Modifies ddc and dart2js logic to only include null-checks on native
members inside the web libraries. Modifies tests to account for this
change.
Change-Id: If9c164fb90b761d3c4611d87ffeb02c2fa884457
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168585
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2020-10-23 00:07:21 +00:00
Johnni Winther
b42f954364
[cfe] Use experiment release version when non-nullable is enabled explicitly
...
Even when non-nullable is enabled by default, enabling the experiment
explicitly should result in the experiment release version (and not
the experiment enabled version) to be used for opting in.
For this change, the semantics of parseExperimentalFlags was change
to _not_ normalize the flags to a full mapping including default values.
For this reason all uses of such maps are renamed to
'explicitExperimentalFlags'.
Closes #43879
Change-Id: I0d0262e68ec1403549abcfd305ae3a4404fe93e3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168654
Reviewed-by: Jake Macdonald <jakemac@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-10-22 06:17:39 +00:00
Jens Johansen
29fa4e8148
[CFE et al] Compile flutter platform as agnostic for test; set component mode more
...
Bug: dartbug.com/43844 dartbug.com/43807
Change-Id: Iba662f0955897244aaac86ceace73b213fa06319
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168482
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-10-21 10:04:41 +00:00
Anna Gringauze
f04bc85e4f
Refined scope calculation in expression compiler
...
- make sure nested blocks scopes are visited
- make sure variable definitions do not leak beyond block scopes
- properly collect scopes for loops, if statements, constructors
- add calculation of fileEndOffsets for blocks
- save block file offsets to dill
- update binary format version
- change kernel readers and writers to read and write block offsets
- change vm readers to read and block offsets for new version
- add missing fileOffsets and fileEndOffsets on functions for
late fields
- add missing fileOffsets and fileEndOffsets on functions for
extensions
- add errors on failures to find scope
- find libraries for private fields correctly
- add more expression compilation tests
- add test to verify fileOffsets and fileEndOffsets are set for
SDK summary (will add full dill tests later)
Closes: https://github.com/dart-lang/sdk/issues/40278
Related: https://github.com/dart-lang/sdk/issues/34942
Change-Id: I5bc1bb645543045b689d8d61069ee77dc4ee9025
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/167541
Commit-Queue: Anna Gringauze <annagrin@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2020-10-20 01:44:52 +00:00
Michal Terepeta
9dade7fd21
Revert "[ddc] Move native null-checks to definitions"
...
This reverts commit e02085bec3 .
Reason for revert: This seems to break an internal test
(http://b/171029249 ).
Original change's description:
> [ddc] Move native null-checks to definitions
>
> Bug: https://github.com/dart-lang/sdk/issues/42535
>
> Native null-checks are moved to member definitions, and native
> member accesses are changed to use this indirection in the case
> where the member type can be checked.
>
> Change-Id: I499bb3a4f6a66021dd0ab7930a55e7233c1ce020
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166785
> Reviewed-by: Nicholas Shahan <nshahan@google.com >
> Reviewed-by: Sigmund Cherem <sigmund@google.com >
> Commit-Queue: Srujan Gaddam <srujzs@google.com >
TBR=sigmund@google.com ,nshahan@google.com ,srujzs@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Bug: https://github.com/dart-lang/sdk/issues/42535
Change-Id: I145ff11a18374d0d63e2042956ad53ea0939baf7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/168345
Commit-Queue: Michal Terepeta <michalt@google.com >
Reviewed-by: David Morgan <davidmorgan@google.com >
Reviewed-by: Michal Terepeta <michalt@google.com >
2020-10-19 13:43:27 +00:00
Nicholas Shahan
885cc8ce18
[ddc] Optimize toString() calls
...
Change-Id: Ib2caa2d08076fac80917336f69c22ab771e95664
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166301
Reviewed-by: Mark Zhou <markzipan@google.com >
2020-10-16 21:21:42 +00:00
Nicholas Shahan
bef5ffde1e
[ddc] Optimize calling values typed as a Function
...
Change-Id: Idb74eb268de780e935d72c91f0758cbb02552d2f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166300
Reviewed-by: Mark Zhou <markzipan@google.com >
2020-10-16 21:21:42 +00:00
Nicholas Shahan
4cb164215f
[ddc] Trust non-nullability of awaited expressions
...
Change-Id: I0691dd2b2b7fd9f3e563952d983514cd095bb6ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166940
Reviewed-by: Mark Zhou <markzipan@google.com >
2020-10-16 21:21:42 +00:00
Nicholas Shahan
ed8933db3f
[ddc] Trust non-nullability of casts
...
Change-Id: I19f73e7a3e1f65e27a27eb00f6f6d41ffda598af
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165141
Reviewed-by: Mark Zhou <markzipan@google.com >
2020-10-16 21:21:42 +00:00
Nicholas Shahan
e2a4906c51
[ddc] Trust non-nullability of return types
...
Change-Id: I2587fc8f263762524dfac27c75bd975d7aa51299
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165140
Reviewed-by: Mark Zhou <markzipan@google.com >
2020-10-16 21:21:42 +00:00
Nicholas Shahan
e92b1b30b0
[ddc] Trust non-nullability of variables
...
Use the non-nullablity of local variables and method arguments
to help guide the nullable inference when running with sound
null safety.
Change-Id: I00484dc908502b600de058103381af6588c4a958
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155301
Reviewed-by: Mark Zhou <markzipan@google.com >
2020-10-16 21:21:42 +00:00
Srujan Gaddam
e02085bec3
[ddc] Move native null-checks to definitions
...
Bug: https://github.com/dart-lang/sdk/issues/42535
Native null-checks are moved to member definitions, and native
member accesses are changed to use this indirection in the case
where the member type can be checked.
Change-Id: I499bb3a4f6a66021dd0ab7930a55e7233c1ce020
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166785
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Srujan Gaddam <srujzs@google.com >
2020-10-15 21:10:57 +00:00
Leaf Petersen
e85bf740ef
Opt pkg/dev_compiler out of null safety.
...
Change-Id: I62207a436605480b6981b8b00bf7b88d8589db0f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166980
Commit-Queue: Leaf Petersen <leafp@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
2020-10-12 23:25:42 +00:00
Mark Zhou
38667e5667
[dartdevc] Lazily executing deferred types to prevent improper module reordering.
...
Supercedes the following (reverted/abandoned) CLs:
* https://dart-review.googlesource.com/c/sdk/+/162383
* https://dart-review.googlesource.com/c/sdk/+/165149
* https://dart-review.googlesource.com/c/sdk/+/165782
Fixes https://github.com/flutter/flutter/issues/66859 and https://github.com/flutter/flutter/issues/64011
Thanks to Siggi for this approach!
Change-Id: I8e496fdb938e18252ec8a0cf7232c99ca8c27080
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166127
Commit-Queue: Mark Zhou <markzipan@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
2020-10-06 21:31:33 +00:00
Nicholas Shahan
59fe3d510d
[ddc] Fix incorrect source maps from JS templates
...
JS templates should always use their own source information. DDC
was incorrectly caching and reusing templates with the same source
information in various parts of the program. This lead to incorrect
source maps and in some cases compiler crashes when the source map
in a user application pointed to source location in the SDK.
Change-Id: I11607e6f02b894ead1d350e9b3071173ba36a048
Fixes: https://github.com/dart-lang/sdk/issues/43589
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/166122
Reviewed-by: Mark Zhou <markzipan@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Nicholas Shahan <nshahan@google.com >
2020-10-06 01:17:53 +00:00
Mark Zhou
350481a93c
Revert "[dartdevc] Fixing issue related to dual exports of multiple entrypoints in a cyclic import loop."
...
This reverts commit 53895b2270 .
Reason for revert: Replacing this change with a new strategy for better module reordering.
Original change's description:
> [dartdevc] Fixing issue related to dual exports of multiple entrypoints in a cyclic import loop.
>
> See: https://github.com/flutter/flutter/issues/64011
> Change-Id: I8a11e9d3f19428a516cf7a60ee45c3bacf26545d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162383
> Commit-Queue: Mark Zhou <markzipan@google.com >
> Reviewed-by: Nicholas Shahan <nshahan@google.com >
TBR=sigmund@google.com ,nshahan@google.com ,markzipan@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: Iee91d33d1696ffa7406b724466144ab06af80394
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165873
Commit-Queue: Mark Zhou <markzipan@google.com >
Reviewed-by: Mark Zhou <markzipan@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2020-10-05 23:49:53 +00:00
Anna Gringauze
719094028a
Ensure expression compiler worker can terminate
...
- add handling a 'Shutdown' message to expression compiler worker
so the parent program can terminate it before exiting itself
Closes: https://github.com/dart-lang/sdk/issues/43513
Change-Id: I18a4cbd9214a5e72c90d725039c2936e6e67a231
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163960
Commit-Queue: Anna Gringauze <annagrin@google.com >
Reviewed-by: Gary Roumanis <grouma@google.com >
Reviewed-by: Jake Macdonald <jakemac@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
2020-10-05 22:22:12 +00:00
Johnni Winther
8b07d1902c
[kernel] Remove DirectPropertyGet/DirectPropertySet/DirectMethodInvocation
...
These nodes are no longer used.
Change-Id: I40c8df7376f0c40a4122c22d934fb3c6f6fd520d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165902
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-10-03 19:15:41 +00:00
Mark Zhou
3234534bf9
Revert "[dartdevc] Conserving virtual mixin superclass hierarchies even when marked as deferred"
...
This reverts commit 17dba76fb5 .
Reason for revert: Replacing this change with a new strategy for better module reordering.
Original change's description:
> [dartdevc] Conserving virtual mixin superclass hierarchies even when marked as deferred
>
> Fixes https://github.com/flutter/flutter/issues/66859
>
> Change-Id: I9ca3ae7a312d48192659508f2fa0617c7f85efd9
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165149
> Reviewed-by: Nicholas Shahan <nshahan@google.com >
> Commit-Queue: Mark Zhou <markzipan@google.com >
TBR=sigmund@google.com ,nshahan@google.com ,markzipan@google.com
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I02561ab7e4678392ee96a6132b96c7f0a1499a34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165872
Reviewed-by: Mark Zhou <markzipan@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Mark Zhou <markzipan@google.com >
2020-10-02 23:55:11 +00:00
Jens Johansen
fc7de901ee
[kernel] Make LogicalExpression operator an enum (and rename)
...
Change-Id: I6054e8e44133d2419582d74700c4223d51495978
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165606
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2020-10-02 09:41:12 +00:00
Mark Zhou
17dba76fb5
[dartdevc] Conserving virtual mixin superclass hierarchies even when marked as deferred
...
Fixes https://github.com/flutter/flutter/issues/66859
Change-Id: I9ca3ae7a312d48192659508f2fa0617c7f85efd9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/165149
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Commit-Queue: Mark Zhou <markzipan@google.com >
2020-10-01 20:12:20 +00:00
Srujan Gaddam
f4f53ca252
[ddc] Add nullability assertions for native values
...
Bug: https://github.com/dart-lang/sdk/issues/42535
Adds a runtime flag to ddc to enable runtime checks on native APIs.
In the case where an API is typed non-nullable but returns a null
value, throws a null assertion error.
Change-Id: I4d5d7529ba28d9308687dad5d51f1b9c71274455
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162461
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Commit-Queue: Srujan Gaddam <srujzs@google.com >
2020-09-25 01:32:43 +00:00
Johnni Winther
5d8a9340ae
[cfe] Add support for using backend defined sentinels in late lowering
...
Change-Id: Iabcd0c79fb8f09c9de99856e50518eb7ace38464
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163860
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2020-09-23 08:07:26 +00:00
Anna Gringauze
1c8020cfc7
Emit module and add logging with timer to expression compilation
...
- Emit module before expression compilation to JavaScript so the
ProgramCompiler has all types available.
- Add logging with ticker to expression compilation in expression
compilation worker in DDC and in frontend server.
- Remove excessively verbose logging
Related:
https://github.com/dart-lang/webdev/issues/1006
https://github.com/dart-lang/webdev/issues/1106
Change-Id: Ia3a985f2d12d27f0bcc2c5d3923db137070e9cdd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162624
Commit-Queue: Anna Gringauze <annagrin@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
2020-09-22 02:17:12 +00:00
Johnni Winther
f4501b6e83
Reland "[kernel] Rename Name.name to Name.text"
...
Including a deprecated getter to avoid breaking dependent code outside
the Dart repo.
Change-Id: I365957b7c2da6e0cb5c71eb8d2906b0dc6ff18ec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/163062
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-09-17 06:10:49 +00:00
Nicholas Shahan
1d34f60b66
[ddc] Fix missing covariant checks from mixins
...
Collect all forwarding stubs from anonymous mixin classes and insert
them in the target class if no override exists.
Change-Id: Id62f20b644ce7bbabe114d0d1648664392748a2d
Fixes: https://github.com/dart-lang/sdk/issues/43027
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/161760
Commit-Queue: Nicholas Shahan <nshahan@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2020-09-16 18:56:58 +00:00
Johnni Winther
644df9b9fb
Revert "Reland: [kernel] Rename Name.name to Name.text"
...
This reverts commit c430a0ac0b .
Reason for revert: Will break flutter_frontend_server when rolled into google3
Original change's description:
> Reland: [kernel] Rename Name.name to Name.text
>
> Change-Id: I5240b0ff09faf35184998920202d7600dc97766d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162746
> Reviewed-by: Johnni Winther <johnniwinther@google.com >
> Commit-Queue: Johnni Winther <johnniwinther@google.com >
TBR=jensj@google.com ,johnniwinther@google.com
Change-Id: Ib6961f49dd416171c5d5935c490d79d6f7be779e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162748
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-09-16 08:22:55 +00:00
Johnni Winther
c430a0ac0b
Reland: [kernel] Rename Name.name to Name.text
...
Change-Id: I5240b0ff09faf35184998920202d7600dc97766d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162746
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-09-16 07:42:42 +00:00
Daco Harkes
7302e01a79
Revert "[kernel] Rename Name.name to Name.text"
...
This reverts commit 3ff8dd2f51 .
Reason for revert: Fails all CI builders. Possibly something landed
in the mean time.
Original change's description:
> [kernel] Rename Name.name to Name.text
>
> Change-Id: I93162fb387ba123b949e19a7829bd5614845b15d
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162722
> Reviewed-by: Jens Johansen <jensj@google.com >
> Commit-Queue: Johnni Winther <johnniwinther@google.com >
TBR=jensj@google.com ,johnniwinther@google.com
Change-Id: I2ffe526dabf37ae09d5e4ab1fbe514925f6e8768
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162744
Reviewed-by: Daco Harkes <dacoharkes@google.com >
Commit-Queue: Daco Harkes <dacoharkes@google.com >
2020-09-15 15:21:35 +00:00
Johnni Winther
3ff8dd2f51
[kernel] Rename Name.name to Name.text
...
Change-Id: I93162fb387ba123b949e19a7829bd5614845b15d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162722
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2020-09-15 14:27:22 +00:00
Mark Zhou
53895b2270
[dartdevc] Fixing issue related to dual exports of multiple entrypoints in a cyclic import loop.
...
See: https://github.com/flutter/flutter/issues/64011
Change-Id: I8a11e9d3f19428a516cf7a60ee45c3bacf26545d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162383
Commit-Queue: Mark Zhou <markzipan@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
2020-09-14 18:49:00 +00:00
Nicholas Shahan
50dfbe9579
[ddc] Escape type name identifiers
...
Avoids a compiler crash if invalid characters in the type names leak
from the CFE.
Change-Id: I3c9a9fcfd2ac6ef4f7ef5593a53d6f936653955e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/162260
Reviewed-by: Mark Zhou <markzipan@google.com >
Commit-Queue: Nicholas Shahan <nshahan@google.com >
2020-09-10 01:02:46 +00:00