Commit graph

2028 commits

Author SHA1 Message Date
Srujan Gaddam d67104c37c [pkg:js] Refactor mock creation to export creation
Instead of relying on descriptors, we now just take in an export
map that was already precomputed for a given class. This map is
then used to create an object literal that maps property names to
their Dart targets.

Change-Id: I431cbfb3978eb41543bb46859612e13da7637e79
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261764
Reviewed-by: Riley Porter <rileyporter@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2022-10-24 17:37:09 +00:00
Stephen Adams b03b9c3712 Redo "[kernel] Create Source.sourceCode as view of the binary bytes"
Retrying now that https://github.com/dart-lang/sdk/issues/50206 is fixed.

Change-Id: I2612e53c845b2e906ab51bfe39db2fe775e10bca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/264602
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-10-21 01:11:47 +00:00
Alexander Markov 671717b578 [vm/aot] Support dynamic record field access in TFA
TEST=language/records/simple/dynamic_field_access_test

Issue: https://github.com/dart-lang/sdk/issues/49719
Change-Id: I811db5c649988cbadf7ab29e5c4c70366f55e86b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262845
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-10-19 17:49:47 +00:00
Ahmed Ashour 10e7e478a2 Fix typos
Fixes #50184

Change-Id: If17f838d932171e30ef92d1bda8d4918e7e08a8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263622
Reviewed-by: Lasse Nielsen <lrn@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-10-12 14:12:42 +00:00
Ilya Yanok 174f3d3be2 Revert "[kernel] Create Source.sourceCode as view of the binary bytes"
This reverts commit a07a0333c3.

Reason for revert: Seems to increase AOT build times significantly (see b/251787563).

Original change's description:
> [kernel] Create Source.sourceCode as view of the binary bytes
>
> This saves about 400MB heap when loading a 900MB .dill file.
>
> Change-Id: I5a09b06764cb493aab8dade2afb4665e12688133
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255802
> Reviewed-by: Jens Johansen <jensj@google.com>
> Commit-Queue: Stephen Adams <sra@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: Ia7edd7d5e711a33bd037f6edbe52ba2fb561709c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/263101
Reviewed-by: Ivan Inozemtsev <iinozemtsev@google.com>
Reviewed-by: Morgan :) <davidmorgan@google.com>
Commit-Queue: Ilya Yanok <yanok@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Ilya Yanok <yanok@google.com>
2022-10-10 11:20:19 +00:00
Johnni Winther c3de385658 [cfe] Unify handling of 'resolveTypeParameterType'.
We had multiple implementations of this logic and with the introduction
of IntersectionType some where not updated. Instead, this is now added
as a property of `DartType`.

Closes #50112

Change-Id: I2d7a3943b0577d905a1861aa35b0552578766993
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262960
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2022-10-06 10:38:39 +00:00
Jens Johansen 4d9bbde5ce [kernel] AST-to-Text for records works as expected
For whatever reason https://dart-review.googlesource.com/c/sdk/+/257203
didn't follow normal textual output and would for instance output

