Initial 'dart doc' command for the unified 'dart' developer tool,
over time replacing the exiting 'bin/dartdoc' tool.
This is a second attempt after the previous got reverted:
https://dart-review.googlesource.com/c/sdk/+/217980
The first attempt, which was already reviewed, is
in patchset 1.
Change-Id: Id9e0e572944ba032c32f3cebec579ab23d0df036
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220744
Commit-Queue: Michael Thomsen <mit@google.com>
Reviewed-by: Ben Konyi <bkonyi@google.com>
Reviewed-by: Samuel Rawlins <srawlins@google.com>
We have added more examples, and some of them uses the structure of:
````dart
/// ```dart
/// var x = something;
/// ```
/// and then you can also floo the thing
/// ```
/// x.floo(...);
/// ```
````
The following chunks of the same example can now be written as:
````dart
/// ```dart continued
/// x.floo(...);
/// ```
````
Change handling of imports,
and introduce a `top` template different from `none`.
The `none` template gets nothing for free.
The sample must be completely self-contained.
Is triggered by the sample containing a `library` declaration,
because we can't add anything before that.
The `top` template allows top-level declarations,
but does introduce automatic imports and "samples can expect"
code if the sample doesn't contain `import`s.
Is triggered by top-level declarations other than `library`.
Also some restructuring of the code to make this feature easier
to implement.
Change-Id: If2288147face01efad2ad656aa52183cb4c8b3bf
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221343
Commit-Queue: Lasse Nielsen <lrn@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
When ABI-specific integers are introduced, their mappings can be
partial. We need to account for this in the transformation and the code
we generate.
In the transformation, all sizes and offsets become nullable.
In the generated code we add `null` constants and a call to check
whether the value is not-null at runtime.
Note that with only this CL we can not generate nulls yet, because all
size and offset mappings are still complete.
TEST=pkg/front_end/testcases/nnbd/ffi*
TEST=tests/ffi*
Bug: https://github.com/dart-lang/sdk/issues/42563
Change-Id: I80d45f3f52001670bc0679a033f7daa22198d55e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221631
Reviewed-by: Ryan Macnak <rmacnak@google.com>
TEST=Manual. AFAIK, the cause of this error is the socket receiving a TCP RST from it's peer and, AFAIK, I can't do that from Dart.
Bug: https://github.com/dart-lang/sdk/issues/47766
Change-Id: Ia423ee951b96bdb140c321fbc87b6bd59e39d84d
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221222
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Brian Quinlan <bquinlan@google.com>
This change refactors `_asExternalTypedData` into multiple functions,
which are data type specific, e.g `_asExternalTypedDataInt8`.
These functions are implemented as recognized methods.
Argument checks have previously been performed in the removed
runtime entry implementation of `_asExternalTypedData.` These are
now handled in Dart.
TEST=tests/ffi/external_typed_data_test.dart
Closes https://github.com/dart-lang/sdk/issues/39843
Closes https://github.com/dart-lang/sdk/pull/47780https://github.com/dart-lang/sdk/pull/47780
GitOrigin-RevId: 65763bddd06c633583b4adbf920c32c5a7a3720f
Change-Id: I703b350d89004ebe36e70eaa44dda1d9ebb050c7
Cq-Include-Trybots: luci.dart.try:vm-kernel-reload-rollback-linux-debug-x64-try,vm-kernel-reload-linux-debug-x64-try,vm-precomp-ffi-qemu-linux-release-arm-try,vm-ffi-android-debug-arm64c-try,vm-ffi-android-debug-arm-try,app-kernel-linux-debug-x64-try,vm-kernel-nnbd-linux-debug-x64-try,vm-kernel-win-debug-x64-try,vm-kernel-nnbd-mac-debug-x64-try,vm-kernel-linux-debug-ia32-try
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221360
Reviewed-by: Daco Harkes <dacoharkes@google.com>
Commit-Queue: Daco Harkes <dacoharkes@google.com>
This reverts commit 75abd86407.
Reason for revert: Breaks internal tests (http://b/207612278)
Original change's description:
> [ VM / Service ] Omit private fields from service responses by default
>
> Service responses and events previously could include "private"
> properties, which have names starting with "_". This change removes
> these properties from service objects unless explicitly requested via a
> private parameter.
>
> See go/smaller-dart-vm-service-responses for response size reduction
> data.
>
> TEST=Existing service suite
>
> Change-Id: Ia65b14872e798eaa843f7d180c57721b82371d0b
> Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221143
> Commit-Queue: Ben Konyi <bkonyi@google.com>
> Reviewed-by: Ryan Macnak <rmacnak@google.com>
# Not skipping CQ checks because original CL landed > 1 day ago.
Change-Id: I0b015baadfcdf4211426efa9a92804b163f88649
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221280
Reviewed-by: Michal Terepeta <michalt@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
Commit-Queue: Michal Terepeta <michalt@google.com>
Service responses and events previously could include "private"
properties, which have names starting with "_". This change removes
these properties from service objects unless explicitly requested via a
private parameter.
See go/smaller-dart-vm-service-responses for response size reduction
data.
TEST=Existing service suite
Change-Id: Ia65b14872e798eaa843f7d180c57721b82371d0b
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/221143
Commit-Queue: Ben Konyi <bkonyi@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
This change makes the error message consistent with a similar
message in sdk/lib/_internal/vm/bin/vmservice_server.dart.
Before:
Could not start Observatory HTTP server
After:
Could not start Observatory HTTP server:
Invalid argument(s): A directory corresponding to fileSystemPath "/.../out/DebugX64/devtools" could not be found
#0 createStaticHandler (package:shelf_static/src/static_handler.dart:50:5)
[...]
Change-Id: Ie42d39d8c009b4ea403e1584a524567b3da20a45
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/220742
Reviewed-by: Ben Konyi <bkonyi@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
Updates which characters are allowed in the dataset name based on
external documentation, and removes restriction on not allowing the
name to start with `xml`. These restrictions are not enforced in the
name parsing in `_DataAttributeMap`. Note, there is an additional
restriction in our docs which is inconsistent with external behavior
disallowing capital letters.
Change-Id: I4143503b17673be2e038df8647fef7c9ac09e9ba
Bug: https://github.com/dart-lang/sdk/issues/43295
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219180
Reviewed-by: Sigmund Cherem <sigmund@google.com>
Commit-Queue: Riley Porter <rileyporter@google.com>
Change-Id: Iee1ee36e3de040da2d2508938ba00a7faa1950c6
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219980
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Allows throwing an error with an existing stack trace, instead of always
creating a new stack traces.
Fixes#30741
Bug: https://github.com/dart-lang/sdk/issues/30741
TEST=corelib/error_throw_with_stacktrace_test.dart
Change-Id: Iea77b4a8eb5e0cab4cd0d75432d033256c9f79fc
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219522
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Nate Bosch <nbosch@google.com>
Changes `refChild` to `child` to match parameter name and makes
`insertAllBefore` consistent with `insertBefore`. Also adds a
description of behavior given a null `child`.
Fixes: https://github.com/dart-lang/sdk/issues/46603
Change-Id: I280306018ee16fa9088d55110ef502f49ed1d66a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219122
Reviewed-by: Srujan Gaddam <srujzs@google.com>
Commit-Queue: Riley Porter <rileyporter@google.com>
In addition to making the documentation of [SendPort.send] more precise
by describing what objects are disallowed for sending objects between
isolates within the same isolate group, it also makes [Isolate.exit]
link to [SendPort.send].
Closes https://github.com/dart-lang/sdk/issues/46623
TEST=Updates documentation only.
Change-Id: I9bc1d88faaf2b70589af5e56168976ba89a35558
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219080
Commit-Queue: Martin Kustermann <kustermann@google.com>
Reviewed-by: Alexander Aprelev <aam@google.com>
This CL expands the ABIs in the FFI transform and VM from 3 groups to
18 individual ABIs in preparation of adding ABI-specific integer sizes
and structs.
This increases const lists with offsets in the kernel representation
from 3 to 18 elements. We do not expect significant size increases or
performance regressions from this. The constants are deduplicated in
Dart and the optimizer should optimize indexed lookups in const lists
away. However, landing this separately will enable us to verify that
assumption.
This also moves `Abi` to its own file and makes it an opaque class with
a predefined set of instances so that we do not depend on its internals.
That will enable us to keep `pkg/vm/lib/transformations/ffi/abi.dart`
consistent with the `Abi` abstraction to be introduced in `dart:ffi`
later for specifying ABI-specific integer sizes.
Bug: https://github.com/dart-lang/sdk/issues/42563
Bug: https://github.com/dart-lang/sdk/issues/42816
List of ABIs decided based on what's currently used (as Dart SDK target
platform, or Flutter target platform, or G3 target) and added
windows_arm64 in anticipation of
(https://github.com/flutter/flutter/issues/53120).
Excluded are macos_ia32 (https://github.com/dart-lang/sdk/issues/39810)
because we discontinued support; and windows_arm, fuchsia_arm,
fuchsia_ia32, ios_ia32, and macos_arm because these are
unlikely to be added.
TEST=pkg/front_end/testcases/*.expect
TEST=tests/ffi/*
Change-Id: I437707c18d8667490c063272a5f8a33d846e6061
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/+/217184
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Ryan Macnak <rmacnak@google.com>
Reviewed-by: Clement Skau <cskau@google.com>
When we rehash a linked hash map, we rebuild the index but keep the
existing data array. The [_deletedKeys] specifies the number of entries in the
[_index] which were marked as deleted. The Dart code that triggers
rehashing and initializes a new [_index] didn't initialize
[_deletedKeys].
=> We'll fix this in the Dart code and as a precaution also in the
transitive object copy code.
Furthermore we add a missing optimization: In the example from the bug
report we shouldn't even have attempted to re-hash, because the maps
have only primitive keys (which do not rely on identity or user-defined
hashcodes).
=> We'll change the existing optimization to ignore deleted entries when
determining whether a rehash is needed.
The rehashing code for Sets works differently and takes this already
into account.
Closes https://github.com/dart-lang/sdk/issues/47598
TEST=vm/dart{,_2}/isolates/fast_object_copy_test
Change-Id: I3529ecbf500009ab0c72b98e6c427b8840a69371
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/219000
Reviewed-by: Alexander Aprelev <aam@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Change-Id: Ie1ed719aca9b1f18240b811271ac952818d04c89
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/218664
Auto-Submit: Kevin Moore <kevmoo@google.com>
Commit-Queue: Kevin Moore <kevmoo@google.com>
Commit-Queue: Devon Carew <devoncarew@google.com>
Reviewed-by: Devon Carew <devoncarew@google.com>
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>