Commit Graph

1152 Commits

Author SHA1 Message Date
Nicholas Shahan d5d8486c25 [ddc] Remove legacy code from tests
Stop running expression evaluation and module symbols tests on legacy
code. These still run with unsound null safety, just on migrated code.

Change-Id: Ifb602c058ebcc3fbd8254e8c2f431f8b18146a64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337615
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
2023-12-14 00:34:15 +00:00
David Morgan 11e29a7d9e [ddc] Add macro flags, add test coverage for basic compile.
Support and test coverage for other modes to follow.

R=cstefantsova@google.com, jakemac@google.com

Change-Id: Ic715f43317364955b3b2341134cf3cf576cebd00
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/339321
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Auto-Submit: Morgan :) <davidmorgan@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-12-12 10:07:42 +00:00
Jens Johansen 6c9f95bd15 [CFE/DDC] Scope test adds context for type parameters; more testing
Change-Id: I218cc473ae2e48944b268094e08cf0da19a09bbd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337740
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2023-11-28 07:52:32 +00:00
Nicholas Shahan 84aa0207cf [ddc] Remove legacy from nullable inference test
Update source code in tests to be migrated to null safety. Tests are
still running in unsound null safety.

In most cases types are now inferred to be non-nullable so the code that
makes expressions to be seen as nullable now require `as dynamic` to
allow them to compile.

Update nullable inference logic to recognize `.toString()` on a String
as non-nullable in code that has been migrated to null safety.

Change-Id: Id0771cc5317e3dafbf10e766b80d2994752bacc8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/337700
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2023-11-23 20:03:22 +00:00
Ryan Macnak c1143082fe Include ARM64 when uploading d8.
Change-Id: I613ca948734a849c43f6f6d02cfd678d18fe7e03
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336200
Reviewed-by: Alexander Thomas <athom@google.com>
2023-11-21 17:15:20 +00:00
Nicholas Shahan a45fc14739 [ddc] Update debugger field signatures
Erases extension types to their representation type for field
signatures. This is the best representation we have at runtime for
the field. Note this isn't necessarily the runtime type of the
field value.

Issue: https://github.com/dart-lang/sdk/issues/49735
Change-Id: Ibe064f4fd3829a858fc9fd920e2e91175d9ae0c9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/336823
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2023-11-21 01:55:46 +00:00
Johnni Winther 56a86e599e [cfe,ddc] Add tests for scopes in extensions, extension types and mixins
This adds support using experimental features in id testing in DDC and
uses it to add tests for scopes in extensions, extension types and
mixins.

The tests show that the DartScopeBuilder and DartScopeBuilder2 differ
on the scope on instance members in extensions and extension types for
the synthetic #this variable.

Change-Id: Iec0f3b938da567578b1245ada885370fb2a8b33f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335824
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-11-16 09:37:31 +00:00
Johnni Winther 4eed065859 [cfe] Add CFE test for DartScope
This adds a CFE test for DartScope that shares the data with the
corresponding DDC test. The CFE test uses the DartScopeBuilder2
which is currently in development to replace the DartScopeBuilder.

Change-Id: I0d6c76957e7a5d28babab14110d430935e686b22
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335821
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2023-11-15 10:17:23 +00:00
Johnni Winther 1f86f34c5c [dartdevc] Add id-testing support in ddc
This adds id-testing support to dartdevc and uses it to add a
scope_test for the DartScope created for expression compilation.

Change-Id: I861092e17807190880bd20e4e39e012fbf0cbe53
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/334220
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2023-11-10 10:49:56 +00:00
Jens Johansen dc68ce5c68 [ddc/kernel] Move DDCs dart scope calculation for expression evaluation to kernel
Change-Id: I40602560d0a4d88db43f514bcfa46d9959299fc3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332240
Reviewed-by: Anna Gringauze <annagrin@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2023-11-06 08:16:20 +00:00
Jonas Termansen 4bef74a60e Remove dart language marker in jsinterop test.
The @dart marker should only be used for released language versions,
rather than the upcoming release, since the upcoming language features
has not been finally assigned to a language version yet. The appropriate
experiments should be used instead to opt into upcoming features.

This change is part of the effort to make it possible to easily bump
tools/VERSION without unexpected issues whenever tests have to have
their pinned language versions updated as well.

