Kallen Tu
5c36a30de2
[cfe] Instance field get for const functions.
...
Change-Id: Ie090cbf47d1e5be82e59a3f782dea8b4c1c75c91
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196380
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Jake Macdonald <jakemac@google.com >
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2021-04-22 22:14:01 +00:00
Johnni Winther
fdc765faad
[cfe] Make TypeParameter.defaultType non-nullable
...
TEST=existing
Change-Id: I0a8fdf09f742b55357411f12dc6164d4050bb83c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196283
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2021-04-21 13:51:50 +00:00
Dmitry Stefantsov
ad62d8bd7f
[cfe] Add calls to isExtensionRelated to subtype implementation
...
Closes #45775 .
Bug: https://github.com/dart-lang/sdk/issues/45775
Change-Id: Ibffdd24b1a691b2149323dbc984c0d3ae7134c25
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196120
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2021-04-21 12:03:18 +00:00
JustWe
5787ad0381
[CFE] add 'Function' as type identifier check in CFE
...
try resolve https://github.com/dart-lang/sdk/issues/45705 @eernstg
Closes https://github.com/dart-lang/sdk/pull/45736
https://github.com/dart-lang/sdk/pull/45736
GitOrigin-RevId: 2d91c32a34260014bbd5720e48a713eee180e65b
Change-Id: Ic416287137495926efe1d03da7d484202bd11272
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195761
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2021-04-21 04:43:48 +00:00
Kallen Tu
95229aa779
[cfe] Map [] operator enabled for const functions.
...
Change-Id: I19b0980fc100b3cd19da1875ec9fb08cdd1de70b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195620
Reviewed-by: Jake Macdonald <jakemac@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2021-04-20 20:19:18 +00:00
Dmitry Stefantsov
d7b0b515ab
[cfe] Forbid super-bounded typedef types as constructors
...
Closes #45658 .
Closes #45670 .
Bug: https://github.com/dart-lang/sdk/issues/45658
Bug: https://github.com/dart-lang/sdk/issues/45670
Change-Id: I5b588794a63f7b0aef84c3731ca26624ca8ff23a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195518
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
2021-04-20 11:29:27 +00:00
Nate Bosch
9443e248ee
Enable the triple shift experiment
...
Update the golden for a front_end test which adds additional constant evaluation
information now that the experiment is enabled.
A co19 test will start failing. https://github.com/dart-lang/co19/issues/1062
Change-Id: I18ec586f57deda83f6cd75e476137ab75d50a92f
TEST=No new tests.
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193747
Auto-Submit: Nate Bosch <nbosch@google.com >
Commit-Queue: Nate Bosch <nbosch@google.com >
Reviewed-by: Leaf Petersen <leafp@google.com >
2021-04-19 21:04:38 +00:00
Kallen Tu
2d330c7985
[cfe] String [] operator for const functions.
...
Change-Id: Ia1ad96cd77d94c096bf8a10aa0377f37c79ed398
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195560
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Jake Macdonald <jakemac@google.com >
2021-04-19 17:17:48 +00:00
Johnni Winther
b7c19384b7
[cfe] Handle function types in the mixin on clause
...
Closes #45700
Change-Id: Ieaab6fff727ba2b7ecf4f02be820dc54fea2a9db
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195903
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2021-04-19 13:11:28 +00:00
Johnni Winther
3e44898e08
[kernel] Make FileUriNode.fileUri non-nullable
...
TEST=existing
Change-Id: I72583e500cb0b69d9352b040c3e2885f9e0450c5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195681
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2021-04-19 08:03:30 +00:00
Xiao Yu
d968304570
Reland "Revert commits part of #40548 which still has some design debates and breaks valid local network http traffic"
...
This is a reland of d84f359786
Original change's description:
> Revert commits part of #40548 which still has some design debates and breaks valid local network http traffic
>
> Bug: https://github.com/flutter/flutter/issues/72723
> Change-Id: Ib5f809fccf1fad69add441fd40c463da8dc8be36
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192953
> Auto-Submit: Xiao Yu <xster@google.com >
> Commit-Queue: Vyacheslav Egorov <vegorov@google.com >
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com >
Bug: https://github.com/flutter/flutter/issues/72723
Change-Id: I466d888b3f324a996f0bef0463e7ab3df3179c56
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195485
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com >
Commit-Queue: Xiao Yu <xster@google.com >
2021-04-16 20:25:36 +00:00
Kallen Tu
2ab4ef2a13
[cfe] AbortStatus in return statements in constant evaluator.
...
Change-Id: I2b11774a43b9aa741ada913405154b3abbcf420f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195400
Reviewed-by: Jake Macdonald <jakemac@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2021-04-16 17:56:16 +00:00
Dmitry Stefantsov
025bcc486d
[cfe] Use the supertype locations when reporting errors
...
Closes #45626 .
Bug: https://github.com/dart-lang/sdk/issues/45626
Change-Id: I672efb0bba516534151630e6627959e0971840e5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195515
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Erik Ernst <eernst@google.com >
2021-04-16 15:49:12 +00:00
Dmitry Stefantsov
903c16e773
[cfe] Don't report locations for function-type type parameters
...
Closes #45660 .
Bug: https://github.com/dart-lang/sdk/issues/45660
Change-Id: I6d28d339c0db1993773988c6bbd7f26bd4147c16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195514
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
2021-04-16 12:33:51 +00:00
Mayank Patke
b23c6fb544
[dart2js] Disable CFE lowering for initialized late statics.
...
No additional work needs to be done in the late lowering since the
existing `_lazy` and `_lazyFinal` mechanisms already do the right thing.
Change-Id: I1dd6cb5ce3c882cac5f0206f1cbc87fd53c6fffe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195174
Commit-Queue: Mayank Patke <fishythefish@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2021-04-16 06:34:27 +00:00
Kallen Tu
4ac265efe5
[cfe] Universal error message for core errors for const functions.
...
Change-Id: I58cbbec918adad5e75ed6a7d6b8fb4bf2dcd6c0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195380
Reviewed-by: Jake Macdonald <jakemac@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2021-04-15 16:42:47 +00:00
Xiao Yu
f560d90059
Revert "Revert commits part of #40548 which still has some design debates and breaks valid local network http traffic"
...
This reverts commit d84f359786 .
Reason for revert: removed some private looking but actually vm-entrypoints used by Flutter engine https://buganizer.corp.google.com/issues/185462669
Original change's description:
> Revert commits part of #40548 which still has some design debates and breaks valid local network http traffic
>
> Bug: https://github.com/flutter/flutter/issues/72723
> Change-Id: Ib5f809fccf1fad69add441fd40c463da8dc8be36
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192953
> Auto-Submit: Xiao Yu <xster@google.com >
> Commit-Queue: Vyacheslav Egorov <vegorov@google.com >
> Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
> Reviewed-by: Lasse R.H. Nielsen <lrn@google.com >
TBR=lrn@google.com ,vegorov@google.com ,xster@google.com
Change-Id: Ie746805ab7ef214bc4ba6f3582eb1d32672360ee
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: https://github.com/flutter/flutter/issues/72723
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195484
Reviewed-by: Xiao Yu <xster@google.com >
Commit-Queue: Xiao Yu <xster@google.com >
2021-04-15 15:29:28 +00:00
Dmitry Stefantsov
91aecfcd5f
[cfe] Use i2b at the end of function call inference
...
Closes #45598 .
Bug: https://github.com/dart-lang/sdk/issues/45598
Change-Id: I37430faf057e3559ad6aefaa59d83d8a14320c54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194764
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2021-04-15 10:33:27 +00:00
Daco Harkes
8a2b7bb5d5
[vm/ffi] Support Unions
...
Closes: https://github.com/dart-lang/sdk/issues/38491
tools/test.py ffi ffi_2
TEST=tests/ffi(_2)/(.*)by_value_(*.)_test.dart
Change-Id: I6d29f7e3c3046cda4a15c9b42063c66b064787be
Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try,dart-sdk-mac-try,dart-sdk-win-try,vm-ffi-android-debug-arm-try,vm-ffi-android-debug-arm64-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-mac-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-ia32-try,vm-kernel-nnbd-mac-release-x64-try,vm-kernel-nnbd-win-debug-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-nnbd-linux-debug-x64-try,vm-kernel-precomp-win-release-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,vm-kernel-msan-linux-release-x64-try,vm-kernel-precomp-msan-linux-release-x64-try,vm-kernel-precomp-android-release-arm_x64-try,analyzer-analysis-server-linux-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-linux-debug-x64c-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194420
Commit-Queue: Daco Harkes <dacoharkes@google.com >
Reviewed-by: Aske Simon Christensen <askesc@google.com >
2021-04-15 10:16:27 +00:00
Xiao Yu
d84f359786
Revert commits part of #40548 which still has some design debates and breaks valid local network http traffic
...
Bug: https://github.com/flutter/flutter/issues/72723
Change-Id: Ib5f809fccf1fad69add441fd40c463da8dc8be36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192953
Auto-Submit: Xiao Yu <xster@google.com >
Commit-Queue: Vyacheslav Egorov <vegorov@google.com >
Reviewed-by: Vyacheslav Egorov <vegorov@google.com >
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com >
2021-04-15 09:25:17 +00:00
Kallen Tu
c851cd31b5
[cfe] Core List properties enabled with const functions.
...
Change-Id: I3bac87b7be213756fc24fbb026f663f14c390e7b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/195200
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Jake Macdonald <jakemac@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2021-04-14 20:02:45 +00:00
Kallen Tu
f9536375e1
[cfe] Invalid empty return statements in const function invocations.
...
Change-Id: Id1408bff917200f3825846bd6d483e52ca326d5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194840
Reviewed-by: Jake Macdonald <jakemac@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2021-04-13 14:49:06 +00:00
Daco Harkes
bde9578a39
[vm/ffi] Introduce _Compound NativeType
...
Introduces the class `_Compound extends NativeType`, for sharing between
`Struct` and `Union`.
Does minimal changes to CFE and IL construction. Follow up refactor CLs
rename everything.
Bug: https://github.com/dart-lang/sdk/issues/38491
tools/test.py ffi ffi_2
TEST=tests/ffi(_2)/(.*)by_value_(*.)_test.dart
Change-Id: I276ceb9249c20bd331c2f8b6ef64e35acb525e9c
Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-reload-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194765
Reviewed-by: Aske Simon Christensen <askesc@google.com >
2021-04-13 12:50:17 +00:00
Johnni Winther
8baa649665
[cfe] Add tests to verify that mixin forwarding stub problems have been fixed
...
With the new class hierarchy builder and mixin stubs we no longer
insert superfluous forwarding stub nor use mixin declaration/clones
as targets inconsistently.
These test expand upon existing tests to verify that these issue have
been fixed.
Change-Id: I27db6e27e86d8c83692e9a16f7c435f633a599c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194787
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2021-04-13 07:55:46 +00:00
Mayank Patke
05a0508e7c
[dart2js] Implement Cell lowering for initialized local variables.
...
Change-Id: I99c1274e1a74693be329ad9f582baf2a9817934a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194961
Commit-Queue: Mayank Patke <fishythefish@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2021-04-13 02:25:46 +00:00
Mayank Patke
5d20034a82
Reland "[dart2js] Implement Cell lowering for uninitialized static fields."
...
This is a reland of da42b0d323
Original change's description:
> [dart2js] Implement Cell lowering for uninitialized static fields.
>
> Change-Id: If0cd7c95a8e52de19893892acae662619075d87b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193835
> Commit-Queue: Mayank Patke <fishythefish@google.com >
> Reviewed-by: Johnni Winther <johnniwinther@google.com >
Change-Id: Ic8089989c2c474c4204be9742601be82f9aa108f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194901
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Mayank Patke <fishythefish@google.com >
2021-04-12 21:11:26 +00:00
Kallen Tu
9bd43c3071
[cfe] Uninitialized variable declarations in const functions.
...
Change-Id: I1c27902a0af7648b4352b0cd21691cf9f88b78fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194460
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Reviewed-by: Jake Macdonald <jakemac@google.com >
2021-04-12 15:42:26 +00:00
Johnni Winther
64460ec47f
[kernel] Make Member.name non-nullable
...
Change-Id: Id2befd868e93985d6af463c2ccd410cd56b68187
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194721
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2021-04-12 13:48:46 +00:00
Kallen Tu
0b175ed534
[cfe] Const constructors enabled with const functions.
...
Change-Id: Ic0597bf7ec69811ec822539ef5df1e24ef1b9884
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194560
Reviewed-by: Jake Macdonald <jakemac@google.com >
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2021-04-09 21:10:53 +00:00
Mayank Patke
c745c6d26a
Revert "[dart2js] Implement Cell lowering for uninitialized static fields."
...
This reverts commit da42b0d323 .
Reason for revert: g3 failures
Original change's description:
> [dart2js] Implement Cell lowering for uninitialized static fields.
>
> Change-Id: If0cd7c95a8e52de19893892acae662619075d87b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193835
> Commit-Queue: Mayank Patke <fishythefish@google.com >
> Reviewed-by: Johnni Winther <johnniwinther@google.com >
TBR=johnniwinther@google.com ,sra@google.com ,fishythefish@google.com
Change-Id: Ic90ebf140b2105f06afa43ae7d332c01887cd8d5
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194900
Reviewed-by: Mayank Patke <fishythefish@google.com >
Commit-Queue: Mayank Patke <fishythefish@google.com >
2021-04-09 20:42:45 +00:00
Mayank Patke
da42b0d323
[dart2js] Implement Cell lowering for uninitialized static fields.
...
Change-Id: If0cd7c95a8e52de19893892acae662619075d87b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193835
Commit-Queue: Mayank Patke <fishythefish@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2021-04-09 19:46:23 +00:00
Johnni Winther
282a3ab70b
[cfe] Handle ParserRecovery in beginTypeVariable
...
Closes #45329
Change-Id: I7e153e41891332bd8ea85849b993066de342eed5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194682
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2021-04-09 09:38:31 +00:00
Kallen Tu
6f90c5531e
[cfe] Closures and environment changes for const functions.
...
Change-Id: If844a28192c1eef4dcbb62075ae07e86297f2c92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193920
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Reviewed-by: Jake Macdonald <jakemac@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2021-04-08 15:09:39 +00:00
Kallen Tu
5bcaf448af
[cfe] Try-catch, try-finally, throw for const functions.
...
Change-Id: Id25f78bba9c65e702bcd5051c776782a146e0605
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193780
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Reviewed-by: Jake Macdonald <jakemac@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2021-04-07 21:40:38 +00:00
Mayank Patke
8f832e2c6b
[dart2js] Implement Cell lowering for uninitialized locals.
...
Change-Id: I7233e1484cc19e5f24d215bfd2c1e34c8f12961b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193588
Commit-Queue: Mayank Patke <fishythefish@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2021-04-07 19:43:07 +00:00
Johnni Winther
5f57456528
[cfe] Support experimental flags and language versions in message_suite.dart
...
Change-Id: I150a93834783219c73f9dc4961eb83a48a7ea7e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194067
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2021-04-07 11:31:07 +00:00
Daco Harkes
d27f166b75
[vm/ffi] Tree shaking of Struct sub classes
...
This CL enables tree shaking of `Struct` sub classes by simulating the
native behavior in Dart code.
We call the struct constructors in let expressions where FFI trampolines
are created which allocate these struct objects in native code. This way
TFA is instructed about the native behavior. The VM recognizes these
constructor calls as dead code and removes them.
For more info see go/dart-ffi-struct-treeshaking.
Closes: https://github.com/dart-lang/sdk/issues/38721
This CL fixes the types on the generated #fromTypedDataBase constructors.
Also, this CL also cleans up the struct naming:
* _addressOf -> _typedDataBase
* _fromPointer -> _fromTypedDataBase
* #pointer -> #typedDataBase
These cleanups are not split into a separate CL to prevent updating
the .expect files multiple times.
Finally, this CL enables running a single transformer test through:
`dart pkg/vm/test/transformations/type_flow/transformer_test.dart name`
TEST=pkg/vm/testcases/transformations/type_flow/transformer/ffi_struct_constructors.dart
TEST=tests/ffi(_2)/function_callbacks_structs_by_value_generated_test.dart
TEST=tests/ffi(_2)/function_structs_by_value_generated_test.dart
Change-Id: I418d0d73bc86b234dfe5b7b04ae726c33d2b8aeb
Cq-Include-Trybots: luci.dart.try:vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64-try,vm-kernel-precomp-asan-linux-release-x64-try,vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-obfuscate-linux-release-x64-try,analyzer-analysis-server-linux-try,analyzer-linux-release-try,dart-sdk-linux-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-reload-linux-debug-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193661
Commit-Queue: Daco Harkes <dacoharkes@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2021-04-07 11:02:27 +00:00
Johnni Winther
05c70ab355
[cfe] Update tests after language version change
...
In response to #45461
Change-Id: I5bc6234cf6c6ca620e322697aeb0a0c2a04d4ffd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/194066
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2021-04-07 09:44:07 +00:00
Kallen Tu
b5d4d26abe
[cfe] Const factories when const functions enabled.
...
Change-Id: Ifd24678c0ac191c5cc6f1d60443ab96f56cbba7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192400
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Jake Macdonald <jakemac@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2021-04-06 19:46:32 +00:00
Johnni Winther
f0ccceab4d
Roll dart_style 2.0.1 into the SDK.
...
This pins to https://github.com/dart-lang/dart_style/pull/1016 .
Change-Id: Ia7b297a03eff00c68bf76bbfd206cf88d800a92c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193961
Reviewed-by: Jens Johansen <jensj@google.com >
Reviewed-by: Nate Bosch <nbosch@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
Auto-Submit: Bob Nystrom <rnystrom@google.com >
2021-04-06 14:32:37 +00:00
Mayank Patke
76ed8441b9
Add frontend expectations for late variables in dart2js.
...
Change-Id: I718ba69d31d44f30bb52157e87ebc64316bf860b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193586
Commit-Queue: Mayank Patke <fishythefish@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Stephen Adams <sra@google.com >
2021-04-01 22:58:07 +00:00
Dmitry Stefantsov
904882fce3
[cfe] Check rhs of typedefs for regular-boundness
...
Closes #42435 .
Closes #45491 .
Closes #45493 .
Bug: https://github.com/dart-lang/sdk/issues/42435
Bug: https://github.com/dart-lang/sdk/issues/45491
Bug: https://github.com/dart-lang/sdk/issues/45493
Change-Id: I368aff553a8bdd5e5312ecf06f0d19c8390a0d22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193662
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2021-04-01 12:26:43 +00:00
Dmitry Stefantsov
19297a9a42
[cfe] Implement missing bound checks for nonfunction type aliases
...
Closes #45519 .
Bug: https://github.com/dart-lang/sdk/issues/45519
Change-Id: I0492e83ebf605eaa1355d7e472bc28050dc5588c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193500
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2021-03-31 19:21:42 +00:00
Johnni Winther
3c2dfd7975
[cfe] Check bounds on function invocation
...
Closes #45464
Change-Id: I0fb3abf66c2119147ddd9413792e6f5dc151c31c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193660
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2021-03-31 16:33:49 +00:00
Alexander Markov
6239c434fb
[vm,cfe] Avoid elimination of 'x as Function' type casts
...
Elimination of redundant type cast 'x as Function' where x is
a function type (such as 'void Function(int)') is not correct because
it changes semantics of a function call if such expression is
used as a receiver.
"Function" static type of receiver allows arbitrary function calls,
while known function type of the receiver means the call doesn't
need to check parameter types. Static type of receiver is currently
not stored in kernel AST but calculated from the receiver node,
so replacing 'x as Function' with 'x' changes static type of
the receiver from "Function" to function type.
TEST=tests/language/regress/regress45428_test.dart
Fixes https://github.com/dart-lang/sdk/issues/45428
Change-Id: If7148450526703daa63a442adf67a9e7a2dcea54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193524
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2021-03-31 15:57:29 +00:00
Johnni Winther
1eda15854d
[cfe] Allow experiments only in current sdk version
...
Experiments that have not be enabled by default should only be allowed
in the current version of the sdk.
Closes #45460
Change-Id: I159f390ac85fe37943920717ce11a4c817d5b4a9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193480
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2021-03-31 15:20:08 +00:00
Johnni Winther
19ab1fd800
[cfe] Report error on nullable supertypes through type aliases
...
Closes #43261
Closes #45423
Change-Id: Ia22975f9cd8fd3835b0feda82c6d5310098b605c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193501
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2021-03-31 12:34:13 +00:00
Johnni Winther
9ca19cac6f
[kernel] Change encoding of types in constants to not be offset by the context
...
Function type parameters in occurring in constants were using an offset
based on the context in which the constant first occurred. This meant
that function type parameters occurring in a generic context would have
a different offset that those occurring in a non-generic context.
The loading of .dill in ast_from_binary would read all constants outside
the context and would therefore get the indices wrong on generic
function types.
This CL changes the encoding of these type parameters to always use
a fresh context.
Closes #45415
TEST=pkg/front_end/testcases/generic_metadata/from_dill/main.dart
Change-Id: Ifdaedb4581f1e022c908fc58a58ceac3d7b0900e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193481
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2021-03-31 12:31:43 +00:00
Johnni Winther
0a1a5276ba
[cfe] Ensure that types are also resolved in case of parser recovery
...
Closes #45490
Change-Id: I447a637a13fc9a32528a79f0f036c0aa6f74abb5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193407
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2021-03-30 14:56:38 +00:00
Dmitry Stefantsov
3a21e08d9e
Reland [cfe] Remember built TypedefTypes for late bounds checks
...
Closes #45487 .
Bug: https://github.com/dart-lang/sdk/issues/45487
Change-Id: Idf68c051260b47e9d830c5de0cba977e2f85b427
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193401
Commit-Queue: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2021-03-30 13:49:18 +00:00