Commit Graph

13 Commits

Author SHA1 Message Date
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
Jake Macdonald e43aad1984 This is a precursor CL to a client side only InterfaceType class, which requires the ability to look at type parameters for arbitrary types in the program, in the declaration phase.
Move TypeDeclarationResolver to be available in the Declaration phase.

Add IntrospectableType interface, and IntrospectableClassDeclaration which implements it (we will eventually have IntrospectableMixinDeclaration, IntrospectableEnumDeclaration, etc).

Migrate ClassIntrospector to InterfaceIntrospector, which operates on IntrospectableType instances instead of ClassDeclaration instances.

Question: Possibly `InterfaceIntrospector` should have a different name, maybe just `TypeDeclarationIntrospector`?

Change-Id: Ifd202bad61eeae5f7d76d769d9d96a866c0fecdb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/247060
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2022-06-28 14:02:12 +00:00
Jake Macdonald 9846fe2621 Add FunctionTypeParameter and Parameter classes
Bug: https://github.com/dart-lang/language/issues/2208
Change-Id: I2a9bed6cc243eef2bfa313f7280d1d60c51a7b36
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/242140
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2022-04-22 19:20:19 +00:00
Jake Macdonald aa1596735a support Set instances in macro arguments, add some more testing of various supported Argument types
Change-Id: I0d61a6d88dba41421fe8f3cbd3e14c62bbfa4843
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/241682
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-04-19 20:18:38 +00:00
Jake Macdonald 1f543bcedf Refactor how actual executor instances are created.
- removes the `loadMacro` api entirely
- adds new apis to MultiMacroExecutor
  - registerExecutorFactory
  - unregisterExecutorFactory
  - libraryIsRegistered
- Removes the MacroClassIdentifier, instantiateMacro takes a library uri and class name
- Drop precompiledMacroUris from CompilerOptions, only have a macroExecutor now

Change-Id: Ic33933b34dbfd637da3d841ff496582f688dcd87
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239466
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2022-04-05 19:25:13 +00:00
Jake Macdonald ef413b95e0 add a socket communication option for the process executor
Change-Id: I0bf2ca9c8737ec0e0035e1e8e42a5e3aa3ea813c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/239581
Reviewed-by: Jens Johansen <jensj@google.com>
Auto-Submit: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2022-03-31 16:35:05 +00:00
Johnni Winther e50b7e77b8 [macro] Support fresh names in MacroExecutor.buildAugmentationLibrary
This adds support for generating truly unique fresh names when building
augmentation library code. The synthesized names are used for import
prefixes and as placeholders for not-yet-inferred omitted type
annotations.

Change-Id: I6fe9bc37b39a243c93187f561ee32e07237341f1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237823
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-22 16:30:08 +00:00
Jake Macdonald ded8936d35 Add TypeInferrer interface, this is what macro authors will use to infer real types from OmittedTypeAnnotations.
Bug:https://github.com/dart-lang/language/issues/2154
Change-Id: I00484ddbd09a3c2371b96e540b9926144d80c832
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237844
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2022-03-21 16:19:47 +00:00
Jake Macdonald 8d2c630052 add OmittedTypeAnnotation and support in code objects
Bug: https://github.com/dart-lang/language/issues/2154
Change-Id: Ie48d308a822798da22ea38954774e393f81e2e2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/237740
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2022-03-18 14:30:07 +00:00
Johnni Winther 2c430537c6 add IdentifierResolver api, which allows you to get identifiers for a
given symbol in a given library

Change-Id: I665b3bd2fa6fe7bb64375873e9ae9343e7922a3b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234904
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-03-03 16:51:50 +00:00
Jake Macdonald fb5503960f Add a map of class name to augmentations in MacroExecutionResults to assist with merging.
There should now only be a single `augment class` declaration (per augmented class) in a given augmentation library.

Change-Id: I32a56baef63a0658df23b3c52e398597c09f8ba2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/234106
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2022-02-24 17:31:21 +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