Bug: b/304745266
Change-Id: If9c7f07bb8bf0482257d0476b4e7d64077e53b8d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/330106
Commit-Queue: Jonas Termansen <sortie@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-10-12 09:40:11 +00:00
Jonas Termansen e743910b18 Reland "Bump version to 3.3."
Please prefer not to revert this change. Any tests that fail are release
blockers and need to be approved and urgently fixed forward. Dart 3.2
has already been cut and the version number must be updated. It is
acceptable for rolls to be blocked until the release blockers have been
resolved as P0 issues.

Remove needless version number comment from experimental_features to
remove duplicated information and simplify version updates.

Update dartdoc to a version that supports 3.3.

Change-Id: I1a19aa86e185c99e61374665f18cf24c498935a5
Tested: CQ
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329588
Commit-Queue: Slava Egorov <vegorov@google.com>
Auto-Submit: Jonas Termansen <sortie@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
2023-10-06 19:00:58 +00:00
Ilya Yanok 85fd1b8f43 Revert "Bump version to 3.3."
This reverts commit 81aaf6c6c4.

Reason for revert: regression in G3: b/303734572

Original change's description:
> Bump version to 3.3.
>
> Remove needless version number comment from experimental_features to
> remove duplicated information and simplify version updates.
>
> Tested: CQ
> Change-Id: I864bfc44070136406e95fdaf4d83f491b2c95943
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329460
> Reviewed-by: Alexander Thomas <athom@google.com>

Change-Id: Ie7dca3106345ee7949ccd13ab4765998926c0abc
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329603
Commit-Queue: Ilya Yanok <yanok@google.com>
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Alexander Thomas <athom@google.com>
2023-10-06 13:34:56 +00:00
Jonas Termansen 81aaf6c6c4 Bump version to 3.3.
Remove needless version number comment from experimental_features to
remove duplicated information and simplify version updates.

Tested: CQ
Change-Id: I864bfc44070136406e95fdaf4d83f491b2c95943
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329460
Reviewed-by: Alexander Thomas <athom@google.com>
2023-10-05 23:06:17 +00:00
Devon Carew e2fe203adc [deps] roll package:lints to the latest
Change-Id: I582f956cd4b712203c2f6dd630b4e1384040446d
Tested: analysis clean (this is a lint only related change)
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/329400
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-10-05 03:36:59 +00:00
Nicholas Shahan 02f91a1064 [ddc] Cleanup dynamic calls in core_patch.dart
Change-Id: I453b9b034c4656db96bb034a39602c5514a5bed9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/328663
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-09-29 16:14:30 +00:00
Anna Gringauze e1efba011e [ddc] Fix exception on pausing in library with late globals
Closes: https://github.com/dart-lang/sdk/issues/53603
Change-Id: If2c9b62204dc00c5d0316e66ab34bf10855e9c92
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327823
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2023-09-28 19:59:02 +00:00
Johnni Winther 9c6f8bebfb [dartdevc] Analyze dartdevc and its platform libraries for dynamic access
This adds two dartdevc tests that analyze dartdevc itself and the
dartdevc platform libraries, respectively, for uses of dynamic invocation,
dynamic get and dynamic set. This is to help reduce the number of these
accesses, which are often accidental and unwanted.

The current state is allowed using allow-lists.

Change-Id: Ib2bb69cc311b0a3d6993da3cd31090a9321e0e64
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327880
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2023-09-27 07:32:14 +00:00
Devon Carew 3b0b1bd863 Bump package:lints to the latest; address instances of new lints.
Changes:
```
> git log --format="%C(auto) %h %s" 8d5f750..b044aca
 https://dart.googlesource.com/lints.git/+/b044aca add several rules to core and recommended (150)
 https://dart.googlesource.com/lints.git/+/81100a2 fix a dangling table link (146)
```

