Commit Graph

37938 Commits

Author SHA1 Message Date
Brian Wilkerson 5933e2dfbc Replace a hard-coded path with a computed path
Fixes https://github.com/dart-lang/sdk/issues/48355

Change-Id: Ib6b46ab73f7264f6f7f23a603b57d1fbbedc0752
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233656
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-02-19 16:51:22 +00:00
Brian Wilkerson ab6d76844a Attempt to fix the windows bot
Change-Id: Ifbe570282c99441c3b80926ae4d615e142b27480
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233657
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-02-19 05:20:32 +00:00
Joshua Litt 934ad4753d [dart2js] Elide a number of interfaces.
Inlined KClosedWorldImpl into KClosedWorld
Inlined ResolutionWorldBuilderImpl into ResolutionWorldBuilder

Change-Id: Id88abac06f7cd279413ae56ea8b021b349009649
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233655
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-02-19 02:49:52 +00:00
Brian Wilkerson 0b12b2c5a4 Unify the two copies of IndexRange
Change-Id: I3836c680b71404c157814eb5c3c234b026587be9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233654
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-02-19 02:20:32 +00:00
Konstantin Shcheglov 96464ceb3a Test for navigation when named arguments anywhere.
Change-Id: I0ad0e8501b7f8297750b0767a61ba9039859b2a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233643
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-19 02:12:33 +00:00
Konstantin Shcheglov 24839d6123 Test for occurrences with named arguments anywhere.
Change-Id: I5f93602d7286d0437b7c27ee8c0145fe80b2901f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233645
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-19 02:12:30 +00:00
Konstantin Shcheglov 627eb64320 Test for Flutter outline with named arguments anywhere.
Change-Id: I9e2df45ba04c0e02b2388029c2c3c56213ef9dc5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233644
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-19 02:04:31 +00:00
Konstantin Shcheglov f0ae696ee2 Tests for search with named arguments anywhere.
Change-Id: I423a92f49981514074a26e1b893dfff06b0e3389
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233646
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-19 02:04:28 +00:00
Konstantin Shcheglov d637f3591d Test for semantic highlighting with named arguments anywhere.
Change-Id: I44badd1284cc512615dfae727b9d674fee193812
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233647
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-19 01:56:29 +00:00
Konstantin Shcheglov 1751ae0db0 Update ResolvedAstPrinter to use namedChildEntities.
Change-Id: I621f3f7c309b2a1a17c68ae95e2a609121a113e1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233649
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-19 01:56:26 +00:00
Stephen Adams 07d63eab7e [dart2js] GVN string concatenation
GVN pure stringifiers and string concatenation.

I removed the comment regarding #9293. I could not understand it.
Removing the 'setDependsOnSomething()' does occasionally produce
worse-looking code, but at the application level, the code is
marginally smaller.

https://github.com/dart-lang/sdk/issues/48243 is a more general
description of the 'looks better' problem that pure operations tend to
sink to their use, increasing live-ranges of the operands.  The
sinking is sometimes advantageous - e.g. when the new location is on
an error path.

I see common subexpression elimination often in the pattern of
constructing default strings for Intl.plural:


    Intl.plural(...,
        one: '$first (+$howManyMore language)',
        other: '$first (+$howManyMore languages)',
        ...);

--> old JavaScript

    var
      t1 = A.S(first) + " (+" + howManyMore + " language)",
      t2 = A.S(first) + " (+" + howManyMore + " languages)";
    return A.Intl__plural(..., t1, t2, ...);

--> new JavaScript

    var
      t1 = A.S(first) + " (+" + howManyMore;
    return A.Intl__plural(..., t1 + " language)", t1 + " languages)", ...);

Change-Id: I56aff26c9e5e31954fef224378f3723a05b318ea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233641
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-02-18 23:20:52 +00:00
Ben Konyi f9147d933e [ Service ] Update VM service message to not reference Observatory
See https://github.com/dart-lang/sdk/issues/46756

TEST=Existing

Change-Id: Ib71bf00d667369d7438a4547ae444951ec0979df
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233504
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-02-18 20:53:52 +00:00
Brian Wilkerson 0921dceaef Add a quick assist to convert a class to an enum
Change-Id: Iebd83940c85e778132132bfe483df08193f574ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233002
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-02-18 20:00:21 +00:00
Danny Tuppeny 2bbd3bc67e [analysis_server] Fix code_actions_fixes test on Windows
Fixes https://github.com/dart-lang/sdk/issues/48431.