constants  {
  #C1 = 1
  #C2 = 2
const (#C1, #C2)
const ({a:#C1, b:#C2})
const ({a:#C3, b:#C4})
const (#C5, #C3)
}

instead of something like

constants  {
  #C1 = 1
  #C2 = 2
  #C3 = (#C1, #C2)
  #C4 = ({a:#C1, b:#C2})
  #C5 = ({a:#C3, b:#C4})
  #C6 = (#C5, #C3)
}

Change-Id: I9a8d515694d3486ffbb38fdc0d1986d41d053103
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262800
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-10-06 06:32:31 +00:00
Stephen Adams a07a0333c3 [kernel] Create Source.sourceCode as view of the binary bytes
This saves about 400MB heap when loading a 900MB .dill file.

Change-Id: I5a09b06764cb493aab8dade2afb4665e12688133
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255802
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-10-05 20:27:59 +00:00
Johnni Winther e2bf48243f [cfe] Handle record access through type variables
... and promotions.

Closes #50124

Change-Id: Ie04db8c13f81e6d81ad12bf2677e924492ac5fc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/262602
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-10-05 09:25:21 +00:00
Chloe Stefantsova 1d768f3c75 Reland "Reland "[cfe,corelib] Add class 'Record' to the core library""
This is a reland of commit 4b6a8f35b9

Original change's description:
> Reland "[cfe,corelib] Add class 'Record' to the core library"
>
> Part of https://github.com/dart-lang/sdk/issues/49713
>
> Change-Id: I56bfca49492d14bb561b32993fd9adfe775b7400
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259583
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>

Change-Id: Idaab98c028312ca36bd07f569374ca8b76151a02
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260101
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-10-04 12:29:47 +00:00
Ömer Sinan Ağacan c427299b1c [kernel] Add an example and a note in kernel BreakStatement docs
Change-Id: Ic0153a084950d2eea53e9fd8a0ee0332de5e2ae3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/261841
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
2022-09-29 12:29:47 +00:00
Paul Berry 54906759b9 Don't delegate foreign private names to noSuchMethod.
If a concrete class implements an interface containing a name that's
private to a different library, any attempt to invoke that name will
result in an exception getting thrown.  Previously, such attempts
would result in the call being diverted to noSuchMethod.

This change closes a loophole in Dart's privacy system, and paves the way for
a future implementation of promotion for private final fields (see
https://github.com/dart-lang/language/issues/2020).

Bug: https://github.com/dart-lang/sdk/issues/49687
Change-Id: Ie55805e0fc77dc39713761a80a42c28bd0504722
Tested: language tests
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255640
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
2022-09-27 21:20:35 +00:00
Chloe Stefantsova 354f144c08 [cfe] Add initial implementation of type inference for records
Part of https://github.com/dart-lang/sdk/issues/49713

Change-Id: I9208bbfa410fbf6d200e4715ea6171ed58b3510d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260882
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-09-26 15:25:27 +00:00
Johnni Winther 008190bf11 [cfe] Ensure constructor type in type alias invocation
Closes #49985

Change-Id: I0fdf1a1cc984a5ab9e10f9df794864bbeaf44579
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260705
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-09-26 10:52:47 +00:00
Johnni Winther d43aa20afa [cfe] Support current uri for crashes during top level inference
+ avoid printing the stack trace twice on crash

Change-Id: Iac220117b77c30bc03212b2727efe88036819357
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260700
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2022-09-23 08:32:49 +00:00
Chloe Stefantsova 78dd98a8f4 [cfe] Add tests for NORM on records
Part of https://github.com/dart-lang/sdk/issues/49749

Change-Id: I7a72eeb14000823067736c8c010a83481677d9b2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260521
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-09-22 10:11:38 +00:00
Johnni Winther 281a8a5d2b [cfe] Implement RecordLiteral.transformOrRemoveChildren
Closes #50004

Change-Id: Iaea68b563bd59bb3280bd6ffb86f18d50f3d2a4b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/260105
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-09-21 08:49:16 +00:00
Chloe Stefantsova f8ef60a868 Revert "Reland "[cfe,corelib] Add class 'Record' to the core library""
This reverts commit 4b6a8f35b9.

Reason for revert: Breakages in google3.

Original change's description:
> Reland "[cfe,corelib] Add class 'Record' to the core library"
>
> Part of https://github.com/dart-lang/sdk/issues/49713
>
> Change-Id: I56bfca49492d14bb561b32993fd9adfe775b7400
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259583
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Slava Egorov <vegorov@google.com>
> Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>

# Not skipping CQ checks because original CL landed > 1 day ago.

Change-Id: I61c4db244329615d7d218484cd86601b1c737ba6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259800
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Auto-Submit: Chloe Stefantsova <cstefantsova@google.com>
2022-09-19 13:52:01 +00:00
Alexander Markov e5f3b0dc0e [vm/aot] Initial support for records in TFA
This change adds minimal support for RecordType, RecordLiteral,
RecordIndexGet, RecordNameGet and RecordConstant kernel nodes to TFA.
TFA is *not* yet extended with the ability to infer record types.

TEST=language/records/simple

Issue: https://github.com/dart-lang/sdk/issues/49719
Change-Id: I7c5eb860c6a5cb263e4d1bb55ad230e5c51f47c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259520
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-09-16 18:43:50 +00:00
Chloe Stefantsova 4b6a8f35b9 Reland "[cfe,corelib] Add class 'Record' to the core library"
Part of https://github.com/dart-lang/sdk/issues/49713

Change-Id: I56bfca49492d14bb561b32993fd9adfe775b7400
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259583
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-09-16 11:46:40 +00:00
Alexander Aprelev d31c741fbb Revert "[cfe,corelib] Add class 'Record' to the core library"
This reverts commit f553f0aad9

Reason for revert: breaks g3 bot

Original change's description:
> [cfe,corelib] Add class 'Record' to the core library
>
> Part of https://github.com/dart-lang/sdk/issues/49713
>
> Change-Id: Ibb0309f97565c0a623f60e588eefcad6759d5ace
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257066
> Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
> Reviewed-by: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>

TBR=lrn@google.com,scheglov@google.com,cstefantsova@google.com,johnniwinther@google.com

Change-Id: If386819fc7419a660c692e4187ead4ebf142c68c
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259462
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
2022-09-15 17:45:50 +00:00
Chloe Stefantsova dc4c7a1a8d [cfe] Extend UP and DOWN onto record types
Closes https://github.com/dart-lang/sdk/issues/49914

Part of https://github.com/dart-lang/sdk/issues/49713

Change-Id: I49b1ca4ca9b68c8a8dfcdd9d0fc855f173088efe
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258005
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-09-15 14:09:53 +00:00
Chloe Stefantsova f553f0aad9 [cfe,corelib] Add class 'Record' to the core library
Part of https://github.com/dart-lang/sdk/issues/49713

Change-Id: Ibb0309f97565c0a623f60e588eefcad6759d5ace
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257066
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
2022-09-15 11:50:33 +00:00
Chloe Stefantsova 14c30c3f10 [cfe] Interpret undetermined nullability as nullable in UP
Closes https://github.com/dart-lang/sdk/issues/49908
Closes https://github.com/dart-lang/sdk/issues/49909

Change-Id: I55007394454f2acab0e69a948df84007fedfc3c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259182
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-09-15 07:52:33 +00:00
Johnni Winther 6795c753fd [cfe] Handle unnamed extensions in parts
This introduces a MemberName abstraction that supports the late
computation of member names, taking privacy and synthesized names
of unnamed extensions into account. With this feature, the unnamed
extension are now more directly handled as having no (known) name
which avoids the clash between the eagerly synthesized named of
unnamed extensions in different parts.

Closes #48765

TEST=existing

Change-Id: I62c00ace017141ecbc61eeecb275d0211f341c82
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258800
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2022-09-14 14:44:12 +00:00
Johnni Winther 4ef2914caa [kernel] Update VariableDeclaration.name comment
Change-Id: I40336a0ea93b5384bd73e7c8810cdac8d029a014
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/258925
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Auto-Submit: Johnni Winther <johnniwinther@google.com>
2022-09-13 16:17:07 +00:00
Chloe Stefantsova 05ddb78364 [cfe] Make DartTypeEquivalence symmetrical for functions and records
Change-Id: I9963ae7401d1e31e07edf90146f411b6586dbc16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256664
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2022-09-07 09:11:11 +00:00
Johnni Winther 7f4c3787c3 [cfe] Handle RecordConstant in ast_to_text
Change-Id: Ie967e18e35da41eb1c563cd95aa21f08a401dc5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/257203
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2022-09-02 09:40:53 +00:00
Johnni Winther 02c47b6de0 [cfe] Support const records
Change-Id: I3c0724e18a405ec0fe2d3a60e2722d78f9e3bed6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256666
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-08-31 21:47:01 +00:00
Chloe Stefantsova d4a8100908 [cfe] Implement subtype relationship for record types
Part of https://github.com/dart-lang/sdk/issues/49713

Change-Id: I736a4e4f4ba09a80dda1409a1c6640a64ab560f4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256480
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-08-29 10:05:35 +00:00
Johnni Winther 2da3806823 [cfe] Handle Record(Index/Name)Get
Change-Id: I9550d1e73b7caf1924596b3208a16f51a8cfcf41
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256362
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2022-08-26 17:10:41 +00:00
Johnni Winther f8b6897a44 [cfe] Create RecordType and RecordLiteral
Change-Id: Idd59d5c26b1d695386a14544c1013aea3329b222
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256361
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-08-26 15:59:22 +00:00
Chloe Stefantsova ddff459c7f [cfe] Add RecordType, RecordLiteral, and associated nodes
TEST=Covered by upcoming language and co19 tests.

Change-Id: Ibe8ecfb7f854adce5646125f6909066e27424665
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256066
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2022-08-25 10:33:35 +00:00
Lasse R.H. Nielsen 8a883fa54d Change : to = for default values in pkg.
Leaves some in parser test:
 pkg/front_end/parser_testcases/error_recovery/keyword_named_formal_parameter_prime.dart

TEST=Refactoring, covered by existing tests.

Change-Id: I7a83ef95df3cbd283878b3685b5c747bd89a1b16
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256125
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-08-24 15:57:16 +00:00
Jens Johansen 104b0deb5c [kernel] Fix verifier having exponential behavior
Before this CL the verifiers `visitInterfaceType` would start by calling
`node.visitChildren(this);` and finish by calling
`defaultDartType(node);` which calls `defaultNode(node)` which calls
`node.visitChildren(this);`. This means that we call `visitChildren`
twice which means exponential --- e.g. the added test with nested Lists
(List mentioned 40 times) the innermost type would have been visited
549,755,813,888 times (that's 500+ billion times) (for a total of
1 trillion+ visits to types for that alone).

Fixes https://github.com/dart-lang/sdk/issues/49780.

PS: We don't want to run the formatter on that either. It doesn't
exhibit bad speed-wise behavior but the output isn't exactly pretty.

Change-Id: Ibb2f0d2669511934badb562cb96ee439bd44bebd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/256121
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
2022-08-24 06:06:12 +00:00
Johnni Winther dcaebaa793 [cfe] Add Field.isEnumElement
This adds the flag `isEnumElement` to the `Field` node and uses it
to recognize enum elements for the exhaustiveness computation on
switch statements.

Closes #49697

TEST=pkg/front_end/testcases/general/issue49697/main.dart

Change-Id: I21852f3b063329e043639c825054f538c8ed6536
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/255808
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2022-08-22 05:44:57 +00:00
Chloe Stefantsova 1611fe6f45 [cfe] Separate out IntersectionType from TypeParameterType
TEST=Covered by existing tests

Change-Id: Ie7b99b1c109edff5198cfbf5d22e1cfb1dc130d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253665
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-08-18 08:47:29 +00:00
Srujan Gaddam 61abaeda3f [CFE/web] Move static interop erasure and remove outline stubber
Deletes the outline stubber as it's not necessary on any backend.
DDC should compile the entire sources and outline dill in one step.
dart2wasm operates similarly, and so only needs the modular transformer.
dart2js moves the erasure to a global transform.

Also, this CL reverts now unnecessary plumbing that was needed for the
outline stubber.

Change-Id: Ic085c4fad5a6bdfc7d6916f7fa575c6ef9b20110
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/253000
Reviewed-by: Joshua Litt <joshualitt@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2022-08-01 18:17:44 +00:00
Anis Alibegić 40e18905f2 Fixed various typos in a lot of files
Closes https://github.com/dart-lang/sdk/pull/49478

TEST=Manual

GitOrigin-RevId: f4c9c6869dfe73639295e86574a021523b3d374d
Change-Id: I134a97caed4eec59d70e9cbca16b7e9a472cf2c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251902
Reviewed-by: Michael Thomsen <mit@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Kevin Chisholm <kevinjchisholm@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2022-07-25 12:21:59 +00:00
Srujan Gaddam f6a3d2d5c2 [pkg:js] Transform constants and supertypes in eraser
Types in constants and supertypes need to be visited in case
they include @staticInterop types.

Fixes a bug in caching in the constant replacer.

Change-Id: Icde8b7170a8806d6a1995cad57a9788893b7772f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249441
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Riley Porter <rileyporter@google.com>
2022-07-18 18:24:53 +00:00
Alexander Thomas 5249cd9294 [release] Bump version to 2.19
Tested: Standard CQ
Change-Id: Ic52d4d38a5b117dfcdc778dedfac08315ca30a54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251541
Commit-Queue: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
2022-07-14 14:14:55 +00:00
Jens Johansen 9f8f6df70f [CFE] Cache unevaluated constant results in equivalence testing
For now it's only done for unevaluated constants as that's where an
issue has been observed.
This CL further more limits the default nesting depth for both
expressions and statements (e.g. when .toString() printing an ast node)
to 50. Again this has been shown in one case to be a good place to
stop an (exponential time) issue from happening.

Change-Id: I6affb2846a6587542ffce3f8d6914a4209b08322
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/251103
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-07-12 10:14:45 +00:00
Alexander Markov 3a1229e56c [kernel] Remove obsolete AsyncMarker.SyncYielding and YieldStatement.isNative
AsyncMarker.SyncYielding and YieldStatement.isNative became
obsolete after async/async*/sync* kernel transformation was removed in
https://dart-review.googlesource.com/c/sdk/+/249944.

TEST=ci

Issue: https://github.com/dart-lang/sdk/issues/48378
Change-Id: I69ac994af77f7e403686750bf8df437868bf33fa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249947
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2022-07-11 18:20:45 +00:00
Alexander Markov 94c120a6ea [vm] Cleanup old async/async*/sync* implementation from kernel
This change removes kernel transformation which was used to
desugar async/async*/sync* functions in the old implementation of
async/async*/sync*.

The useful part of the transformation is retained in
pkg/vm/lib/transformations/for_in_lowering.dart.

TEST=ci

Issue: https://github.com/dart-lang/sdk/issues/48378
Change-Id: Ic70c1fb35162a31bcc22eac3a8f6488b61e945b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249944
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-07-11 18:12:41 +00:00
Johnni Winther f6846849b9 [cfe] Handle augment super expressions
This adds the generation of access to augmented procedures.

TEST=existing

Change-Id: I5efa9cc541b86c18735bb1f4c51c73976ffa42ca
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/250164
Reviewed-by: Tess Strickland <sstrickl@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-07-04 12:37:50 +00:00
Srujan Gaddam 0036dc7c57 [CFE] Add constant replacer
Adds a replacement visitor for Constant types using null as a
sentinel value for whether a subnode has changed or not (except
in the case of TreeNodes in order to match existing Visitor
semantics).

Change-Id: Iaaab1b1c608af07f36ece08071b3d703884cd91b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/248944
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2022-06-30 18:13:46 +00:00
Johnni Winther 414d5d3836 [cfe] Include concrete augmented procedures in the AST
This is in preparation for supporting `augment super` access of
augmented members.

Change-Id: Ib306ef59faa7c9ad735304545aa414f6b21e2596
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249862
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2022-06-29 12:27:05 +00:00
Srujan Gaddam b372fd4c52 [CFE/pkg:js] Find reference of stub if it already exists
Fixes #49301

From https://github.com/dart-lang/sdk/issues/49301#issuecomment-1165536192

Adds referenceFromIndex to outline transformations so that the eraser
can use it to find the reference for the stub if it was already created.
This is needed when the module where the stub exists is invalidated.
Since references in other modules should still be valid, we should
attempt to get that reference.

Change-Id: I5905a002480444aecd57de650cd439bdc34d4eba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249729
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Joshua Litt <joshualitt@google.com>
2022-06-28 18:36:02 +00:00
Alexander Markov 77ea9820aa [vm] New implementation of sync* based on suspend/resume stubs
Issue: https://github.com/dart-lang/sdk/issues/48378
Change-Id: I7f4b6b56d914a617dfd7ac724cd4414532073b4c
TEST=ci
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249141
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-06-27 18:19:12 +00:00
Johnni Winther e18977ed9c [cfe] Report error for missing concrete super target
In response to https://github.com/dart-lang/sdk/issues/47406

The error is currently not reported if the mixin declaration is from
an outline dill.

Change-Id: I94a61d6409d0c238614d9f377b5f324153360bc6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/249184
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-06-24 14:04:49 +00:00