Diff: https://dart.googlesource.com/lints.git/+/8d5f7500024320654adb1e799e49fc10c5304ae7..b044acab9f6669b3d8e781923a8ff86877801177/
Change-Id: I031333ade99af700a7009b14a36d3aadba12fc94
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/327321
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
2023-09-25 21:15:15 +00:00
Alexander Thomas 9394b30b77 Fix incorrect file reference in license headers
Bug: b/286184681
Change-Id: I903528c4adfbc576644aec7541903df6b9633e26
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325523
Reviewed-by: Jonas Termansen <sortie@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2023-09-18 06:44:08 +00:00
Johnni Winther 01f582df78 [cfe] Make (Tree)Visitor(1) pure interfaces
This splits visitors for (Tree)Visitor(1) into pure interfaces, mixins,
and a base class with the base implementation. This is a step towards
avoid having an accidental default implementation where a static error
would have been preferable.

This extract a ConstantReferenceVisitor(1) and its corresponding
DefaultMixin from the Visitor(1) interface.

TEST=existing

Change-Id: Ibc55bed9cff76581deaade91a10600c17fafc6dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/325704
Reviewed-by: Mayank Patke <fishythefish@google.com>
Reviewed-by: Ömer Ağacan <omersa@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2023-09-14 10:59:26 +00:00
Anna Gringauze 3740e620cd Reland "[ddc] Add module local caches for new types"
This is a reland of commit a9fc9ffc4d

Additional changes:

- Set incremental mode on generic class table
  - fixes expression evaluation failure discovered by dwds tests
    (generic class table was not always defined in compiled expression)
- Allow expression evaluation while the app is running in e2e suite
- Add regression tests for the expression evaluation failure.

Original change's description:
> [ddc] Add module local caches for new types
>
> - Provides fast access for types that are used multiple times in the
>   same module.
> - Enable the existing type table cache when running with new types.
> - Add a similar cache for instantiated generic classes. This cache
>   is used in the current type system as well to help keep the
>   difference between types and classes more clear.
>
> Issue: https://github.com/dart-lang/sdk/issues/48585
> Change-Id: I32103cf0c0bcf9b9771e789c0d04e63a4365a066
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321320
> Commit-Queue: Nicholas Shahan <nshahan@google.com>
> Reviewed-by: Mark Zhou <markzipan@google.com>

Change-Id: I9c31d1d07d7f9bb15645ac9aa6e91d35e8906e85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/323501
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2023-09-01 21:10:09 +00:00
Nicholas Shahan 3a65ac91f1 [ddc] Cleanup old "dartdevc" build targets
Use the new "ddc" targets everywhere and delete
the old targets.

Change-Id: I89d3351006a2c3eb0d1b9d526b868cbb676dce6b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/315561
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-08-29 21:33:48 +00:00
Srujan Gaddam 90e056cc05 [ddc] Use cast to JSObject for counter
Fixes https://github.com/dart-lang/sdk/issues/53231

createDartExport does not return a JSObject by default, and
therefore needs to be casted.

Change-Id: I4eb448565bf48d1c9b3b300644883c74b1764200
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/321202
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2023-08-16 19:38:23 +00:00
Anna Gringauze 8f4e5c8194 [ddc] Fix runtime failure on evaluation of expressions that use JS interop and extension types
Incremental compiler only runs procedure transformations during expression compilation, as opposed to modular library transformations
that are run during initial compilation stage on libraries (including JS interop-related transformations).


In this CL:

- Add implementation of `performTransformationsOnProcedure` to dev compiler target
  - runs JS interop-related transformations on a procedure.
- Add related expression evaluation tests
  - expressions using JS interop and extension types.

Closes: https://github.com/dart-lang/sdk/issues/53048
Change-Id: I085920db9c3af4c680283c574087d8901c99dfcf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/319585
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2023-08-11 16:15:00 +00:00
Anna Gringauze 67d752aa12 [ddc] Clean up expression compiler tests
- Allow running the tests with asserts enabled

- Allow running the tests in canary mode

- Unify common test code and remove duplication
   - merge expression_compiler/setup_compiler_options.dart
     into share_compiler_options.dart

   - Merge TestCompiler code from expression evaluation and
     expression compilation tests and move into
     expression_compiler/test_compiler.dart

   - Rename various TestDrivers so they have more descriptive names

- Remove 'golden' JS comparison tests from expression_compiler_test.dart
   - replace by evaluation tests where needed

