Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit ecfee80

Browse files
author
Dart CI
committed
Version 2.10.0-45.0.dev
Merge commit 'f3ce2d6c3342e317ae7d1bde5d5bed2d6ff7c31e' into 'dev'
2 parents 9608dfd + f3ce2d6 commit ecfee80

File tree

11 files changed

+2756
-7
lines changed

11 files changed

+2756
-7
lines changed

DEPS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ vars = {
118118
"markupsafe_rev": "8f45f5cfa0009d2a70589bcda0349b8cb2b72783",
119119
"markdown_rev": "dbeafd47759e7dd0a167602153bb9c49fb5e5fe7",
120120
"matcher_rev": "9cae8faa7868bf3a88a7ba45eb0bd128e66ac515",
121-
"mime_rev": "179b5e6a88f4b63f36dc1b8fcbc1e83e5e0cd3a7",
121+
"mime_tag": "0.9.7",
122122
"mockito_rev": "d39ac507483b9891165e422ec98d9fb480037c8b",
123123
"mustache_rev": "664737ecad027e6b96d0d1e627257efa0e46fcb1",
124124
"oauth2_tag": "1.6.0",
@@ -363,7 +363,7 @@ deps = {
363363
Var("dart_root") + "/third_party/pkg/matcher":
364364
Var("dart_git") + "matcher.git" + "@" + Var("matcher_rev"),
365365
Var("dart_root") + "/third_party/pkg/mime":
366-
Var("dart_git") + "mime.git" + "@" + Var("mime_rev"),
366+
Var("dart_git") + "mime.git" + "@" + Var("mime_tag"),
367367
Var("dart_root") + "/third_party/pkg/mockito":
368368
Var("dart_git") + "mockito.git" + "@" + Var("mockito_rev"),
369369
Var("dart_root") + "/third_party/pkg/mustache":

pkg/analyzer/lib/dart/element/element.dart

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,9 @@ abstract class Element implements AnalysisTarget {
528528
/// or `@Deprecated('..')`.
529529
bool get hasDeprecated;
530530

531+
/// Return `true` if this element has an annotation of the form `@doNotStore`.
532+
bool get hasDoNotStore;
533+
531534
/// Return `true` if this element has an annotation of the form `@factory`.
532535
bool get hasFactory;
533536

@@ -702,6 +705,10 @@ abstract class ElementAnnotation implements ConstantEvaluationTarget {
702705
/// deprecated.
703706
bool get isDeprecated;
704707

708+
/// Return `true` if this annotation marks the associated element as not to be
709+
/// stored.
710+
bool get isDoNotStore;
711+
705712
/// Return `true` if this annotation marks the associated member as a factory.
706713
bool get isFactory;
707714

pkg/analyzer/lib/src/dart/element/element.dart

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2284,6 +2284,10 @@ class ElementAnnotationImpl implements ElementAnnotation {
22842284
/// deprecated.
22852285
static const String _DEPRECATED_VARIABLE_NAME = "deprecated";
22862286

2287+
/// The name of the top-level variable used to mark an element as not to be
2288+
/// stored.
2289+
static const String _DO_NOT_STORE_VARIABLE_NAME = "doNotStore";
2290+
22872291
/// The name of the top-level variable used to mark a method as being a
22882292
/// factory.
22892293
static const String _FACTORY_VARIABLE_NAME = "factory";
@@ -2411,6 +2415,12 @@ class ElementAnnotationImpl implements ElementAnnotation {
24112415
return false;
24122416
}
24132417

2418+
@override
2419+
bool get isDoNotStore =>
2420+
element is PropertyAccessorElement &&
2421+
element.name == _DO_NOT_STORE_VARIABLE_NAME &&
2422+
element.library?.name == _META_LIB_NAME;
2423+
24142424
@override
24152425
bool get isFactory =>
24162426
element is PropertyAccessorElement &&
@@ -2674,6 +2684,18 @@ abstract class ElementImpl implements Element {
26742684
return false;
26752685
}
26762686

2687+
@override
2688+
bool get hasDoNotStore {
2689+
var metadata = this.metadata;
2690+
for (var i = 0; i < metadata.length; i++) {
2691+
var annotation = metadata[i];
2692+
if (annotation.isDoNotStore) {
2693+
return true;
2694+
}
2695+
}
2696+
return false;
2697+
}
2698+
26772699
@override
26782700
bool get hasFactory {
26792701
var metadata = this.metadata;
@@ -5957,6 +5979,9 @@ class MultiplyDefinedElementImpl implements MultiplyDefinedElement {
59575979
@override
59585980
bool get hasDeprecated => false;
59595981

5982+
@override
5983+
bool get hasDoNotStore => false;
5984+
59605985
@override
59615986
bool get hasFactory => false;
59625987

pkg/analyzer/lib/src/dart/element/member.dart

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,9 @@ abstract class Member implements Element {
450450
@override
451451
bool get hasDeprecated => _declaration.hasDeprecated;
452452

453+
@override
454+
bool get hasDoNotStore => _declaration.hasDoNotStore;
455+
453456
@override
454457
bool get hasFactory => _declaration.hasFactory;
455458

pkg/analyzer/lib/src/error/codes.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1587,6 +1587,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
15871587
'CONST_EVAL_TYPE_TYPE',
15881588
"In constant expressions, operands of this operator must be of type "
15891589
"'Type'.");
1590+
15901591
/**
15911592
* Parameters:
15921593
* 0: the name of the type of the initializer expression
@@ -2534,7 +2535,7 @@ class CompileTimeErrorCode extends AnalyzerErrorCode {
25342535
static const CompileTimeErrorCode EXPORT_LEGACY_SYMBOL = CompileTimeErrorCode(
25352536
'EXPORT_LEGACY_SYMBOL',
25362537
"The symbol '{0}' is defined in a legacy library, and can't be "
2537-
"re-exported from a non-nullable by default library.",
2538+
"re-exported from a library with null safety enabled.",
25382539
correction: "Try removing the export or migrating the legacy library.",
25392540
hasPublishedDocs: true);
25402541

pkg/analyzer/tool/diagnostics/diagnostics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1907,7 +1907,7 @@ values are returned by an iterator.
19071907
### export_legacy_symbol
19081908

19091909
_The symbol '{0}' is defined in a legacy library, and can't be re-exported from
1910-
a non-nullable by default library._
1910+
a library with null safety enabled._
19111911

19121912
#### Description
19131913

pkg/pkg.status

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ front_end/test/fasta/strong4_test: Pass, ExtraSlow
8585
front_end/test/fasta/text_serialization_test: Pass, ExtraSlow
8686
front_end/test/fasta/types/dart2js_benchmark_test: Pass, Slow
8787
front_end/test/fasta/types/large_app_benchmark_test: Pass, ExtraSlow
88-
front_end/test/incremental_compiler_leak_test.dart: Pass, Slow
89-
front_end/test/incremental_dart2js_test.dart: Pass, Slow
88+
front_end/test/incremental_compiler_leak_test: Pass, Slow
89+
front_end/test/incremental_dart2js_test: Pass, Slow
9090
front_end/test/minimal_incremental_kernel_generator_test: Slow, Pass
9191
front_end/test/whole_program_test: Slow, Pass
9292
front_end/testcases/*: Skip # These are not tests but input for tests.

0 commit comments

Comments
 (0)