Johnni Winther
30e4861d9b
[cfe] Run weak suite only on dart2js
...
Change-Id: I96aa868dd9ac5cf8c7c5592607c0d87e3f2d9bc7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366620
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2024-05-15 11:33:06 +00:00
Johnni Winther
4bf22f41f3
[cfe] Use sound null safety for outline and modular suites
...
Change-Id: Ideee9917b2e5b819672c7e441d051f9bc57c86c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/366342
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2024-05-15 08:27:25 +00:00
Alexander Markov
9ee25d3ce1
Cleanup unsound mode from pkg/vm, frontend_server and dart2native
...
TEST=ci
Change-Id: Ica8b8b68f69e8f4a8cd5af3375da4a9ff0947c35
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/364602
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Siva Annamalai <asiva@google.com >
2024-04-29 14:18:01 +00:00
Alexander Markov
632a8baac5
[vm] Avoid altering static types when removing redundant type casts
...
VM can use static type of receiver in order to omit parameter
type checks. Removing a redundant AsExpression node can incorrectly
change static type of a receiver and break parameter type checks.
So, instead of removing redundant AsExpression nodes they are now
marked as Unchecked. This turns them into a no-op when building
flow graph, but keeps static type unchanged.
TEST=runtime/tests/vm/dart/regress_53945a_test.dart
Fixes https://github.com/dart-lang/sdk/issues/53945
Change-Id: Ic283158c9b7ba11cb5c140226a6d057e98c8ce77
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351621
Reviewed-by: Tess Strickland <sstrickl@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2024-02-12 17:54:32 +00:00
Johnni Winther
8a2f6495b3
[cfe] Add isImplicitCall to DynamicInvocation
...
This adds an ìsImplicitCall to DynamicInvocation which is set on
expression like `d()` where `d` has type dynamic, to distinguish
the for `d.call()`.
TEST=pkg/front_end/testcases/general/dynamic_call.dart
Change-Id: I73beb911bdb315a510c862e6d4876cf7673ec3c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346240
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2024-01-19 08:39:30 +00:00
Jens Johansen
01a27372e2
[CFE] Textual outline suite doesn't remove empty lines before formatting
...
Change-Id: I8b7d9fdb5e2562914b66ccd748a8f417895658a4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/344705
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2024-01-08 13:11:52 +00:00
Johnni Winther
59c3ab312b
[cfe] Allow FormatterCrash for unreleased features
...
This extracts the FolderOptions and TestOptions logic from suite.dart
to be shared with other test suites. The former is used to allow
the textual outline suite to have a formatter crash while a feature
is not yet released. These crashes have caused quite a bit of churn
in the early development of new features.
Change-Id: Iac607ea8fc1c8ae0ba9dd0397bccb9a11fbae9a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/319982
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2023-08-14 07:27:27 +00:00
Johnni Winther
36641368bb
[cfe] Treat NonNullableByDefault as default in ast-to-text
...
This changes ast-to-text to mark legacy libraries instead of
non-nullable-by-default libraries.
TEST=existing
Change-Id: Ib01147e4ef48c2c5b2ffc6b23547998344dfdf2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307121
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2023-06-08 06:28:50 +00:00
Johnni Winther
13c4ad23c5
[kernel] Add SwitchStatement.expressionType
...
This adds the static type of the switch statement expression to
the AST to better support optimizations based on the possible
runtime values of the switch expression.
TEST=existing
Change-Id: Ief35b687150401100d8c96721a026e9f0911b3b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301063
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
Reviewed-by: Mayank Patke <fishythefish@google.com >
2023-05-08 07:39:02 +00:00
Johnni Winther
6d2e6f9452
[cfe] Improve switch encoding
...
Addresses https://github.com/dart-lang/sdk/issues/51554#issuecomment-1466946211
Closes #51391
TEST=existing
Change-Id: Idec105dcfde4a91d0a21a1907777d6c07e5f01b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/289224
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2023-03-20 15:21:52 +00:00
Johnni Winther
04e6f4c282
[kernel] Add VariableDeclaration.isSynthesized
...
This adds an [isSynthesized] flag to the [VariableDeclaration] the
signal when the variable doesn't correspond to a variable in the
source code.
The name of a variable can only be `null` if it is synthesized.
Partially in response to
https://github.com/dart-lang/sdk/issues/51554
TEST=existing
Change-Id: I94591971f11da09d210c8b25a2d05e22ca05dc62
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286961
Reviewed-by: Joshua Litt <joshualitt@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2023-03-10 11:13:36 +00:00
Martin Kustermann
354e8068a4
[kernel] Make package:kernel`s text printer end map constants with matching "}"
...
This makes it easier to navigate around in editors that can go to
matching braces/parenthesis (e.g. jump from end of constant section to
start).
TEST=Fixes kernel text printer & updates tests.
Change-Id: I6cbf34f5a62e11454e5de4d5fc9a313e0c6cf36c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283641
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Martin Kustermann <kustermann@google.com >
2023-02-20 14:10:09 +00:00
Johnni Winther
404fbe553b
[cfe] Always create PatternSwitchStatement when patterns are enabled
...
This ensures that an otherwise regular switch statement has the new
switch statements semantics; using == calls and allowing user defined
== implementations.
Closes #50871
Change-Id: I0908b3a0adce959fe65ca61c5e94cf2a5e3f7e65
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280109
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
2023-02-01 19:08:54 +00:00
Johnni Winther
eba2188053
[cfe] Insert synthetic break statements
...
With the patterns feature, switch cases without a break now implicitly
break instead of falling through to the next case (which was an error
anyway). We now insert a synthetic break statement in such cases.
To avoid crashes, the implementation to `TypeAnalyzerisAlwaysExhaustiveType` is also provided. This function
is not explicit test by this CL.
Closes #50624
Change-Id: I5d467072e26d79d0469e216bd21b460237af931b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/278746
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2023-01-11 10:53:17 +00:00
Chloe Stefantsova
a46de1c30c
[cfe] Add implicit null-check on throw
...
Throwing `null` is not supported in sound null safety. This change
inserts an implicit `as Object` cast that result in a TypeError, rather
than a NullThrownError, in sound mode.
Closes https://github.com/dart-lang/sdk/issues/49198
TEST=Covered by the existing tests
Change-Id: I041baf95becd2df1b940fdff7cde398a4e391ee7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247546
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com >
2022-12-12 00:48:13 +00:00
Johnni Winther
41e04fc452
[cfe] Handle non-const records in const constructors
...
The initializer was built in an 'inferred' rather than a 'required'
constant context, meaning that it would be encoded as a declaratively
constant literal instead of a structurally constant literal.
Closes #50132
Change-Id: I58b995d879efd2ec374b711718b63ac8f122bcfc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262349
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
2022-10-28 09:55:22 +00:00
Johnni Winther
29d7be011e
[cfe] Omit line/column from sdk constant coverage
...
This is done to avoid unnecessary dependency on sdk sources.
Change-Id: I5a72df4bb3a808a5a6398ae45ca587b43734314d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251264
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2022-07-13 06:52:14 +00:00
Jens Johansen
3326738913
[CFE] Enable NNBD and triple shift in textual outline suite
...
Change-Id: I2eac320f0d9c60370105fdcf1b5b49e58c7f6ced
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249180
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2022-06-21 06:21:03 +00:00
Johnni Winther
6980a1b4c3
[kernel] Add VariableDeclaration.hasDeclaredInitializer
...
The computation of default values on super parameters requires the
notion of a declared initializer. By adding this as a flag to
VariableDeclarations the implementation can now be normalized across
parameter from source and dill.
TEST=existing
Change-Id: Ic980e68b569e3bdab38d2c7c7e4374e0c931a87b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/240403
Reviewed-by: Aske Simon Christensen <askesc@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2022-04-07 14:54:08 +00:00
Johnni Winther
078d407f40
[cfe] Add modular_suite
...
This adds a new expectation test suite which mimics the modular
compilation strategy used by dartdevc; the test code is fully compiled
but the linked dependencies are only compiled as outlines.
Change-Id: I4b8a68087997c025eb39aec414ee1706ddf7f847
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/222762
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
2021-12-10 14:02:30 +00:00
Johnni Winther
6c4b75237a
[kernel] Rename isFieldFormal to isInitializingFormal
...
+ update ast-to-text, including previous renames of covariant
TEST=existing
Change-Id: Ia29847cba791096ccd9c6c383a1b633a6150cd94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214042
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Chloe Stefantsova <dmitryas@google.com >
2021-09-22 15:56:07 +00:00
Johnni Winther
a4a1f2c0d5
[cfe] Update precedence for instantiation and constant nodes in ast-to-text
...
TEST=existing
Change-Id: I6269aaef293765e68e5f119184f0d24f40da9aec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/212821
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2021-09-10 12:10:27 +00:00
Daco Harkes
2b5adb7231
[vm] Implement constant Maps in the VM
...
This CL changes the frontend to emit map and set constants which are
then processed by the constant reader in the VM.
This CL also introduces support for sending the const maps and sets
in messages between isolates and saving it in snapshots.
TEST=tests/language/const/map_test.dart (et al, for lookups)
TEST=tests/lib/isolate/message3_test.dart (et al, for isolate messages)
TEST=tools/test.py -c dartkp (for consts from clustered snapshot)
TEST=tools/test.py -n app_jitk-linux-debug-x64 (for consts from app
jit snapshots)
TEST=Building the SDK which uses const Maps in clustered snapshots.
Closes: https://github.com/dart-lang/sdk/issues/45908
Change-Id: I1f8150a8aba8298c4e64d2571dd147743526135a
Cq-Include-Trybots: luci.dart.try:analyzer-nnbd-linux-release-try,app-kernel-linux-debug-x64-try,dart-sdk-linux-try,front-end-nnbd-linux-release-x64-try,pkg-linux-debug-try,vm-canary-linux-debug-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-checked-linux-release-x64-try,vm-kernel-linux-debug-x64c-try,vm-kernel-linux-debug-x64-try,vm-kernel-linux-debug-simarm64c-try,vm-kernel-nnbd-linux-release-simarm-try,vm-kernel-optcounter-threshold-linux-release-x64-try,vm-kernel-precomp-android-release-arm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-debug-x64c-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-precomp-linux-debug-simarm_x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-tsan-linux-release-x64-try,vm-kernel-tsan-linux-release-x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/203765
Reviewed-by: Martin Kustermann <kustermann@google.com >
2021-09-06 06:28:59 +00:00
Johnni Winther
ae4543fcb9
[cfe] Report all compile-time errors found during constant evaluation
...
Closes #46925
Change-Id: I81e97cae05c39c24b24dae82a222f857d4730ac7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/210465
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2021-08-24 11:42:53 +00:00
Johnni Winther
e7638e8e96
[cfe] Use wrapInProblem instead of buildProblem in inference
...
Change-Id: I51fe495d162e26ac7cd97629272170c85cafea36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208642
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2021-08-04 10:07:24 +00:00
Johnni Winther
5dc4d65114
[kernel] Add InvalidExpression.expression
...
... and use this to wrap expressions instead of Let
TEST=existing
Change-Id: I6d1f5cfa4693222840d6cb406790c39c6ae63e5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/208580
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2021-08-04 08:40:18 +00:00
Alexander Markov
88021fd67a
[vm] Enable new kernel AST invocation nodes for the VM, take 2
...
This change was already reviewed at
https://dart-review.googlesource.com/c/sdk/+/197586 .
Bugfix is in the separate change:
https://dart-review.googlesource.com/c/sdk/+/199365 .
TEST=ci
Issue: https://github.com/dart-lang/sdk/issues/45340
Change-Id: I4311909e4893af53e88895512f03d3ef84c6bc5f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199366
Commit-Queue: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2021-05-20 18:53:45 +00:00
Martin Kustermann
31364331e9
Revert "[vm] Enable new kernel AST invocation nodes for the VM"
...
This reverts commit 53e3c079b7 .
Reason for revert: This change has seemingly caused errors of the form
```
stderr >> Unhandled exception:
stderr >> Invalid argument(s): Missing canonical name for Reference to <XXX>
stderr >> #0 BinaryPrinter.writeNullAllowedReference (package:kernel/binary/ast_to_binary.dart:894:9)
stderr >> #1 BinaryPrinter.visitTypedefType (package:kernel/binary/ast_to_binary.dart:2410:5)
stderr >> #2 TypedefType.accept (package:kernel/ast.dart:11115:42)
stderr >> #3 BinaryPrinter.writeNode (package:kernel/binary/ast_to_binary.dart:403:10)
stderr >> #4 BinaryPrinter.writeOptionalNode (package:kernel/binary/ast_to_binary.dart:496:7)
```
Issue https://github.com/dart-lang/sdk/issues/45966
Original change's description:
> [vm] Enable new kernel AST invocation nodes for the VM
>
> TEST=ci
>
> Issue: https://github.com/dart-lang/sdk/issues/45340
> Change-Id: Ibb307d8df8ff4ae8f2efad177880634ec9e27905
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197586
> Commit-Queue: Alexander Markov <alexmarkov@google.com >
> Reviewed-by: Johnni Winther <johnniwinther@google.com >
> Reviewed-by: Aske Simon Christensen <askesc@google.com >
TBR=vegorov@google.com ,alexmarkov@google.com ,johnniwinther@google.com ,askesc@google.com
Change-Id: I05d010378cfcc5ba40f2be58b01b3ed27a8fc31e
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Issue: https://github.com/dart-lang/sdk/issues/45340
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/199000
Reviewed-by: Martin Kustermann <kustermann@google.com >
Commit-Queue: Martin Kustermann <kustermann@google.com >
2021-05-10 12:32:38 +00:00
Alexander Markov
53e3c079b7
[vm] Enable new kernel AST invocation nodes for the VM
...
TEST=ci
Issue: https://github.com/dart-lang/sdk/issues/45340
Change-Id: Ibb307d8df8ff4ae8f2efad177880634ec9e27905
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197586
Commit-Queue: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Aske Simon Christensen <askesc@google.com >
2021-05-09 21:00:28 +00:00
Alexander Markov
237c6eef9e
[cfe] Improve support for new invocation nodes in constant evaluator
...
* FunctionInvocation and LocalFunctionInvocation nodes are now supported.
* Handling of List getters is added to InstanceGet.
* Removed incorrect constant evaluation of .hashCode and .runtimeType
for List constants.
Issue: https://github.com/dart-lang/sdk/issues/45340
Change-Id: I73f3e64e805c0753325463b3e777a6c1b7d0b5fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/198181
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2021-05-09 20:04:38 +00:00
Kallen Tu
68d133d949
[cfe] Mutable lists and list add method in const functions.
...
Within constant evaluation, mutable lists can be created and altered with `add`.
Change-Id: I4ad86e3bea768844835dd732bff3ae135d6df8fb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197280
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Jake Macdonald <jakemac@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2021-04-29 17:52:36 +00:00
Kallen Tu
2ac2871476
[cfe] NullConstant variable declaration value.
...
Change-Id: I6d5adea4d70d8cd34f565a729034e2636935033e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197120
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Jake Macdonald <jakemac@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2021-04-29 15:36:15 +00:00
Kallen Tu
4e2fac951d
[cfe] Allow non-const constructor invocations in const functions.
...
Change-Id: Ieb8d3030c6132ccf9037e64cef3ba6c4eeaa90ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197180
Reviewed-by: Jake Macdonald <jakemac@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2021-04-28 21:17:33 +00:00
Kallen Tu
8a0801572c
[cfe] Instance method invocations for const functions.
...
Change-Id: I2e7d8b3859f09dd906e78e6e6d44722a0aabaeb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196140
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Bob Nystrom <rnystrom@google.com >
Reviewed-by: Jake Macdonald <jakemac@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2021-04-26 18:11:47 +00:00
Kallen Tu
931f7dc2e6
[cfe] List [] for const functions.
...
Change-Id: Ibbd9b828334609bca3d700bd5af7049b78b8a33a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/196200
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Jake Macdonald <jakemac@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2021-04-26 16:40:17 +00:00
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
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
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
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
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
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
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
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
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
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
Kallen Tu
5b3a5acf01
[cfe] Switch statements for const functions.
...
Change-Id: I1194f9091b74ba3e288d5e7bd386c204fa25c837
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/193360
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Reviewed-by: Jake Macdonald <jakemac@google.com >
2021-03-30 03:56:58 +00:00
Kallen Tu
045813c1f3
[cfe] Asserts for const functions.
...
Basic assert statements, inline functions in the future. AssertBlocks are not supported with const functions.
Change-Id: Ic831fc4d76db0403a30577b9d00c629237148581
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192800
Reviewed-by: Jake Macdonald <jakemac@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
Commit-Queue: Kallen Tu <kallentu@google.com >
2021-03-24 16:38:41 +00:00
Kallen Tu
9e5a6c1568
[cfe] Do-while statements for const functions.
...
Change-Id: I881fb535ef76e564ab76c5fc661d3adbbe5aed0f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/192401
Commit-Queue: Kallen Tu <kallentu@google.com >
Reviewed-by: Jake Macdonald <jakemac@google.com >
Reviewed-by: Dmitry Stefantsov <dmitryas@google.com >
2021-03-22 22:19:45 +00:00