Commit graph

83534 commits

Author SHA1 Message Date
Daco Harkes 045b9c1715 Reland "[vm/ffi] Add common C types"
We're adding these types to `dart:ffi` rather than `package:ffi` so that
they can be used with `FfiNative`s.

Adds `NativeType`s for the following C types:

* unsigned char
* signed char
* short
* unsigned short
* int
* unsigned int
* long
* unsigned long
* long long
* unsigned long long
* uintptr_t
* size_t
* wchar_t

Because the C standard only defines minimum sizes for many of these
types, future platforms might diverge from the typical size even if all
platforms currently agree on a size. To avoid having to reification
later, we define all types as AbiSpecificIntegers rather than typedefs,
even if all current target platforms agree on the size.

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

TEST=tests/ffi/c_types_test.dart

Original patch in patchset 1.

* Removes `Char` for now until package:win32 has rolled to 2.3.8 in
  Flutter. https://pub.dev/packages/win32/versions/2.3.8/changelog
  https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8824468064587445729/+/u/Android_Views_Integration_Tests/stdout
* Adds `c_type.dart` in `ffi_source.gni` which should fix `IntPtr`
  missing when analyzing `path_provider_linux`. (However, I was unable
  to reproduce the issue locally.)
  https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8824468064571399025/+/u/run_test.dart_for_flutter_plugins_shard_and_subshard_analyze/test_stdout
  `/tmp/flutter_plugins.KZMNMC/packages/path_provider/path_provider_linux$ ~/flt/engine/src/out/host_debug/dart-sdk/bin/dart  analyze --fatal-infos`

Change-Id: I89130cccba285fc9c483bb53f5710a302f2b104f
Cq-Include-Trybots: luci.dart.try:dart-sdk-linux-try,dart-sdk-mac-try,dart-sdk-win-try,vm-ffi-android-debug-arm64c-try,vm-ffi-android-debug-arm-try,vm-canary-linux-debug-try,vm-fuchsia-release-x64-try,vm-kernel-gcc-linux-try,vm-kernel-asan-linux-release-x64-try,vm-kernel-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-mac-debug-x64-try,vm-kernel-mac-release-arm64-try,vm-kernel-nnbd-win-release-ia32-try,vm-kernel-nnbd-win-release-x64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-win-release-x64-try,flutter-analyze-try,flutter-engine-linux-try,flutter-frontend-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229156
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-01-27 13:09:01 +00:00
Sigurd Meldgaard bc7554107b Bump pub to 8f5ab7b1aba3b9f66b56246d77e167990339d317
Changes:
```
> git log --format="%C(auto) %h %s" dcb6aba..8f5ab7b
 https://dart.googlesource.com/pub.git/+/8f5ab7b1 Avoid raceconditions in `global activate`, `run` and `global run` (#3285)
 https://dart.googlesource.com/pub.git/+/6e03ec02 Support multiple packages in 'dart pub add' (#3283)
 https://dart.googlesource.com/pub.git/+/1a298f4d Fix --verbose doc, and accept verboseness setting from embedder (#3279)
 https://dart.googlesource.com/pub.git/+/5bda798c Avoid race condition for hosted source on package extraction (#3277)
 https://dart.googlesource.com/pub.git/+/17c5addb Error on acquireDependencies when the root pubspec has an unknown sdk in the environment. (#3271)
 https://dart.googlesource.com/pub.git/+/0a32ae4a folder/* should not ignore the folder itself, only the contents (#3267)
 https://dart.googlesource.com/pub.git/+/44b785aa Normalize file names for tar.gz (#3268)
 https://dart.googlesource.com/pub.git/+/2fd6b5f0 Fix repository specification: isRetracted -> retracted (#3249)
 https://dart.googlesource.com/pub.git/+/0fc71db4 Write log trace to $PUB_CACHE/log/pub_log.txt when crashing (#3240)

```

