Commit Graph

6372 Commits

Author SHA1 Message Date
Johnni Winther 44e35b1daa [cfe] Check for misplaced type arguments on implicit creation expression
Change-Id: Ic3436f2bce0369d0efad9946cbbdae7c6bf334b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218400
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
2021-10-28 19:21:39 +00:00
Chloe Stefantsova ed0131bc7c [cfe] Change the order of hoisted initializers insertions
Change-Id: I61db6b57fffc11d62267b8648b4741a74d0a9f83
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218440
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2021-10-28 12:35:28 +00:00
Chloe Stefantsova 7fb17818f7 [cfe] Handle argument hoisting in redirecting initializers
Part of https://github.com/dart-lang/sdk/issues/47451.

Change-Id: Ic3564833cf87d5ccfb8b43f589c241104ce6df61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217602
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
2021-10-28 08:41:00 +00:00
Kevin Moore 83286de2a8 Allow pub get/upgrade to run on a number of packages in pkg/
Zero runtime affect to these unpublished packages
Allows using standard tools such as dart test, etc
Also allows better checking of dependency constraints

TEST=no effect on SDK build process

Change-Id: Ic6fbe6ce8f57724a87c058eccad64ce8e7473af1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218180
Auto-Submit: Kevin Moore <kevmoo@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
2021-10-27 23:15:56 +00:00
Kevin Moore 5e866bf841 Improve HTTP docs in dart:io
Recommend folks use pkg:shelf and/or pkg:http
Use async/await in code examples
Remove unneeded `new`

Change-Id: I87d192799cebd88fc0d11c03a7147848bc45efa2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217502
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Kathy Walrath <kathyw@google.com>
2021-10-27 18:55:17 +00:00
Johnni Winther 1972c11b4e [cfe] Support implicit super call
Closes https://github.com/dart-lang/sdk/issues/47545

Change-Id: I7adc75c574fd6d0be17f2f53066d34efd5d54a08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217922
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-10-26 10:02:54 +00:00
Johnni Winther 25ef052cfc [cfe] Keep non-proper renames distinct in constant evaluation
Closes https://github.com/dart-lang/sdk/issues/47462

Change-Id: I669ca4f97bfbe10900453b1aa78211c52e0ad2e6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217720
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-10-26 06:45:00 +00:00
Johnni Winther 114ad79698 [cfe] Ensure separation between StaticGet/StaticTearOff/ConstructorTearOff
Change-Id: I5b8d1103c10fecaf8fdaa69ee62215deb7eebc38
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217641
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-10-26 04:53:00 +00:00
Chloe Stefantsova 29e0c5e2bc Add "super-parameters" experiment flag
Part of https://github.com/dart-lang/sdk/issues/47525.

Change-Id: If7bf6f39b9b3ade1769f158ea1ca45515f859a2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217640
Auto-Submit: Chloe Stefantsova <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-10-21 16:50:15 +00:00
Kevin Moore 7d8459dc3c dart:_http: apply and fix most of pkg:lints recommended lints
TEST=N/A

Change-Id: I3e3f0cd1d94743fbbe8cfcc5723eb38608be2a8b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217503
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Ben Konyi <bkonyi@google.com>
Auto-Submit: Kevin Moore <kevmoo@google.com>
2021-10-21 16:33:15 +00:00
Johnni Winther d906c6de26 Reland "[cfe] Move createLibraryBuilder methods to loaders"
This is a reland of 0e7d0f5205

Original change's description:
> [cfe] Move createLibraryBuilder methods to loaders
>
> Change-Id: I912ab0494cc91a4a2b665a24a7d55362402542ff
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216940
> Commit-Queue: Johnni Winther <johnniwinther@google.com>
> Reviewed-by: Jens Johansen <jensj@google.com>

Change-Id: Ibb25413423a9bbd67c8788f9adce95c201ac8ebf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217603
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-10-21 14:24:06 +00:00
Johnni Winther 50d885e53c Reland "[cfe] Encapsulate Dill/SourceLoader.builders"
This is a reland of 2bbb5dc907