Closes: https://github.com/dart-lang/sdk/issues/53145
Change-Id: Ic797fa4ee9bfa6b858b924be9f9a53fd10ae1448
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/318080
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-08-08 16:21:31 +00:00
Anna Gringauze dd1e7ae18b [ddc] Run tests on canary and stable bots with matching settings
Closes: https://github.com/dart-lang/sdk/issues/53077
Towards: https://github.com/dart-lang/sdk/issues/43986
Change-Id: I60df13b8ff29a0865a45b3a48a97af0ce94460b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/317448
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2023-08-04 15:22:38 +00:00
Nicholas Shahan 5ed1a94ced [ddc] Update ddc stable targets to use new targets
- Updates test infra to use the assets built by the new "ddc" build
  targets.
- The old "dartdevc" targets are still present to avoid breaking 
  golem when this change lands.
- Old targets are still used when packaging assets for the SDK.
- Golem and the SDK packaging will be updated in following changes.

Change-Id: I1926e0c86833c812f5ed8355d7cd4df8740d79ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/315224
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2023-07-31 16:06:07 +00:00
Anna Gringauze a322a97fac [ddc] Add debugger runtime API
Define debugger runtime API so the debugger can display objects without knowing DDC implementation details.

- Add new DDC debugger runtime API in `debugger.dart`
- Add helpers for getting some type information in new and old type systems
- Add tests


Closes: https://github.com/dart-lang/sdk/issues/52773
Change-Id: I8efa4cacebb0d73ef58b5360979089cba2039379
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311154
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2023-07-21 20:10:15 +00:00
Anna Gringauze ab933fe9e5 [ddc tests] Fix expression compilation tests timeouts on JS exceptions
Fix timeout in expression compiler tests

Closes: https://github.com/dart-lang/sdk/issues/51740
Change-Id: I8fd2a321450b4a10235c97af640714a93c805f85
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/314620
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2023-07-18 23:35:07 +00:00
Anna Gringauze d2f5b3bfab [ddc] Add --canary flag to expression compiler worker
Closes: https://github.com/dart-lang/sdk/issues/52776
Change-Id: I639fe7fbadf3e938cc686aa8dbd2320a4cc7af7d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/311151
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2023-06-26 22:55:07 +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
Nicholas Shahan 629b46cdd3 [ddc] Remove .__proto__ use from const instances
Issue: https://github.com/dart-lang/sdk/issues/52372
Change-Id: Ic7072449a1c0a4e46f72a301e907738411406a93
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/304283
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-05-22 20:12:18 +00:00
Nicholas Shahan d869fe93e2 [ddc] Update e2e breakpoint pause detection
Make pulling both events from the stream more explicit and
ensure that different errors appear when each event doesn't
arrive in time.

There are several issues with the previous approach:
- `.skip(1)` actually returns a new stream that will skip the
  first event.
- Calling `.timeout()` on the new stream returns yet another
  stream with the timeout.
- It appeared like each event should have a timeout but the
  ordering means both the skip and first event actually shared
  a single timeout.

Change-Id: I60062634a35424455c03b6e1778cc56bbdeb1716
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/294080
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-04-07 16:30:47 +00:00
Nicholas Shahan d83dcd59e1 [ddc] Add retry logic to the e2e suite cleanup
Change-Id: Ic51ce9bb434ee4b15d44375b362f44837a09c02b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293965
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2023-04-06 22:16:18 +00:00
Nicholas Shahan c18b928382 [ddc] Manually shard e2e test suites
The intention of this change is to break apart the suites and should
not add or remove any tests in any configuration.
- Moved records and patterns tests into a Dart 3.0 specific suite.
- Broke the before/after null safety agnostic tests into two shards.
- Added new suites to run all of the same tests in all of the same
  configs.

Change-Id: If2aea16f1f9e8ac01b1aab49a99d652813fe42fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293384
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-04-05 20:43:30 +00:00
Nicholas Shahan b0abd310ca [ddc] Fix pattern test in expression eval test
New compile time errors rejected the existing code. Variables
created in pattern cases need to keep their type consistent.

Fixes: https://github.com/dart-lang/sdk/issues/51933
Change-Id: I00299ac14f01c95baf9c5d8a5f7eee675ce0c600
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/293400
Reviewed-by: Anna Gringauze <annagrin@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-04-04 20:46:07 +00:00
Anna Gringauze 7b81625180 [Expression compiler] fix pattern evaluation and scope tests
- Update pattern scope tests after CFE switch improvements.
- Fix incorrect end offset detection in expression compiler.
  Account for synthetic variables that can have offsets from
  later code (i.e. created for hoisting).