Diff: https://dart.googlesource.com/pub.git/+/dcb6abac2d7d43258c03b348be42bf4aab9529b1~..8f5ab7b1aba3b9f66b56246d77e167990339d317/
Change-Id: I54f1fde0f50ca19ca036bb1e6d9b166455031183
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229542
Reviewed-by: Jonas Jensen <jonasfj@google.com>
Commit-Queue: Sigurd Meldgaard <sigurdm@google.com>
2022-01-27 11:17:00 +00:00
Jens Johansen 4b26ea0dad [CFE] Fix incremental_compiler_leak_test(er)
In https://dart-review.googlesource.com/c/sdk/+/214020
incremental_compiler_leak_test was renamed to
incremental_compiler_leak_tester temporarily because it started saying
we had possible leaks.

Looking into it now, a number of puzzeling this were found:
* Many SourceLibraryBuilders, SourceClassBuilders etc was alive despite
  having been converted to DillLibraryBuilders (etc). They shoudn't be.
* Several Librarys (from kernels AST) came and went between
  invalidations.

This all was caused by the VM sometimes keeping things around longer
than it should (probably a variation of
https://github.com/dart-lang/sdk/issues/36983).

This CL fixes it by explicitley nulling things out (and similar).
It re-enasbles the test and updates it to explicitley expecting a
certain number of instances for some classes (e.g. it now expect
0 SourceLibraryBuilders).

To be clear I don't think this has caused any "real" leaks, but:
* having things clear up too late is very confusing.
* we will probably use less memory now.

Change-Id: I3a439f23fc7ef26b156c6164a2c37f6352bc57b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229964
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-01-27 09:55:51 +00:00
Chloe Stefantsova 13713c2232 [cfe] Make _Enum type pre-created similarly to built-in types
Part of https://github.com/dart-lang/sdk/issues/47453

Change-Id: I046fc14b76513b6b1b3f3606b4c1bd299abca50a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229963
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-01-27 09:32:40 +00:00
Johnni Winther d2105a9c7b [cfe] Add initial support for applying phase 1+2 macros
Change-Id: I04964684b355e50abb4a0d9bcfa0558297e667c2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230080
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-01-27 08:39:51 +00:00
Michael Thomsen 208e7bc2e2 Remove dartdoc commands
Part of previously announced deprecation, see:
https://github.com/dart-lang/sdk/issues/46100

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

Change-Id: Ic3eaa793149da412b7520b154a0909ee59fbfb5d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228647
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2022-01-27 08:12:00 +00:00
Konstantin Shcheglov da48a6fb12 Create a new session on a file change.
This should restore throwing InconsistentAnalysisException.

Internal presubmit looks green.
https://fusion2.corp.google.com/presubmit/tap/424245133/OCL:424245133:BASE:424340361:1643210802936:6f26b405

Change-Id: I286d5db0fe51e8ea00d0fe83a70d4c9d59052715
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230040
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-27 00:44:39 +00:00
Alexander Markov 17563522da [vm/compiler] Minor improvements in hashcodes and test for inefficient hashes
This change improves a few implementations of hashcodes in compiler.
Slightly improves AOT compilation time:
gen_snapshot 60.736s -> 58.920s (-2.9%)
(on a large Flutter app, compiled in release mode for arm64).

Also, the same large app can be now compiled with
--hash_map_probes_limit=1500, meaning that all hash maps in
the compiler perform less than 1500 probes when looking for an
element.

This change also adds a test which verifies that kernel compiler
itself can be compiled with --hash_map_probes_limit=1000.
This is a sanity check to ensure we do not have a very
badly distributed hashcode in the compiler.

TEST=ci

Issue: https://github.com/dart-lang/sdk/issues/43299
Change-Id: I7a802709727a33760c4f1d13f7b2c8cb263852d7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229940
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Slava Egorov <vegorov@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
2022-01-26 23:44:31 +00:00
Ryan Macnak 9a00395504 [vm, x64] Use a shorter addressing mode for UnboxInt64.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/48221
Change-Id: I429b2d05aef595dd3ad148ada0aeb3a3225e2995
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230200
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-01-26 22:18:17 +00:00
Ben Konyi 1c571a12fa [ CLI ] Migrate package:dartdev to null safety
Fixes https://github.com/dart-lang/sdk/issues/47964

TEST=CQ

Change-Id: I4ee57bc5739835824b0052bd9470a0d52ccf161b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229948
Reviewed-by: Devon Carew <devoncarew@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
2022-01-26 21:16:49 +00:00
Danny Tuppeny 7ad1786e45 [analysis_server] Refactor completion handlers in preparation for using NotImportedContributor
Change-Id: I18608b110093e87887f8e9118340e323fe829248
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230081
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-01-26 20:07:28 +00:00
Ryan Macnak 6eb5cde512 [vm] Remove dead flag declarations.
TEST=ci
Change-Id: I32297b9791462b4a9a03918cf5ee405a3354184c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229720
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-01-26 18:58:58 +00:00
Joshua Litt f6ebe80d26 [dart2js] Refactor program split constraint's Fuse node.
This cl makes Fuse an unnamed ordering node, and allows ors / ands
within the fuse. For examples of the benefits of this new Fuse, please
see:
pkg/compiler/test/custom_split/data/fuse_with_and/main.dart
and
pkg/compiler/test/custom_split/data/fuse_with_or/main.dart

Change-Id: I5076abcd617d138b03dc8944737c61645e42e038
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228685
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Joshua Litt <joshualitt@google.com>
2022-01-26 18:03:58 +00:00
Konstantin Shcheglov 540c053ca8 Add HighlightRegionType.EXTENSION
Change-Id: I375df19b8ee5f6570fcc7d440b9d71b148bcef73
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230020
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-26 16:11:59 +00:00
Johnni Winther 715e13a03a [cfe] Compute data needed for macro precompilation
This adds (and tests) the computation of the libraries and their
macros classes/constructors needed for precompilation.

The data isn't used to trigger the precompilation yet.

Change-Id: Iefec9766b405cb3411f277695b315657a2d92b27
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229145
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-01-26 16:09:48 +00:00
Aske Simon Christensen c05fe0bfd1 [vm,dart2wasm] Add a placeholder patch file for map/set factories
The relevant code will be moved to the new file after the Flutter patch
file lists have been updated.

TEST=ci
Change-Id: I37bd1f7124029e35b81dc4913962f2707bc02781
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229905
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Aske Simon Christensen <askesc@google.com>
2022-01-26 15:33:38 +00:00
Alexander Thomas 62e2f5494a [release] Update changelog for dart_internal
Follow-up to: https://dart-review.googlesource.com/c/sdk/+/230000

Change-Id: If2d030b8400f1f38d27f759f262fd82c8c7cbf4d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229965
Reviewed-by: William Hesse <whesse@google.com>
2022-01-26 15:13:26 +00:00
Daco Harkes dfcd594ebd [vm] Delete dead runtime entries
We do not have a byte code interpreter anymore, these runtime entries
are dead.

With enabling inlining for external functions (previous CL), the
`external-name` annotations can also be removed.

TEST=removes dead code
TEST=hashes: runtime/vm/compiler/recognized_methods_list.h

Change-Id: Ibf7f9598cfe52756f6645473f619cf8456f8f593
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229961
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
2022-01-26 13:09:58 +00:00
Daco Harkes 0ac2549604 [vm] enable inlining external functions
Closes: https://github.com/dart-lang/sdk/issues/48215

TEST=vm/cc/ReachabilityFence_Loop (IL matching fails if not inlined)

Change-Id: I268bf8abe38c81b7df87d2b7aef03fbd43ee517c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229960
Reviewed-by: Martin Kustermann <kustermann@google.com>
2022-01-26 13:09:58 +00:00
Jake Macdonald 5f7a49979b Add shouldExecute and supportsDeclarationKind apis to MacroInstanceIdentifier.
Ideally this would be on MacroClassIdentifier but it isn't very feasible to do, at least not without using mirrors.

Change-Id: I543461fc677da3daeec4172489d1c7d846901382
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229945
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2022-01-26 11:19:30 +00:00
Alexander Thomas fe78ad3cb9 [co19] Roll co19 to 1247f4096b835f31465e8f71dece427e95b51534
2022-01-25 sgrekhov@unipro.ru Fixes dart-lang/co19#1276. Roll failures fixed, runtime checkings added
2022-01-24 sgrekhov@unipro.ru Fixes dart-lang/co19#1278. Errors and typos in some Enhanced enums tests fixed
2022-01-24 sgrekhov@unipro.ru dart-lang/co19#1277. Typo fixed
2022-01-22 irina.arkhipets@gmail.com Fixed dart-lang/co19#1279: test expectations corrected.
2022-01-21 irina.arkhipets@gmail.com dart-lang/co19#47849: Enhanced Enum tests corrected, missing Issue tags added.
2022-01-21 irina.arkhipets@gmail.com Fixes dart-lang/co19#1277: Missing closing } added.

Cq-Include-Trybots: dart/try:analyzer-nnbd-linux-release-try,dart2js-nnbd-linux-x64-chrome-try,ddc-nnbd-linux-release-chrome-try,front-end-nnbd-linux-release-x64-try,vm-kernel-nnbd-linux-release-x64-try,vm-kernel-nnbd-win-release-x64-try,vm-kernel-precomp-nnbd-linux-release-x64-try
Change-Id: I9fb09ef36e731b9f92829de6303a83d78554a9ac
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229900
Reviewed-by: William Hesse <whesse@google.com>
2022-01-26 11:15:26 +00:00
Jens Johansen a9e2703a62 [CFE] Fix scopes for expression compilation
Before this CL, when doing expression compilation we would build scopes
like this:

[exp scope locals] -> [exp scope imports] -> [org scope]

Which means that if one looks up "Foo" in the (first) scope and
something with that name is available both via imports and via
the original scope one would find it via the import.
That's not what we want considering the expression compilation
library should pretend to be the original library.

Instead this CL copies the original scope into the expression
compilation local scope:

[exp scope locals + org scope] -> [exp scope imports]

Meaning that we would find the correct "Foo" if one was defined in
the original library and (another one by the same name is) available
via an import.

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

Change-Id: Ib9e089b465f7da1a4c5799a2165fd06c735ea7da
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229904
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2022-01-26 10:03:32 +00:00
Robert Nystrom 836aeecb91 Update dart_internal to allow SDK 2.17.
Change-Id: Ic3295690f9f4cf2d0a84cfbba59b7cd107c22f4f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230000
Auto-Submit: Bob Nystrom <rnystrom@google.com>
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2022-01-26 09:26:18 +00:00
Konstantin Shcheglov 1c2ecfe624 Switch AnalysisSessionImplTest to PubPackageResolutionTest.
Change-Id: I2f014084da34ab2f4265b489fe2fbe397beefb07
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229942
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-26 01:48:57 +00:00
Brian Wilkerson 6c10e05ba3 Mark internal codes as never being displayed to users
Change-Id: I70b903059b37765c57bacf0f0402ec73e405fd4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229980
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-01-26 00:54:37 +00:00
Konstantin Shcheglov afd8df4d54 Fix for suggesting enum constructors, tests for both protocols.
Change-Id: I71721cf0e2c3c772b1662f2abe065837c5405ad2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229950
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-26 00:44:59 +00:00
Ryan Macnak f0e63afd9e [vm, gc] Allow the main thread to perform incremental marking during idle time.
Also allow the main thread to contribute to marking if concurrent marking does not complete before we hit the hard allocation limit.

TEST=ci
Change-Id: Ia6c35cf8b54adc6f1259c6bd03701c2c4cf849c8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229284
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-01-25 23:18:07 +00:00
Ryan Macnak 9bc03ece9a [vm, compiler] Fix BinarySmiOpInstr(USHR, reg, reg) on RV64.
TEST=ci
Bug: https://github.com/dart-lang/sdk/issues/38587
Change-Id: I29a532e8c8a1170dbd4f20e081c1a3f397ccc591
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229700
Reviewed-by: Alexander Markov <alexmarkov@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-01-25 22:54:47 +00:00
Srujan Gaddam b979f797f3 [dart:html] Add firefox to requestFullscreen's SupportedBrowsers
Change-Id: I13f9db6a8d4a8d8ae1e17604db075120e0470dd4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229941
Auto-Submit: Srujan Gaddam <srujzs@google.com>
Reviewed-by: Riley Porter <rileyporter@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2022-01-25 20:12:30 +00:00
Lasse R.H. Nielsen bd8c047a8b Disable 2.15 language features experiment flags.
Step of releasing 2.16.

Change-Id: I9336289e71bcbb2cc5d298c9fb621aa6d14e99b7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/227540
Auto-Submit: Lasse Nielsen <lrn@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-01-25 19:26:49 +00:00
Nate Bosch 4cbbf03ced Update to the latest package:matcher
Change-Id: Iae9528d7398857d3d20135bab50534dbc9805c80
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229680
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Jake Macdonald <jakemac@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2022-01-25 18:23:15 +00:00
Daco Harkes 356a56193e [gardening,gcc] avoid error=maybe-uninitialized
TEST=simple refactor

Change-Id: I307b67337265ef7da663e00274358262d828bbd5
Cq-Include-Trybots: luci.dart.try:vm-kernel-gcc-linux-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229902
Reviewed-by: Aske Simon Christensen <askesc@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
2022-01-25 17:48:27 +00:00
Sai Sandeep Mutyala 4e77df92de Add a fix for the leading_newlines_in_multiline_strings lint.
Bug: https://github.com/dart-lang/sdk/issues/47960
Change-Id: Id775cfc3a2c5a8635ad26c8b4a611c94e770b6b6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229480
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-01-25 17:24:01 +00:00
Konstantin Shcheglov 1028355cad Use isEnumConstant in 'constants'.
Change-Id: Id02f46a438a4c5b7117cb37e9e82ef986e5941ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229860
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-25 17:00:11 +00:00
Graciliano Monteiro Passos 624a99646b Improve documentation of integers endianness.
Added to the documentation that integers should be of the same endianness of the host.

- I have lost 2 hours to discover that `asUint32List` requires the same endianness of `Endian.host`.

Closes https://github.com/dart-lang/sdk/pull/47980
https://github.com/dart-lang/sdk/pull/47980

GitOrigin-RevId: 1a1728602735434efd3e505d76e4f45b8161ea14
Change-Id: Id8a1fd8c5c4dced141881a1ce64577fdcbb8b62e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/225080
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
2022-01-25 16:39:52 +00:00
Jake Macdonald 577ba62516 Macro cleanup/simplifications plus some additional tests and fixes
- Added the ClassMemberDeclaration interface to simplify some things and unify builder implementations.
- Adds tests for running macros on top level declarations
- Update the code for executing macros to allow function/variable macros to be ran on methods and fields.
- Other general cleanup and some minor bug fixes

Change-Id: I9bc60740c1b583e39179238cdcd68a78c110c3dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229621
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2022-01-25 16:27:32 +00:00
Chloe Stefantsova e0d0ff6059 [cfe] Named factories don't prevent synthesized default enum constructor
Closes https://github.com/dart-lang/sdk/issues/48181

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

Change-Id: Idac70540cf2d4b566fa88bad1e7feef1aec9e3a5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229540
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2022-01-25 10:36:32 +00:00
Konstantin Shcheglov e3a2e59f18 Don't use 'whereType' in NotImportedContributor.
Bug: https://github.com/dart-lang/sdk/issues/47680
Change-Id: I7e90f52e7658eef4b9280f485b457d86ac0f4e9a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229820
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-25 06:41:09 +00:00
Konstantin Shcheglov e8d5008843 Update validation for final fields with const enum constructor.
For now just making it to not crash.

Change-Id: I415f0c7e17cc959f26f87acd2d662e7f6de3b39b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229780
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-25 05:37:26 +00:00
Brian Wilkerson 1708703d15 Complete the refactoring of ElementMatcher
There are quite a few TODOs left in the code, and I'll address them in
future CLs, but this appears to be consistent with the behavior of the
previous implementation and finishes the majority of the refactoring
changes.

Change-Id: I68093f6ac115f8b8b9b10bf93239fe4e2b9c6390
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229660
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-01-25 05:36:36 +00:00
Konstantin Shcheglov 7162015869 Resolve enum constants to constructors.
Change-Id: Iace6dd63bd2071830436b070299991f4e811cdf6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229620
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-25 02:48:38 +00:00
Konstantin Shcheglov 06e9046e34 Issue 48074. Display inherited default value for super-parameters.
Bug: https://github.com/dart-lang/sdk/issues/48074
Change-Id: I964141c9b2a1ccf4a2d08d6bfff7675aa6df9d5a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229740
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-25 01:54:27 +00:00
Srujan Gaddam 4c64181d73 [dart:html] Fix requestFullscreen bindings and type
Closes https://github.com/dart-lang/sdk/issues/25324

requestFullscreen returns a Promise and takes in an options parameter.
It also can be accessed either via `requestFullscreen` or
`webkitFullscreen` (only necessary for Safari). The bindings should be
updated to reflect this behavior.

Change-Id: I9401b6a1c8b3f9ac370aad8caac8295e0ee358b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229381
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Srujan Gaddam <srujzs@google.com>
2022-01-25 00:24:57 +00:00
Ben Konyi e72363c72d [ DevTools ] Roll in updated DevTools version
Resolves https://github.com/dart-lang/sdk/issues/48010

Change-Id: I9a7d7cfd89682ac0b568bc841e10ede188da589a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229640
Auto-Submit: Ben Konyi <bkonyi@google.com>
Reviewed-by: Kenzie (Schmoll) Davisson <kenzieschmoll@google.com>
Commit-Queue: Kenzie (Schmoll) Davisson <kenzieschmoll@google.com>
2022-01-24 22:06:10 +00:00
Nate Bosch 627326aec1 Update to the latest package_config
Change-Id: I9f36e546e8c76b50d2bc4bc3f3fbcc4897a2eb5b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/226982
Auto-Submit: Nate Bosch <nbosch@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
Reviewed-by: Lasse Nielsen <lrn@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
2022-01-24 20:50:17 +00:00
Brian Wilkerson 7272aadca4 Add diagnostic documentation for most of the ffi diagnostics
Change-Id: I37ba1852dea9c7e53966050eafaed9bb61cffbb8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229580
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
2022-01-24 20:02:27 +00:00
Ryan Macnak 85b79f0856 [vm, gc] Refactor the concurrent sweeper so that work-in-progress is accessible to other threads.
This is prep work for allowing the main thread to contribute during idle time or when waiting for the sweeper to catch up.

TEST=ci
Change-Id: Ia25c61a448bf5d2dada7d5b494ea08f3526d8740
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/228725
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
2022-01-24 18:44:01 +00:00
Jake Macdonald b0d9dc4192 add support for type phase macros
Change-Id: I6bd786853760bb0eaf087eae5bc42f7532e190b3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229323
Auto-Submit: Jake Macdonald <jakemac@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
2022-01-24 17:34:36 +00:00
Konstantin Shcheglov befff2871f Build constructor elements for enums.
Change-Id: I6654a1be91718914668b52e77aea5c9da23312d0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229301
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
2022-01-24 16:37:06 +00:00
Michael Thomsen e2acafdf80 Remove stale docs
Change-Id: I8d8c6a777eea03d92f3a5790eb38128fefe9886c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229150
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Michael Thomsen <mit@google.com>
2022-01-24 15:07:06 +00:00