Original change's description:
> [cfe] Encapsulate Dill/SourceLoader.builders
>
> Change-Id: Ie98b3a243932cebeb845adb1cbe6c2cab1e92e0e
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216287
> Reviewed-by: Jens Johansen <jensj@google.com>
> Commit-Queue: Johnni Winther <johnniwinther@google.com>

Change-Id: I11611645337b4ea745d00a846a822ffcaedc9dec
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217580
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-10-21 12:00:37 +00:00
Chloe Stefantsova 33ac6e2c4d [cfe] Use invalid type when nonfunction typedefs aren't enabled
Closes https://github.com/dart-lang/sdk/issues/47495.

Bug: https://github.com/dart-lang/sdk/issues/47495
Change-Id: I18ff096dd2d33bcdcc1155de63a625051ef5efa0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217365
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <dmitryas@google.com>
2021-10-21 08:30:32 +00:00
Ahmed Ashour d041cf0478 Remove extra the, be and of
Fixes #https://github.com/dart-lang/sdk/issues/47504

TEST=No tests needed, only comments affected.

Change-Id: Ie096307b5ce314d328fea6780f396aaa226ad3b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216182
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
2021-10-20 09:29:01 +00:00
Johnni Winther 3006908d7e Revert "[cfe] Encapsulate Dill/SourceLoader.builders" and "[cfe] Move createLibraryBuilder methods to loaders"
This reverts commits 2bbb5dc907 and 0e7d0f5205.

Change-Id: I140ae6eab70102d39b1bec665bedd3a3dbfb02bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217300
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-10-19 23:14:11 +00:00
Alexander Thomas 056afdac39 [testing] Merge dart2js-batch into the global batch option
* Remove all uses of `--dart2js-batch`.
* Enable batch mode for dart2js by default.
* Rename `--noBatch` to `--no-batch`.
* Make `--no-batch` affect dart2js configurations.

Change-Id: I33bdb5cfe8a82ccfc6ce9e43843f1b7a34ff1fbf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217006
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
2021-10-19 13:49:02 +00:00
Johnni Winther 0cbaee4c30 [cfe] Pass reference for lowered static late fields
Fixes fuzz test of static_field_lowering/opt_in

Change-Id: Ia0199e0cf3471a9b100e5f442ccfaad2930d94bd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217187
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-10-19 12:32:57 +00:00
Johnni Winther c206ec38ce [cfe] Pass ReferenceFromIndex to value class transformation
This fixes fuzz testing for value_class/empty,
value_class/explicit_mixin, and value_class/value_mixin_error

Change-Id: Ia098b3ed5b8a028f1a28c5579fe5df11e5a92ff0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217185
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-10-19 10:02:38 +00:00
Johnni Winther a5de2458f6 [cfe] Use correct Name for lookup of private forwarding constructors
Fixes fuzz testing of general/issue46581 and general/issue46581/main

Change-Id: Idb03be55756dec0a861006484a457a6911fc9adf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217017
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-10-19 08:40:08 +00:00
Daco Harkes 757c2b82ce [vm/ffi] Add Bool
This CL adds the `Bool` `NativeType` with support for loading/storing
from `Pointer<Bool>`, `Array<Bool>`, and `Struct` and `Union` fields,
and support for passing booleans through FFI calls and callbacks.

The assumption is that `bool` is always treated as `uint8_t` in the
native ABIs. Including: (1) whether there can be garbage in the upper
bytes in CPU registers, (2) stack alignment, and (3) alignment in
compounds.

The conversion from `bool` to `uint8_t` is implemented as follows:
- bool to int: `value ? 1 : 0`
- int to bool: `value != 0`
The conversion is implemented in Dart in patch files for memory loads
and stores (pointer, array, and struct fields) and kernel_to_il for
FFI call and callback arguments and return value.

TEST=runtime/vm/compiler/ffi/native_type_vm_test.cc
TEST=tests/ffi/bool_test.dart
TEST=tests/ffi/function_callbacks_structs_by_value_generated_test.dart
TEST=tests/ffi/function_structs_by_value_generated_test.dart

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