Change-Id: Ifb15a2fbd1949ba6e825f6fb2769eb790588a60f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233567
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-02-18 19:56:12 +00:00
Danny Tuppeny bf491f87cd [analysis_server] Add support for snippets in LSP completion
Change-Id: Ife64add884c310e4d0b5413ef91665aef2375648
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233361
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-02-18 19:43:21 +00:00
Konstantin Shcheglov 8b6280b8fd Collect ChildEntity instances, add AstNodeImpl.namedChildEntities
The new getter is not used yet, will be used to update ResolvedAstPrinter.

Change-Id: I5c3509ad2339d9f4b2ef398443012b980be66fea
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233541
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-18 18:40:32 +00:00
Konstantin Shcheglov b227dab402 Add more tests for GETTER_NOT_SUBTYPE_SETTER_TYPES.
Change-Id: I7354b5e813765ee973b04fee05213b307a88be2e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233526
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-18 17:40:21 +00:00
Konstantin Shcheglov f784130fea Fix MISSING_REQUIRED_ARGUMENT for super-formal parameters.
Change-Id: I0ee3114e5d618fa16da42072c8bc15d7b86001c3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233525
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-18 17:33:53 +00:00
Johnni Winther 05b4a4e0a8 [cfe] Support sequential application of Phase 2 macros
This CL add support for introspecting members added in Phase 2 from
one macro application to the next.

Included is a refactoring of the class/member patching where the
origin now owns the patches similar to how library patching now
works.

Change-Id: Ifdf03461d66be3f5a5df4b5bdb1e3da9f4cfd688
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233462
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-02-18 12:11:51 +00:00
Martin Kustermann f50b3a52e4 [vm] Make async lowering no longer use optional parameters
This CL

  * Makes :async_op only have two parameters: We take advantage
    of the fact that errors not only have exception != null but
    also stacktrace != null.
  * Makes :async_op have no optional parameters. This reduces
    code size significantly.
  * Removes unused parameter in _awaitHelper calls
  * Wrap the then callback instead of the error callback. (needed
    to make optional parameters required)

This results in 2% code savings on a big g3 app.
The size of :async_op shrinks on average by 11%

TEST=ci

Change-Id: I38d5fba4ebebc780b48dac5aa6a250d2c7952bfd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233362
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
2022-02-18 12:09:42 +00:00
Johnni Winther 931fd976c6 [cfe] Apply phase 2 macro results
Results of Phase 2 macros are now applied. The macro application code
has been refactored to support that Phase 1 can apply all macro
applications within a library in bulk, but Phase 2 can apply each
macro application in sequence.

The later is to prepare for making added member visible to subsequent
macro applications within Phase 2. This functionality has not been
completed yet.

Change-Id: Idaf2702e21bde75aedb1509d88e02f270196af5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233380
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-02-18 11:00:31 +00:00
Johnni Winther 2435848b13 [parser] Support 'augment' modifier on class declarations
This adds support for the 'augment' modifier on class declarations
needed for the static meta-programming prototype.

Change-Id: Iadd11f766a195076405f2803b2092199caf1ea8c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233180
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-02-18 09:39:23 +00:00
Jens Johansen 84d223eb96 [CFE] Use list instead of map for initializers inference
Change-Id: I9935f57c65c335b504af89406e00b9c86603dba8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233460
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-02-18 08:36:41 +00:00
Konstantin Shcheglov 7cd6b3ed3e Issue 48396. Set 'dynamic' if invalid function reference resolution.
Bug: https://github.com/dart-lang/sdk/issues/48396
Change-Id: I9d7f617fd716b6a1eb8c2d38e64f1f5800a99f54
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233529
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-18 02:31:11 +00:00
Stephen Adams b13257e01b [dart2js] Remove ability to choose --legacy-javascript
Change-Id: I48cc93c5778807e6c86168b096ae8ae97ff08b66
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232483
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Stephen Adams <sra@google.com>
2022-02-18 02:24:11 +00:00
Mayank Patke d539c43372 [dart2js] Create child LocalState for inference of labeled statements.
This is analogous to what we do for other control flow constructs.
Without this, a `break` to the label causes the outer scope to also
appear aborted.

Fixes: #48317
Bug: https://github.com/flutter/flutter/issues/96394
Change-Id: I575a5bf96b25b49df6f15d429881e310b3b34d15
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233446
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
2022-02-18 00:58:20 +00:00
Joshua Litt fee5309e61 [dart2js] Remove ImpactTransformer.
Removing the indirection now that there is only one ImpactTransformer.

Change-Id: I20644113d4fce046138df4adc4b1f836d81c2523
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232964
Reviewed-by: Mayank Patke <fishythefish@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-02-17 23:11:16 +00:00
Jake Macdonald 621ea99c80 Work around windows test failures
This directory sometimes fails to delete due to files being still "in use".

