Skip to content

Commit

Permalink
Version 3.5.0-212.0.dev
Browse files Browse the repository at this point in the history
Merge d36a892 into dev
  • Loading branch information
Dart CI committed May 31, 2024
2 parents f085f1a + d36a892 commit 97b2762
Show file tree
Hide file tree
Showing 65 changed files with 1,932 additions and 225 deletions.
26 changes: 13 additions & 13 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,16 @@ vars = {
# EOL comment after a dependency to disable this and pin it at its current
# revision.

"args_rev": "cf905519d67054a5e8d8835ffd4b247d8bbb602d",
"async_rev": "77a25d77392b131df4ecac85bcfe9a30f82a9f40",
"bazel_worker_rev": "2fb4fbff6ee8d26fee1f3576fa0500057d897afd",
"benchmark_harness_rev": "accc7552b5fc0ba38493707635dc9e1ce7b90f12",
"boolean_selector_rev": "2cbd4a60b89fe51a404e9ee3625a8fb8019561dd",
"args_rev": "b3608bd95168428621689dce62f873b76a1617d4",
"async_rev": "f933ddff63021bfbdb70938d6a137eb9e7419b05",
"bazel_worker_rev": "2ec90c023d7c62a38cfbd2f34f55093ab38ccf85",
"benchmark_harness_rev": "6fa42b072694875823bd81cb0913a9409e018e5f",
"boolean_selector_rev": "84467e580fa1c7c53ea588308f1acbcf4e8eb6a6",
"browser_launcher_rev": "0dcf2246c11eaf6c4f2591332f1057734a847793",
"characters_rev": "7633a16a22c626e19ca750223237396315268a06",
"cli_util_rev": "9fe3eeb8a2fad6da9a156055207337474436da12",
"clock_rev": "80e70acf72cc3a876d3158911b097b581cd8fd1a",
"collection_rev": "471839875a3bbfb26a7d51eca82be5b788660982",
"collection_rev": "fe2e80039b6d44d80f7465535988f935ccf554a5",
"convert_rev": "056626e0cddd56c4cc1184aac787ba06ecdaae3a",
"crypto_rev": "3f815aca8ad5020bb39be09ec9bfd75c36910809",
"csslib_rev": "141dd6567651500bb8c17ccb65e3c9e117c64035",
Expand All @@ -144,7 +144,7 @@ vars = {
#
# For more details, see https://github.com/dart-lang/sdk/issues/30164.
"dart_style_rev": "a6ad7693555a9add6f98ad6fd94de80d35c89415", # disable tools/rev_sdk_deps.dart
"dartdoc_rev": "1e1a004c69022ae19e121b6b9c90039dccd56749",
"dartdoc_rev": "ed975850ec97bbccba1c5c2a997e2c085ef842da",
"ecosystem_rev": "ad9da1557bbf522ff5bd25aa83117aeb818160c9",
"file_rev": "8ce0d13ffe9dac267bdbd6c65c145ba4f611af72",
"fixnum_rev": "ac892adead8317e22fafaec65a4e76bda1640f26",
Expand All @@ -158,8 +158,8 @@ vars = {
"json_rpc_2_rev": "3187f7b59ed253d14b2560c5306b037bca6817b0",
"leak_tracker_rev": "f5620600a5ce1c44f65ddaa02001e200b096e14c", # manually rolled
"lints_rev": "b254c7e374b0328d4ebfe4f32638fd5e58a81b59",
"logging_rev": "49d89b1de6e847174bc93b709e858b99e61b2ae7",
"markdown_rev": "340c76f6cab697ca9a51e0772009347400d9488a",
"logging_rev": "7f722dcbe541de330b5ebc1e9ae075e92033aa06",
"markdown_rev": "c1013dc6fc2653baeb9fac70d0a036615867e629",
"matcher_rev": "4ac4096facce24a781ab6609ca99995aeb443b25",
"material_color_utilities_rev": "799b6ba2f3f1c28c67cc7e0b4f18e0c7d7f3c03e",
"mime_rev": "b01c9a24e0991da479bd405138be3b3e403ff456",
Expand All @@ -171,7 +171,7 @@ vars = {
"protobuf_rev": "ccf104dbc36929c0f8708285d5f3a8fae206343e",
"pub_rev": "75ab224376e80e918d3c53494a36d4bf8a2f2af6", # disable tools/rev_sdk_deps.dart
"pub_semver_rev": "f57c9c31dfd4e45ce6b11f18ee388e526ba1792a",
"shelf_rev": "d9f82bf2cdd87e2878cfdc167aa41b9ce87a52d8",
"shelf_rev": "338962c5a80761ca60921fc9c9b3e6ff57ffc82c",
"source_map_stack_trace_rev": "6834af5e9e4ba880741b1357a5967fee8d90827c",
"source_maps_rev": "181a41c10668801486c53b48d6fce42fea5c9eca",
"source_span_rev": "e80cb44fc0f8d284e86372c9c98bbdd958810beb",
Expand All @@ -190,13 +190,13 @@ vars = {
"typed_data_rev": "fb1958ca880d650972e124222d3d9e41bd35c76c",
"vector_math_rev": "43f2a77bb0be812b027a68a11792d563713b42a1",
"watcher_rev": "c182cd3db6f0bc285bf5da52df422f5c64f21a37",
"web_rev": "d7766451f43001276b5493b2261d2973702b8334",
"web_rev": "d7766451f43001276b5493b2261d2973702b8334", # b/343654390
"web_socket_channel_rev": "45b8ce9ce9fb5194a24d3dff8913c573fbe7896a",
"webdev_rev": "fc32eb69f2ad666e9ab1cb3300510e5daed222d6",
"webdev_rev": "a97c2a1f074209584e7a6a4923d2ca029411f718",
"webdriver_rev": "f85779edd7c9f66198d4391ed3631db1d97a5b11",
"webkit_inspection_protocol_rev": "5740cc91eaeb13a02007b77b128fccf4b056db6e",
"yaml_rev": "8fb8147e40236bdefd02abbca7b92ddfd7ca0749",
"yaml_edit_rev": "31919348bd2a1bbb805b4eb88a6b7f50d4ab247e",
"yaml_edit_rev": "963e7a31efc7e2f24e409f239106f1ed1c6fee35",

# Windows deps
"crashpad_rev": "bf327d8ceb6a669607b0dbab5a83a275d03f99ed",
Expand Down
2 changes: 1 addition & 1 deletion build/linux/alpine_sysroot_scripts/install-sysroot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ SCRIPT="$(readlink -f -- "$0")"
WORKDIR="$(dirname -- "$(dirname -- "$(dirname -- "$(dirname -- "$SCRIPT")")")")"

if test $# -eq 0; then
set aarch64 armv7 x86_64 x86
set aarch64 armv7 x86_64 x86 riscv64
fi

echo "$@" | xargs -n 1 -- sh -xc 'apk add --root "$1/buildtools/sysroot/alpine-linux-$2" --repositories-file /etc/apk/repositories --allow-untrusted --arch "$2" --no-cache --no-scripts --initdb -- build-base linux-headers' -- "$WORKDIR"
2 changes: 1 addition & 1 deletion pkg/_fe_analyzer_shared/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: _fe_analyzer_shared
version: 69.0.0
version: 70.0.0
description: Logic that is shared between the front_end and analyzer packages.
repository: https://github.com/dart-lang/sdk/tree/main/pkg/_fe_analyzer_shared

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
#
# Stats:
# - 42 "needsEvaluation"
# - 354 "needsFix"
# - 397 "hasFix"
# - 353 "needsFix"
# - 398 "hasFix"
# - 516 "noFix"

AnalysisOptionsErrorCode.INCLUDED_FILE_PARSE_ERROR:
Expand Down Expand Up @@ -3237,9 +3237,7 @@ ParserErrorCode.SEALED_MIXIN:
notes: |-
Remove the `sealed` keyword.
ParserErrorCode.SEALED_MIXIN_CLASS:
status: needsFix
notes: |-
Remove the `sealed` keyword.
status: hasFix
ParserErrorCode.SETTER_CONSTRUCTOR:
status: needsFix
notes: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1415,6 +1415,9 @@ final _builtInNonLintProducers = <ErrorCode, List<ProducerGenerator>>{
ParserErrorCode.RECORD_TYPE_ONE_POSITIONAL_NO_TRAILING_COMMA: [
AddTrailingComma.new,
],
ParserErrorCode.SEALED_MIXIN_CLASS: [
RemoveExtraModifier.new,
],
ParserErrorCode.VAR_AND_TYPE: [
RemoveTypeAnnotation.fixVarAndType,
RemoveVar.new,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,15 @@ typedef F();
''');
}

Future<void> test_class_sealed_mixin() async {
await resolveTestCode('''
sealed mixin class A {}
''');
await assertHasFix('''
mixin class A {}
''');
}

Future<void> test_covariantTopLevelDeclaration_class() async {
await resolveTestCode(r'''
covariant class C {}
Expand Down
3 changes: 3 additions & 0 deletions pkg/analyzer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
## 6.5.2
* Updated constraints `macros: '>=0.1.2-0 <0.1.3'`.

## 6.5.1
* Updated constraints `macros: '>=0.1.1-0 <0.1.2'`.

Expand Down
6 changes: 3 additions & 3 deletions pkg/analyzer/lib/src/dart/element/scope.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ class FormalParameterScope extends EnclosedScope {
}
}

/// The scope defined by an interface element.
class InterfaceScope extends EnclosedScope {
InterfaceScope(super.parent, InstanceElement element) {
/// The scope defined by an instance element.
class InstanceScope extends EnclosedScope {
InstanceScope(super.parent, InstanceElement element) {
var augmented = element.augmented;
augmented.accessors.forEach(_addPropertyAccessor);
augmented.methods.forEach(_addGetter);
Expand Down
10 changes: 5 additions & 5 deletions pkg/analyzer/lib/src/generated/resolver.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4309,7 +4309,7 @@ class ScopeResolverVisitor extends UnifyingAstVisitor<void> {
node.nameScope = nameScope;
visitClassDeclarationInScope(node);

nameScope = InterfaceScope(nameScope, element);
nameScope = InstanceScope(nameScope, element);
visitClassMembersInScope(node);
} finally {
nameScope = outerScope;
Expand All @@ -4335,7 +4335,7 @@ class ScopeResolverVisitor extends UnifyingAstVisitor<void> {
Scope outerScope = nameScope;
try {
ClassElement element = node.declaredElement!;
nameScope = InterfaceScope(
nameScope = InstanceScope(
TypeParameterScope(nameScope, element.typeParameters),
element,
);
Expand Down Expand Up @@ -4456,7 +4456,7 @@ class ScopeResolverVisitor extends UnifyingAstVisitor<void> {
node.nameScope = nameScope;
visitEnumDeclarationInScope(node);

nameScope = InterfaceScope(nameScope, element);
nameScope = InstanceScope(nameScope, element);
visitEnumMembersInScope(node);
} finally {
nameScope = outerScope;
Expand Down Expand Up @@ -4530,7 +4530,7 @@ class ScopeResolverVisitor extends UnifyingAstVisitor<void> {
node.representation.accept(this);
node.implementsClause?.accept(this);

nameScope = InterfaceScope(nameScope, element);
nameScope = InstanceScope(nameScope, element);
visitDocumentationComment(node.documentationComment);
node.members.accept(this);
} finally {
Expand Down Expand Up @@ -4898,7 +4898,7 @@ class ScopeResolverVisitor extends UnifyingAstVisitor<void> {
node.nameScope = nameScope;
visitMixinDeclarationInScope(node);

nameScope = InterfaceScope(nameScope, element);
nameScope = InstanceScope(nameScope, element);
visitMixinMembersInScope(node);
} finally {
nameScope = outerScope;
Expand Down
8 changes: 4 additions & 4 deletions pkg/analyzer/lib/src/summary2/reference_resolver.dart
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class ReferenceResolver extends ThrowingAstVisitor<void> {
node.withClause?.accept(this);
node.implementsClause?.accept(this);

scope = InterfaceScope(scope, element);
scope = InstanceScope(scope, element);
LinkingNodeContext(node, scope);

node.members.accept(this);
Expand Down Expand Up @@ -147,7 +147,7 @@ class ReferenceResolver extends ThrowingAstVisitor<void> {
node.implementsClause?.accept(this);
node.withClause?.accept(this);

scope = InterfaceScope(scope, element);
scope = InstanceScope(scope, element);
LinkingNodeContext(node, scope);

node.members.accept(this);
Expand Down Expand Up @@ -203,7 +203,7 @@ class ReferenceResolver extends ThrowingAstVisitor<void> {
node.representation.accept(this);
node.implementsClause?.accept(this);

scope = InterfaceScope(scope, element);
scope = InstanceScope(scope, element);
LinkingNodeContext(node, scope);
LinkingNodeContext(node.representation, scope);

Expand Down Expand Up @@ -375,7 +375,7 @@ class ReferenceResolver extends ThrowingAstVisitor<void> {
node.onClause?.accept(this);
node.implementsClause?.accept(this);

scope = InterfaceScope(scope, element);
scope = InstanceScope(scope, element);
LinkingNodeContext(node, scope);

node.members.accept(this);
Expand Down
4 changes: 2 additions & 2 deletions pkg/analyzer/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: analyzer
version: 6.5.1
version: 6.5.2
description: >-
This package provides a library that performs static analysis of Dart code.
repository: https://github.com/dart-lang/sdk/tree/main/pkg/analyzer
Expand All @@ -8,7 +8,7 @@ environment:
sdk: '>=3.3.0 <4.0.0'

dependencies:
_fe_analyzer_shared: ^69.0.0
_fe_analyzer_shared: ^70.0.0
collection: ^1.17.0
convert: ^3.0.0
crypto: ^3.0.0
Expand Down
67 changes: 67 additions & 0 deletions pkg/analyzer/test/src/dart/resolution/macro_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1204,6 +1204,73 @@ class X {}
]);
}

test_macroDiagnostics_report_atDeclaration_class_method_typeParameter() async {
await assertErrorsInCode('''
import 'diagnostic.dart';
class A {
@ReportAtDeclaration([
'typeParameter 0',
])
void foo<T>() {}
}
''', [
error(WarningCode.MACRO_WARNING, 101, 1),
]);
}

test_macroDiagnostics_report_atDeclaration_class_typeParameter() async {
await assertErrorsInCode('''
import 'diagnostic.dart';
@ReportAtDeclaration([
'typeParameter 1',
])
class A<T, U, V> {}
''', [
error(WarningCode.MACRO_WARNING, 85, 1),
]);
}

test_macroDiagnostics_report_atDeclaration_function_typeParameter() async {
await assertErrorsInCode('''
import 'diagnostic.dart';
@ReportAtDeclaration([
'typeParameter 0',
])
void foo<T>() {}
''', [
error(WarningCode.MACRO_WARNING, 83, 1),
]);
}

test_macroDiagnostics_report_atDeclaration_mixin_typeParameter() async {
await assertErrorsInCode('''
import 'diagnostic.dart';
@ReportAtDeclaration([
'typeParameter 0',
])
mixin A<T> {}
''', [
error(WarningCode.MACRO_WARNING, 82, 1),
]);
}

test_macroDiagnostics_report_atDeclaration_typeAlias_typeParameter() async {
await assertErrorsInCode('''
import 'diagnostic.dart';
@ReportAtDeclaration([
'typeParameter 0',
])
typedef A<T> = List<T>;
''', [
error(WarningCode.MACRO_WARNING, 84, 1),
]);
}

/// Test that macros are compiled using the packages file of the package
/// that uses the macro.
test_macroInPackage() async {
Expand Down
4 changes: 4 additions & 0 deletions pkg/vm_service/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 14.2.3
- An instance of RPCError is now thrown when attempting to invoke an RPC after the
`VmService` instance has been disposed.

## 14.2.2
- Fixes issue where outstanding service requests were not automatically completed
with an error when the VM service connection was closed.
Expand Down
2 changes: 1 addition & 1 deletion pkg/vm_service/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: vm_service
version: 14.2.2
version: 14.2.3
description: >-
A library to communicate with a service implementing the Dart VM
service protocol.
Expand Down
13 changes: 6 additions & 7 deletions runtime/docs/gc.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,18 @@ But we combine the generational and incremental checks with a shift-and-mask.
```c++
enum HeaderBits {
...
kNotMarkedBit, // Incremental barrier target.
kNewBit, // Generational barrier target.
kAlwaysSetBit, // Incremental barrier source.
kOldAndNotRememberedBit, // Generational barrier source.
kNotMarkedBit, // Incremental barrier target.
kNewOrEvacuationCandidateBit, // Generational barrier target.
kAlwaysSetBit, // Incremental barrier source.
kOldAndNotRememberedBit, // Generational barrier source.
...
};
static constexpr intptr_t kGenerationalBarrierMask = 1 << kNewBit;
static constexpr intptr_t kGenerationalBarrierMask = 1 << kNewOrEvacuationCandidateBit;
static constexpr intptr_t kIncrementalBarrierMask = 1 << kNotMarkedBit;
static constexpr intptr_t kBarrierOverlapShift = 2;
COMPILE_ASSERT(kNotMarkedBit + kBarrierOverlapShift == kAlwaysSetBit);
COMPILE_ASSERT(kNewBit + kBarrierOverlapShift == kOldAndNotRememberedBit);
COMPILE_ASSERT(kNewOrEvacuationCandidateBit + kBarrierOverlapShift == kOldAndNotRememberedBit);
StorePointer(ObjectPtr source, ObjectPtr* slot, ObjectPtr target) {
*slot = target;
Expand Down Expand Up @@ -178,7 +178,6 @@ We can eliminate these checks when the compiler can prove these cases cannot hap
* `value` is a constant. Constants are always old, and they will be marked via the constant pools even if we fail to mark them via `container`.
* `value` has the static type bool. All possible values of the bool type (null, false, true) are constants.
* `value` is known to be a Smi. Smis are not heap objects.
* `container` is the same object as `value`. The GC never needs to retain an additional object if it sees a self-reference, so ignoring a self-reference cannot cause us to free a reachable object.
* `container` is known to be a new object or known to be an old object that is in the remembered set and is marked if marking is in progress.

We can know that `container` meets the last property if `container` is the result of an allocation (instead of a heap load), and there is no instruction that can trigger a GC between the allocation and the store. This is because the allocation stubs ensure the result of AllocateObject is either a new-space object (common case, bump pointer allocation succeeds), or has been preemptively added to the remembered set and marking worklist (uncommon case, entered runtime to allocate object, possibly triggering GC).
Expand Down
4 changes: 2 additions & 2 deletions runtime/platform/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ class RelaxedAtomic {
}
T operator+=(T arg) { return fetch_add(arg) + arg; }
T operator-=(T arg) { return fetch_sub(arg) - arg; }
T& operator++() { return fetch_add(1) + 1; }
T& operator--() { return fetch_sub(1) - 1; }
T operator++() { return fetch_add(1) + 1; }
T operator--() { return fetch_sub(1) - 1; }
T operator++(int) { return fetch_add(1); }
T operator--(int) { return fetch_sub(1); }

Expand Down
2 changes: 1 addition & 1 deletion runtime/vm/app_snapshot.cc
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ void Deserializer::InitializeHeader(ObjectPtr raw,
tags = UntaggedObject::AlwaysSetBit::update(true, tags);
tags = UntaggedObject::NotMarkedBit::update(true, tags);
tags = UntaggedObject::OldAndNotRememberedBit::update(true, tags);
tags = UntaggedObject::NewBit::update(false, tags);
tags = UntaggedObject::NewOrEvacuationCandidateBit::update(false, tags);
tags = UntaggedObject::ImmutableBit::update(is_immutable, tags);
raw->untag()->tags_ = tags;
}
Expand Down
Loading

0 comments on commit 97b2762

Please sign in to comment.