Change-Id: I75d100340ba41771abfb41c598ca92066a89370b
Cq-Include-Trybots: luci.dart.try:vm-kernel-linux-debug-x64-try,vm-ffi-android-debug-arm-try,vm-kernel-mac-debug-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-linux-debug-ia32-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-win-debug-x64-try,vm-kernel-win-debug-ia32-try,vm-ffi-android-debug-arm64c-try,vm-kernel-mac-release-arm64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-kernel-precomp-android-release-arm64c-try,vm-kernel-precomp-android-release-arm_x64-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216900
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
2021-10-18 10:44:11 +00:00
Mayank Patke 70479beea5 [dart2js] Rename platform files.
This avoids terms like "NNBD" and "strong" in favor of sound/unsound
null safety.

Change-Id: I1c99bea7155f80bc6acf62f46c6f266a29ebf1a2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213406
Commit-Queue: Mayank Patke <fishythefish@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-10-15 21:40:08 +00:00
Chloe Stefantsova 43d91dd031 [cfe] Use expriment flag "named-arguments-anywhere"
Part of https://github.com/dart-lang/sdk/issues/47451.

Change-Id: I7befc385261f2489b79f6c90f1bb903b02a413a1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/217001
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <dmitryas@google.com>
2021-10-15 10:20:03 +00:00
Johnni Winther 0e7d0f5205 [cfe] Move createLibraryBuilder methods to loaders
Change-Id: I912ab0494cc91a4a2b665a24a7d55362402542ff
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216940
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-10-15 06:13:07 +00:00
Johnni Winther 2bbb5dc907 [cfe] Encapsulate Dill/SourceLoader.builders
Change-Id: Ie98b3a243932cebeb845adb1cbe6c2cab1e92e0e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216287
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-10-14 20:34:45 +00:00
Chloe Stefantsova 448e44191c Add "named-arguments-anywhere" experiment flag
Part of https://github.com/dart-lang/sdk/issues/47451

Change-Id: I049519061d132eb681cc3aa67b1dea5d296e540e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216801
Commit-Queue: Chloe Stefantsova <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-10-14 14:16:52 +00:00
Chloe Stefantsova a666b5a72b [analyzer,parser] Check for named before positional in analyzer
Since the check or the absence of the check for a named argument
appearing before a positional parameter is feature-specific
considering the language feature that allows placing the named
arguments anywhere, it should be performed by the listeners of the
parser and guarded by an experiment flag, in alignment with other
experimental featuers. This CL moves the check and the reporting of
the error from the parser into the Analyzer, so that later this check
can be skipped if the corresponding experiment flag is enabled.

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

Change-Id: Ib795d418af429ee04ecfff6dfa71ec1e836fe798
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216640
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Chloe Stefantsova <dmitryas@google.com>
2021-10-14 13:25:23 +00:00
Chloe Stefantsova cfa5d6cdcb Add "enhanced-enums" experiment flag
Part of https://github.com/dart-lang/sdk/issues/47453.

Change-Id: I6d1fdc4bc170354985a9d216b13ad8f153717adf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216662
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <dmitryas@google.com>
2021-10-14 12:19:42 +00:00
Brian Wilkerson d6936a5749 Make the use of Example and Examples more consistent
I think the headings are now 'correct' in the sense that they are
singular when there's a single example and plural when there is more
than one.

In the process I noticed that we have a similar problem with 'Common
fixes' in that sometimes there's one fix and sometimes multiple. I
don't think it would read well to say 'Common fix', so I'm disinclined
to change those, but it makes me wonder whether I should have just
used 'Examples' everywhere.

Change-Id: Idbfc3354b52cf1da677db51f4c626bb3269465b8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215983
Commit-Queue: Kathy Walrath <kathyw@google.com>
Reviewed-by: Kathy Walrath <kathyw@google.com>
2021-10-13 21:41:17 +00:00
Sam Rawlins 20da76f9f8 Update parser to allow unnamed constructor reference in comment reference
Code like `/// See also [List.new].` will be accepted as a valid comment
reference.

Test in front_end, analyzer, analysis_server.

Remove TODOs in analyzer for reporting a reference to an element whose
library is not the library in which the comment is found.

