Jens Johansen
fc79ba71c6
[kernel] Get location less in verifier
...
Change-Id: I644f46819b2c4524f57aa3a37f4e2b754b6f951d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322641
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2023-08-25 11:38:35 +00:00
Alexander Markov
9f40ce6e3d
[vm/aot] Use inferred types of captured local variables
...
On a micro-benchmark from https://github.com/dart-lang/sdk/issues/48764
in AOT mode, 'for-in' case:
Before: 0.556557s
After: 0.166579s (3.3x faster)
TEST=runtime/tests/vm/dart/regress_48764_il_test.dart
Issue https://github.com/dart-lang/sdk/issues/48764
Fixes https://github.com/dart-lang/sdk/issues/51102
Change-Id: I591739b8c2154931f6c535db57c0c11ba0eeb4a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321543
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Martin Kustermann <kustermann@google.com >
2023-08-24 15:21:51 +00:00
Johnni Winther
e0142d3435
[kernel] Remove caching of ExtensionType.typeErasure
...
The cache collides with the need to transform the declared representation
type on ExtensionTypeDeclaration.
Closes #53204
Change-Id: I1be3e50dbf932928e08bbf82e1b85ba9d0b29bf5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322120
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2023-08-24 14:21:40 +00:00
Jens Johansen
9f9da91b84
[kernel] Facilitate faster sorting of additional exports
...
The "additionalExports" are sorted in production code to give stable
output.
Before this CL it did `toString()` on the canonical names which is
O(n^2) because of continued string concatenation.
This CL changes it to sort on the name, going to the parent if it's the
same. This _does_ change the sorting, but should still be stable.
When compiling via the flutter frontend try bot the time spent on
sorting does from ~45 seconds to ~9 seconds (arguable still a lot, but
much better).
This will also speed up flutter testing because it will spend less time
waiting for the frontend.
TEST=Assuming existing tests.
Change-Id: If350b7c2ce49f00b2924732a7fa7eb51c38c8172
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/322280
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Commit-Queue: Jens Johansen <jensj@google.com >
2023-08-24 13:21:38 +00:00
Mayank Patke
5be5d29cd7
[dart2js] Implement await runtime check using kernel transformation.
...
This replaces the lowering during SSA which requires manually
registering impacts in multiple places. Instead, we use a kernel
transformation to invoke a helper function which implements the
specified semantics.
Change-Id: I58fd11f6d4d1e4f90d00fa826453de024c8686aa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/319901
Reviewed-by: Stephen Adams <sra@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Lasse Nielsen <lrn@google.com >
Commit-Queue: Mayank Patke <fishythefish@google.com >
2023-08-23 22:58:49 +00:00
Johnni Winther
30cb4d44e4
[cfe] Handle extension type in fuzz testing
...
Closes #53115
Closes #53117
Change-Id: Id34594b246a86f1c62dfc41d55a783a737a300ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321680
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2023-08-18 12:49:53 +00:00
Johnni Winther
caafea0aee
[kernel] Rename ExtensionType.instantiatedRepresentationType to typeErasure
...
To align with the specification.
TEST=existing
Change-Id: I7a9f21473c860b90f051bf9bc3361dfd7786c40c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/320521
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2023-08-17 08:32:58 +00:00
Johnni Winther
eb54326834
[cfe] Ensure default types on extension type constructor type parameters
...
Closes #53155
Change-Id: I3032078f5e1c48e4dc78062d32efabcee478ccf1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/320860
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
2023-08-16 14:23:24 +00:00
Chloe Stefantsova
4352f10c05
[cfe] Implement spec update on generator element type
...
The update can be found here:
https://github.com/dart-lang/language/pull/3218/files
Closes https://github.com/dart-lang/sdk/issues/53052
Change-Id: I08146a6ca09667cc5e0ebcd564e60f454d03a468
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/320763
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com >
2023-08-16 09:49:34 +00:00
Johnni Winther
a6de8d5468
[cfe] Implement subtyping for ExtensionType
...
Change-Id: I5c8d76083190945eaa5c2fbb43ad0d94dea7540f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/319482
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2023-08-15 09:39:35 +00:00
Johnni Winther
1c12ac639f
[cfe] Compute instantiated representation type
...
TEST=pkg/front_end/testcases/inline_class/extension_types/representation_type.dart
Change-Id: I384c7b68513ccf8426a41029622b8c0913197cd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/319481
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2023-08-11 10:32:00 +00:00
Johnni Winther
0769b22b4f
[cfe] Support interface member access on extension types
...
Change-Id: I53975b71683e119fe6abec72341cdcd814244f58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/318982
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2023-08-09 12:19:39 +00:00
Johnni Winther
6b5c722712
[cfe] Update ast-to-text for extension type declarations
...
Includes a fix for the serialization of the representation name found
through the update of the ast-to-text.
TEST=existing
Change-Id: Id741d66d8f43b5dc1d5e79f967b9625579539404
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/318941
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
2023-08-08 14:53:20 +00:00
Johnni Winther
b6409c0f04
[cfe] Check superbounded extension types
...
Closes #53139
Change-Id: I2f13d77454e2a7bac70d19afa1fb321815aac3bc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/318641
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2023-08-08 09:13:51 +00:00
Johnni Winther
7a2f49a3fa
[cfe] Check cyclic representation dependency
...
Change-Id: Ic0da6d4af5c16c1460add140bbffcb21c5a2139d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/318280
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2023-08-07 08:58:28 +00:00
Johnni Winther
4243547391
[cfe] Check and add non-extension types in implements clause
...
Closes #51564
Change-Id: I555c367f3650ddb435908a72b78069ceb6d07814
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317881
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
2023-08-03 13:16:48 +00:00
Paul Berry
191752dc00
Front end: add unchecked "as" nodes for promoted getter accesses.
...
These nodes are necessary to inform the back ends that the static type
of the getter access is different from the static type of the
field. Without them, some back ends may make unsound assumptions about
the generated code, leading to runtime failures.
Fixes https://github.com/dart-lang/sdk/issues/50499 .
Change-Id: Iad32c9b660d6e3e3106c3143c5139c8a6bd0b67b
Bug: https://github.com/dart-lang/sdk/issues/50499
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317260
Commit-Queue: Paul Berry <paulberry@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
2023-08-03 12:07:45 +00:00
Alexander Markov
dc2abf0a80
[kernel] Add missing visitors for RecordNameGet.receiverType and RecordIndexGet.receiverType
...
Fixes https://github.com/dart-lang/sdk/issues/53070
Change-Id: If3a687626af6671b657eb034cf24685ba587f08f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317142
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Alexander Markov <alexmarkov@google.com >
2023-08-01 14:50:39 +00:00
Johnni Winther
de20ac1447
[cfe] Fix ExtensionType.==
...
DartType.== was declared abstract, expecting subtypes to call
the `equals` method, but this was accidentally omitted for
ExtensionType.
This CL moves the implementation to DartType.== since it was called
with the same arguments in all subtypes, thus ensuring that new
DartType classes will get the correct equals by default.
Closes #53046
Change-Id: Ieaaf33ecb569ea7361ac338066a3a5760391e424
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316583
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
2023-08-01 11:04:22 +00:00
Johnni Winther
a76f4d5c34
[cfe] Rename InlineClass to ExtensionTypeDeclaration
...
This renames InlineClass to ExtensionTypeDeclaration, and InlineType
to ExtensionType. Members of extension type declarations are called
extension type members instead of extension type declaration members
for "brevity".
TEST=existing
Change-Id: I91ed62533ddd345644492f04dc3310d007460288
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316780
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2023-08-01 09:04:38 +00:00
Johnni Winther
4efcda0fd2
[cfe] Generate statements for trivial pattern assignments
...
Closes #52960
Change-Id: I868a7ef5867ad955072ae5425da82c007ca1d73c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/315902
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Paul Berry <paulberry@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
2023-07-28 11:11:37 +00:00
Johnni Winther
bf9ea56ff7
[kernel] Remove nodes used for the old 'extension-types' experiment
...
This removes ExtensionType, ExtensionTypeShowHideClause and
CallSiteAccessKind from package:kernel which where only used by the now
removed 'extension-types' experiment.
A follow-up CL will rename InlineClass/InlineType to
ExtensionTypeDeclaration/ExtensionType to match the names of the
Extension Type feature currently being implemented.
TEST=existing
Change-Id: I58d2e8b0a92ac61329ee161cc6884a2c0e6f87ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316420
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2023-07-27 10:47:08 +00:00
Alexander Thomas
a3d48885e7
[release] Bump version on main to 3.2
...
Tested: CQ
Change-Id: I16210697b47dd85aec8743b457e773b044cab81f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/316200
Reviewed-by: William Hesse <whesse@google.com >
Commit-Queue: Alexander Thomas <athom@google.com >
2023-07-25 15:12:49 +00:00
Chloe Stefantsova
2c86500e36
[cfe] Adjust nullability of UP of intersection type and another type
...
Closes https://github.com/dart-lang/sdk/issues/52993
Change-Id: Id7c18f98d2422264ca69e275505d4977b8b59a99
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/315900
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com >
2023-07-25 10:12:58 +00:00
Chloe Stefantsova
cc5ba81491
[cfe] Use term equality in place of identity in UP and DOWN
...
Closes https://github.com/dart-lang/sdk/issues/52997
Change-Id: I8b15ca1c4d2e3efbc8d7cdebeed1b16fe92d542b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/315443
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2023-07-24 14:54:34 +00:00
Chloe Stefantsova
d3b2b764a1
[cfe] Remove 'value-class' experimental flag
...
Change-Id: I9bcb9e30732503c9da4e723ded863949f5f0f1b1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/315200
Reviewed-by: Michael Thomsen <mit@google.com >
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2023-07-21 11:16:24 +00:00
Johnni Winther
911b376f7e
[cfe] Handle inline class representation field in object pattern
...
Closes #52667
Change-Id: I9c6d51597ff27ae3a7cdeed29d75755c18a2d530
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311742
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
2023-07-10 11:02:50 +00:00
Chloe Stefantsova
b36fbaef2c
[cfe] Update both sides of intersection types in GUB
...
In computation of GUB both the left-hand and the right-hand sides of
the intersection should be updated as nullable when the other operator
to GUB is Null.
Closes https://github.com/dart-lang/sdk/issues/50431
Change-Id: I4b616a94a3e7bf149205ba1b90732453c19ace47
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311845
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com >
2023-07-10 09:51:56 +00:00
Nicholas Shahan
be6a560ca1
[kernel] Fix record type equivalence
...
- Increment index to avoid infinite loop when the first named elements
in the two record types are equivalent.
- Add some test cases for record types.
Fixes: https://github.com/dart-lang/sdk/issues/52817
Change-Id: Ifbf3505c74a1f130c9c90ddbb6b1d96d9641e51e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311929
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
Commit-Queue: Nicholas Shahan <nshahan@google.com >
2023-07-06 16:37:49 +00:00
Johnni Winther
0c8ded72dc
[cfe] Add FileUriConstantExpression
...
This adds FileUriConstantExpression, a subclass of ConstantExpression, to support correct file offset of annotations for augmentations and patches.
The FileUriExpression is used to carry the file uri of the expression
before constant evaluation.
TEST=general/patch_annotations
Change-Id: I0dc8a0cb97dd530fd1960785d38c2d5e4883c3dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311660
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2023-06-28 07:52:09 +00:00
Johnni Winther
545b7c02f7
[cfe] Support redirecting factories in inline classes
...
Closes #52525
TEST=inline_class/issue52525
Change-Id: Ia2f6e3aa92ddd053f5736150713d9267b89f401c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308621
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2023-06-14 10:31:42 +00:00
Johnni Winther
7226c7245e
[kernel] Remove RedirectingFactory node
...
Closes #28421
Closes #29169
TEST=existing
Change-Id: Iee7d84fadc10981648cb327589fd7aa15b9b3e12
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/308140
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2023-06-14 06:38:32 +00:00
Johnni Winther
90d5a99c15
[cfe] Remove redirecting factory field
...
TEST=existing
Change-Id: Ic9f51693d0cc75cbe745dcaa0f4feb26d7005a9e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307941
Reviewed-by: Sigmund Cherem <sigmund@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2023-06-13 09:24:28 +00:00
Johnni Winther
c308c9327d
[cfe] Ensure Member.isInlineClassMember is set
...
TEST=existing
Change-Id: I16fbeb0bbe431e3f85ed11c21e0506e6aa4abf58
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302206
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Srujan Gaddam <srujzs@google.com >
2023-06-08 15:02:03 +00:00
Johnni Winther
82e3a751a9
[cfe] Remove unnecessary_null_comparison code
...
The frontend is now run with sound null safety so these are no longer needed.
TEST=existing
Change-Id: I6c1776845854695ff34e310a3bb5bc9d86715f06
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307901
Reviewed-by: Jens Johansen <jensj@google.com >
Reviewed-by: Srujan Gaddam <srujzs@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2023-06-08 08:46:47 +00:00
Johnni Winther
ccb21bd54b
[kernel] Add RedirectingFactoryTarget to FunctionNode
...
This replaces the RedirectingFactoryBody with a dedicated
RedirectingFactoryTarget object on FunctionNode.
TEST=existing
Change-Id: I3cc8b9f8abf938c6d60fdbc91b1f4210686fc359
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307082
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
Reviewed-by: Alexander Markov <alexmarkov@google.com >
2023-06-08 08:04:15 +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
Alexander Markov
5ff0821b27
[kernel,vm] First-class kernel serialization of FutureOrType and NullType
...
TEST=ci
Fixes https://github.com/dart-lang/sdk/issues/52565
Change-Id: I9906f2d10c7ed51d11a0c402b51c8189ac3b6298
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306901
Commit-Queue: Alexander Markov <alexmarkov@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
Reviewed-by: Ryan Macnak <rmacnak@google.com >
2023-06-05 21:24:35 +00:00
Johnni Winther
8091581e72
[cfe] Use unchecked AsExpression instead of promoted VariableGet
...
This changes the pattern lowering to use unchecked AsExpression
instead of promoted VariableGet when this occurs within a late
cache variable initializer. This is done to avoid promoted variables
that violate the (otherwise used) conservative reasoning about the
execution order of closures.
The unchecked AsExpressions are now shown in the ast-to-text.
Change-Id: I4fa6813f3b5cc73d9cdac17054de59e5d4b8ce7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/307044
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Nate Biggs <natebiggs@google.com >
2023-06-02 16:37:17 +00:00
Johnni Winther
5476e3bd6e
[kernel] Rename InterfaceType.className to classReference
...
+ Name.libraryName -> libraryReference
Change-Id: I25b5022ea87f92fb5837f03d29f1671f0e68261b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304740
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Sigmund Cherem <sigmund@google.com >
2023-06-01 06:43:46 +00:00
Chloe Stefantsova
9fecc29dbb
[cfe] Adjust the resulting nullabilities in 'flatten'
...
Closes https://github.com/dart-lang/sdk/issues/52485
Change-Id: I428933193611ffc68c750e6dc91f54ee2385036b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/306400
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com >
2023-05-31 07:33:37 +00:00
Johnni Winther
4d37cc40ff
[cfe] Support redirecting initializers in inline classes
...
Closes #52119
Change-Id: Id9322ba7c4571786c8c07b6a36c3b1e3ef94aec9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303740
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2023-05-17 12:35:07 +00:00
Jens Johansen
4fd173a43e
[CFE] Various small optimizations
...
Looking at instructions this seems to speedup compilation of
`compile.dart` with about 1.00% in AOT mode.
Occasionally there's also a measurable time improvement, e.g.
```
msec task-clock:u: -1.3447% +/- 1.1644%
seconds time elapsed: -1.3438% +/- 1.1638%
seconds user: -1.8838% +/- 1.4478%
```
Change-Id: I98866740b00bc01c70dd82d7591864bcb278394d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303701
Commit-Queue: Jens Johansen <jensj@google.com >
Reviewed-by: Johnni Winther <johnniwinther@google.com >
2023-05-17 12:20:08 +00:00
Mayank Patke
ea84221100
Fix nullability of cast to FunctionType.
...
Fixes : #52403
Change-Id: I6eeaad51f45b8dabfd61132d2deae0893b01e99b
Fixed: 52403
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/303420
Reviewed-by: Johnni Winther <johnniwinther@google.com >
Auto-Submit: Mayank Patke <fishythefish@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2023-05-16 06:43:09 +00:00
Johnni Winther
0767670779
[cfe] Don't create tear-offs for sealed class constructors
...
Closes #52359
Change-Id: Iaa8d64f01978c201165242dd0b0a3b18890de833
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302920
Reviewed-by: Kallen Tu <kallentu@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2023-05-15 06:32:34 +00:00
Johnni Winther
9b42e2d166
[cfe] Generate covariant checks in pattern matching
...
Closes #52192
Change-Id: Iaac816273fb80eaf166fc300b2b3367f1a592d3f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/302223
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com >
2023-05-09 11:02:45 +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
Chloe Stefantsova
e3275641a3
[cfe] Remove spurious ".this" in IntersectionType.withDeclaredNullability
...
Change-Id: Id5428658ebdccca4385a700725218ee5551495f7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/300660
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com >
2023-05-03 06:20:24 +00:00
Johnni Winther
ff0079b94b
Reland "[cfe] Enable verification in platform compilation"
...
This relands https://dart-review.googlesource.com/c/sdk/+/299100
The fix is in patchset 2
Change-Id: I505f3d9c67625cac24ecf60f0eb3d0617d2e847d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/298821
Reviewed-by: Nicholas Shahan <nshahan@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
Commit-Queue: Johnni Winther <johnniwinther@google.com >
2023-05-01 07:35:41 +00:00
Johnni Winther
cb7546f58d
[cfe] Handle unevaluated constants in enums for exhaustiveness checking
...
If enum values have used defined fields that use fromEnvironment constants
the enum values themselves are seen as unevaluated constants when
compiling with dart2js. This means that the enum value are not recognized
correctly in exhaustiveness checking.
This CL changes the enum value representation of the CFE to use the
enum class and the name of the enum element, derived either from the
instance constant or the unevaluated constant expression.
Change-Id: I7d5791a41349dacd20b588f5dbfca37d8755ef79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/299100
Commit-Queue: Johnni Winther <johnniwinther@google.com >
Reviewed-by: Jens Johansen <jensj@google.com >
2023-04-28 06:52:59 +00:00