Related: https://github.com/dart-lang/sdk/issues/51554

Closes: https://github.com/dart-lang/sdk/issues/51825
Change-Id: I07cd319f8996acae2dada96ba6e43eac9e04fbb6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/290706
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
2023-03-23 18:19:07 +00:00
Anna Gringauze b4a609ec3b [DDC] Use temporary names for synthesized CFE variables
Closes: https://github.com/dart-lang/sdk/issues/51589
Change-Id: I9d52b894419165f7e371c4e4fc56b81cb587d935
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288829
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Commit-Queue: Anna Gringauze <annagrin@google.com>
2023-03-20 21:06:48 +00:00
Nicholas Shahan e2e160705a [ddc] Fix e2e suite to use new Record type strings
The `toString()` text no longer contains "RecordType".

Change-Id: I31130a9eda1b52550fd2c5643932b596b9d17f90
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/288546
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
2023-03-14 23:21:21 +00:00
Mark Zhou a92274cae8 [ddc] Rolling internal dart_library.js into SDK
Change-Id: Ifb1cf1aed53b04eaa0a258668eab6b4b8f19df80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286609
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mark Zhou <markzipan@google.com>
2023-03-07 19:44:26 +00:00
Johnni Winther bd02ce7a7f [cfe] Report error on : for default values
Closes #51576

TEST=pkg/front_end/testcases/general/colon_default_value

Change-Id: Ia8ccdf697d876dbefcbf2c5ed98d01634c075e74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/286183
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2023-03-06 19:04:55 +00:00
Devon Carew 0bed5e0398 [pkg/testing] use package:lints/recommended.yaml
Change-Id: If3836cb1758671ccd53bfe2b227b7489a9855fa5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/283460
Reviewed-by: William Hesse <whesse@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-02-17 01:34:34 +00:00
Mayank Patke aa0a7e7083 [ddc] Add dart.web.assertions_enabled environment variable.
Change-Id: If28f2f1404f02c5d757774188a5a006137c8734f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/273284
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
2023-02-14 01:35:05 +00:00
Devon Carew 21ab29fef6 [deps] rev package:source_maps to the latest
Change-Id: Ic0926143ea98bc3bc1eebfaca0d20c3f5578154a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/282808
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
2023-02-13 21:18:37 +00:00
Joshua Litt 99a9f3d516 [js_types] MVP of JS types.
Change-Id: Ic329146a270ff32fc2cdb32febc6f574bc81792f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280131
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2023-02-02 21:29:01 +00:00
Alexander Markov a9d9b7395b [kernel] Enable sound null safety in TargetFlags by default
TargetFlags.enableNullSafety is set to true by default and
also renamed to TargetFlags.soundNullSafety to better reflect its
meaning.

TEST=ci

Change-Id: I2c2f30c2af6502fd9a96141dc60e4afbf8c524fd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280216
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2023-02-02 14:54:18 +00:00
Anna Gringauze 6387f7345a Fix incorrect record types
- Access record elements starting from 1 when creating record type.
- Add record tests for the expression compiler.

Closes: https://github.com/dart-lang/sdk/issues/51197
Change-Id: I02af94a1f09cbcb9801b6b3a5b0effdfd33aab2b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/280204
Commit-Queue: Anna Gringauze <annagrin@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
2023-02-01 01:56:38 +00:00
Nicholas Shahan 7c5445074b [ddc] Refactor modular test suites
- Move DDC modular pipeline to helper library.
- Add null safety flag to `SourceToSummaryDillStep`.
- Add null safety and canary mode flags to `DDCStep`.
- Add new suite that runs in canary mode without sound null safety.

Change-Id: I3b5450c2f07913a8bdc9a210e16d26fe162ff1c0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279478
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Nicholas Shahan <nshahan@google.com>
2023-01-27 23:57:30 +00:00
Nicholas Shahan fa8c14a3e3 [ddc] Add scope offset test in sound null safety
Change-Id: Ic050932eb5a082330a18d4aeaefb106cbd2819ba
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279907
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Anna Gringauze <annagrin@google.com>
2023-01-27 00:32:38 +00:00