Bug: https://github.com/dart-lang/sdk/issues/47446
Change-Id: Ifa19278f92ac003082b62b121c66f0559c0152e8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216583
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-10-13 14:09:26 +00:00
Chloe Stefantsova 24fb189bc3 [cfe] Don't unalias constructor calls prematurely
Closes https://github.com/dart-lang/sdk/issues/47339.

Bug: https://github.com/dart-lang/sdk/issues/47339
Change-Id: I5fa7bf330676c92b5a074478319d1d537d1a0e9f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216185
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <dmitryas@google.com>
2021-10-13 13:33:36 +00:00
Johnni Winther 56490f9776 [cfe] Add Procedure.signatureType
The added field holds the interface signature type for a Procedure when
this is different from the class signature type (implied by the function
parameters and return type). This is needed for forwarding semi stubs
when its declared type is different from the called super member.

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

TEST=pkg/front_end/testcases/general/implement_semi_stub.dart and more

Change-Id: I4a7cdc9d564fb0a59e7b06e83646b5410d8d82f5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216420
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <dmitryas@google.com>
2021-10-13 11:31:16 +00:00
Nate Bosch f9c68a5679 Replace a bunch of references to .packages
Most of these arguments are flowing through to a `--packages` argument
which allows passing the `package_config.json` file. In the long term we
should remove the `.packages` file entirely.

TEST=None, the change should have no visible impact.

Change-Id: I60a8b175d5e217a85588bbcb91cc5095514066b4
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/211503
Auto-Submit: Nate Bosch <nbosch@google.com>
Commit-Queue: Nate Bosch <nbosch@google.com>
Reviewed-by: Kevin Moore <kevmoo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
2021-10-12 20:16:15 +00:00
Clement Skau 998d5f5a9b [vm/ffi] Adds FFI transform FfiNative instance methods.
- Allows FfiNative annotation to be attached to non-static
  methods of classes.
- Transforms non-static instance methods to static, adding
  wrappers with the receiver as an extra, implicit first paramters.
- Transform all parameters and arguments to Pointer if the object
  being passed supports it (i.e. extends NativeFieldWrapperClass1).
- Adds compile time errors for cases where the FfiNative annotation
  doesn't align with the annotated function. Taking into account
  implicit receivers and converted Pointers.
- Adds complimentary Analyzer checks for the above errors as well.
- Adds tests for the transforms, compile time errors and analyzer
  changes.

TEST=Adds new tests for instance methods, analyzer changes.

Change-Id: Idf54430acf2728a650008333b149b254941290ad
Cq-Do-Not-Cancel-Tryjobs: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/213773
Commit-Queue: Clement Skau <cskau@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Reviewed-by: Daco Harkes <dacoharkes@google.com>
2021-10-12 10:58:44 +00:00
Chloe Stefantsova d83e78c7a3 [cfe] Account for bounds changes in override substitution
Closes https://github.com/dart-lang/sdk/issues/47311.

Bug: https://github.com/dart-lang/sdk/issues/47311
Change-Id: I0ef3245f5a69951c323dc4a592e2c8ce194f59f3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215763
Commit-Queue: Chloe Stefantsova <dmitryas@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-10-12 09:46:25 +00:00
Sam Rawlins 228e1062ee Move front_end's libraries.json parser to _fe_analyzer_shared
Bug: https://github.com/dart-lang/sdk/issues/35081
Change-Id: Idd1c68a871ace37e45970e5452a59fd655445fd3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216100
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
2021-10-11 17:59:43 +00:00
Paul Berry 3cb2d38723 Coalesce two more analyzer errors with their front end counterparts.
Change-Id: Iec2e6e67a4c3af1309ee208007008ca595059bd2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216001
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2021-10-08 18:30:28 +00:00
Johnni Winther 9603871cfd [cfe] Report error on 'new' used invalidly as selector
Part of https://github.com/dart-lang/sdk/issues/46232

Closes #47075

Change-Id: I6aece2236d6f45ec50bda3622b133c16761dd990
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215764
Reviewed-by: Chloe Stefantsova <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-10-07 13:24:33 +00:00
Chloe Stefantsova ca9e1e9801 [cfe] Retain parenthesized expressions until inference
Closes https://github.com/dart-lang/sdk/issues/47338.