If we have a better fix than just ignoring it let me know, but its just a temp dir used in a test.

Change-Id: I5c8e76192230cf2b033d9bcb4a86940ddf974517
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233522
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-02-17 22:27:41 +00:00
Jake Macdonald 7822eb9107 Add a macro executor which spawns and talks to a different process.
This also:

- Adds support to the bootstrap code to handle communicating via sendPort or stdio
- Refactors pretty heavily the isolate executor code such that it can be reused.
- Refactors the isolated executor test into a shared test for all executors
- Removes the mirror based executor entirely - I don't see a path forward with this one.
- Reorganizes all executor based files under macros/executor

Change-Id: I2fc6bb3e6ce56c8b331719f4dc08617b3a521398
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233200
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2022-02-17 20:40:21 +00:00
Konstantin Shcheglov 7386ea6326 Rewrite ParserDiagnosticsTest to use textual dumps of ASTs.
We can reuse the existing "resolved" AST printer here.

One possible deficiency in the existing implementation is that it
sorts children by name, does not print them in their syntactic
positions, i.e. for `(var a)` we should print `keyword: var`,
and then `identifier: a`. The reason for this sorting is that
implementation adds properties from superclasses later, and there
is no correct positions for it.

Of course we have `childrenEntities`, which are sorted correctly,
but they lack names. Maybe if we added a new API with names, we
could use it here.

Ah, another issue is resolution information, e.g. `staticElement`,
`staticType` - these don't have the right syntactic position. We
could add them after syntactic entities, this is probably not worse
than what we have now.

Change-Id: I1354556acd69afdce7da712ce10d1a1fc724871b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232687
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-17 17:42:12 +00:00
Konstantin Shcheglov aec9bccdd9 Update 'mightBeTypeIdentifier' to return the type name, or null.
This way, instead of implicit result that the given node is a
SimpleIdentifier and requiring a cast in the client, or a
PrefixedIdentifier - so we have to check whether it is one or another
again; we now prove the result by returning the actual value, not
just a flag.

Change-Id: I65f0a21e5d3c1e7be06e621a0f7fb6a5e6b2db2d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232780
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-17 17:04:30 +00:00
Devon Carew 61415f99e5 Remove pkg/diagnostic - this is no longer used.
Change-Id: I755f47c30ef015da53ace4bd0464b3f14c5219d2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233448
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2022-02-17 15:58:00 +00:00
Chloe Stefantsova deba7fee1d [cfe] Report errors on implementors of 'Enum' declaring 'values'
Part of https://github.com/dart-lang/sdk/issues/47453

Closes https://github.com/dart-lang/sdk/issues/48388

Change-Id: I87d57407e16916a78864b9ce74b9250afc39958f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233304
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-02-17 10:29:00 +00:00
Aske Simon Christensen 34c0296f6d OWNERS files for dart2wasm
Change-Id: I7d74013b27625d0a5d3e4d3d8f83aa4859fb4892
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233303
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2022-02-17 09:26:23 +00:00
Chloe Stefantsova 2e2df71eef [cfe] Account for static members when adding noSuchMethod forwarders
Closes https://github.com/dart-lang/sdk/issues/48402

Change-Id: I1f7d9d15af40b1ed2b0de327031953e46f932a28
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233300
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-02-17 09:00:20 +00:00
Konstantin Shcheglov beddd6f2cd Rename refactoring for enum constructors.
Change-Id: I35fd6ba07b911862c76d58aa7a58d226d2ff050f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232820
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-17 02:21:23 +00:00
Konstantin Shcheglov 60b428e2b1 Deprecate superclass2, mixinTypes2, etc.
Change-Id: Ieaaeab57930cb93f5b6b1323efe63c3395b79993
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232742
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-17 02:20:42 +00:00
Konstantin Shcheglov 1a1d3714f5 Remove supportsAvailableSuggestions from AbstractCompletionDriverTest.
We always use it for the protocol version 1.

Change-Id: I18558bb76e82bc5c8be7ccb2fca886dc0139b7a0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232741
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-17 02:13:21 +00:00
Konstantin Shcheglov fe5a580f8e Pass the context as a single object in class body completion tests.
Change-Id: Iec7bc93a150a1dfe4d96ef6c1c87d334db28146a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232760
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-02-17 02:12:40 +00:00
Ben Konyi 04d61d01b5 [ Service ] Add VM service testing for super-parameters language feature
Fixes https://github.com/dart-lang/sdk/issues/48076

