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>
This reverts commit 4daa257b32.
Reason for revert: Flutter Engine build breaks on iOS builds (32 bit)
Original change's description:
> [ VM / Profiler ] Update MacOS thread interrupter to use Mach APIs instead of SIGPROF
>
> Enabling the CPU profiler on OSX/iOS with a lldb connection would cause
> applications to slow to a crawl due to lldb performing checks on each
> SIGPROF. This change replaces the SIGPROF based thread interrupter for
> MacOS with one based on the Mach Thread APIs.
>
> Fixes https://github.com/dart-lang/sdk/issues/47139
>
> TEST=Manual testing, CQ
>
> Change-Id: Iedfd73a83f92d51e01b98bfa281440c7d1ba9e08
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216220
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
TBR=bkonyi@google.com,rmacnak@google.com,asiva@google.com
Change-Id: I4edf1b73d8f90934fff92971fac8ef7b0f165971
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216682
Reviewed-by: Siva Annamalai <asiva@google.com>
Commit-Queue: Siva Annamalai <asiva@google.com>
The ephemeron and its key may be processed by different workers, so there is a race when accessing the key's header. This race is harmless: if the key becomes a survivor, it will trigger another round of ephemeron processing.
TEST=tsan, splay_ephemeron_test
Bug: https://github.com/dart-lang/sdk/issues/47412
Change-Id: I20339c2215f2d37ad8b9687aebe62492b36a8a61
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216340
Reviewed-by: Liam Appelbe <liama@google.com>
Commit-Queue: Ryan Macnak <rmacnak@google.com>
The error messages for INVALID_NON_VIRTUAL_ANNOTATION and
INVALID_SEALED_ANNOTATION appeared to reference the name of the
erroneously declared member, with messages like "The member '{0}'
can't be '@nonVirtual' because it isn't a concrete instance member.",
however the actual text that was substituted into the error message
wasn't the name of the member, but rather the name of the element
declaring the annotation. So the error message would always be "The
member 'nonVirtual' can't be '@nonVirtual' because it isn't a concrete
instance member.", which was unhelpful and confusing.
Rather than fix the code to come up with the correct name of the
member (which would have been challenging, because the target of the
annotation could be an extension without a name, and wouldn't have
been that useful anyway, since the error location points to the
member), I've simply rephrased the error messages so that they don't
name the member in question.
Change-Id: I34f74e04607e16211b357429820c0336e0a03059
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216563
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
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>
For CompileTimeErrorCode.UNDEFINED_METHOD, it was possible that the
undefined method reference might appear inside an unnamed extension
declaration. This was fixed by changing the error message to refer to
the extended type rather than the extension name.
For HintCode.INVALID_VISIBLE_FOR_OVERRIDING_ANNOTATION and
CompileTimeErrorCode.EXTENSION_CONFLICTING_STATIC_AND_INSTANCE, we
just allow the name to be `<unnamed>` when the declaration in question
is an unnamed extension.
For AnalysisOptionsWarningCode.UNRECOGNIZED_ERROR_CODE and
AnalysisOptionsWarningCode.UNSUPPORTED_OPTION_WITH_LEGAL_VALUES, it's
actually ok for `null` to show up in the error message, because it can
only happen if the user has a literal `null` in their options file.
However, the way we want this to work is by passing the string `null`
as an argument to the error message (rather than the `null` value);
this will allow us to make message arguments non-nullable in a
follow-up CL.
Change-Id: I67138f314e6234d860c01d083d7c08a1a3ef11ed
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216460
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
Currently there is a strong link between dyn:-forwarder and
its target (through Function::data_ field). This link causes us
to retain some Function objects even if they are otherwise
considered dropped.
In reality this link is only ever used during compilation
or when accessing script information for the dyn:-forwarder.
As such when generating snapshots in DWARF stack traces mode
we should be able to consider this connection weak
and allow dropped Function objects to be truly discarded from
the snapshot.
This change puts WSR in between dyn:-forwarder and its target
when we know that target is not going to be retained.
We also clean how forwarding target represented to avoid
unnecessary indirection through a one-element array.
TEST=ci
Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-dwarf-linux-product-x64-try,vm-kernel-precomp-linux-debug-x64-try,vm-kernel-precomp-linux-release-x64-try
Change-Id: I4f0ec822ff15f78c72ff55a87d9dc52abd466cb3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216040
Commit-Queue: Slava Egorov <vegorov@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
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>
We don't need it anymore, a few years as probably.
Change-Id: Ieccb8fa303d8bc4595268ba6bde2b5da8bdc2731
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216541
Reviewed-by: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Enabling the CPU profiler on OSX/iOS with a lldb connection would cause
applications to slow to a crawl due to lldb performing checks on each
SIGPROF. This change replaces the SIGPROF based thread interrupter for
MacOS with one based on the Mach Thread APIs.
Fixes https://github.com/dart-lang/sdk/issues/47139
TEST=Manual testing, CQ
Change-Id: Iedfd73a83f92d51e01b98bfa281440c7d1ba9e08
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216220
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Evaluation of a constructor's initializers (field initializers, assert
initializers, and super initializer) are all so much complexity separate
from evaluating a simpler const object that they deserve their own test
classes.
* Move all tests using assert initializers from very old
non_error_resolver.test and from constant.dart to
InstanceCreationEvaluatorTestCases.
* Move many test cases into *TestCases so they are tested in pre- and
post-null safety.
* Introduce more basic tests for assert initializers.
Bug: Preparation for https://github.com/dart-lang/sdk/issues/46081
Change-Id: Ie3e21d2457b1ba34667f85a0f5e3ef0e558f5cb3
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216380
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Commit-Queue: Samuel Rawlins <srawlins@google.com>
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>
UntaggedClass::host_type_arguments_field_offset_in_words_ is initialized
when class is finalized. When comparing generic types for the class
which was not finalized, we cannot rely on the value of that field.
Intrinsified Type.operator== has been using host_type_arguments_field_offset_in_words_
to check if the class is generic, and has been treating classes which
are not finalized as non-generic. This has been causing the wrong
result for generic types which are different only in type arguments.
This change fixes Type.operator== intrinsics to check if
type arguments match even if class was not finalized.
Also, EquivalentClassIds helper was revised to take 3 labels
explicitly for all possible outcomes (instead of 2 labels and
a fall-through).
TEST=runtime/tests/vm/dart/regress_47425_test.dart
Fixes https://github.com/dart-lang/sdk/issues/47425
Change-Id: I3f49114644d44808c668df7cbb8a702cd42b3673
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216270
Reviewed-by: Tess Strickland <sstrickl@google.com>
Commit-Queue: Alexander Markov <alexmarkov@google.com>
Previously, the compile time errors EXPORT_OF_NON_LIBRARY,
EXPORT_INTERNAL_LIBRARY, and IMPORT_OF_NON_LIBRARY would redundantly
quote their URIs (e.g. an EXPORT_OF_NON_LIBRARY error message might
say "The exported library ''part.dart'' can't have a part-of
directive."). This change avoids the extra quoting by using the
string value of the URI as an argument to the error rather than the
AST node.
Change-Id: I64f250dcf15f638cfe4a3ade23bb2cd2c710a0d5
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216300
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This requires passing the runtime type arguments into the
InstanceCreationEvaluator, so that it can store them in a lexical scope
map.
Bug: https://github.com/dart-lang/sdk/issues/47302
Change-Id: I6b9d660f20b981d26810f29858784c034cc8abfd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215960
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
It appears that invoking exit with a value other than either zero (0) or
254 causes the test infrastructure to interpret the failure as a failure
in the infrastructure, turning the bot purple rather than red. Thowing
an exception is interpreted correctly, so I believe that this change will
cause a need to regenerate to show up as a red bot.
Change-Id: I01e9fc2bfe09fac3da2a9aade69fabf3abd17179
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/216260
Reviewed-by: Paul Berry <paulberry@google.com>
Commit-Queue: Brian Wilkerson <brianwilkerson@google.com>
Change-Id: I26b028a942d3d95c6bf135f983a22d02d31ddb34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/215541
Reviewed-by: Alexander Thomas <athom@google.com>
Reviewed-by: Erik Ernst <eernst@google.com>
Commit-Queue: Alexander Thomas <athom@google.com>