Bug: https://github.com/dart-lang/sdk/issues/47338
Change-Id: I9520699286864919948e1400ad430a7c64681d50
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215549
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Chloe Stefantsova <dmitryas@google.com>
2021-10-07 10:52:02 +00:00
Srujan Gaddam 67be663490 [pkg:js] Add @staticInterop annotation to package:js
Adds @staticInterop annotation to allow users to declare static interop
classes. Also adds errors for erroneous usage of static interop
classes, like including instance members or using a non-static
supertype.

Change-Id: I21abafbf6ea6c2eb7cd0425f0a54c1ba35d6ec6c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215010
Reviewed-by: Sigmund Cherem <sigmund@google.com>
2021-10-06 19:04:02 +00:00
Jens Johansen 9836909f3d [CFE] Make unit_test_suites report errors
Change-Id: I4ede539b5508b7206fd486c6a4556ba01e78b299
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215740
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-10-06 08:16:15 +00:00
Johnni Winther 3171c7cc0e [cfe] Remove UnresolvedType
All NamedTypeBuilder objects from user code contain the needed file uri
and char offset.

Change-Id: Ia067c5ef740967302aa207eaf2d46fc2f75c1c8f
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215600
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-10-06 07:39:34 +00:00
Johnni Winther c8cf6d6bba [cfe] Fix reference lookup for external extension fields
Change-Id: Ibd540d6b4aa56ee15f50e39184b420eca427845d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215551
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-10-05 15:16:20 +00:00
Johnni Winther 74fd108a69 [cfe] Handle nullable function types in explicit instantiation
Part of https://github.com/dart-lang/sdk/issues/46232

Change-Id: I390dc15a253cf0b335ed41bf945bbab2a3b2bdcc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215545
Reviewed-by: Chloe Stefantsova <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-10-05 13:01:41 +00:00
Johnni Winther cf1591f935 [cfe] Refactor detection of instance type variable access in static context
NamedTypeBuilder is now created with a state that determines whether it
can validly be resolved to an instance type variable.

Change-Id: I1e7f5f8e05a5f68ec18a063476b6cda291a1aca8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/214643
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-10-05 11:58:04 +00:00
Jens Johansen b683e9c481 [CFE] Serialize when fuzzing
Change-Id: Id06a81243630f3bca682ec7722113df6d07a87c1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215423
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-10-05 10:58:31 +00:00
Johnni Winther 3aaea30f10 [cfe] Pass references to lowered tear-offs
TEST=existing

Change-Id: I7e2625f87b357ceec45ec2664f7444af38ec0cf1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215402
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Jens Johansen <jensj@google.com>
2021-10-05 09:20:41 +00:00
Johnni Winther 5574b1e59f [cfe] Support implicit tear off in explicit instantiation
Part of https://github.com/dart-lang/sdk/issues/46232

Change-Id: I578ae9d78dd71da40630a3d6da75c4344876944b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215021
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Chloe Stefantsova <dmitryas@google.com>
2021-10-04 14:35:30 +00:00
Johnni Winther 81839ddcc1 [cfe] Generate tear off lowering for named mixin application constructors
Closes #47313

Change-Id: I41f822cdc026214b538e5bcf562b51a065e50904
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215200
Reviewed-by: Chloe Stefantsova <dmitryas@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
2021-10-04 13:55:37 +00:00
Paul Berry b2c2acee09 Adjust front end nomenclature for error messages.
This change updates the classes Message, MessageCode, Template,
LocatedMessage, and FormattedMessage so that they uniformly refer to
error message text using the terminology `problemMessage` and to
correction suggestions using the terminology `correctionMessage`.
This brings them into alignment with the names we've decided to use to
unify the structure of front_end and analyzer, and makes them match
the names used in the anlayzer and front end's `messages.yaml` files.

Change-Id: Idcbb7ccfff6bb4e99ca22a3ef3c19d83880cf3c7
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215154
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
2021-10-04 13:32:46 +00:00
Jens Johansen c3d9664956 [CFE] Unmark dart2js late lowering as semi fuzz failures
It no longer fails.

Change-Id: I512d01a273c1c8f68991e92862f7bd9e87fdd7b9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215421
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
2021-10-04 13:07:46 +00:00