In my head "raw" means without markers.
So, the previous naming was confusing.
Change-Id: I54d366cb406f7ba5487ae0bb2a7f800b2fccea84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352985
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
- Also adds the public exception APIs to dart:_macros which were missing.
Change-Id: If08bcb8bc60b91eaf08a02140c6d310e7c2e51f2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353540
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
The benchmarks were using a range of antipatterns that did not do what
the authors thought they did. It seems that the authors thought the
warmup method has to run for a while and do the full warmup, but the
truth is that the harness will do that for you by running the warmup
function in a timed loop. Instead these patterns just wasted time by
making the warmup more expensive and complex than needed.
This change just removes the warmup overrides since none of them do
anything positive. This change prepares us for future improvements to
the benchmark harness.
Fixes: b/324874055
Change-Id: Ib7c282123a2151614bc95a105a30e67221f11315
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352022
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
The only expected exceptions at this point are DiagnosticException and MacroException subtypes; everything else is a bug in the implementation.
Tweak the diagnostic to explain that it's due to a bug in the macro. Add the exception message and stack trace as a context message, and a fix hint to contact the author.
Add a language test.
Retry landing with updates to `pkg/analyzer/test/summary/macro_test`.
R=jensj@google.com, scheglov@google.com, sigmund@google.com
Change-Id: Iebc3df784922dcb6ef112ba8d023d5388516373b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352361
Reviewed-by: Jake Macdonald <jakemac@google.com>
Auto-Submit: Morgan :) <davidmorgan@google.com>
Commit-Queue: Morgan :) <davidmorgan@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
When a macro declaration is supplied as dill, the macro api library
is not directly needed by the source libraries. Therefore, in order
to determine whether macro declarations are available, we need to also
look up the macro api library in the dill loader.
Closes#54560
Change-Id: I131d3881f557566871d9e8c9f38c19029637c534
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/346000
Reviewed-by: Morgan :) <davidmorgan@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Nicholas Shahan <nshahan@google.com>
Currently the dds process is being launched from dartdev and
this causes problems when the dartdev commands 'run' and 'test'
are implemented by spawning child processes (this is needed
to make dartdev an AOT snapshot).
This CL attempts to lauch dds from the service isolate code.
TEST=ci
Change-Id: Iad00a17473a630659f15a5c73be0f5385ea35bdd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/350688
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
This is about 30% faster in my tests even on a small library, and ultimately makes it linear instead of n*m or so.
Change-Id: Ia368766a1ee9b06cc7a1b93f0f130e2356a3d7d6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353542
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Jake Macdonald <jakemac@google.com>
After the switch to the new type system more code is unnecessary.
- Clean up logic for deferring classes because the new type system
allows us to flatten the search to just the immediate superclass.
- Delete more `emit<xxx>Type` helper methods.
- Further differentiate emitting a Type vs a reference to a Class.
Fixes: https://github.com/dart-lang/sdk/issues/54745
Change-Id: Ia6e1accb4c9c993967cd5444c18c65938954f7d9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/348766
Commit-Queue: Nicholas Shahan <nshahan@google.com>
Reviewed-by: Mark Zhou <markzipan@google.com>
Impact analysis is no longer supported as a standalone phase. All this serialization logic for impacts is therefore no longer needed and is fact unreachable code.
Change-Id: Ifca8b907c5b8b6ad65cdc35b809aef0a8d4975e2
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353560
Commit-Queue: Nate Biggs <natebiggs@google.com>
Reviewed-by: Mayank Patke <fishythefish@google.com>
This bumps yaml_edit to get a fix from https://github.com/dart-lang/yaml_edit/pull/66 that corrects line endings on Windows.
It removes the workaround that was in the server normalizing these itself.
It also updates the tests to use normalized content to ensure consistent line endings on both platforms.
Change-Id: I096978500b30ca41d38bc9e78dc9bdf3e44474d1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353521
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
Also modified `File::GetType` on Windows to correctly report the type of broken links as notFound.
Windows fixes:
co19/LibTest/io/Link/createSync_A04_t08
co19/LibTest/io/Link/createSync_A04_t10
co19/LibTest/io/Link/createSync_A04_t12
co19/LibTest/io/Link/createSync_A04_t14
co19/LibTest/io/Link/createSync_A04_t16
co19/LibTest/io/Link/createSync_A06_t01
co19/LibTest/io/Link/createSync_A06_t03
co19/LibTest/io/Link/createSync_A06_t06
co19/LibTest/io/Link/createSync_A06_t08
co19/LibTest/io/Link/create_A04_t08
co19/LibTest/io/Link/create_A04_t10
co19/LibTest/io/Link/create_A04_t12
co19/LibTest/io/Link/create_A04_t14
co19/LibTest/io/Link/create_A04_t16
co19/LibTest/io/Link/create_A06_t01
co19/LibTest/io/Link/create_A06_t03
co19/LibTest/io/Link/create_A06_t06
co19/LibTest/io/Link/create_A06_t08
co19/LibTest/io/Link/resolveSymbolicLinksSync_A01_t01
co19/LibTest/io/Link/resolveSymbolicLinks_A01_t01
Bug:https://github.com/dart-lang/sdk/issues/53848
Bug:https://github.com/dart-lang/sdk/issues/45981
Change-Id: I3d156f38540089d8adb12dbb79d0477330d9eb07
Tested: updated unit tests plus fixes existing tests
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/335940
Commit-Queue: Brian Quinlan <bquinlan@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This relands a fix for looking up hostname on Windows in utf8-aware fashion.
Previously this was reverted because the API was only introduced in Windows 8,
making this use of Windows API fail on Windows 7.
With Windows 7 no longer being a target, original fix can be relanded.
BUG=https://github.com/dart-lang/sdk/issues/52701
TEST=manually
Change-Id: I330048c8b92ce805b7bb7e3fa05c88fefe3a30b0
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353500
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Alexander Aprelev <aam@google.com>
The VM has required Vista since at least cb522bfcd2.
TEST=ci
Change-Id: I6b6d293f1e2821c441482745fef38a07aacf528c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353231
Commit-Queue: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
We don't know if there is a 'const' constructor, so we do it for all fields.
If there is no 'const' constructor, we clear 'constantInitializer's.
Change-Id: I123fe318497f074a449dae4e857889989a2563ee
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353230
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Keerti Parthasarathy <keertip@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
This is a follow-up to https://dart-review.googlesource.com/c/sdk/+/350323
This CL addresses more of the cases where the `declaredNullability` of a type
object is overridden by the overall `nullability`, introducing unexpected
values to the field.
TEST=existing
Change-Id: I4830cd8113604dcc38a01ff09a9c1b2f50e091ef
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/351141
Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
This looks like it was an oversight--previous to this change, there
was zero test coverage for this case.
Change-Id: I4301a3ba90aedce3b0fcd901649c370cba522f4e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353280
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
Currently hash code for a closure is the hash code of it's runtime type.
This causes a lot hash collisions in some apps and cause performance
issues.
With this patch we now use captured objects in closures when calculating
hash codes.
The hash codes are now:
- For tear-offs:
mix(receiver hash, closure runtime type hash)
- For instantiations:
mix(instantiated closure hash,
hashes of captured types)
Note that an instantiation can be of a tear-off, in which case
"instantiated closure hash" will calculate the tear-off hash as above.
- For others (function literals, static functions), the hash is the
identity hash.
Fixes#54912.
CoreLibraryReviewExempt: Mark private corelib function as entry-point in Wasm
Change-Id: I6a123fdc690237f543bb8bf832f0f8119d013a55
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353162
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Ömer Ağacan <omersa@google.com>
Fixes: #54971
Change-Id: I033c8ba78e6cdcf26dce9cae8998308a595a37e9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353262
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: William Hesse <whesse@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>
This update the checked-in SDK to a version that includes
fe52b9bfe5
which adds support for `dart:_macros` and `package:macros`.
This is needed in order to move shared macro code from to
pkg/_fe_analyzer_shared/ (a temporary location) to `dart:_macros` and
used from the CFE and analyzer through `package:macros`.
Change-Id: Icba4e19ff654b8a664269c12ac555912eccf42bb
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353401
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Johnni Winther <johnniwinther@google.com>
This looks like it was an oversight--previous to this change, there
was zero test coverage for this case.
Change-Id: Icba1381c389af37ab4fe38f345cc78fe6c01d7f9
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353226
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Chloe Stefantsova <cstefantsova@google.com>
If a target `_Future` is chained to another source `_Future`,
then it's because the target will complete with the same
result as the source future. Instead of keeping both
alive with a listener on the source which completes the target,
instead the target moves all its listeners to be directly on
the source, and keeps a link to the source in case more listeners
are added later.
The idea is that most futures are unreferenced after they have
had their first listener, so the target future has a chance
to be GC'ed.
If the target future has `.ignore()` called, and has no listener,
then the source completing with an error should not cause the
error to be uncaught. Without the optimization, the source would
have had a listener, and the target would ignore the error.
To simulate that, the source now gets a copy of the target's
`_ignoreUnhandledErrors` flag.
This is still not precisely the same as it would be without the
optimization. If *two* target futures are chained to the same source,
and only one of targes has `.ignore()` called, then this
implementation will make the uncaught error not be reported,
where it technically should.
(An alternative would be to *not* use chaining for futures
with `ignore()` called on them. But those are precisely futures
that are likely to be GC'able, because someone has already said
that they don't care if the future complete with errors.)
Fixes#54943
Bug: https://github.com/dart-lang/sdk/issues/54943
Change-Id: I0dbb4919ce2ea612d66539862fa0eb188aab8287
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/352908
Reviewed-by: Slava Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Stephen Adams <sra@google.com>
* Added tests for compiling the platform with coverage information
* Patched all CFE suites to be able to capture coverage information
(e.g. via
`out/ReleaseX64/dart pkg/front_end/test/fasta/strong_suite.dart \
--coverage=coverage/` and then merging and showing via
`out/ReleaseX64/dart pkg/front_end/tool/coverage_merger.dart \
--coverage=coverage/`)
* Added "meta test" that runs all of the cfe et al tests and captures
coverage information at the end.
* Patched the bulk compiler to be able to capture coverage information
(likely only works in non-Windows as it has to hook into signaling to
be able to capture data as the process is being killed by the test.py
script).
* Tool for combining the dumped coverage information.
* Meta test that executes everything and combines the result
(run via e.g. `out/ReleaseX64/dart-sdk/bin/dart \
pkg/front_end/test/run_all_coverage.dart`)
Initially I wanted to (for language tests) have per-test coverage,
changed the test.py scripts to run the tests through a special tool that
then captured coverage information for the kernel_service isolate which
worked well for tests that compiles without error, but doesn't work when
there are compile time errors (because dart terminates before coverage
can be captured). So the solution - at least for now - was to hook into
the batch compilation.
The "visualization" of the result currently isn't very good -- mostly
just a list of not covered positions -- but the hope is that everything
that should be covered (eventually) will be covered, so maybe it's not a
big deal.
Also still to do is being able to - probably via comments in the covered
code - say "this isn't expected to be covered", so we can work towards
expecting all (or certain) files to be 100% covered (modulo those
comments), e.g. when running the thing on the weekly bot.
Change-Id: I6f885f4a9c04fb52a65797a9de790e1e5eacecf1
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353103
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
The path separator in the expect makes it fail; shorten the path, there
is no need for a separator in the test case.
R=whesse@google.com
Change-Id: Ief6078828daa18e1bf552e62ea0d3d4dee70ec84
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353400
Reviewed-by: Jonas Termansen <sortie@google.com>
Auto-Submit: Morgan :) <davidmorgan@google.com>
Commit-Queue: Jonas Termansen <sortie@google.com>
This aligns this code better with Effective Dart and prepares for the
upcoming lint rule change at https://dart-review.googlesource.com/c/sdk/+/353140.
Change-Id: I4a419c50b851680150d4f17941bc0f94a98cb148
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/353221
Reviewed-by: Jens Johansen <jensj@google.com>
Commit-Queue: Jens Johansen <jensj@google.com>
Auto-Submit: Samuel Rawlins <srawlins@google.com>