TEST=super_constructor_invocation_test.dart

Change-Id: Ia823c228836e4f8fca06e8211f93849115eb6845
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233343
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-02-16 23:27:34 +00:00
Ryan Macnak ef60f64d81 [vm] Annotate concrete types when creating arrays and strings.
TEST=ci
Change-Id: I8881b52f9ea8a146138127ec2fc726a79f7441be
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233220
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-02-16 20:36:30 +00:00
Danny Tuppeny 55fd24e6a6 [analysis_server] Refactor LSP snippet building in preparation for Snippet completions
Change-Id: Ie39e2e803d17435b31246da07ed69eba7d7aba21
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233360
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-02-16 20:01:00 +00:00
Danny Tuppeny 4f9a044418 [analyzer_plugin] Ensure FileEditBuilder updates linked positions correctly
Without this change, any linked edit groups that fall between the offset and offset+length of the new edit are not updated, which means new edits can be inserted that overlap with the linked edit groups instead of pushing them along by the delta.

Change-Id: If3e60bfa1efa4736f91bb85eb29cd785e933e78c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232099
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-02-16 19:39:40 +00:00
Ben Konyi 884bed1fff [ package:vm_service ] Fix bad merge resulting in double stream subscriptions
Fixes https://github.com/dart-lang/sdk/issues/48403
Fixes https://github.com/dart-lang/sdk/issues/48340
Fixes https://github.com/dart-lang/sdk/issues/47734

TEST=Existing

Change-Id: Ie844642d5e50cf455c115b6d3af1c1dc30e194a6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233120
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-02-16 16:52:50 +00:00
Aske Simon Christensen 6faa5f3bd0 [dart2wasm] Initial commit for the Dart-to-WasmGC compiler.
This is work in progress. Several language features are still
unimplemented or only partially implemented.

Instructions for running the compiler and its output can be found in
pkg/dart2wasm/dart2wasm.md. These procedures are preliminary and
expected to change.

The best version of d8 to use for this version of dart2wasm is 10.0.40,
as explained here: https://dart-review.googlesource.com/c/sdk/+/232097

This commit also adds a dart2wasm-hostasserts-linux-x64-d8 testing
configuration to run the compiler over the test suite.

The history of the prototype that this is based on can be seen here:

https://github.com/askeksa-google/sdk/tree/wasm_prototype

Issue: https://github.com/dart-lang/sdk/issues/32894

Change-Id: I910b6ff239ef9c5f66863e4ca97b39b8202cce85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/175728
Reviewed-by: Joshua Litt <joshualitt@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2022-02-16 11:11:14 +00:00
Johnni Winther f24c4fa919 [cfe] Add initial support for applying the phase 1 macro results
This adds support for the generating a synthesized augmentation
library for each library in which phase 1 macros were applied.
Current implementation piggybacks on the patch library support. The
intension is that both patches and augmentations are handled through
the same general mechanism. For now, the wording refers to augmentation
libraries as patch libraries where the implementation is shared.

Testing is extended to verify that the generated classes are
included in the resulting AST.

Change-Id: Ie0d4cfdc84b55ca87e0014794f14b38e442f08eb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233101
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-02-16 09:19:49 +00:00
Joshua Litt f50a4b4612 [dart2js] Cleanup some TODOs in dart2js' frontend api.
These appear to be no longer necessary.

Change-Id: I8ec8a13394b6e56697de3ccee3a5326b149a137a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/233000
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-02-15 17:41:39 +00:00
Jake Macdonald e6654814cc Make the serialization mode easily configurable (and required), and some other improvements.
- Support TransferableTypedData in the bootstrap code and IsolatedExecutor.
- Also removed the fake executor and conditional import. Mode will likely be chosen based on factors other than just the availability of `dart:isolate`.
- Run the tests in both serialization modes.

Change-Id: I5c731d192c0d3a8cdc5f7fb900dc07a32f4f4d51
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232981
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2022-02-15 16:16:20 +00:00
Chloe Stefantsova 6c8ad6a723 [cfe] Report errors on declared 'values' member in enums
Part of https://github.com/dart-lang/sdk/issues/47453

Closes https://github.com/dart-lang/sdk/issues/48389
Closes https://github.com/dart-lang/sdk/issues/48387

Change-Id: I8313e3f63122c85c91a9647ddaa53346591d7238
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232841
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-02-15 12:22:19 +00:00
Jake Macdonald 97176be3d4 add the local identifier type for parameters, add isStatic field to class members
Change-Id: I15d85fdc4a6b894e6ecda6716f9931e03a8278ae
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/232961
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-02-15 11:49:50 +00:00