Version 2.14.0-112.0.dev
Merge commit '2f85591b67d12f8bbbaa5ad86ceefadc4c150371' into 'dev'
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4a229d0..3a1ba65 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -132,7 +132,7 @@
}
```
-## 2.13.0
+## 2.13.0 - 2021-05-18
### Language
diff --git a/DEPS b/DEPS
index 65c748d..835c510 100644
--- a/DEPS
+++ b/DEPS
@@ -710,20 +710,4 @@
'action': ['python3', 'sdk/build/vs_toolchain.py', 'update'],
'condition': 'checkout_win'
},
- {
- "name": "7zip",
- "pattern": ".",
- "action": [
- "download_from_google_storage",
- "--no_auth",
- "--no_resume",
- "--bucket",
- "dart-dependencies",
- "--platform=win32",
- "--extract",
- "-s",
- Var('dart_root') + "/third_party/7zip.tar.gz.sha1",
- ],
- 'condition': 'checkout_win'
- },
]
diff --git a/pkg/analyzer/lib/src/dart/analysis/experiments.g.dart b/pkg/analyzer/lib/src/dart/analysis/experiments.g.dart
index f380214..7321d6b 100644
--- a/pkg/analyzer/lib/src/dart/analysis/experiments.g.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/experiments.g.dart
@@ -25,6 +25,7 @@
ExperimentalFeatures.nonfunction_type_aliases,
EnableString.set_literals: ExperimentalFeatures.set_literals,
EnableString.spread_collections: ExperimentalFeatures.spread_collections,
+ EnableString.test_experiment: ExperimentalFeatures.test_experiment,
EnableString.triple_shift: ExperimentalFeatures.triple_shift,
EnableString.value_class: ExperimentalFeatures.value_class,
EnableString.variance: ExperimentalFeatures.variance,
@@ -66,6 +67,9 @@
/// String to enable the experiment "spread-collections"
static const String spread_collections = 'spread-collections';
+ /// String to enable the experiment "test-experiment"
+ static const String test_experiment = 'test-experiment';
+
/// String to enable the experiment "triple-shift"
static const String triple_shift = 'triple-shift';
@@ -190,8 +194,19 @@
releaseVersion: Version.parse('2.0.0'),
);
- static final triple_shift = ExperimentalFeature(
+ static final test_experiment = ExperimentalFeature(
index: 11,
+ enableString: EnableString.test_experiment,
+ isEnabledByDefault: IsEnabledByDefault.test_experiment,
+ isExpired: IsExpired.test_experiment,
+ documentation:
+ 'Has no effect. Can be used for testing the --enable-experiment command line functionality.',
+ experimentalReleaseVersion: null,
+ releaseVersion: null,
+ );
+
+ static final triple_shift = ExperimentalFeature(
+ index: 12,
enableString: EnableString.triple_shift,
isEnabledByDefault: IsEnabledByDefault.triple_shift,
isExpired: IsExpired.triple_shift,
@@ -201,7 +216,7 @@
);
static final value_class = ExperimentalFeature(
- index: 12,
+ index: 13,
enableString: EnableString.value_class,
isEnabledByDefault: IsEnabledByDefault.value_class,
isExpired: IsExpired.value_class,
@@ -211,7 +226,7 @@
);
static final variance = ExperimentalFeature(
- index: 13,
+ index: 14,
enableString: EnableString.variance,
isEnabledByDefault: IsEnabledByDefault.variance,
isExpired: IsExpired.variance,
@@ -257,6 +272,9 @@
/// Default state of the experiment "spread-collections"
static const bool spread_collections = true;
+ /// Default state of the experiment "test-experiment"
+ static const bool test_experiment = false;
+
/// Default state of the experiment "triple-shift"
static const bool triple_shift = true;
@@ -304,6 +322,9 @@
/// Expiration status of the experiment "spread-collections"
static const bool spread_collections = true;
+ /// Expiration status of the experiment "test-experiment"
+ static const bool test_experiment = false;
+
/// Expiration status of the experiment "triple-shift"
static const bool triple_shift = false;
@@ -354,6 +375,9 @@
bool get spread_collections =>
isEnabled(ExperimentalFeatures.spread_collections);
+ /// Current state for the flag "test-experiment"
+ bool get test_experiment => isEnabled(ExperimentalFeatures.test_experiment);
+
/// Current state for the flag "triple-shift"
bool get triple_shift => isEnabled(ExperimentalFeatures.triple_shift);
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index 61af881..67045fb 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -6265,10 +6265,6 @@
PrefixElementImpl(String name, int nameOffset, {Reference? reference})
: super(name, nameOffset, reference: reference);
- PrefixElementImpl.forLinkedNode(
- ElementImpl enclosing, Reference reference, SimpleIdentifier linkedNode)
- : super.forLinkedNode(enclosing, reference, linkedNode);
-
@override
String get displayName => name;
@@ -6281,21 +6277,10 @@
@override
String get name {
- if (linkedNode != null) {
- return reference!.name;
- }
return super.name!;
}
@override
- int get nameOffset {
- if (linkedNode != null) {
- return (linkedNode as SimpleIdentifier).offset;
- }
- return super.nameOffset;
- }
-
- @override
Scope get scope => _scope ??= PrefixScope(enclosingElement, this);
@override
diff --git a/pkg/analyzer/lib/src/summary2/library_builder.dart b/pkg/analyzer/lib/src/summary2/library_builder.dart
index c6cb319..c91e88e 100644
--- a/pkg/analyzer/lib/src/summary2/library_builder.dart
+++ b/pkg/analyzer/lib/src/summary2/library_builder.dart
@@ -406,9 +406,7 @@
}
@override
- void visitExportDirective(ast.ExportDirective node) {
- node as ast.ExportDirectiveImpl;
-
+ void visitExportDirective(covariant ast.ExportDirectiveImpl node) {
var element = ExportElementImpl(node.keyword.offset);
element.combinators = _buildCombinators(node.combinators);
element.exportedLibrary = _selectLibrary(node);
@@ -420,9 +418,7 @@
}
@override
- void visitImportDirective(ast.ImportDirective node) {
- node as ast.ImportDirectiveImpl;
-
+ void visitImportDirective(covariant ast.ImportDirectiveImpl node) {
var element = ImportElementImpl(node.keyword.offset);
element.combinators = _buildCombinators(node.combinators);
element.importedLibrary = _selectLibrary(node);
diff --git a/pkg/compiler/lib/src/commandline_options.dart b/pkg/compiler/lib/src/commandline_options.dart
index 7288f48..74f994c 100644
--- a/pkg/compiler/lib/src/commandline_options.dart
+++ b/pkg/compiler/lib/src/commandline_options.dart
@@ -79,6 +79,10 @@
static const String noNativeNullAssertions = '--no-native-null-assertions';
static const String noSourceMaps = '--no-source-maps';
+
+ static const String omitLateNames = '--omit-late-names';
+ static const String noOmitLateNames = '--no-omit-late-names';
+
static const String preserveUris = '--preserve-uris';
static const String printLegacyStars = '--debug-print-legacy-stars';
static const String showPackageWarnings = '--show-package-warnings';
diff --git a/pkg/compiler/lib/src/dart2js.dart b/pkg/compiler/lib/src/dart2js.dart
index 1dcfde0..e193c1c 100644
--- a/pkg/compiler/lib/src/dart2js.dart
+++ b/pkg/compiler/lib/src/dart2js.dart
@@ -512,6 +512,8 @@
new OptionHandler(Flags.initializingFormalAccess, ignoreOption),
new OptionHandler(Flags.minify, passThrough),
new OptionHandler(Flags.noMinify, passThrough),
+ new OptionHandler(Flags.omitLateNames, passThrough),
+ new OptionHandler(Flags.noOmitLateNames, passThrough),
new OptionHandler(Flags.preserveUris, ignoreOption),
new OptionHandler(Flags.printLegacyStars, passThrough),
new OptionHandler('--force-strip=.*', setStrip),
@@ -1122,6 +1124,11 @@
--no-source-maps
Do not generate a source map file.
+ --omit-late-names
+ Do not include names of late variables in error messages. This allows
+ dart2js to generate smaller code by removing late variable names from the
+ generated JavaScript.
+
-O<0,1,2,3,4>
Controls optimizations that can help reduce code-size and improve
performance of the generated code for deployment.
@@ -1149,6 +1156,7 @@
Equivalent to calling dart2js with these extra flags:
--minify
--lax-runtime-type-to-string
+ --omit-late-names
-O3
Enables optimizations that respect the language semantics only on
diff --git a/pkg/compiler/lib/src/ir/scope_visitor.dart b/pkg/compiler/lib/src/ir/scope_visitor.dart
index 2a6ddc4..075e6aa 100644
--- a/pkg/compiler/lib/src/ir/scope_visitor.dart
+++ b/pkg/compiler/lib/src/ir/scope_visitor.dart
@@ -983,17 +983,20 @@
@override
EvaluationComplexity visitConstructorInvocation(
ir.ConstructorInvocation node) {
+ ir.Constructor target = node.target;
+ ir.Class enclosingClass = target.enclosingClass;
+
// TODO(45681): Investigate if other initializers should be made eager.
- // Lazily invoking the `_Cell` constructor pessimizes certain uses of late
- // variables, so we ensure it gets called eagerly.
- if (node.target == _coreTypes.cellConstructor) {
+ // Lazily constructing cells pessimizes certain uses of late variables, so
+ // we ensure they get constructed eagerly.
+ if (enclosingClass == _coreTypes.cellClass) {
return EvaluationComplexity.eager();
}
if (node.arguments.types.isNotEmpty) {
visitNodesInContext(node.arguments.types,
- new VariableUse.constructorTypeArgument(node.target));
+ new VariableUse.constructorTypeArgument(target));
}
visitArguments(node.arguments);
return node.isConst
diff --git a/pkg/compiler/lib/src/kernel/dart2js_target.dart b/pkg/compiler/lib/src/kernel/dart2js_target.dart
index a048dea..eb08931 100644
--- a/pkg/compiler/lib/src/kernel/dart2js_target.dart
+++ b/pkg/compiler/lib/src/kernel/dart2js_target.dart
@@ -77,9 +77,11 @@
@override
final String name;
+ final bool omitLateNames;
+
Map<String, ir.Class> _nativeClasses;
- Dart2jsTarget(this.name, this.flags);
+ Dart2jsTarget(this.name, this.flags, {this.omitLateNames = false});
@override
bool get enableNoSuchMethodForwarders => true;
@@ -158,7 +160,8 @@
_nativeClasses)
.visitLibrary(library);
}
- lowering.transformLibraries(libraries, coreTypes, hierarchy);
+ lowering.transformLibraries(libraries, coreTypes, hierarchy,
+ omitLateNames: omitLateNames);
logger?.call("Lowering transformations performed");
}
diff --git a/pkg/compiler/lib/src/kernel/loader.dart b/pkg/compiler/lib/src/kernel/loader.dart
index 99a37c5..a348813 100644
--- a/pkg/compiler/lib/src/kernel/loader.dart
+++ b/pkg/compiler/lib/src/kernel/loader.dart
@@ -136,7 +136,8 @@
}
} else {
bool verbose = false;
- Target target = Dart2jsTarget(targetName, TargetFlags());
+ Target target = Dart2jsTarget(targetName, TargetFlags(),
+ omitLateNames: _options.omitLateNames);
fe.FileSystem fileSystem = CompilerFileSystem(_compilerInput);
fe.Verbosity verbosity = _options.verbosity;
fe.DiagnosticMessageHandler onDiagnostic =
diff --git a/pkg/compiler/lib/src/kernel/transformations/late_lowering.dart b/pkg/compiler/lib/src/kernel/transformations/late_lowering.dart
index ebac6bb..5b9b6e4 100644
--- a/pkg/compiler/lib/src/kernel/transformations/late_lowering.dart
+++ b/pkg/compiler/lib/src/kernel/transformations/late_lowering.dart
@@ -6,16 +6,16 @@
import 'package:kernel/core_types.dart';
import 'package:kernel/type_algebra.dart';
-bool _shouldLowerVariable(VariableDeclaration node) => node.isLate;
+bool _shouldLowerVariable(VariableDeclaration variable) => variable.isLate;
-bool _shouldLowerUninitializedVariable(VariableDeclaration node) =>
- _shouldLowerVariable(node) && node.initializer == null;
+bool _shouldLowerUninitializedVariable(VariableDeclaration variable) =>
+ _shouldLowerVariable(variable) && variable.initializer == null;
-bool _shouldLowerInitializedVariable(VariableDeclaration node) =>
- _shouldLowerVariable(node) && node.initializer != null;
+bool _shouldLowerInitializedVariable(VariableDeclaration variable) =>
+ _shouldLowerVariable(variable) && variable.initializer != null;
-bool _shouldLowerField(Field node) =>
- node.isLate && node.isStatic && node.initializer == null;
+bool _shouldLowerField(Field field) =>
+ field.isLate && field.isStatic && field.initializer == null;
class _Reader {
final Procedure _procedure;
@@ -30,25 +30,32 @@
class LateLowering {
final CoreTypes _coreTypes;
+ final bool omitLateNames;
+
final _Reader _readLocal;
final _Reader _readField;
final _Reader _readInitialized;
final _Reader _readInitializedFinal;
- // TODO(fishythefish): Remove cells when exiting their scope.
- final Map<VariableDeclaration, VariableDeclaration> _variableCells = {};
+ // Each map contains the mapping from late local variables to cells for a
+ // given function scope.
+ final List<Map<VariableDeclaration, VariableDeclaration>> _variableCells = [];
+
final Map<Field, Field> _fieldCells = {};
Member _contextMember;
- LateLowering(this._coreTypes)
- : _readLocal = _Reader(_coreTypes.cellReadLocal),
+ LateLowering(this._coreTypes, {this.omitLateNames})
+ : assert(omitLateNames != null),
+ _readLocal = _Reader(_coreTypes.cellReadLocal),
_readField = _Reader(_coreTypes.cellReadField),
_readInitialized = _Reader(_coreTypes.initializedCellRead),
_readInitializedFinal = _Reader(_coreTypes.initializedCellReadFinal);
- void transformAdditionalExports(Library node) {
- List<Reference> additionalExports = node.additionalExports;
+ Nullability get nonNullable => _contextMember.enclosingLibrary.nonNullable;
+
+ void transformAdditionalExports(Library library) {
+ List<Reference> additionalExports = library.additionalExports;
Set<Reference> newExports = {};
additionalExports.removeWhere((Reference reference) {
Field cell = _fieldCells[reference.node];
@@ -59,17 +66,43 @@
additionalExports.addAll(newExports);
}
- ConstructorInvocation _callCellConstructor(int fileOffset) =>
+ ConstructorInvocation _callCellConstructor(Expression name, int fileOffset) =>
+ omitLateNames
+ ? _callCellUnnamedConstructor(fileOffset)
+ : _callCellNamedConstructor(name, fileOffset);
+
+ ConstructorInvocation _callCellUnnamedConstructor(int fileOffset) =>
ConstructorInvocation(_coreTypes.cellConstructor,
Arguments.empty()..fileOffset = fileOffset)
..fileOffset = fileOffset;
+ ConstructorInvocation _callCellNamedConstructor(
+ Expression name, int fileOffset) =>
+ ConstructorInvocation(_coreTypes.cellNamedConstructor,
+ Arguments([name])..fileOffset = fileOffset)
+ ..fileOffset = fileOffset;
+
ConstructorInvocation _callInitializedCellConstructor(
+ Expression name, Expression initializer, int fileOffset) =>
+ omitLateNames
+ ? _callInitializedCellUnnamedConstructor(initializer, fileOffset)
+ : _callInitializedCellNamedConstructor(name, initializer, fileOffset);
+
+ ConstructorInvocation _callInitializedCellUnnamedConstructor(
Expression initializer, int fileOffset) =>
ConstructorInvocation(_coreTypes.initializedCellConstructor,
Arguments([initializer])..fileOffset = fileOffset)
..fileOffset = fileOffset;
+ ConstructorInvocation _callInitializedCellNamedConstructor(
+ Expression name, Expression initializer, int fileOffset) =>
+ ConstructorInvocation(_coreTypes.initializedCellNamedConstructor,
+ Arguments([name, initializer])..fileOffset = fileOffset)
+ ..fileOffset = fileOffset;
+
+ StringLiteral _nameLiteral(String name, int fileOffset) =>
+ StringLiteral(name ?? '')..fileOffset = fileOffset;
+
InstanceInvocation _callReader(
_Reader reader, Expression receiver, DartType type, int fileOffset) {
Procedure procedure = reader._procedure;
@@ -92,17 +125,51 @@
interfaceTarget: _setter)
..fileOffset = fileOffset;
+ void enterFunction() {
+ _variableCells.add(null);
+ }
+
+ void exitFunction() {
+ _variableCells.removeLast();
+ }
+
+ VariableDeclaration _lookupVariableCell(VariableDeclaration variable) {
+ assert(_shouldLowerVariable(variable));
+ for (final scope in _variableCells) {
+ if (scope == null) continue;
+ final cell = scope[variable];
+ if (cell != null) return cell;
+ }
+ return null;
+ }
+
+ VariableDeclaration _addToCurrentScope(
+ VariableDeclaration variable, VariableDeclaration cell) {
+ assert(_shouldLowerVariable(variable));
+ assert(_lookupVariableCell(variable) == null);
+ return (_variableCells.last ??= {})[variable] = cell;
+ }
+
+ VariableDeclaration _variableCell(VariableDeclaration variable) {
+ assert(_shouldLowerVariable(variable));
+ final cell = _lookupVariableCell(variable);
+ if (cell != null) return cell;
+ return variable.initializer == null
+ ? _uninitializedVariableCell(variable)
+ : _initializedVariableCell(variable);
+ }
+
VariableDeclaration _uninitializedVariableCell(VariableDeclaration variable) {
assert(_shouldLowerUninitializedVariable(variable));
- return _variableCells.putIfAbsent(variable, () {
- int fileOffset = variable.fileOffset;
- return VariableDeclaration(variable.name,
- initializer: _callCellConstructor(fileOffset),
- type: InterfaceType(_coreTypes.cellClass,
- _contextMember.enclosingLibrary.nonNullable),
- isFinal: true)
- ..fileOffset = fileOffset;
- });
+ int fileOffset = variable.fileOffset;
+ String name = variable.name;
+ final cell = VariableDeclaration(name,
+ initializer:
+ _callCellConstructor(_nameLiteral(name, fileOffset), fileOffset),
+ type: InterfaceType(_coreTypes.cellClass, nonNullable),
+ isFinal: true)
+ ..fileOffset = fileOffset;
+ return _addToCurrentScope(variable, cell);
}
FunctionExpression _initializerClosure(
@@ -117,41 +184,36 @@
VariableDeclaration _initializedVariableCell(VariableDeclaration variable) {
assert(_shouldLowerInitializedVariable(variable));
- return _variableCells.putIfAbsent(variable, () {
- int fileOffset = variable.fileOffset;
- return VariableDeclaration(variable.name,
- initializer: _callInitializedCellConstructor(
- _initializerClosure(variable.initializer, variable.type),
- fileOffset),
- type: InterfaceType(_coreTypes.initializedCellClass,
- _contextMember.enclosingLibrary.nonNullable),
- isFinal: true)
- ..fileOffset = fileOffset;
- });
+ int fileOffset = variable.fileOffset;
+ String name = variable.name;
+ final cell = VariableDeclaration(name,
+ initializer: _callInitializedCellConstructor(
+ _nameLiteral(name, fileOffset),
+ _initializerClosure(variable.initializer, variable.type),
+ fileOffset),
+ type: InterfaceType(_coreTypes.initializedCellClass, nonNullable),
+ isFinal: true)
+ ..fileOffset = fileOffset;
+ return _addToCurrentScope(variable, cell);
}
- VariableDeclaration _variableCell(VariableDeclaration variable) {
- assert(_shouldLowerVariable(variable));
- return variable.initializer == null
- ? _uninitializedVariableCell(variable)
- : _initializedVariableCell(variable);
- }
-
- VariableGet _variableCellAccess(
- VariableDeclaration variable, int fileOffset) =>
- VariableGet(_variableCell(variable))..fileOffset = fileOffset;
-
TreeNode transformVariableDeclaration(
- VariableDeclaration node, Member contextMember) {
+ VariableDeclaration variable, Member contextMember) {
_contextMember = contextMember;
- if (!_shouldLowerVariable(node)) return node;
+ if (!_shouldLowerVariable(variable)) return variable;
// A [VariableDeclaration] being used as a statement must be a direct child
// of a [Block].
- if (node.parent is! Block) return node;
+ if (variable.parent is! Block) return variable;
- return _variableCell(node);
+ return _variableCell(variable);
+ }
+
+ VariableGet _variableCellAccess(
+ VariableDeclaration variable, int fileOffset) {
+ assert(_shouldLowerVariable(variable));
+ return VariableGet(_variableCell(variable))..fileOffset = fileOffset;
}
TreeNode transformVariableGet(VariableGet node, Member contextMember) {
@@ -191,12 +253,13 @@
assert(_shouldLowerField(field));
return _fieldCells.putIfAbsent(field, () {
int fileOffset = field.fileOffset;
+ Name name = field.name;
field.getterReference.canonicalName?.unbind();
field.setterReference?.canonicalName?.unbind();
- return Field.immutable(field.name,
- type: InterfaceType(
- _coreTypes.cellClass, field.enclosingLibrary.nonNullable),
- initializer: _callCellConstructor(fileOffset),
+ return Field.immutable(name,
+ type: InterfaceType(_coreTypes.cellClass, nonNullable),
+ initializer: _callCellConstructor(
+ _nameLiteral(name.text, fileOffset), fileOffset),
isFinal: true,
isStatic: true,
fileUri: field.fileUri)
@@ -208,12 +271,12 @@
StaticGet _fieldCellAccess(Field field, int fileOffset) =>
StaticGet(_fieldCell(field))..fileOffset = fileOffset;
- TreeNode transformField(Field node, Member contextMember) {
+ TreeNode transformField(Field field, Member contextMember) {
_contextMember = contextMember;
- if (!_shouldLowerField(node)) return node;
+ if (!_shouldLowerField(field)) return field;
- return _fieldCell(node);
+ return _fieldCell(field);
}
TreeNode transformStaticGet(StaticGet node, Member contextMember) {
diff --git a/pkg/compiler/lib/src/kernel/transformations/lowering.dart b/pkg/compiler/lib/src/kernel/transformations/lowering.dart
index 3885486..f8726e9 100644
--- a/pkg/compiler/lib/src/kernel/transformations/lowering.dart
+++ b/pkg/compiler/lib/src/kernel/transformations/lowering.dart
@@ -14,8 +14,11 @@
/// Each transformation is applied locally to AST nodes of certain types after
/// transforming children nodes.
void transformLibraries(
- List<Library> libraries, CoreTypes coreTypes, ClassHierarchy hierarchy) {
- final transformer = _Lowering(coreTypes, hierarchy);
+ List<Library> libraries, CoreTypes coreTypes, ClassHierarchy hierarchy,
+ {bool omitLateNames}) {
+ assert(omitLateNames != null);
+ final transformer =
+ _Lowering(coreTypes, hierarchy, omitLateNames: omitLateNames);
libraries.forEach(transformer.visitLibrary);
// Do a second pass to remove/replace now-unused nodes.
@@ -31,9 +34,10 @@
Member _currentMember;
- _Lowering(CoreTypes coreTypes, ClassHierarchy hierarchy)
- : factorySpecializer = FactorySpecializer(coreTypes, hierarchy),
- _lateLowering = LateLowering(coreTypes);
+ _Lowering(CoreTypes coreTypes, ClassHierarchy hierarchy, {bool omitLateNames})
+ : assert(omitLateNames != null),
+ factorySpecializer = FactorySpecializer(coreTypes, hierarchy),
+ _lateLowering = LateLowering(coreTypes, omitLateNames: omitLateNames);
void transformAdditionalExports(Library node) {
_lateLowering.transformAdditionalExports(node);
@@ -52,6 +56,14 @@
}
@override
+ TreeNode visitFunctionNode(FunctionNode node) {
+ _lateLowering.enterFunction();
+ node.transformChildren(this);
+ _lateLowering.exitFunction();
+ return node;
+ }
+
+ @override
TreeNode visitVariableDeclaration(VariableDeclaration node) {
node.transformChildren(this);
return _lateLowering.transformVariableDeclaration(node, _currentMember);
@@ -71,6 +83,7 @@
@override
TreeNode visitField(Field node) {
+ _currentMember = node;
node.transformChildren(this);
return _lateLowering.transformField(node, _currentMember);
}
diff --git a/pkg/compiler/lib/src/options.dart b/pkg/compiler/lib/src/options.dart
index f3b99c9..a37a9c8 100644
--- a/pkg/compiler/lib/src/options.dart
+++ b/pkg/compiler/lib/src/options.dart
@@ -248,6 +248,14 @@
/// which case [_disableMinification] wins.
bool _disableMinification = false;
+ /// Whether to omit names of late variables from error messages.
+ bool omitLateNames = false;
+
+ /// Flag to turn off `omitLateNames` even if enabled elsewhere, e.g. via
+ /// `-O2`. Both [omitLateNames] and [_noOmitLateNames] can be true, in which
+ /// case [_noOmitLateNames] wins.
+ bool _noOmitLateNames = false;
+
/// Whether to model which native classes are live based on annotations on the
/// core libraries. If false, all native classes will be included by default.
bool enableNativeLiveTypeAnalysis = true;
@@ -490,6 +498,8 @@
_extractStringOption(options, '${Flags.dumpSsa}=', null)
..enableMinification = _hasOption(options, Flags.minify)
.._disableMinification = _hasOption(options, Flags.noMinify)
+ ..omitLateNames = _hasOption(options, Flags.omitLateNames)
+ .._noOmitLateNames = _hasOption(options, Flags.noOmitLateNames)
..enableNativeLiveTypeAnalysis =
!_hasOption(options, Flags.disableNativeLiveTypeAnalysis)
..enableUserAssertions = _hasOption(options, Flags.enableCheckedMode) ||
@@ -623,6 +633,7 @@
if (optimizationLevel >= 2) {
enableMinification = true;
laxRuntimeTypeToString = true;
+ omitLateNames = true;
}
if (optimizationLevel >= 3) {
omitImplicitChecks = true;
@@ -658,6 +669,10 @@
enableMinification = false;
}
+ if (_noOmitLateNames) {
+ omitLateNames = false;
+ }
+
if (_noNativeNullAssertions || nullSafetyMode != NullSafetyMode.sound) {
nativeNullAssertions = false;
}
diff --git a/pkg/compiler/test/codegen/model_test.dart b/pkg/compiler/test/codegen/model_test.dart
index 6748f8b..f7a1537 100644
--- a/pkg/compiler/test/codegen/model_test.dart
+++ b/pkg/compiler/test/codegen/model_test.dart
@@ -17,7 +17,6 @@
import 'package:compiler/src/js_emitter/model.dart';
import 'package:compiler/src/js_model/element_map.dart';
import 'package:compiler/src/js_model/js_world.dart';
-import 'package:js_ast/js_ast.dart' as js;
import 'package:kernel/ast.dart' as ir;
import '../equivalence/id_equivalence.dart';
import '../equivalence/id_equivalence_helper.dart';
diff --git a/pkg/dartdev/lib/src/templates/common.dart b/pkg/dartdev/lib/src/templates/common.dart
index 37e4bdc..2aac572 100644
--- a/pkg/dartdev/lib/src/templates/common.dart
+++ b/pkg/dartdev/lib/src/templates/common.dart
@@ -14,13 +14,18 @@
final String analysisOptions = '''
# This file configures the static analysis results for your project (errors,
# warnings, and lints).
+#
+# This enables the 'recommended' set of lints from `package:lints`.
+# This set helps identify many issues that may lead to problems when running
+# or consuming Dart code, and enforces writing Dart using a single, idiomatic
+# style and format.
+#
+# If you want a smaller set of lints you can change this to specify
+# 'package:lints/core.yaml'. These are just the most critical lints
+# (the recommended set includes the core lints).
+# The core lints are also what is used by pub.dev for scoring packages.
-# The following line activates a set of core lints for Dart apps; this is the
-# set that is used by pub.dev for scoring packages. For many projects, consider
-# changing this to specify 'package:lints/recommended.yaml'; that's an
-# additional set of lints designed to encourage good coding practices.
-
-include: package:lints/core.yaml
+include: package:lints/recommended.yaml
# Uncomment the following section to specify additional rules.
diff --git a/pkg/dartdev/test/commands/run_test.dart b/pkg/dartdev/test/commands/run_test.dart
index 58a4d56..f10f092 100644
--- a/pkg/dartdev/test/commands/run_test.dart
+++ b/pkg/dartdev/test/commands/run_test.dart
@@ -81,7 +81,7 @@
p.file('main.dart', 'void main(args) { print(args); }');
ProcessResult result = p.runSync([
'run',
- '--enable-experiment=triple-shift',
+ '--enable-experiment=test-experiment',
'main.dart',
'argument1',
'argument2',
@@ -133,7 +133,7 @@
final name = path.join(p.dirPath, 'main.dart');
final result = p.runSync([
'run',
- '--enable-experiment=triple-shift',
+ '--enable-experiment=test-experiment',
name,
'--argument1',
'argument2',
diff --git a/pkg/expect/lib/expect.dart b/pkg/expect/lib/expect.dart
index 59b0c0d..1b1a534 100644
--- a/pkg/expect/lib/expect.dart
+++ b/pkg/expect/lib/expect.dart
@@ -712,14 +712,14 @@
/// because the types appear to be unrelated.
static void _subtypeAtRuntime<Sub, Super>() {
if (<Sub>[] is! List<Super>) {
- fail("$Sub is not a subtype of $Super");
+ _fail("Expect.subtype<$Sub, $Super>: $Sub is not a subtype of $Super");
}
}
/// Checks that `Sub` is not a subtype of `Super` at run time.
static void notSubtype<Sub, Super>() {
if (<Sub>[] is List<Super>) {
- fail("$Sub is a subtype of $Super");
+ _fail("Expect.notSubtype<$Sub, $Super>: $Sub is a subtype of $Super");
}
}
@@ -727,7 +727,7 @@
(reason.isEmpty) ? "" : ", '$reason'";
@alwaysThrows
- static void _fail(String message) {
+ static Never _fail(String message) {
throw new ExpectException(message);
}
}
diff --git a/pkg/front_end/lib/src/api_prototype/experimental_flags_generated.dart b/pkg/front_end/lib/src/api_prototype/experimental_flags_generated.dart
index 71f0bd6..65286ee 100644
--- a/pkg/front_end/lib/src/api_prototype/experimental_flags_generated.dart
+++ b/pkg/front_end/lib/src/api_prototype/experimental_flags_generated.dart
@@ -22,6 +22,7 @@
nonfunctionTypeAliases,
setLiterals,
spreadCollections,
+ testExperiment,
tripleShift,
valueClass,
variance,
@@ -40,6 +41,7 @@
const Version enableNonfunctionTypeAliasesVersion = const Version(2, 13);
const Version enableSetLiteralsVersion = const Version(2, 0);
const Version enableSpreadCollectionsVersion = const Version(2, 0);
+const Version enableTestExperimentVersion = const Version(2, 14);
const Version enableTripleShiftVersion = const Version(2, 14);
const Version enableValueClassVersion = const Version(2, 14);
const Version enableVarianceVersion = const Version(2, 14);
@@ -70,6 +72,8 @@
return ExperimentalFlag.setLiterals;
case "spread-collections":
return ExperimentalFlag.spreadCollections;
+ case "test-experiment":
+ return ExperimentalFlag.testExperiment;
case "triple-shift":
return ExperimentalFlag.tripleShift;
case "value-class":
@@ -93,6 +97,7 @@
ExperimentalFlag.nonfunctionTypeAliases: true,
ExperimentalFlag.setLiterals: true,
ExperimentalFlag.spreadCollections: true,
+ ExperimentalFlag.testExperiment: false,
ExperimentalFlag.tripleShift: true,
ExperimentalFlag.valueClass: false,
ExperimentalFlag.variance: false,
@@ -111,6 +116,7 @@
ExperimentalFlag.nonfunctionTypeAliases: false,
ExperimentalFlag.setLiterals: true,
ExperimentalFlag.spreadCollections: true,
+ ExperimentalFlag.testExperiment: false,
ExperimentalFlag.tripleShift: false,
ExperimentalFlag.valueClass: false,
ExperimentalFlag.variance: false,
@@ -129,6 +135,7 @@
ExperimentalFlag.nonfunctionTypeAliases: const Version(2, 13),
ExperimentalFlag.setLiterals: const Version(2, 0),
ExperimentalFlag.spreadCollections: const Version(2, 0),
+ ExperimentalFlag.testExperiment: const Version(2, 14),
ExperimentalFlag.tripleShift: const Version(2, 14),
ExperimentalFlag.valueClass: const Version(2, 14),
ExperimentalFlag.variance: const Version(2, 14),
@@ -147,194 +154,195 @@
ExperimentalFlag.nonfunctionTypeAliases: const Version(2, 13),
ExperimentalFlag.setLiterals: const Version(2, 0),
ExperimentalFlag.spreadCollections: const Version(2, 0),
+ ExperimentalFlag.testExperiment: const Version(2, 14),
ExperimentalFlag.tripleShift: const Version(2, 14),
ExperimentalFlag.valueClass: const Version(2, 14),
ExperimentalFlag.variance: const Version(2, 14),
};
const AllowedExperimentalFlags defaultAllowedExperimentalFlags =
- const AllowedExperimentalFlags(sdkDefaultExperiments: {
- ExperimentalFlag.nonNullable,
- ExperimentalFlag.tripleShift,
-}, sdkLibraryExperiments: {}, packageExperiments: {
- "async": {
- ExperimentalFlag.nonNullable,
- },
- "boolean_selector": {
- ExperimentalFlag.nonNullable,
- },
- "characters": {
- ExperimentalFlag.nonNullable,
- },
- "charcode": {
- ExperimentalFlag.nonNullable,
- },
- "clock": {
- ExperimentalFlag.nonNullable,
- },
- "collection": {
- ExperimentalFlag.nonNullable,
- },
- "connectivity": {
- ExperimentalFlag.nonNullable,
- },
- "connectivity_platform_interface": {
- ExperimentalFlag.nonNullable,
- },
- "convert": {
- ExperimentalFlag.nonNullable,
- },
- "crypto": {
- ExperimentalFlag.nonNullable,
- },
- "csslib": {
- ExperimentalFlag.nonNullable,
- },
- "dart_internal": {
- ExperimentalFlag.nonNullable,
- },
- "device_info": {
- ExperimentalFlag.nonNullable,
- },
- "device_info_platform_interface": {
- ExperimentalFlag.nonNullable,
- },
- "fake_async": {
- ExperimentalFlag.nonNullable,
- },
- "file": {
- ExperimentalFlag.nonNullable,
- },
- "fixnum": {
- ExperimentalFlag.nonNullable,
- },
- "flutter": {
- ExperimentalFlag.nonNullable,
- },
- "flutter_driver": {
- ExperimentalFlag.nonNullable,
- },
- "flutter_test": {
- ExperimentalFlag.nonNullable,
- },
- "flutter_goldens": {
- ExperimentalFlag.nonNullable,
- },
- "flutter_goldens_client": {
- ExperimentalFlag.nonNullable,
- },
- "http": {
- ExperimentalFlag.nonNullable,
- },
- "http_parser": {
- ExperimentalFlag.nonNullable,
- },
- "intl": {
- ExperimentalFlag.nonNullable,
- },
- "js": {
- ExperimentalFlag.nonNullable,
- },
- "logging": {
- ExperimentalFlag.nonNullable,
- },
- "matcher": {
- ExperimentalFlag.nonNullable,
- },
- "meta": {
- ExperimentalFlag.nonNullable,
- },
- "native_stack_traces": {
- ExperimentalFlag.nonNullable,
- },
- "observatory": {
- ExperimentalFlag.nonNullable,
- },
- "observatory_test_package": {
- ExperimentalFlag.nonNullable,
- },
- "path": {
- ExperimentalFlag.nonNullable,
- },
- "pedantic": {
- ExperimentalFlag.nonNullable,
- },
- "platform": {
- ExperimentalFlag.nonNullable,
- },
- "plugin_platform_interface": {
- ExperimentalFlag.nonNullable,
- },
- "pool": {
- ExperimentalFlag.nonNullable,
- },
- "process": {
- ExperimentalFlag.nonNullable,
- },
- "pub_semver": {
- ExperimentalFlag.nonNullable,
- },
- "sky_engine": {
- ExperimentalFlag.nonNullable,
- },
- "source_maps": {
- ExperimentalFlag.nonNullable,
- },
- "source_map_stack_trace": {
- ExperimentalFlag.nonNullable,
- },
- "source_span": {
- ExperimentalFlag.nonNullable,
- },
- "stack_trace": {
- ExperimentalFlag.nonNullable,
- },
- "stream_channel": {
- ExperimentalFlag.nonNullable,
- },
- "string_scanner": {
- ExperimentalFlag.nonNullable,
- },
- "term_glyph": {
- ExperimentalFlag.nonNullable,
- },
- "test": {
- ExperimentalFlag.nonNullable,
- },
- "test_api": {
- ExperimentalFlag.nonNullable,
- },
- "test_core": {
- ExperimentalFlag.nonNullable,
- },
- "typed_data": {
- ExperimentalFlag.nonNullable,
- },
- "url_launcher": {
- ExperimentalFlag.nonNullable,
- },
- "url_launcher_linux": {
- ExperimentalFlag.nonNullable,
- },
- "url_launcher_macos": {
- ExperimentalFlag.nonNullable,
- },
- "url_launcher_platform_interface": {
- ExperimentalFlag.nonNullable,
- },
- "url_launcher_windows": {
- ExperimentalFlag.nonNullable,
- },
- "vector_math": {
- ExperimentalFlag.nonNullable,
- },
- "video_player": {
- ExperimentalFlag.nonNullable,
- },
- "video_player_platform_interface": {
- ExperimentalFlag.nonNullable,
- },
- "video_player_web": {
- ExperimentalFlag.nonNullable,
- },
-});
+ const AllowedExperimentalFlags(
+ sdkDefaultExperiments: {},
+ sdkLibraryExperiments: {},
+ packageExperiments: {
+ "async": {
+ ExperimentalFlag.nonNullable,
+ },
+ "boolean_selector": {
+ ExperimentalFlag.nonNullable,
+ },
+ "characters": {
+ ExperimentalFlag.nonNullable,
+ },
+ "charcode": {
+ ExperimentalFlag.nonNullable,
+ },
+ "clock": {
+ ExperimentalFlag.nonNullable,
+ },
+ "collection": {
+ ExperimentalFlag.nonNullable,
+ },
+ "connectivity": {
+ ExperimentalFlag.nonNullable,
+ },
+ "connectivity_platform_interface": {
+ ExperimentalFlag.nonNullable,
+ },
+ "convert": {
+ ExperimentalFlag.nonNullable,
+ },
+ "crypto": {
+ ExperimentalFlag.nonNullable,
+ },
+ "csslib": {
+ ExperimentalFlag.nonNullable,
+ },
+ "dart_internal": {
+ ExperimentalFlag.nonNullable,
+ },
+ "device_info": {
+ ExperimentalFlag.nonNullable,
+ },
+ "device_info_platform_interface": {
+ ExperimentalFlag.nonNullable,
+ },
+ "fake_async": {
+ ExperimentalFlag.nonNullable,
+ },
+ "file": {
+ ExperimentalFlag.nonNullable,
+ },
+ "fixnum": {
+ ExperimentalFlag.nonNullable,
+ },
+ "flutter": {
+ ExperimentalFlag.nonNullable,
+ },
+ "flutter_driver": {
+ ExperimentalFlag.nonNullable,
+ },
+ "flutter_test": {
+ ExperimentalFlag.nonNullable,
+ },
+ "flutter_goldens": {
+ ExperimentalFlag.nonNullable,
+ },
+ "flutter_goldens_client": {
+ ExperimentalFlag.nonNullable,
+ },
+ "http": {
+ ExperimentalFlag.nonNullable,
+ },
+ "http_parser": {
+ ExperimentalFlag.nonNullable,
+ },
+ "intl": {
+ ExperimentalFlag.nonNullable,
+ },
+ "js": {
+ ExperimentalFlag.nonNullable,
+ },
+ "logging": {
+ ExperimentalFlag.nonNullable,
+ },
+ "matcher": {
+ ExperimentalFlag.nonNullable,
+ },
+ "meta": {
+ ExperimentalFlag.nonNullable,
+ },
+ "native_stack_traces": {
+ ExperimentalFlag.nonNullable,
+ },
+ "observatory": {
+ ExperimentalFlag.nonNullable,
+ },
+ "observatory_test_package": {
+ ExperimentalFlag.nonNullable,
+ },
+ "path": {
+ ExperimentalFlag.nonNullable,
+ },
+ "pedantic": {
+ ExperimentalFlag.nonNullable,
+ },
+ "platform": {
+ ExperimentalFlag.nonNullable,
+ },
+ "plugin_platform_interface": {
+ ExperimentalFlag.nonNullable,
+ },
+ "pool": {
+ ExperimentalFlag.nonNullable,
+ },
+ "process": {
+ ExperimentalFlag.nonNullable,
+ },
+ "pub_semver": {
+ ExperimentalFlag.nonNullable,
+ },
+ "sky_engine": {
+ ExperimentalFlag.nonNullable,
+ },
+ "source_maps": {
+ ExperimentalFlag.nonNullable,
+ },
+ "source_map_stack_trace": {
+ ExperimentalFlag.nonNullable,
+ },
+ "source_span": {
+ ExperimentalFlag.nonNullable,
+ },
+ "stack_trace": {
+ ExperimentalFlag.nonNullable,
+ },
+ "stream_channel": {
+ ExperimentalFlag.nonNullable,
+ },
+ "string_scanner": {
+ ExperimentalFlag.nonNullable,
+ },
+ "term_glyph": {
+ ExperimentalFlag.nonNullable,
+ },
+ "test": {
+ ExperimentalFlag.nonNullable,
+ },
+ "test_api": {
+ ExperimentalFlag.nonNullable,
+ },
+ "test_core": {
+ ExperimentalFlag.nonNullable,
+ },
+ "typed_data": {
+ ExperimentalFlag.nonNullable,
+ },
+ "url_launcher": {
+ ExperimentalFlag.nonNullable,
+ },
+ "url_launcher_linux": {
+ ExperimentalFlag.nonNullable,
+ },
+ "url_launcher_macos": {
+ ExperimentalFlag.nonNullable,
+ },
+ "url_launcher_platform_interface": {
+ ExperimentalFlag.nonNullable,
+ },
+ "url_launcher_windows": {
+ ExperimentalFlag.nonNullable,
+ },
+ "vector_math": {
+ ExperimentalFlag.nonNullable,
+ },
+ "video_player": {
+ ExperimentalFlag.nonNullable,
+ },
+ "video_player_platform_interface": {
+ ExperimentalFlag.nonNullable,
+ },
+ "video_player_web": {
+ ExperimentalFlag.nonNullable,
+ },
+ });
diff --git a/pkg/front_end/testcases/dart2js/late_locals.dart.strong.transformed.expect b/pkg/front_end/testcases/dart2js/late_locals.dart.strong.transformed.expect
index bac60ce..f7c1b79 100644
--- a/pkg/front_end/testcases/dart2js/late_locals.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/dart2js/late_locals.dart.strong.transformed.expect
@@ -14,49 +14,49 @@
self::testNonNullableInitializedFinalLocal();
}
static method testNullableUninitializedNonFinalLocal() → void {
- final _la::_Cell x = new _la::_Cell::•();
+ final _la::_Cell x = new _la::_Cell::named("x");
x.{_la::_Cell::value} = 42;
core::print(x.{_la::_Cell::readLocal}<core::int>(){() → core::int});
}
static method testNonNullableUninitializedNonFinalLocal() → void {
- final _la::_Cell x = new _la::_Cell::•();
+ final _la::_Cell x = new _la::_Cell::named("x");
x.{_la::_Cell::value} = 42;
core::print(x.{_la::_Cell::readLocal}<core::int>(){() → core::int});
}
static method testNullableUninitializedFinalLocal() → void {
- final _la::_Cell x = new _la::_Cell::•();
+ final _la::_Cell x = new _la::_Cell::named("x");
x.{_la::_Cell::finalLocalValue} = 42;
core::print(x.{_la::_Cell::readLocal}<core::int>(){() → core::int});
}
static method testNonNullableUninitializedFinalLocal() → void {
- final _la::_Cell x = new _la::_Cell::•();
+ final _la::_Cell x = new _la::_Cell::named("x");
x.{_la::_Cell::finalLocalValue} = 42;
core::print(x.{_la::_Cell::readLocal}<core::int>(){() → core::int});
}
static method testNullableInitializedNonFinalLocal() → void {
- final _la::_InitializedCell x = new _la::_InitializedCell::•(() → core::int? => 1.{core::int::unary-}(){() → core::int});
+ final _la::_InitializedCell x = new _la::_InitializedCell::named("x", () → core::int? => 1.{core::int::unary-}(){() → core::int});
core::print(x.{_la::_InitializedCell::read}<core::int>(){() → core::int});
x.{_la::_InitializedCell::value} = 42;
core::print(x.{_la::_InitializedCell::read}<core::int>(){() → core::int});
- final _la::_InitializedCell y = new _la::_InitializedCell::•(() → core::int? => null);
+ final _la::_InitializedCell y = new _la::_InitializedCell::named("y", () → core::int? => null);
core::print(y.{_la::_InitializedCell::read}<core::int?>(){() → core::int?});
y.{_la::_InitializedCell::value} = 42;
core::print(y.{_la::_InitializedCell::read}<core::int>(){() → core::int});
}
static method testNonNullableInitializedNonFinalLocal() → void {
- final _la::_InitializedCell x = new _la::_InitializedCell::•(() → core::int => 1.{core::int::unary-}(){() → core::int});
+ final _la::_InitializedCell x = new _la::_InitializedCell::named("x", () → core::int => 1.{core::int::unary-}(){() → core::int});
core::print(x.{_la::_InitializedCell::read}<core::int>(){() → core::int});
x.{_la::_InitializedCell::value} = 42;
core::print(x.{_la::_InitializedCell::read}<core::int>(){() → core::int});
}
static method testNullableInitializedFinalLocal() → void {
- final _la::_InitializedCell x = new _la::_InitializedCell::•(() → core::int? => 1.{core::int::unary-}(){() → core::int});
+ final _la::_InitializedCell x = new _la::_InitializedCell::named("x", () → core::int? => 1.{core::int::unary-}(){() → core::int});
core::print(x.{_la::_InitializedCell::readFinal}<core::int?>(){() → core::int?});
- final _la::_InitializedCell y = new _la::_InitializedCell::•(() → core::int? => null);
+ final _la::_InitializedCell y = new _la::_InitializedCell::named("y", () → core::int? => null);
core::print(y.{_la::_InitializedCell::readFinal}<core::int?>(){() → core::int?});
}
static method testNonNullableInitializedFinalLocal() → void {
- final _la::_InitializedCell x = new _la::_InitializedCell::•(() → core::int => 1.{core::int::unary-}(){() → core::int});
+ final _la::_InitializedCell x = new _la::_InitializedCell::named("x", () → core::int => 1.{core::int::unary-}(){() → core::int});
core::print(x.{_la::_InitializedCell::readFinal}<core::int>(){() → core::int});
}
diff --git a/pkg/front_end/testcases/dart2js/late_locals.dart.weak.transformed.expect b/pkg/front_end/testcases/dart2js/late_locals.dart.weak.transformed.expect
index bac60ce..f7c1b79 100644
--- a/pkg/front_end/testcases/dart2js/late_locals.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/dart2js/late_locals.dart.weak.transformed.expect
@@ -14,49 +14,49 @@
self::testNonNullableInitializedFinalLocal();
}
static method testNullableUninitializedNonFinalLocal() → void {
- final _la::_Cell x = new _la::_Cell::•();
+ final _la::_Cell x = new _la::_Cell::named("x");
x.{_la::_Cell::value} = 42;
core::print(x.{_la::_Cell::readLocal}<core::int>(){() → core::int});
}
static method testNonNullableUninitializedNonFinalLocal() → void {
- final _la::_Cell x = new _la::_Cell::•();
+ final _la::_Cell x = new _la::_Cell::named("x");
x.{_la::_Cell::value} = 42;
core::print(x.{_la::_Cell::readLocal}<core::int>(){() → core::int});
}
static method testNullableUninitializedFinalLocal() → void {
- final _la::_Cell x = new _la::_Cell::•();
+ final _la::_Cell x = new _la::_Cell::named("x");
x.{_la::_Cell::finalLocalValue} = 42;
core::print(x.{_la::_Cell::readLocal}<core::int>(){() → core::int});
}
static method testNonNullableUninitializedFinalLocal() → void {
- final _la::_Cell x = new _la::_Cell::•();
+ final _la::_Cell x = new _la::_Cell::named("x");
x.{_la::_Cell::finalLocalValue} = 42;
core::print(x.{_la::_Cell::readLocal}<core::int>(){() → core::int});
}
static method testNullableInitializedNonFinalLocal() → void {
- final _la::_InitializedCell x = new _la::_InitializedCell::•(() → core::int? => 1.{core::int::unary-}(){() → core::int});
+ final _la::_InitializedCell x = new _la::_InitializedCell::named("x", () → core::int? => 1.{core::int::unary-}(){() → core::int});
core::print(x.{_la::_InitializedCell::read}<core::int>(){() → core::int});
x.{_la::_InitializedCell::value} = 42;
core::print(x.{_la::_InitializedCell::read}<core::int>(){() → core::int});
- final _la::_InitializedCell y = new _la::_InitializedCell::•(() → core::int? => null);
+ final _la::_InitializedCell y = new _la::_InitializedCell::named("y", () → core::int? => null);
core::print(y.{_la::_InitializedCell::read}<core::int?>(){() → core::int?});
y.{_la::_InitializedCell::value} = 42;
core::print(y.{_la::_InitializedCell::read}<core::int>(){() → core::int});
}
static method testNonNullableInitializedNonFinalLocal() → void {
- final _la::_InitializedCell x = new _la::_InitializedCell::•(() → core::int => 1.{core::int::unary-}(){() → core::int});
+ final _la::_InitializedCell x = new _la::_InitializedCell::named("x", () → core::int => 1.{core::int::unary-}(){() → core::int});
core::print(x.{_la::_InitializedCell::read}<core::int>(){() → core::int});
x.{_la::_InitializedCell::value} = 42;
core::print(x.{_la::_InitializedCell::read}<core::int>(){() → core::int});
}
static method testNullableInitializedFinalLocal() → void {
- final _la::_InitializedCell x = new _la::_InitializedCell::•(() → core::int? => 1.{core::int::unary-}(){() → core::int});
+ final _la::_InitializedCell x = new _la::_InitializedCell::named("x", () → core::int? => 1.{core::int::unary-}(){() → core::int});
core::print(x.{_la::_InitializedCell::readFinal}<core::int?>(){() → core::int?});
- final _la::_InitializedCell y = new _la::_InitializedCell::•(() → core::int? => null);
+ final _la::_InitializedCell y = new _la::_InitializedCell::named("y", () → core::int? => null);
core::print(y.{_la::_InitializedCell::readFinal}<core::int?>(){() → core::int?});
}
static method testNonNullableInitializedFinalLocal() → void {
- final _la::_InitializedCell x = new _la::_InitializedCell::•(() → core::int => 1.{core::int::unary-}(){() → core::int});
+ final _la::_InitializedCell x = new _la::_InitializedCell::named("x", () → core::int => 1.{core::int::unary-}(){() → core::int});
core::print(x.{_la::_InitializedCell::readFinal}<core::int>(){() → core::int});
}
diff --git a/pkg/front_end/testcases/dart2js/late_statics.dart.strong.transformed.expect b/pkg/front_end/testcases/dart2js/late_statics.dart.strong.transformed.expect
index 30448db..39d75e1 100644
--- a/pkg/front_end/testcases/dart2js/late_statics.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/dart2js/late_statics.dart.strong.transformed.expect
@@ -13,8 +13,8 @@
export "org-dartlang-testcase:///late_statics_lib.dart";
class Statics extends core::Object {
- static final field _la::_Cell a = new _la::_Cell::•();
- static final field _la::_Cell b = new _la::_Cell::•();
+ static final field _la::_Cell a = new _la::_Cell::named("a");
+ static final field _la::_Cell b = new _la::_Cell::named("b");
late static field core::int c = 1.{core::int::unary-}(){() → core::int};
late static final field core::int d = 1.{core::int::unary-}(){() → core::int};
synthetic constructor •() → self::Statics
@@ -73,8 +73,8 @@
import "dart:_late_helper" as _la;
import "dart:core" as core;
-static final field _la::_Cell a = new _la::_Cell::•();
-static final field _la::_Cell b = new _la::_Cell::•();
+static final field _la::_Cell a = new _la::_Cell::named("a");
+static final field _la::_Cell b = new _la::_Cell::named("b");
late static field core::int c = 1.{core::int::unary-}(){() → core::int};
late static final field core::int d = 1.{core::int::unary-}(){() → core::int};
diff --git a/pkg/front_end/testcases/dart2js/late_statics.dart.weak.transformed.expect b/pkg/front_end/testcases/dart2js/late_statics.dart.weak.transformed.expect
index 30448db..39d75e1 100644
--- a/pkg/front_end/testcases/dart2js/late_statics.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/dart2js/late_statics.dart.weak.transformed.expect
@@ -13,8 +13,8 @@
export "org-dartlang-testcase:///late_statics_lib.dart";
class Statics extends core::Object {
- static final field _la::_Cell a = new _la::_Cell::•();
- static final field _la::_Cell b = new _la::_Cell::•();
+ static final field _la::_Cell a = new _la::_Cell::named("a");
+ static final field _la::_Cell b = new _la::_Cell::named("b");
late static field core::int c = 1.{core::int::unary-}(){() → core::int};
late static final field core::int d = 1.{core::int::unary-}(){() → core::int};
synthetic constructor •() → self::Statics
@@ -73,8 +73,8 @@
import "dart:_late_helper" as _la;
import "dart:core" as core;
-static final field _la::_Cell a = new _la::_Cell::•();
-static final field _la::_Cell b = new _la::_Cell::•();
+static final field _la::_Cell a = new _la::_Cell::named("a");
+static final field _la::_Cell b = new _la::_Cell::named("b");
late static field core::int c = 1.{core::int::unary-}(){() → core::int};
late static final field core::int d = 1.{core::int::unary-}(){() → core::int};
diff --git a/pkg/front_end/testcases/general/constants/folder.options b/pkg/front_end/testcases/general/constants/folder.options
index 0cbe954..db4ac03 100644
--- a/pkg/front_end/testcases/general/constants/folder.options
+++ b/pkg/front_end/testcases/general/constants/folder.options
@@ -1,4 +1,3 @@
---enable-experiment=triple-shift
-Dbaz=42
-DbazTrue=true
-DbazFalse=false
\ No newline at end of file
diff --git a/pkg/front_end/testcases/general/constants/js_semantics/folder.options b/pkg/front_end/testcases/general/constants/js_semantics/folder.options
index 7a017fa..53ae728 100644
--- a/pkg/front_end/testcases/general/constants/js_semantics/folder.options
+++ b/pkg/front_end/testcases/general/constants/js_semantics/folder.options
@@ -1,2 +1 @@
---enable-experiment=triple-shift
--target=dart2js
\ No newline at end of file
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/folder.options b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/folder.options
index 2913882..85995ca 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/folder.options
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/folder.options
@@ -1,5 +1,4 @@
--no-defines
--target=none
--no-verify
---nnbd-agnostic
---enable-experiment=triple-shift
\ No newline at end of file
+--nnbd-agnostic
\ No newline at end of file
diff --git a/pkg/front_end/testcases/generic_metadata/folder.options b/pkg/front_end/testcases/generic_metadata/folder.options
index 2d13171..e69de29 100644
--- a/pkg/front_end/testcases/generic_metadata/folder.options
+++ b/pkg/front_end/testcases/generic_metadata/folder.options
@@ -1 +0,0 @@
---enable-experiment=generic-metadata
\ No newline at end of file
diff --git a/pkg/front_end/testcases/incremental/bad_sdk_uri.yaml.world.3.expect b/pkg/front_end/testcases/incremental/bad_sdk_uri.yaml.world.3.expect
index 69312e6..7ecccb5 100644
--- a/pkg/front_end/testcases/incremental/bad_sdk_uri.yaml.world.3.expect
+++ b/pkg/front_end/testcases/incremental/bad_sdk_uri.yaml.world.3.expect
@@ -6,7 +6,6 @@
: super #lib1::Object::•()
;
method bMethod() → void {}
- abstract member-signature operator ==(dynamic dynamic) → #lib1::bool*; -> #lib1::Object::==
}
}
library from "org-dartlang-test:///main.dart" as main {
diff --git a/pkg/front_end/testcases/incremental/dart2js_late.yaml.world.1.expect b/pkg/front_end/testcases/incremental/dart2js_late.yaml.world.1.expect
index efbafde..d186e96 100644
--- a/pkg/front_end/testcases/incremental/dart2js_late.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental/dart2js_late.yaml.world.1.expect
@@ -11,5 +11,5 @@
}
library from "org-dartlang-test:///late_statics_lib.dart" as lat2 {
- static final field _late_helper::_Cell a = new _late_helper::_Cell::•();
+ static final field _late_helper::_Cell a = new _late_helper::_Cell::named("a");
}
diff --git a/pkg/front_end/testcases/incremental/dart2js_late.yaml.world.2.expect b/pkg/front_end/testcases/incremental/dart2js_late.yaml.world.2.expect
index 5398173..e6cc8ab 100644
--- a/pkg/front_end/testcases/incremental/dart2js_late.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental/dart2js_late.yaml.world.2.expect
@@ -18,5 +18,5 @@
}
library from "org-dartlang-test:///late_statics_lib.dart" as lat2 {
- static final field _late_helper::_Cell a = new _late_helper::_Cell::•();
+ static final field _late_helper::_Cell a = new _late_helper::_Cell::named("a");
}
diff --git a/pkg/front_end/testcases/triple_shift/folder.options b/pkg/front_end/testcases/triple_shift/folder.options
index 55774c6..e69de29 100644
--- a/pkg/front_end/testcases/triple_shift/folder.options
+++ b/pkg/front_end/testcases/triple_shift/folder.options
@@ -1 +0,0 @@
---enable-experiment=triple-shift
diff --git a/pkg/kernel/lib/core_types.dart b/pkg/kernel/lib/core_types.dart
index 30c0329..d44801ec 100644
--- a/pkg/kernel/lib/core_types.dart
+++ b/pkg/kernel/lib/core_types.dart
@@ -332,12 +332,18 @@
late final Constructor cellConstructor =
index.getMember('dart:_late_helper', '_Cell', '') as Constructor;
+ late final Constructor cellNamedConstructor =
+ index.getMember('dart:_late_helper', '_Cell', 'named') as Constructor;
+
late final Class initializedCellClass =
index.getClass('dart:_late_helper', '_InitializedCell');
late final Constructor initializedCellConstructor = index.getMember(
'dart:_late_helper', '_InitializedCell', '') as Constructor;
+ late final Constructor initializedCellNamedConstructor = index.getMember(
+ 'dart:_late_helper', '_InitializedCell', 'named') as Constructor;
+
late final Procedure cellReadLocal =
index.getMember('dart:_late_helper', '_Cell', 'readLocal') as Procedure;
diff --git a/pkg/vm/lib/transformations/ffi_definitions.dart b/pkg/vm/lib/transformations/ffi_definitions.dart
index f841be3..3ac5988 100644
--- a/pkg/vm/lib/transformations/ffi_definitions.dart
+++ b/pkg/vm/lib/transformations/ffi_definitions.dart
@@ -1271,8 +1271,7 @@
unionAlignment = math.max(unionAlignment, alignment);
}
final int size = _alignOffset(unionSize, unionAlignment);
- return CompoundLayout(
- size, unionAlignment, List.filled(Abi.values.length, 0));
+ return CompoundLayout(size, unionAlignment, List.filled(types.length, 0));
}
}
diff --git a/pkg/vm_snapshot_analysis/test/instruction_sizes_test.dart b/pkg/vm_snapshot_analysis/test/instruction_sizes_test.dart
index 16b2504..faa3f50 100644
--- a/pkg/vm_snapshot_analysis/test/instruction_sizes_test.dart
+++ b/pkg/vm_snapshot_analysis/test/instruction_sizes_test.dart
@@ -821,9 +821,14 @@
'#type': 'class',
'makeSomeClosures': {
'#type': 'function',
+ // Type of returned list is more precise, as closures
+ // that returned non-K objects were removed, causing the
+ // type K* to be attributed to makeSomeClosures instead
+ // of just those inner closures that returned that type.
+ '#size': greaterThan(0),
'<anonymous closure>': {
'#type': 'function',
- '#size': lessThan(0),
+ '#size': lessThan(0), // Some inner closures removed.
},
},
},
diff --git a/runtime/bin/dfe.cc b/runtime/bin/dfe.cc
index 6935447..be5c249 100644
--- a/runtime/bin/dfe.cc
+++ b/runtime/bin/dfe.cc
@@ -281,10 +281,7 @@
}
DartUtils::ReadFile(buffer, size, script_file);
DartUtils::CloseFile(script_file);
- if (buffer == nullptr) {
- return false;
- }
- return true;
+ return *buffer != nullptr;
}
class KernelIRNode {
diff --git a/runtime/tests/concurrency/run_stress_test_shards.dart b/runtime/tests/concurrency/run_stress_test_shards.dart
new file mode 100644
index 0000000..ee16cb2
--- /dev/null
+++ b/runtime/tests/concurrency/run_stress_test_shards.dart
@@ -0,0 +1,134 @@
+// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:convert';
+import 'dart:io';
+import 'dart:io' as io;
+import 'dart:isolate';
+import 'dart:math';
+
+import 'package:args/args.dart';
+import 'package:path/path.dart' as path;
+
+import '../vm/dart/snapshot_test_helper.dart';
+
+void forwardStream(Stream<List<int>> input, IOSink output) {
+ // Print the information line-by-line.
+ input
+ .transform(utf8.decoder)
+ .transform(const LineSplitter())
+ .listen((String line) {
+ output.writeln(line);
+ });
+}
+
+Future<bool> run(String executable, List<String> args) async {
+ print('Running "$executable ${args.join(' ')}"');
+ final Process process = await Process.start(executable, args);
+ forwardStream(process.stdout, stdout);
+ forwardStream(process.stderr, stderr);
+ final int exitCode = await process.exitCode;
+ if (exitCode != 0) {
+ print('=> Running "$executable ${args.join(' ')}" failed with $exitCode');
+ io.exitCode = 255; // Make this shard fail.
+ return false;
+ }
+ return true;
+}
+
+abstract class TestRunner {
+ Future runTest();
+}
+
+class JitTestRunner extends TestRunner {
+ final String buildDir;
+ final List<String> arguments;
+
+ JitTestRunner(this.buildDir, this.arguments);
+
+ Future runTest() async {
+ await run('$buildDir/dart', arguments);
+ }
+}
+
+class AotTestRunner extends TestRunner {
+ final String buildDir;
+ final List<String> arguments;
+ final List<String> aotArguments;
+
+ AotTestRunner(this.buildDir, this.arguments, this.aotArguments);
+
+ Future runTest() async {
+ await withTempDir((String dir) async {
+ final elfFile = path.join(dir, 'app.elf');
+
+ if (await run('$buildDir/gen_snapshot',
+ ['--snapshot-kind=app-aot-elf', '--elf=$elfFile', ...arguments])) {
+ await run(
+ '$buildDir/dart_precompiled_runtime', [...aotArguments, elfFile]);
+ }
+ });
+ }
+}
+
+final configurations = <TestRunner>[
+ JitTestRunner('out/DebugX64', [
+ '--disable-dart-dev',
+ '--no-sound-null-safety',
+ '--enable-isolate-groups',
+ '--experimental-enable-isolate-groups-jit',
+ 'runtime/tests/concurrency/generated_stress_test.dart.jit.dill',
+ ]),
+ JitTestRunner('out/ReleaseX64', [
+ '--disable-dart-dev',
+ '--no-sound-null-safety',
+ '--enable-isolate-groups',
+ '--experimental-enable-isolate-groups-jit',
+ '--no-inline-alloc',
+ '--use-slow-path',
+ '--deoptimize-on-runtime-call-every=3',
+ 'runtime/tests/concurrency/generated_stress_test.dart.jit.dill',
+ ]),
+ JitTestRunner('out/ReleaseTSANX64', [
+ '--disable-dart-dev',
+ '--no-sound-null-safety',
+ '--enable-isolate-groups',
+ '--experimental-enable-isolate-groups-jit',
+ 'runtime/tests/concurrency/generated_stress_test.dart.jit.dill',
+ ]),
+ AotTestRunner('out/ReleaseX64', [
+ '--no-sound-null-safety',
+ 'runtime/tests/concurrency/generated_stress_test.dart.aot.dill',
+ ], [
+ '--no-sound-null-safety',
+ '--enable-isolate-groups',
+ ]),
+ AotTestRunner('out/DebugX64', [
+ '--no-sound-null-safety',
+ 'runtime/tests/concurrency/generated_stress_test.dart.aot.dill',
+ ], [
+ '--no-sound-null-safety',
+ '--enable-isolate-groups',
+ ]),
+];
+
+main(List<String> arguments) async {
+ final parser = ArgParser()
+ ..addOption('shards', help: 'number of shards used', defaultsTo: '1')
+ ..addOption('shard', help: 'shard id', defaultsTo: '1');
+
+ final options = parser.parse(arguments);
+ final shards = int.parse(options['shards']);
+ final shard = int.parse(options['shard']) - 1;
+
+ final thisShardsConfigurations = [];
+ for (int i = 0; i < configurations.length; i++) {
+ if ((i % shards) == shard) {
+ thisShardsConfigurations.add(configurations[i]);
+ }
+ }
+ for (final config in thisShardsConfigurations) {
+ await config.runTest();
+ }
+}
diff --git a/runtime/tests/concurrency/stress_test_list.json b/runtime/tests/concurrency/stress_test_list.json
index cfafa24..170afa2 100644
--- a/runtime/tests/concurrency/stress_test_list.json
+++ b/runtime/tests/concurrency/stress_test_list.json
@@ -1967,67 +1967,11 @@
"../../../tests/language/null/null2_test.dart",
"../../../tests/language/null/to_string2_test.dart",
"../../../tests/language/null/to_string_test.dart",
- "../../../tests/language/null_aware/access_runtime_1_test.dart",
- "../../../tests/language/null_aware/access_runtime_2_test.dart",
- "../../../tests/language/null_aware/access_runtime_3_test.dart",
- "../../../tests/language/null_aware/access_runtime_4_test.dart",
- "../../../tests/language/null_aware/access_runtime_5_test.dart",
- "../../../tests/language/null_aware/access_runtime_6_test.dart",
- "../../../tests/language/null_aware/access_runtime_7_test.dart",
"../../../tests/language/null_aware/access_runtime_test.dart",
- "../../../tests/language/null_aware/assignment_runtime_10_test.dart",
- "../../../tests/language/null_aware/assignment_runtime_11_test.dart",
- "../../../tests/language/null_aware/assignment_runtime_12_test.dart",
- "../../../tests/language/null_aware/assignment_runtime_13_test.dart",
- "../../../tests/language/null_aware/assignment_runtime_1_test.dart",
- "../../../tests/language/null_aware/assignment_runtime_2_test.dart",
- "../../../tests/language/null_aware/assignment_runtime_3_test.dart",
- "../../../tests/language/null_aware/assignment_runtime_4_test.dart",
- "../../../tests/language/null_aware/assignment_runtime_5_test.dart",
- "../../../tests/language/null_aware/assignment_runtime_6_test.dart",
- "../../../tests/language/null_aware/assignment_runtime_7_test.dart",
- "../../../tests/language/null_aware/assignment_runtime_8_test.dart",
- "../../../tests/language/null_aware/assignment_runtime_9_test.dart",
"../../../tests/language/null_aware/assignment_runtime_test.dart",
"../../../tests/language/null_aware/dynamic_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_10_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_11_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_12_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_13_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_14_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_15_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_16_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_17_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_18_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_19_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_1_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_20_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_21_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_22_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_23_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_24_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_25_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_26_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_27_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_28_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_2_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_3_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_4_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_5_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_6_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_7_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_8_test.dart",
- "../../../tests/language/null_aware/increment_decrement_runtime_9_test.dart",
"../../../tests/language/null_aware/increment_decrement_runtime_test.dart",
"../../../tests/language/null_aware/index_this_null_aware_equals_test.dart",
- "../../../tests/language/null_aware/invocation_runtime_1_test.dart",
- "../../../tests/language/null_aware/invocation_runtime_2_test.dart",
- "../../../tests/language/null_aware/invocation_runtime_3_test.dart",
- "../../../tests/language/null_aware/invocation_runtime_4_test.dart",
- "../../../tests/language/null_aware/invocation_runtime_5_test.dart",
- "../../../tests/language/null_aware/invocation_runtime_6_test.dart",
- "../../../tests/language/null_aware/invocation_runtime_7_test.dart",
- "../../../tests/language/null_aware/invocation_runtime_8_test.dart",
"../../../tests/language/null_aware/invocation_runtime_test.dart",
"../../../tests/language/null_aware/null_shortening_test.dart",
"../../../tests/language/null_aware/opt_test.dart",
diff --git a/runtime/tests/vm/dart/unsigned_shift_right_test.dart b/runtime/tests/vm/dart/unsigned_shift_right_test.dart
index 41c18f9..24195d6 100644
--- a/runtime/tests/vm/dart/unsigned_shift_right_test.dart
+++ b/runtime/tests/vm/dart/unsigned_shift_right_test.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=triple-shift
// VMOptions=--deterministic --optimization_counter_threshold=50
// VMOptions=--no-intrinsify
diff --git a/runtime/tests/vm/dart_2/unsigned_shift_right_test.dart b/runtime/tests/vm/dart_2/unsigned_shift_right_test.dart
index 41c18f9..24195d6 100644
--- a/runtime/tests/vm/dart_2/unsigned_shift_right_test.dart
+++ b/runtime/tests/vm/dart_2/unsigned_shift_right_test.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=triple-shift
// VMOptions=--deterministic --optimization_counter_threshold=50
// VMOptions=--no-intrinsify
diff --git a/runtime/vm/compiler/assembler/assembler_arm64.cc b/runtime/vm/compiler/assembler/assembler_arm64.cc
index 7ef550b..9d61143 100644
--- a/runtime/vm/compiler/assembler/assembler_arm64.cc
+++ b/runtime/vm/compiler/assembler/assembler_arm64.cc
@@ -927,7 +927,7 @@
ldr(dest, slot);
#else
ldr(dest, slot, kUnsignedFourBytes); // Zero-extension.
- add(dest, dest, Operand(HEAP_BASE));
+ add(dest, dest, Operand(HEAP_BITS, LSL, 32));
#endif
}
@@ -1054,7 +1054,7 @@
kUnsignedByte);
and_(TMP, TMP2,
Operand(TMP, LSR, target::UntaggedObject::kBarrierOverlapShift));
- tst(TMP, Operand(BARRIER_MASK));
+ tst(TMP, Operand(HEAP_BITS, LSR, 32));
b(&done, ZERO);
if (spill_lr) {
@@ -1122,7 +1122,7 @@
kUnsignedByte);
and_(TMP, TMP2,
Operand(TMP, LSR, target::UntaggedObject::kBarrierOverlapShift));
- tst(TMP, Operand(BARRIER_MASK));
+ tst(TMP, Operand(HEAP_BITS, LSR, 32));
b(&done, ZERO);
if (spill_lr) {
SPILLS_LR_TO_FRAME(Push(LR));
@@ -1374,11 +1374,13 @@
}
void Assembler::RestorePinnedRegisters() {
- ldr(BARRIER_MASK,
+ ldr(HEAP_BITS,
compiler::Address(THR, target::Thread::write_barrier_mask_offset()));
+ LslImmediate(HEAP_BITS, HEAP_BITS, 32);
ldr(NULL_REG, compiler::Address(THR, target::Thread::object_null_offset()));
#if defined(DART_COMPRESSED_POINTERS)
- ldr(HEAP_BASE, compiler::Address(THR, target::Thread::heap_base_offset()));
+ ldr(TMP, compiler::Address(THR, target::Thread::heap_base_offset()));
+ orr(HEAP_BITS, HEAP_BITS, Operand(TMP, LSR, 32));
#endif
}
diff --git a/runtime/vm/compiler/assembler/assembler_arm64_test.cc b/runtime/vm/compiler/assembler/assembler_arm64_test.cc
index 4451d4f..53d2adf 100644
--- a/runtime/vm/compiler/assembler/assembler_arm64_test.cc
+++ b/runtime/vm/compiler/assembler/assembler_arm64_test.cc
@@ -2597,23 +2597,19 @@
__ EnterFrame(0);
__ Push(CODE_REG);
__ Push(THR);
- __ Push(BARRIER_MASK);
+ __ Push(HEAP_BITS);
__ Push(NULL_REG);
- __ Push(HEAP_BASE);
__ TagAndPushPP();
__ ldr(CODE_REG, Address(R0, VMHandles::kOffsetOfRawPtrInHandle));
__ mov(THR, R1);
- __ ldr(BARRIER_MASK, Address(THR, Thread::write_barrier_mask_offset()));
- __ ldr(NULL_REG, Address(THR, Thread::object_null_offset()));
- __ ldr(HEAP_BASE, Address(THR, Thread::heap_base_offset()));
+ __ RestorePinnedRegisters();
__ LoadPoolPointer(PP);
}
static void LeaveTestFrame(Assembler* assembler) {
__ PopAndUntagPP();
- __ Pop(HEAP_BASE);
__ Pop(NULL_REG);
- __ Pop(BARRIER_MASK);
+ __ Pop(HEAP_BITS);
__ Pop(THR);
__ Pop(CODE_REG);
__ LeaveFrame();
@@ -4736,14 +4732,15 @@
__ SetupDartSP();
__ Push(CODE_REG);
__ Push(THR);
- __ Push(BARRIER_MASK);
+ __ Push(HEAP_BITS);
SPILLS_LR_TO_FRAME(__ Push(LR));
__ mov(THR, R2);
- __ ldr(BARRIER_MASK, Address(THR, Thread::write_barrier_mask_offset()));
+ __ ldr(HEAP_BITS, Address(THR, Thread::write_barrier_mask_offset()));
+ __ LslImmediate(HEAP_BITS, HEAP_BITS, 32);
__ StoreIntoObject(R1, FieldAddress(R1, GrowableObjectArray::data_offset()),
R0);
RESTORES_LR_FROM_FRAME(__ Pop(LR));
- __ Pop(BARRIER_MASK);
+ __ Pop(HEAP_BITS);
__ Pop(THR);
__ Pop(CODE_REG);
__ RestoreCSP();
diff --git a/runtime/vm/compiler/assembler/assembler_x64.h b/runtime/vm/compiler/assembler/assembler_x64.h
index 4bc8495..81ed419 100644
--- a/runtime/vm/compiler/assembler/assembler_x64.h
+++ b/runtime/vm/compiler/assembler/assembler_x64.h
@@ -895,6 +895,12 @@
void SmiTag(Register reg) { OBJ(add)(reg, reg); }
void SmiUntag(Register reg) { OBJ(sar)(reg, Immediate(kSmiTagSize)); }
+ void SmiUntag(Register dst, Register src) {
+ if (dst != src) {
+ OBJ(mov)(dst, src);
+ }
+ OBJ(sar)(dst, Immediate(kSmiTagSize));
+ }
void SmiUntagAndSignExtend(Register reg) {
#if !defined(DART_COMPRESSED_POINTERS)
@@ -903,11 +909,23 @@
// This is shorter than
// shlq reg, 32
// sraq reg, 33
- sarl(reg, Immediate(1));
+ sarl(reg, Immediate(kSmiTagSize));
movsxd(reg, reg);
#endif
}
+ void SmiUntagAndSignExtend(Register dst, Register src) {
+#if !defined(DART_COMPRESSED_POINTERS)
+ if (dst != src) {
+ movq(dst, src);
+ }
+ sarq(dst, Immediate(kSmiTagSize));
+#else
+ movsxd(dst, src);
+ sarq(dst, Immediate(kSmiTagSize));
+#endif
+ }
+
void BranchIfNotSmi(Register reg,
Label* label,
JumpDistance distance = kFarJump) {
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler.h b/runtime/vm/compiler/backend/flow_graph_compiler.h
index d209dc0..fd45478 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler.h
+++ b/runtime/vm/compiler/backend/flow_graph_compiler.h
@@ -632,12 +632,6 @@
intptr_t sub_type_cache_index);
#endif
- void GenerateRuntimeCall(const InstructionSource& source,
- intptr_t deopt_id,
- const RuntimeEntry& entry,
- intptr_t argument_count,
- LocationSummary* locs);
-
void GenerateStubCall(const InstructionSource& source,
const Code& stub,
UntaggedPcDescriptors::Kind kind,
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc b/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
index ddcfc7a..ab13d29 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_arm.cc
@@ -465,15 +465,6 @@
}
}
-void FlowGraphCompiler::GenerateRuntimeCall(const InstructionSource& source,
- intptr_t deopt_id,
- const RuntimeEntry& entry,
- intptr_t argument_count,
- LocationSummary* locs) {
- __ CallRuntime(entry, argument_count);
- EmitCallsiteMetadata(source, deopt_id, UntaggedPcDescriptors::kOther, locs);
-}
-
void FlowGraphCompiler::EmitEdgeCounter(intptr_t edge_id) {
// We do not check for overflow when incrementing the edge counter. The
// function should normally be optimized long before the counter can
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc b/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
index 888f4f1..71b11eb 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_arm64.cc
@@ -458,15 +458,6 @@
}
}
-void FlowGraphCompiler::GenerateRuntimeCall(const InstructionSource& source,
- intptr_t deopt_id,
- const RuntimeEntry& entry,
- intptr_t argument_count,
- LocationSummary* locs) {
- __ CallRuntime(entry, argument_count);
- EmitCallsiteMetadata(source, deopt_id, UntaggedPcDescriptors::kOther, locs);
-}
-
void FlowGraphCompiler::EmitEdgeCounter(intptr_t edge_id) {
// We do not check for overflow when incrementing the edge counter. The
// function should normally be optimized long before the counter can
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc b/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc
index a506536..1a06f0a 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_ia32.cc
@@ -500,15 +500,6 @@
AddStaticCallTarget(target, entry_kind);
}
-void FlowGraphCompiler::GenerateRuntimeCall(const InstructionSource& source,
- intptr_t deopt_id,
- const RuntimeEntry& entry,
- intptr_t argument_count,
- LocationSummary* locs) {
- __ CallRuntime(entry, argument_count);
- EmitCallsiteMetadata(source, deopt_id, UntaggedPcDescriptors::kOther, locs);
-}
-
void FlowGraphCompiler::EmitUnoptimizedStaticCall(
intptr_t size_with_type_args,
intptr_t deopt_id,
diff --git a/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc b/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
index 11cfcb6..f334d5c 100644
--- a/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
+++ b/runtime/vm/compiler/backend/flow_graph_compiler_x64.cc
@@ -461,15 +461,6 @@
}
}
-void FlowGraphCompiler::GenerateRuntimeCall(const InstructionSource& source,
- intptr_t deopt_id,
- const RuntimeEntry& entry,
- intptr_t argument_count,
- LocationSummary* locs) {
- __ CallRuntime(entry, argument_count);
- EmitCallsiteMetadata(source, deopt_id, UntaggedPcDescriptors::kOther, locs);
-}
-
void FlowGraphCompiler::EmitUnoptimizedStaticCall(
intptr_t size_with_type_args,
intptr_t deopt_id,
diff --git a/runtime/vm/compiler/backend/il_arm.cc b/runtime/vm/compiler/backend/il_arm.cc
index 4b5c5fa..1f688e0 100644
--- a/runtime/vm/compiler/backend/il_arm.cc
+++ b/runtime/vm/compiler/backend/il_arm.cc
@@ -2401,7 +2401,6 @@
}
if (deopt == NULL) {
- ASSERT(!compiler->is_optimizing());
__ Bind(fail);
__ ldrh(IP,
@@ -2412,6 +2411,7 @@
__ Push(field_reg);
__ Push(value_reg);
+ ASSERT(!compiler->is_optimizing()); // No deopt info needed.
__ CallRuntime(kUpdateFieldCidRuntimeEntry, 2);
__ Drop(2); // Drop the field and the value.
} else {
@@ -2525,6 +2525,7 @@
__ Push(field_reg);
__ Push(value_reg);
+ ASSERT(!compiler->is_optimizing()); // No deopt info needed.
__ CallRuntime(kUpdateFieldCidRuntimeEntry, 2);
__ Drop(2); // Drop the field and the value.
} else {
@@ -3586,9 +3587,10 @@
instruction()->deopt_id(), instruction()->source(),
compiler->CurrentTryIndex());
} else {
- compiler->GenerateRuntimeCall(
+ __ CallRuntime(kStackOverflowRuntimeEntry, kNumSlowPathArgs);
+ compiler->EmitCallsiteMetadata(
instruction()->source(), instruction()->deopt_id(),
- kStackOverflowRuntimeEntry, kNumSlowPathArgs, instruction()->locs());
+ UntaggedPcDescriptors::kOther, instruction()->locs());
}
if (compiler->isolate_group()->use_osr() && !compiler->is_optimizing() &&
@@ -5587,9 +5589,8 @@
}
void CaseInsensitiveCompareInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- ASSERT(TargetFunction().is_leaf());
-
// Call the function.
+ ASSERT(TargetFunction().is_leaf()); // No deopt info needed.
__ CallRuntime(TargetFunction(), TargetFunction().argument_count());
}
@@ -6057,6 +6058,7 @@
// Args must be in D0 and D1, so move arg from Q1(== D3:D2) to D1.
__ vmovd(D1, D2);
if (TargetCPUFeatures::hardfp_supported()) {
+ ASSERT(instr->TargetFunction().is_leaf()); // No deopt info needed.
__ CallRuntime(instr->TargetFunction(), kInputCount);
} else {
// If the ABI is not "hardfp", then we have to move the double arguments
@@ -6064,6 +6066,7 @@
// registers.
__ vmovrrd(R0, R1, D0);
__ vmovrrd(R2, R3, D1);
+ ASSERT(instr->TargetFunction().is_leaf()); // No deopt info needed.
__ CallRuntime(instr->TargetFunction(), kInputCount);
__ vmovdrr(D0, R0, R1);
__ vmovdrr(D1, R2, R3);
@@ -6072,8 +6075,6 @@
}
void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- ASSERT(TargetFunction().is_leaf());
-
if (recognized_kind() == MethodRecognizer::kMathDoublePow) {
InvokeDoublePow(compiler, this);
return;
@@ -6084,6 +6085,7 @@
__ vmovd(D1, D2);
}
if (TargetCPUFeatures::hardfp_supported()) {
+ ASSERT(TargetFunction().is_leaf()); // No deopt info needed.
__ CallRuntime(TargetFunction(), InputCount());
} else {
// If the ABI is not "hardfp", then we have to move the double arguments
@@ -6091,6 +6093,7 @@
// registers.
__ vmovrrd(R0, R1, D0);
__ vmovrrd(R2, R3, D1);
+ ASSERT(TargetFunction().is_leaf()); // No deopt info needed.
__ CallRuntime(TargetFunction(), InputCount());
__ vmovdrr(D0, R0, R1);
__ vmovdrr(D1, R2, R3);
diff --git a/runtime/vm/compiler/backend/il_arm64.cc b/runtime/vm/compiler/backend/il_arm64.cc
index e45eb95..d5a6df9 100644
--- a/runtime/vm/compiler/backend/il_arm64.cc
+++ b/runtime/vm/compiler/backend/il_arm64.cc
@@ -2172,7 +2172,6 @@
}
if (deopt == NULL) {
- ASSERT(!compiler->is_optimizing());
__ Bind(fail);
__ LoadFieldFromOffset(TMP, field_reg, Field::guarded_cid_offset(),
@@ -2181,6 +2180,7 @@
__ b(&ok, EQ);
__ PushPair(value_reg, field_reg);
+ ASSERT(!compiler->is_optimizing()); // No deopt info needed.
__ CallRuntime(kUpdateFieldCidRuntimeEntry, 2);
__ Drop(2); // Drop the field and the value.
} else {
@@ -2285,6 +2285,7 @@
__ b(&ok, EQ);
__ PushPair(value_reg, field_reg);
+ ASSERT(!compiler->is_optimizing()); // No deopt info needed.
__ CallRuntime(kUpdateFieldCidRuntimeEntry, 2);
__ Drop(2); // Drop the field and the value.
} else {
@@ -3181,9 +3182,10 @@
instruction()->deopt_id(), instruction()->source(),
compiler->CurrentTryIndex());
} else {
- compiler->GenerateRuntimeCall(
+ __ CallRuntime(kStackOverflowRuntimeEntry, kNumSlowPathArgs);
+ compiler->EmitCallsiteMetadata(
instruction()->source(), instruction()->deopt_id(),
- kStackOverflowRuntimeEntry, kNumSlowPathArgs, locs);
+ UntaggedPcDescriptors::kOther, instruction()->locs());
}
if (compiler->isolate_group()->use_osr() && !compiler->is_optimizing() &&
@@ -4673,9 +4675,8 @@
}
void CaseInsensitiveCompareInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- ASSERT(TargetFunction().is_leaf());
-
// Call the function.
+ ASSERT(TargetFunction().is_leaf()); // No deopt info needed.
__ CallRuntime(TargetFunction(), TargetFunction().argument_count());
}
@@ -5134,17 +5135,17 @@
__ Bind(&do_pow);
__ fmovdd(base, saved_base); // Restore base.
+ ASSERT(instr->TargetFunction().is_leaf()); // No deopt info needed.
__ CallRuntime(instr->TargetFunction(), kInputCount);
__ Bind(&skip_call);
}
void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- ASSERT(TargetFunction().is_leaf());
-
if (recognized_kind() == MethodRecognizer::kMathDoublePow) {
InvokeDoublePow(compiler, this);
return;
}
+ ASSERT(TargetFunction().is_leaf()); // No deopt info needed.
__ CallRuntime(TargetFunction(), InputCount());
}
diff --git a/runtime/vm/compiler/backend/il_ia32.cc b/runtime/vm/compiler/backend/il_ia32.cc
index f1143d9..4ba570f 100644
--- a/runtime/vm/compiler/backend/il_ia32.cc
+++ b/runtime/vm/compiler/backend/il_ia32.cc
@@ -1903,7 +1903,6 @@
}
if (deopt == NULL) {
- ASSERT(!compiler->is_optimizing());
__ Bind(fail);
__ cmpw(compiler::FieldAddress(field_reg, Field::guarded_cid_offset()),
@@ -1912,6 +1911,7 @@
__ pushl(field_reg);
__ pushl(value_reg);
+ ASSERT(!compiler->is_optimizing()); // No deopt info needed.
__ CallRuntime(kUpdateFieldCidRuntimeEntry, 2);
__ Drop(2); // Drop the field and the value.
} else {
@@ -2021,6 +2021,7 @@
__ pushl(field_reg);
__ pushl(value_reg);
+ ASSERT(!compiler->is_optimizing()); // No deopt info needed.
__ CallRuntime(kUpdateFieldCidRuntimeEntry, 2);
__ Drop(2); // Drop the field and the value.
} else {
@@ -2831,6 +2832,8 @@
class CheckStackOverflowSlowPath
: public TemplateSlowPathCode<CheckStackOverflowInstr> {
public:
+ static constexpr intptr_t kNumSlowPathArgs = 0;
+
explicit CheckStackOverflowSlowPath(CheckStackOverflowInstr* instruction)
: TemplateSlowPathCode(instruction) {}
@@ -2850,9 +2853,11 @@
Environment* env = compiler->SlowPathEnvironmentFor(
instruction(), /*num_slow_path_args=*/0);
compiler->pending_deoptimization_env_ = env;
- compiler->GenerateRuntimeCall(
+
+ __ CallRuntime(kStackOverflowRuntimeEntry, kNumSlowPathArgs);
+ compiler->EmitCallsiteMetadata(
instruction()->source(), instruction()->deopt_id(),
- kStackOverflowRuntimeEntry, 0, instruction()->locs());
+ UntaggedPcDescriptors::kOther, instruction()->locs());
if (compiler->isolate_group()->use_osr() && !compiler->is_optimizing() &&
instruction()->in_loop()) {
@@ -4787,8 +4792,6 @@
}
void CaseInsensitiveCompareInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- ASSERT(TargetFunction().is_leaf());
-
// Save ESP. EDI is chosen because it is callee saved so we do not need to
// back it up before calling into the runtime.
static const Register kSavedSPReg = EDI;
@@ -4801,6 +4804,7 @@
__ movl(compiler::Address(ESP, +3 * kWordSize), locs()->in(3).reg());
// Call the function.
+ ASSERT(TargetFunction().is_leaf()); // No deopt info needed.
__ CallRuntime(TargetFunction(), TargetFunction().argument_count());
// Restore ESP and pop the old value off the stack.
@@ -5287,6 +5291,7 @@
for (intptr_t i = 0; i < kInputCount; i++) {
__ movsd(compiler::Address(ESP, kDoubleSize * i), locs->in(i).fpu_reg());
}
+ ASSERT(instr->TargetFunction().is_leaf()); // No deopt info needed.
__ CallRuntime(instr->TargetFunction(), kInputCount);
__ fstpl(compiler::Address(ESP, 0));
__ movsd(locs->out(0).fpu_reg(), compiler::Address(ESP, 0));
@@ -5296,8 +5301,6 @@
}
void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- ASSERT(TargetFunction().is_leaf());
-
if (recognized_kind() == MethodRecognizer::kMathDoublePow) {
InvokeDoublePow(compiler, this);
return;
@@ -5309,6 +5312,7 @@
__ movsd(compiler::Address(ESP, kDoubleSize * i), locs()->in(i).fpu_reg());
}
+ ASSERT(TargetFunction().is_leaf()); // No deopt info needed.
__ CallRuntime(TargetFunction(), InputCount());
__ fstpl(compiler::Address(ESP, 0));
__ movsd(locs()->out(0).fpu_reg(), compiler::Address(ESP, 0));
diff --git a/runtime/vm/compiler/backend/il_x64.cc b/runtime/vm/compiler/backend/il_x64.cc
index 10fae2a..01e23d2 100644
--- a/runtime/vm/compiler/backend/il_x64.cc
+++ b/runtime/vm/compiler/backend/il_x64.cc
@@ -2159,7 +2159,6 @@
}
if (deopt == NULL) {
- ASSERT(!compiler->is_optimizing());
__ Bind(fail);
__ cmpw(compiler::FieldAddress(field_reg, Field::guarded_cid_offset()),
@@ -2168,6 +2167,7 @@
__ pushq(field_reg);
__ pushq(value_reg);
+ ASSERT(!compiler->is_optimizing()); // No deopt info needed.
__ CallRuntime(kUpdateFieldCidRuntimeEntry, 2);
__ Drop(2); // Drop the field and the value.
} else {
@@ -2273,6 +2273,7 @@
__ pushq(field_reg);
__ pushq(value_reg);
+ ASSERT(!compiler->is_optimizing()); // No deopt info needed.
__ CallRuntime(kUpdateFieldCidRuntimeEntry, 2);
__ Drop(2); // Drop the field and the value.
} else {
@@ -2367,6 +2368,7 @@
__ Bind(&call_runtime);
__ PushObject(original);
__ pushq(value_reg);
+ ASSERT(!compiler->is_optimizing()); // No deopt info needed.
__ CallRuntime(kUpdateFieldCidRuntimeEntry, 2);
__ Drop(2);
}
@@ -3267,9 +3269,10 @@
instruction()->deopt_id(), instruction()->source(),
compiler->CurrentTryIndex());
} else {
- compiler->GenerateRuntimeCall(
+ __ CallRuntime(kStackOverflowRuntimeEntry, kNumSlowPathArgs);
+ compiler->EmitCallsiteMetadata(
instruction()->source(), instruction()->deopt_id(),
- kStackOverflowRuntimeEntry, kNumSlowPathArgs, instruction()->locs());
+ UntaggedPcDescriptors::kOther, instruction()->locs());
}
if (compiler->isolate_group()->use_osr() && !compiler->is_optimizing() &&
@@ -4071,7 +4074,11 @@
summary->set_in(0, needs_writable_input ? Location::WritableRegister()
: Location::RequiresRegister());
if (RepresentationUtils::IsUnboxedInteger(representation())) {
+#if !defined(DART_COMPRESSED_POINTERS)
summary->set_out(0, Location::SameAsFirstInput());
+#else
+ summary->set_out(0, Location::RequiresRegister());
+#endif
} else {
summary->set_out(0, Location::RequiresFpuRegister());
}
@@ -4119,14 +4126,16 @@
const Register box = locs()->in(0).reg();
switch (representation()) {
- case kUnboxedInt32:
- case kUnboxedInt64: {
+ case kUnboxedInt32: {
const Register result = locs()->out(0).reg();
- ASSERT(result == box);
- __ SmiUntagAndSignExtend(box);
+ __ SmiUntag(result, box);
break;
}
-
+ case kUnboxedInt64: {
+ const Register result = locs()->out(0).reg();
+ __ SmiUntagAndSignExtend(result, box);
+ break;
+ }
case kUnboxedDouble: {
const FpuRegister result = locs()->out(0).fpu_reg();
__ SmiUntag(box);
@@ -4143,22 +4152,18 @@
void UnboxInstr::EmitLoadInt32FromBoxOrSmi(FlowGraphCompiler* compiler) {
const Register value = locs()->in(0).reg();
const Register result = locs()->out(0).reg();
- ASSERT(value == result);
compiler::Label done;
#if !defined(DART_COMPRESSED_POINTERS)
+ ASSERT(value == result);
__ SmiUntag(value);
__ j(NOT_CARRY, &done, compiler::Assembler::kNearJump);
__ movsxw(result, compiler::Address(value, TIMES_2, Mint::value_offset()));
#else
- // Cannot speculatively untag because it erases the upper bits needed to
- // dereference when it is a Mint.
- // TODO(compressed-pointers): It would probably be cheaper to make
- // result != value with compressed pointers.
- compiler::Label not_smi;
- __ BranchIfNotSmi(value, ¬_smi, compiler::Assembler::kNearJump);
- __ SmiUntagAndSignExtend(value);
- __ jmp(&done, compiler::Assembler::kNearJump);
- __ Bind(¬_smi);
+ ASSERT(value != result);
+ // Cannot speculatively untag with value == result because it erases the
+ // upper bits needed to dereference when it is a Mint.
+ __ SmiUntagAndSignExtend(result, value);
+ __ j(NOT_CARRY, &done, compiler::Assembler::kNearJump);
__ movsxw(result, compiler::FieldAddress(value, Mint::value_offset()));
#endif
__ Bind(&done);
@@ -4167,24 +4172,21 @@
void UnboxInstr::EmitLoadInt64FromBoxOrSmi(FlowGraphCompiler* compiler) {
const Register value = locs()->in(0).reg();
const Register result = locs()->out(0).reg();
- ASSERT(value == result);
compiler::Label done;
#if !defined(DART_COMPRESSED_POINTERS)
+ ASSERT(value == result);
__ SmiUntag(value);
__ j(NOT_CARRY, &done, compiler::Assembler::kNearJump);
- __ movq(value, compiler::Address(value, TIMES_2, Mint::value_offset()));
- __ Bind(&done);
+ __ movq(result, compiler::Address(value, TIMES_2, Mint::value_offset()));
#else
- // Cannot speculatively untag because it erases the upper bits needed to
- // dereference when it is a Mint.
- compiler::Label not_smi;
- __ BranchIfNotSmi(value, ¬_smi, compiler::Assembler::kNearJump);
- __ SmiUntagAndSignExtend(value);
- __ jmp(&done, compiler::Assembler::kNearJump);
- __ Bind(¬_smi);
- __ movq(value, compiler::FieldAddress(value, Mint::value_offset()));
- __ Bind(&done);
+ ASSERT(value != result);
+ // Cannot speculatively untag with value == result because it erases the
+ // upper bits needed to dereference when it is a Mint.
+ __ SmiUntagAndSignExtend(result, value);
+ __ j(NOT_CARRY, &done, compiler::Assembler::kNearJump);
+ __ movq(result, compiler::FieldAddress(value, Mint::value_offset()));
#endif
+ __ Bind(&done);
}
LocationSummary* UnboxInteger32Instr::MakeLocationSummary(Zone* zone,
@@ -4989,8 +4991,6 @@
}
void CaseInsensitiveCompareInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- ASSERT(TargetFunction().is_leaf());
-
// Save RSP. R13 is chosen because it is callee saved so we do not need to
// back it up before calling into the runtime.
static const Register kSavedSPReg = R13;
@@ -4998,6 +4998,7 @@
__ ReserveAlignedFrameSpace(0);
// Call the function. Parameters are already in their correct spots.
+ ASSERT(TargetFunction().is_leaf()); // No deopt info needed.
__ CallRuntime(TargetFunction(), TargetFunction().argument_count());
// Restore RSP.
@@ -5470,6 +5471,7 @@
__ movaps(XMM0, locs->in(0).fpu_reg());
ASSERT(locs->in(1).fpu_reg() == XMM1);
+ ASSERT(instr->TargetFunction().is_leaf()); // No deopt info needed.
__ CallRuntime(instr->TargetFunction(), kInputCount);
__ movaps(locs->out(0).fpu_reg(), XMM0);
// Restore RSP.
@@ -5478,8 +5480,6 @@
}
void InvokeMathCFunctionInstr::EmitNativeCode(FlowGraphCompiler* compiler) {
- ASSERT(TargetFunction().is_leaf());
-
if (recognized_kind() == MethodRecognizer::kMathDoublePow) {
InvokeDoublePow(compiler, this);
return;
@@ -5492,6 +5492,7 @@
ASSERT(locs()->in(1).fpu_reg() == XMM1);
}
+ ASSERT(TargetFunction().is_leaf()); // No deopt info needed.
__ CallRuntime(TargetFunction(), InputCount());
__ movaps(locs()->out(0).fpu_reg(), XMM0);
// Restore RSP.
diff --git a/runtime/vm/compiler/backend/redundancy_elimination.cc b/runtime/vm/compiler/backend/redundancy_elimination.cc
index 7b27daf..9114a2a 100644
--- a/runtime/vm/compiler/backend/redundancy_elimination.cc
+++ b/runtime/vm/compiler/backend/redundancy_elimination.cc
@@ -444,8 +444,8 @@
static bool IsAllocation(Definition* defn) {
return (defn != NULL) &&
- (defn->IsAllocateObject() || defn->IsCreateArray() ||
- defn->IsAllocateTypedData() ||
+ (defn->IsAllocateObject() || defn->IsAllocateClosure() ||
+ defn->IsCreateArray() || defn->IsAllocateTypedData() ||
defn->IsAllocateUninitializedContext() ||
(defn->IsStaticCall() &&
defn->AsStaticCall()->IsRecognizedFactory()));
@@ -1554,7 +1554,9 @@
for (ForwardInstructionIterator instr_it(block); !instr_it.Done();
instr_it.Advance()) {
Definition* def = instr_it.Current()->AsDefinition();
- if (def != nullptr && (def->IsAllocateObject() || def->IsCreateArray()) &&
+ if (def != nullptr &&
+ (def->IsAllocateObject() || def->IsAllocateClosure() ||
+ def->IsCreateArray()) &&
def->env() == nullptr && !moved.HasKey(def)) {
Instruction* use = DominantUse(def);
if (use != nullptr && !use->IsPhi() && IsOneTimeUse(use, def)) {
diff --git a/runtime/vm/compiler/backend/slot.cc b/runtime/vm/compiler/backend/slot.cc
index 670e1d6..e541010 100644
--- a/runtime/vm/compiler/backend/slot.cc
+++ b/runtime/vm/compiler/backend/slot.cc
@@ -122,18 +122,17 @@
const Slot& Slot::GetNativeSlot(Kind kind) {
if (native_fields_.load() == nullptr) {
Slot* new_value = new Slot[kNativeSlotsCount]{
-#define NULLABLE_FIELD_FINAL \
- (IsNullableBit::encode(true) | IsImmutableBit::encode(true))
-#define NULLABLE_FIELD_FINAL_COMPRESSED \
+#define NULLABLE_FIELD_FINAL(ClassName) \
(IsNullableBit::encode(true) | IsImmutableBit::encode(true) | \
- IsCompressedBit::encode(true))
-#define NULLABLE_FIELD_VAR (IsNullableBit::encode(true))
-#define NULLABLE_FIELD_VAR_COMPRESSED \
- (IsNullableBit::encode(true) | IsCompressedBit::encode(true))
+ IsCompressedBit::encode(ClassName::ContainsCompressedPointers()))
+#define NULLABLE_FIELD_VAR(ClassName) \
+ (IsNullableBit::encode(true) | \
+ IsCompressedBit::encode(ClassName::ContainsCompressedPointers()))
#define DEFINE_NULLABLE_BOXED_NATIVE_FIELD(ClassName, UnderlyingType, \
FieldName, cid, mutability) \
- Slot(Kind::k##ClassName##_##FieldName, NULLABLE_FIELD_##mutability, \
- k##cid##Cid, compiler::target::ClassName::FieldName##_offset(), \
+ Slot(Kind::k##ClassName##_##FieldName, \
+ NULLABLE_FIELD_##mutability(ClassName), k##cid##Cid, \
+ compiler::target::ClassName::FieldName##_offset(), \
#ClassName "." #FieldName, nullptr, kTagged),
NULLABLE_BOXED_NATIVE_SLOTS_LIST(DEFINE_NULLABLE_BOXED_NATIVE_FIELD)
@@ -142,24 +141,30 @@
#undef NULLABLE_FIELD_FINAL
#undef NULLABLE_FIELD_VAR
-#define NONNULLABLE_FIELD_FINAL (Slot::IsImmutableBit::encode(true))
-#define NONNULLABLE_FIELD_FINAL_COMPRESSED \
- (Slot::IsImmutableBit::encode(true) | Slot::IsCompressedBit::encode(true))
-#define NONNULLABLE_FIELD_VAR (0)
-#define NONNULLABLE_FIELD_VAR_COMPRESSED (Slot::IsCompressedBit::encode(true))
+#define NONNULLABLE_FIELD_FINAL(ClassName) \
+ (Slot::IsImmutableBit::encode(true) | \
+ IsCompressedBit::encode(ClassName::ContainsCompressedPointers()))
+#define NONNULLABLE_FIELD_VAR(ClassName) \
+ (IsCompressedBit::encode(ClassName::ContainsCompressedPointers()))
#define DEFINE_NONNULLABLE_BOXED_NATIVE_FIELD(ClassName, UnderlyingType, \
FieldName, cid, mutability) \
- Slot(Kind::k##ClassName##_##FieldName, NONNULLABLE_FIELD_##mutability, \
- k##cid##Cid, compiler::target::ClassName::FieldName##_offset(), \
+ Slot(Kind::k##ClassName##_##FieldName, \
+ NONNULLABLE_FIELD_##mutability(ClassName), k##cid##Cid, \
+ compiler::target::ClassName::FieldName##_offset(), \
#ClassName "." #FieldName, nullptr, kTagged),
NONNULLABLE_BOXED_NATIVE_SLOTS_LIST(
DEFINE_NONNULLABLE_BOXED_NATIVE_FIELD)
#undef DEFINE_NONNULLABLE_BOXED_NATIVE_FIELD
+#undef NONNULLABLE_FIELD_VAR
+#undef NONNULLABLE_FIELD_FINAL
+
+#define UNBOXED_FIELD_FINAL (Slot::IsImmutableBit::encode(true))
+#define UNBOXED_FIELD_VAR (0)
#define DEFINE_UNBOXED_NATIVE_FIELD(ClassName, UnderlyingType, FieldName, \
representation, mutability) \
- Slot(Kind::k##ClassName##_##FieldName, NONNULLABLE_FIELD_##mutability, \
+ Slot(Kind::k##ClassName##_##FieldName, UNBOXED_FIELD_##mutability, \
GetUnboxedNativeSlotCid(kUnboxed##representation), \
compiler::target::ClassName::FieldName##_offset(), \
#ClassName "." #FieldName, nullptr, kUnboxed##representation),
@@ -167,8 +172,8 @@
UNBOXED_NATIVE_SLOTS_LIST(DEFINE_UNBOXED_NATIVE_FIELD)
#undef DEFINE_UNBOXED_NATIVE_FIELD
-#undef NONNULLABLE_FIELD_VAR
-#undef NONNULLABLE_FIELD_FINAL
+#undef UNBOXED_FIELD_VAR
+#undef UNBOXED_FIELD_FINAL
};
Slot* old_value = nullptr;
if (!native_fields_.compare_exchange_strong(old_value, new_value)) {
@@ -211,10 +216,12 @@
const Slot& Slot::GetTypeArgumentsSlotAt(Thread* thread, intptr_t offset) {
ASSERT(offset != Class::kNoTypeArguments);
- return SlotCache::Instance(thread).Canonicalize(
- Slot(Kind::kTypeArguments, IsImmutableBit::encode(true),
- kTypeArgumentsCid, offset, ":type_arguments",
- /*static_type=*/nullptr, kTagged));
+ return SlotCache::Instance(thread).Canonicalize(Slot(
+ Kind::kTypeArguments,
+ IsImmutableBit::encode(true) |
+ IsCompressedBit::encode(TypeArguments::ContainsCompressedPointers()),
+ kTypeArgumentsCid, offset, ":type_arguments",
+ /*static_type=*/nullptr, kTagged));
}
const Slot& Slot::GetTypeArgumentsSlotFor(Thread* thread, const Class& cls) {
@@ -228,7 +235,8 @@
return SlotCache::Instance(thread).Canonicalize(
Slot(Kind::kCapturedVariable,
IsImmutableBit::encode(variable.is_final() && !variable.is_late()) |
- IsNullableBit::encode(true),
+ IsNullableBit::encode(true) |
+ IsCompressedBit::encode(Context::ContainsCompressedPointers()),
kDynamicCid,
compiler::target::Context::variable_offset(variable.index().value()),
&variable.name(), &variable.type(), kTagged));
@@ -237,18 +245,22 @@
const Slot& Slot::GetTypeArgumentsIndexSlot(Thread* thread, intptr_t index) {
const intptr_t offset =
compiler::target::TypeArguments::type_at_offset(index);
- const Slot& slot =
- Slot(Kind::kTypeArgumentsIndex,
- IsImmutableBit::encode(true) | IsCompressedBit::encode(true),
- kDynamicCid, offset, ":argument", /*static_type=*/nullptr, kTagged);
+ const Slot& slot = Slot(
+ Kind::kTypeArgumentsIndex,
+ IsImmutableBit::encode(true) |
+ IsCompressedBit::encode(TypeArguments::ContainsCompressedPointers()),
+ kDynamicCid, offset, ":argument", /*static_type=*/nullptr, kTagged);
return SlotCache::Instance(thread).Canonicalize(slot);
}
const Slot& Slot::GetArrayElementSlot(Thread* thread,
intptr_t offset_in_bytes) {
const Slot& slot =
- Slot(Kind::kArrayElement, IsNullableBit::encode(true), kDynamicCid,
- offset_in_bytes, ":array_element", /*static_type=*/nullptr, kTagged);
+ Slot(Kind::kArrayElement,
+ IsNullableBit::encode(true) |
+ IsCompressedBit::encode(Array::ContainsCompressedPointers()),
+ kDynamicCid, offset_in_bytes, ":array_element",
+ /*static_type=*/nullptr, kTagged);
return SlotCache::Instance(thread).Canonicalize(slot);
}
@@ -306,12 +318,15 @@
}
}
+ Class& owner = Class::Handle(zone, field.Owner());
const Slot& slot = SlotCache::Instance(thread).Canonicalize(
Slot(Kind::kDartField,
IsImmutableBit::encode((field.is_final() && !field.is_late()) ||
field.is_const()) |
IsNullableBit::encode(is_nullable) |
- IsGuardedBit::encode(used_guarded_state),
+ IsGuardedBit::encode(used_guarded_state) |
+ IsCompressedBit::encode(
+ compiler::target::Class::HasCompressedPointers(owner)),
nullable_cid, compiler::target::Field::OffsetOf(field), &field,
&type, rep));
diff --git a/runtime/vm/compiler/backend/slot.h b/runtime/vm/compiler/backend/slot.h
index a9ff524..bfcf561 100644
--- a/runtime/vm/compiler/backend/slot.h
+++ b/runtime/vm/compiler/backend/slot.h
@@ -52,20 +52,18 @@
// (i.e. initialized once at construction time and does not change after
// that) or like a non-final field.
#define NULLABLE_BOXED_NATIVE_SLOTS_LIST(V) \
- V(Function, UntaggedFunction, signature, FunctionType, FINAL_COMPRESSED) \
+ V(Function, UntaggedFunction, signature, FunctionType, FINAL) \
V(Context, UntaggedContext, parent, Context, FINAL) \
V(Closure, UntaggedClosure, instantiator_type_arguments, TypeArguments, \
FINAL) \
V(Closure, UntaggedClosure, delayed_type_arguments, TypeArguments, FINAL) \
V(Closure, UntaggedClosure, function_type_arguments, TypeArguments, FINAL) \
- V(Type, UntaggedType, arguments, TypeArguments, FINAL_COMPRESSED) \
+ V(Type, UntaggedType, arguments, TypeArguments, FINAL) \
V(FunctionType, UntaggedFunctionType, type_parameters, TypeParameters, \
- FINAL_COMPRESSED) \
- V(TypeParameters, UntaggedTypeParameters, flags, Array, FINAL_COMPRESSED) \
- V(TypeParameters, UntaggedTypeParameters, bounds, TypeArguments, \
- FINAL_COMPRESSED) \
- V(TypeParameters, UntaggedTypeParameters, defaults, TypeArguments, \
- FINAL_COMPRESSED) \
+ FINAL) \
+ V(TypeParameters, UntaggedTypeParameters, flags, Array, FINAL) \
+ V(TypeParameters, UntaggedTypeParameters, bounds, TypeArguments, FINAL) \
+ V(TypeParameters, UntaggedTypeParameters, defaults, TypeArguments, FINAL) \
V(WeakProperty, UntaggedWeakProperty, key, Dynamic, VAR) \
V(WeakProperty, UntaggedWeakProperty, value, Dynamic, VAR)
@@ -87,18 +85,15 @@
V(Closure, UntaggedClosure, function, Function, FINAL) \
V(Closure, UntaggedClosure, context, Context, FINAL) \
V(Closure, UntaggedClosure, hash, Context, VAR) \
- V(Function, UntaggedFunction, data, Dynamic, FINAL_COMPRESSED) \
- V(FunctionType, UntaggedFunctionType, parameter_names, Array, \
- FINAL_COMPRESSED) \
- V(FunctionType, UntaggedFunctionType, parameter_types, Array, \
- FINAL_COMPRESSED) \
+ V(Function, UntaggedFunction, data, Dynamic, FINAL) \
+ V(FunctionType, UntaggedFunctionType, parameter_names, Array, FINAL) \
+ V(FunctionType, UntaggedFunctionType, parameter_types, Array, FINAL) \
V(GrowableObjectArray, UntaggedGrowableObjectArray, length, Smi, VAR) \
V(GrowableObjectArray, UntaggedGrowableObjectArray, data, Array, VAR) \
- V(TypedDataBase, UntaggedTypedDataBase, length, Smi, FINAL_COMPRESSED) \
- V(TypedDataView, UntaggedTypedDataView, offset_in_bytes, Smi, \
- FINAL_COMPRESSED) \
- V(TypedDataView, UntaggedTypedDataView, data, Dynamic, FINAL_COMPRESSED) \
- V(String, UntaggedString, length, Smi, FINAL_COMPRESSED) \
+ V(TypedDataBase, UntaggedTypedDataBase, length, Smi, FINAL) \
+ V(TypedDataView, UntaggedTypedDataView, offset_in_bytes, Smi, FINAL) \
+ V(TypedDataView, UntaggedTypedDataView, data, Dynamic, FINAL) \
+ V(String, UntaggedString, length, Smi, FINAL) \
V(LinkedHashMap, UntaggedLinkedHashMap, index, TypedDataUint32Array, VAR) \
V(LinkedHashMap, UntaggedLinkedHashMap, data, Array, VAR) \
V(LinkedHashMap, UntaggedLinkedHashMap, hash_mask, Smi, VAR) \
@@ -109,13 +104,11 @@
V(ArgumentsDescriptor, UntaggedArray, count, Smi, FINAL) \
V(ArgumentsDescriptor, UntaggedArray, size, Smi, FINAL) \
V(PointerBase, UntaggedPointerBase, data_field, Dynamic, FINAL) \
- V(TypeArguments, UntaggedTypeArguments, length, Smi, FINAL_COMPRESSED) \
- V(TypeParameters, UntaggedTypeParameters, names, Array, FINAL_COMPRESSED) \
- V(TypeParameter, UntaggedTypeParameter, bound, Dynamic, FINAL_COMPRESSED) \
- V(UnhandledException, UntaggedUnhandledException, exception, Dynamic, \
- FINAL_COMPRESSED) \
- V(UnhandledException, UntaggedUnhandledException, stacktrace, Dynamic, \
- FINAL_COMPRESSED)
+ V(TypeArguments, UntaggedTypeArguments, length, Smi, FINAL) \
+ V(TypeParameters, UntaggedTypeParameters, names, Array, FINAL) \
+ V(TypeParameter, UntaggedTypeParameter, bound, Dynamic, FINAL) \
+ V(UnhandledException, UntaggedUnhandledException, exception, Dynamic, FINAL) \
+ V(UnhandledException, UntaggedUnhandledException, stacktrace, Dynamic, FINAL)
// List of slots that correspond to unboxed fields of native objects in the
// following format:
diff --git a/runtime/vm/compiler/runtime_api.cc b/runtime/vm/compiler/runtime_api.cc
index 7f52832..48b7da7 100644
--- a/runtime/vm/compiler/runtime_api.cc
+++ b/runtime/vm/compiler/runtime_api.cc
@@ -444,6 +444,16 @@
ObjectAlignment::kObjectAlignment);
}
+// Currently, we only have compressed pointers on the target if we also have
+// compressed pointers on the host, since only 64-bit architectures can have
+// compressed pointers and there is no 32-bit host/64-bit target combination.
+// Thus, we cheat a little here and use the host information about compressed
+// pointers for the target, instead of storing this information in the extracted
+// offsets information.
+bool Class::HasCompressedPointers(const dart::Class& handle) {
+ return handle.HasCompressedPointers();
+}
+
intptr_t Class::NumTypeArguments(const dart::Class& klass) {
return klass.NumTypeArguments();
}
diff --git a/runtime/vm/compiler/runtime_api.h b/runtime/vm/compiler/runtime_api.h
index 4dea5ad..e389c80 100644
--- a/runtime/vm/compiler/runtime_api.h
+++ b/runtime/vm/compiler/runtime_api.h
@@ -486,6 +486,10 @@
// Return instance size for the given class on the target.
static uword GetInstanceSize(const dart::Class& handle);
+ // Return whether objects of the class on the target contain compressed
+ // pointers.
+ static bool HasCompressedPointers(const dart::Class& handle);
+
// Returns the number of type arguments.
static intptr_t NumTypeArguments(const dart::Class& klass);
diff --git a/runtime/vm/compiler/runtime_offsets_extracted.h b/runtime/vm/compiler/runtime_offsets_extracted.h
index ff5bee2..bdd8b3c 100644
--- a/runtime/vm/compiler/runtime_offsets_extracted.h
+++ b/runtime/vm/compiler/runtime_offsets_extracted.h
@@ -2093,7 +2093,7 @@
Thread_write_barrier_wrappers_thread_offset[] = {
1376, 1384, 1392, 1400, 1408, 1416, 1424, 1432, 1440, 1448, 1456,
1464, 1472, 1480, 1488, -1, -1, -1, -1, 1496, 1504, -1,
- -1, -1, 1512, 1520, -1, -1, -1, -1, -1, -1};
+ -1, 1512, 1520, 1528, -1, -1, -1, -1, -1, -1};
static constexpr dart::compiler::target::word AbstractType_InstanceSize = 24;
static constexpr dart::compiler::target::word ApiError_InstanceSize = 16;
static constexpr dart::compiler::target::word Array_header_size = 24;
@@ -3182,7 +3182,7 @@
Thread_write_barrier_wrappers_thread_offset[] = {
1376, 1384, 1392, 1400, 1408, 1416, 1424, 1432, 1440, 1448, 1456,
1464, 1472, 1480, 1488, -1, -1, -1, -1, 1496, 1504, -1,
- -1, -1, 1512, 1520, -1, -1, -1, -1, -1, -1};
+ -1, 1512, 1520, 1528, -1, -1, -1, -1, -1, -1};
static constexpr dart::compiler::target::word AbstractType_InstanceSize = 24;
static constexpr dart::compiler::target::word ApiError_InstanceSize = 16;
static constexpr dart::compiler::target::word Array_header_size = 24;
@@ -5324,7 +5324,7 @@
Thread_write_barrier_wrappers_thread_offset[] = {
1376, 1384, 1392, 1400, 1408, 1416, 1424, 1432, 1440, 1448, 1456,
1464, 1472, 1480, 1488, -1, -1, -1, -1, 1496, 1504, -1,
- -1, -1, 1512, 1520, -1, -1, -1, -1, -1, -1};
+ -1, 1512, 1520, 1528, -1, -1, -1, -1, -1, -1};
static constexpr dart::compiler::target::word AbstractType_InstanceSize = 24;
static constexpr dart::compiler::target::word ApiError_InstanceSize = 16;
static constexpr dart::compiler::target::word Array_header_size = 24;
@@ -6401,7 +6401,7 @@
Thread_write_barrier_wrappers_thread_offset[] = {
1376, 1384, 1392, 1400, 1408, 1416, 1424, 1432, 1440, 1448, 1456,
1464, 1472, 1480, 1488, -1, -1, -1, -1, 1496, 1504, -1,
- -1, -1, 1512, 1520, -1, -1, -1, -1, -1, -1};
+ -1, 1512, 1520, 1528, -1, -1, -1, -1, -1, -1};
static constexpr dart::compiler::target::word AbstractType_InstanceSize = 24;
static constexpr dart::compiler::target::word ApiError_InstanceSize = 16;
static constexpr dart::compiler::target::word Array_header_size = 24;
@@ -8206,7 +8206,7 @@
AOT_Thread_write_barrier_wrappers_thread_offset[] = {
1376, 1384, 1392, 1400, 1408, 1416, 1424, 1432, 1440, 1448, 1456,
1464, 1472, 1480, 1488, -1, -1, -1, -1, 1496, 1504, -1,
- -1, -1, 1512, 1520, -1, -1, -1, -1, -1, -1};
+ -1, 1512, 1520, 1528, -1, -1, -1, -1, -1, -1};
static constexpr dart::compiler::target::word AOT_AbstractType_InstanceSize =
24;
static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 16;
@@ -9417,7 +9417,7 @@
AOT_Thread_write_barrier_wrappers_thread_offset[] = {
1376, 1384, 1392, 1400, 1408, 1416, 1424, 1432, 1440, 1448, 1456,
1464, 1472, 1480, 1488, -1, -1, -1, -1, 1496, 1504, -1,
- -1, -1, 1512, 1520, -1, -1, -1, -1, -1, -1};
+ -1, 1512, 1520, 1528, -1, -1, -1, -1, -1, -1};
static constexpr dart::compiler::target::word AOT_AbstractType_InstanceSize =
24;
static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 16;
@@ -11213,7 +11213,7 @@
AOT_Thread_write_barrier_wrappers_thread_offset[] = {
1376, 1384, 1392, 1400, 1408, 1416, 1424, 1432, 1440, 1448, 1456,
1464, 1472, 1480, 1488, -1, -1, -1, -1, 1496, 1504, -1,
- -1, -1, 1512, 1520, -1, -1, -1, -1, -1, -1};
+ -1, 1512, 1520, 1528, -1, -1, -1, -1, -1, -1};
static constexpr dart::compiler::target::word AOT_AbstractType_InstanceSize =
24;
static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 16;
@@ -12410,7 +12410,7 @@
AOT_Thread_write_barrier_wrappers_thread_offset[] = {
1376, 1384, 1392, 1400, 1408, 1416, 1424, 1432, 1440, 1448, 1456,
1464, 1472, 1480, 1488, -1, -1, -1, -1, 1496, 1504, -1,
- -1, -1, 1512, 1520, -1, -1, -1, -1, -1, -1};
+ -1, 1512, 1520, 1528, -1, -1, -1, -1, -1, -1};
static constexpr dart::compiler::target::word AOT_AbstractType_InstanceSize =
24;
static constexpr dart::compiler::target::word AOT_ApiError_InstanceSize = 16;
diff --git a/runtime/vm/constants_arm64.h b/runtime/vm/constants_arm64.h
index d82871e..8abe440 100644
--- a/runtime/vm/constants_arm64.h
+++ b/runtime/vm/constants_arm64.h
@@ -54,12 +54,12 @@
R20 = 20,
R21 = 21, // DISPATCH_TABLE_REG
R22 = 22, // NULL_REG
- R23 = 23, // HEAP_BASE
+ R23 = 23,
R24 = 24,
R25 = 25,
R26 = 26, // THR
R27 = 27, // PP
- R28 = 28, // BARRIER_MASK
+ R28 = 28, // HEAP_BITS
R29 = 29, // FP
R30 = 30, // LR
R31 = 31, // ZR, CSP
@@ -141,9 +141,8 @@
const Register THR = R26; // Caches current thread in generated code.
const Register CALLEE_SAVED_TEMP = R19;
const Register CALLEE_SAVED_TEMP2 = R20;
-const Register BARRIER_MASK = R28;
+const Register HEAP_BITS = R28; // write_barrier_mask << 32 | heap_base >> 32
const Register NULL_REG = R22; // Caches NullObject() value.
-const Register HEAP_BASE = R23;
// ABI for catch-clause entry point.
const Register kExceptionObjectReg = R0;
@@ -367,11 +366,11 @@
const VRegister kAbiLastPreservedFpuReg = V15;
const int kAbiPreservedFpuRegCount = 8;
-const intptr_t kReservedCpuRegisters =
- R(SPREG) | // Dart SP
- R(FPREG) | R(TMP) | R(TMP2) | R(PP) | R(THR) | R(LR) | R(BARRIER_MASK) |
- R(NULL_REG) | R(HEAP_BASE) | R(R31) | // C++ SP
- R(R18) | R(DISPATCH_TABLE_REG);
+const intptr_t kReservedCpuRegisters = R(SPREG) | // Dart SP
+ R(FPREG) | R(TMP) | R(TMP2) | R(PP) |
+ R(THR) | R(LR) | R(HEAP_BITS) |
+ R(NULL_REG) | R(R31) | // C++ SP
+ R(R18) | R(DISPATCH_TABLE_REG);
constexpr intptr_t kNumberOfReservedCpuRegisters = 13;
// CPU registers available to Dart allocator.
const RegList kDartAvailableCpuRegs =
diff --git a/runtime/vm/dart.cc b/runtime/vm/dart.cc
index 53250c5..cf63124 100644
--- a/runtime/vm/dart.cc
+++ b/runtime/vm/dart.cc
@@ -861,7 +861,9 @@
}
Object::VerifyBuiltinVtables();
- DEBUG_ONLY(IG->heap()->Verify(kForbidMarked));
+ if (T->isolate()->origin_id() == 0) {
+ DEBUG_ONLY(IG->heap()->Verify(kForbidMarked));
+ }
#if defined(DART_PRECOMPILED_RUNTIME)
const bool kIsAotRuntime = true;
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 842bc8f..2e26b48 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -1499,7 +1499,9 @@
StackZone zone(T);
HandleScope handle_scope(T);
#if defined(DEBUG)
- T->isolate_group()->ValidateConstants();
+ if (T->isolate()->origin_id() == 0) {
+ T->isolate_group()->ValidateConstants();
+ }
#endif
Dart::RunShutdownCallback();
}
diff --git a/runtime/vm/dart_entry.h b/runtime/vm/dart_entry.h
index d91d838..13d10fa 100644
--- a/runtime/vm/dart_entry.h
+++ b/runtime/vm/dart_entry.h
@@ -122,6 +122,12 @@
enum { kCachedDescriptorCount = 32 };
+ // For creating ArgumentDescriptor Slots.
+ static constexpr bool ContainsCompressedPointers() {
+ // Use the same state as the backing store.
+ return Array::ContainsCompressedPointers();
+ }
+
private:
// Absolute indices into the array.
// Keep these in sync with the constants in invocation_mirror_patch.dart.
diff --git a/runtime/vm/experimental_features.cc b/runtime/vm/experimental_features.cc
index 18c32a0..c1467f5 100644
--- a/runtime/vm/experimental_features.cc
+++ b/runtime/vm/experimental_features.cc
@@ -18,7 +18,15 @@
bool GetExperimentalFeatureDefault(ExperimentalFeature feature) {
constexpr bool kFeatureValues[] = {
- true, true, true, true, true, true, true, true, true,
+ true,
+ true,
+ true,
+ true,
+ true,
+ true,
+ true,
+ true,
+ true,
};
ASSERT(static_cast<size_t>(feature) < ARRAY_SIZE(kFeatureValues));
return kFeatureValues[static_cast<int>(feature)];
@@ -26,15 +34,15 @@
const char* GetExperimentalFeatureName(ExperimentalFeature feature) {
constexpr const char* kFeatureNames[] = {
- "nonfunction-type-aliases",
- "non-nullable",
- "extension-methods",
- "constant-update-2018",
- "control-flow-collections",
- "generic-metadata",
- "set-literals",
- "spread-collections",
- "triple-shift",
+ "nonfunction-type-aliases",
+ "non-nullable",
+ "extension-methods",
+ "constant-update-2018",
+ "control-flow-collections",
+ "generic-metadata",
+ "set-literals",
+ "spread-collections",
+ "triple-shift",
};
ASSERT(static_cast<size_t>(feature) < ARRAY_SIZE(kFeatureNames));
return kFeatureNames[static_cast<int>(feature)];
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index 7842aa3..6a402e1 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -15255,8 +15255,8 @@
if (num_entries() == 0) {
return "empty ExceptionHandlers\n";
}
- Array& handled_types = Array::Handle();
- Type& type = Type::Handle();
+ auto& handled_types = Array::Handle();
+ auto& type = AbstractType::Handle();
ExceptionHandlerInfo info;
// First compute the buffer size required.
intptr_t len = 1; // Trailing '\0'.
diff --git a/runtime/vm/runtime_entry_arm64.cc b/runtime/vm/runtime_entry_arm64.cc
index 9e48050..465c0fd9 100644
--- a/runtime/vm/runtime_entry_arm64.cc
+++ b/runtime/vm/runtime_entry_arm64.cc
@@ -76,8 +76,7 @@
COMPILE_ASSERT(IsAbiPreservedRegister(THR));
COMPILE_ASSERT(IsAbiPreservedRegister(PP));
COMPILE_ASSERT(IsAbiPreservedRegister(NULL_REG));
- COMPILE_ASSERT(IsAbiPreservedRegister(BARRIER_MASK));
- COMPILE_ASSERT(IsAbiPreservedRegister(HEAP_BASE));
+ COMPILE_ASSERT(IsAbiPreservedRegister(HEAP_BITS));
COMPILE_ASSERT(IsAbiPreservedRegister(DISPATCH_TABLE_REG));
// These registers must be preserved by the runtime functions, otherwise
// we'd need to restore them here.
diff --git a/runtime/vm/simulator_arm64.cc b/runtime/vm/simulator_arm64.cc
index 11cf428..3b5182d 100644
--- a/runtime/vm/simulator_arm64.cc
+++ b/runtime/vm/simulator_arm64.cc
@@ -3735,11 +3735,10 @@
pp -= kHeapObjectTag; // In the PP register, the pool pointer is untagged.
set_register(NULL, CODE_REG, code);
set_register(NULL, PP, pp);
- set_register(NULL, BARRIER_MASK, thread->write_barrier_mask());
+ set_register(
+ NULL, HEAP_BITS,
+ (thread->write_barrier_mask() << 32) | (thread->heap_base() >> 32));
set_register(NULL, NULL_REG, static_cast<int64_t>(Object::null()));
-#if defined(DART_COMPRESSED_POINTERS)
- set_register(NULL, HEAP_BASE, thread->heap_base());
-#endif
if (FLAG_precompiled_mode && FLAG_use_bare_instructions) {
set_register(NULL, DISPATCH_TABLE_REG,
reinterpret_cast<int64_t>(thread->dispatch_table_array()));
diff --git a/sdk/BUILD.gn b/sdk/BUILD.gn
index 1390092..3734869 100644
--- a/sdk/BUILD.gn
+++ b/sdk/BUILD.gn
@@ -280,19 +280,6 @@
]
}
-if (is_win) {
- copy_tree_specs += [
- {
- target = "copy_7zip"
- visibility = [ ":create_common_sdk" ]
- deps = [ ":copy_libraries" ]
- source = "../third_party/7zip"
- dest = "$root_out_dir/dart-sdk/lib/_internal/pub/asset/7zip"
- ignore_patterns = ".svn"
- },
- ]
-}
-
# This generates targets for everything in copy_tree_specs. The targets have the
# same name as the "target" fields in the scopes of copy_tree_specs.
copy_trees("copy_trees") {
@@ -836,10 +823,6 @@
if (dart_target_arch != "ia32") {
public_deps += [ ":copy_dart2native" ]
}
-
- if (is_win) {
- public_deps += [ ":copy_7zip" ]
- }
}
# Parts specific to the platform SDK.
diff --git a/sdk/lib/_internal/allowed_experiments.json b/sdk/lib/_internal/allowed_experiments.json
index 66da861..1f16232 100644
--- a/sdk/lib/_internal/allowed_experiments.json
+++ b/sdk/lib/_internal/allowed_experiments.json
@@ -2,8 +2,6 @@
"version": 1,
"experimentSets": {
"sdkExperiments": [
- "non-nullable",
- "triple-shift"
],
"nullSafety": [
"non-nullable"
diff --git a/sdk/lib/_internal/js_runtime/lib/late_helper.dart b/sdk/lib/_internal/js_runtime/lib/late_helper.dart
index a7adcb8..14f9b454 100644
--- a/sdk/lib/_internal/js_runtime/lib/late_helper.dart
+++ b/sdk/lib/_internal/js_runtime/lib/late_helper.dart
@@ -10,13 +10,18 @@
/// A boxed variable used for lowering uninitialized `late` variables when they
/// are locals or statics.
-///
-/// The [LateError]s produced have empty variable names.
-// TODO(fishythefish): Support variable names depending on flags/compiler.
class _Cell {
+ final String _name;
Object? _value;
- _Cell() {
+ @pragma('dart2js:noInline')
+ _Cell() : _name = '' {
+ // `this` is a unique sentinel.
+ _value = this;
+ }
+
+ @pragma('dart2js:noInline')
+ _Cell.named(this._name) {
// `this` is a unique sentinel.
_value = this;
}
@@ -30,12 +35,12 @@
T readField<T>() => _readField() as T;
Object? _readLocal() {
- if (identical(_value, this)) throw LateError.localNI('');
+ if (identical(_value, this)) throw LateError.localNI(_name);
return _value;
}
Object? _readField() {
- if (identical(_value, this)) throw LateError.fieldNI('');
+ if (identical(_value, this)) throw LateError.fieldNI(_name);
return _value;
}
@@ -44,26 +49,31 @@
}
void set finalLocalValue(Object? v) {
- if (!identical(_value, this)) throw LateError.localAI('');
+ if (!identical(_value, this)) throw LateError.localAI(_name);
_value = v;
}
void set finalFieldValue(Object? v) {
- if (!identical(_value, this)) throw LateError.fieldAI('');
+ if (!identical(_value, this)) throw LateError.fieldAI(_name);
_value = v;
}
}
/// A boxed variable used for lowering `late` variables when they are
/// initialized locals.
-///
-/// The [LateError]s produced have empty variable names.
-// TODO(fishythefish): Support variable names depending on flags/compiler.
class _InitializedCell {
+ final String _name;
Object? _value;
Object? Function() _initializer;
- _InitializedCell(this._initializer) {
+ @pragma('dart2js:noInline')
+ _InitializedCell(this._initializer) : _name = '' {
+ // `this` is a unique sentinel.
+ _value = this;
+ }
+
+ @pragma('dart2js:noInline')
+ _InitializedCell.named(this._name, this._initializer) {
// `this` is a unique sentinel.
_value = this;
}
@@ -84,7 +94,7 @@
Object? _readFinal() {
if (identical(_value, this)) {
final result = _initializer();
- if (!identical(_value, this)) throw LateError.localADI('');
+ if (!identical(_value, this)) throw LateError.localADI(_name);
_value = result;
}
return _value;
@@ -95,7 +105,7 @@
}
void set finalValue(Object? v) {
- if (!identical(_value, this)) throw LateError.localAI('');
+ if (!identical(_value, this)) throw LateError.localAI(_name);
_value = v;
}
}
diff --git a/tests/corelib/unsigned_shift_test.dart b/tests/corelib/unsigned_shift_test.dart
index ab3220f..6a3af9c 100644
--- a/tests/corelib/unsigned_shift_test.dart
+++ b/tests/corelib/unsigned_shift_test.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=triple-shift
import "package:expect/expect.dart";
diff --git a/tests/ffi/regress_45988_test.dart b/tests/ffi/regress_45988_test.dart
new file mode 100644
index 0000000..ce58efb
--- /dev/null
+++ b/tests/ffi/regress_45988_test.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:ffi';
+
+import "package:expect/expect.dart";
+import "package:ffi/ffi.dart";
+
+class DartValueFields extends Union {
+ external Pointer p1;
+ external Pointer p2;
+ external Pointer p3;
+ external Pointer p4;
+}
+
+void main() {
+ final p = calloc<DartValueFields>();
+ Expect.equals(0, p.ref.p4.address);
+ calloc.free(p);
+}
diff --git a/tests/ffi_2/regress_45988_test.dart b/tests/ffi_2/regress_45988_test.dart
new file mode 100644
index 0000000..8677840
--- /dev/null
+++ b/tests/ffi_2/regress_45988_test.dart
@@ -0,0 +1,21 @@
+// Copyright (c) 2021, the Dart project authors. Please see the AUTHORS file
+// for details. All rights reserved. Use of this source code is governed by a
+// BSD-style license that can be found in the LICENSE file.
+
+import 'dart:ffi';
+
+import "package:expect/expect.dart";
+import "package:ffi/ffi.dart";
+
+class DartValueFields extends Union {
+ Pointer p1;
+ Pointer p2;
+ Pointer p3;
+ Pointer p4;
+}
+
+void main() {
+ final p = calloc<DartValueFields>();
+ Expect.equals(0, p.ref.p4.address);
+ calloc.free(p);
+}
diff --git a/tests/language/const/double_in_int_op_test.dart b/tests/language/const/double_in_int_op_test.dart
index ed12305..9ff3279 100644
--- a/tests/language/const/double_in_int_op_test.dart
+++ b/tests/language/const/double_in_int_op_test.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=triple-shift
main() {
const dynamic i1 = 3;
diff --git a/tests/language/extension_methods/static_extension_constant_lib.dart b/tests/language/extension_methods/static_extension_constant_lib.dart
index 23d6de9..8fdb7b4 100644
--- a/tests/language/extension_methods/static_extension_constant_lib.dart
+++ b/tests/language/extension_methods/static_extension_constant_lib.dart
@@ -9,7 +9,7 @@
bool operator ^(Object other) => true;
int operator ~/(Object other) => 0;
int operator >>(Object other) => 1;
- // int operator >>>(Object other) => 2; // Requires triple-shift.
+ int operator >>>(Object other) => 2;
int operator <<(Object other) => 0;
int operator +(Object other) => 0;
double operator -() => 1.0;
@@ -39,7 +39,7 @@
b ^ b,
i ~/ i,
i >> i,
- // i >>> i, // Requries triple-shift.
+ i >>> i,
i << i,
i + i,
-i,
diff --git a/tests/language/extension_methods/static_extension_constant_test.dart b/tests/language/extension_methods/static_extension_constant_test.dart
index 18fdad15..751b7d8 100644
--- a/tests/language/extension_methods/static_extension_constant_test.dart
+++ b/tests/language/extension_methods/static_extension_constant_test.dart
@@ -24,7 +24,7 @@
b ^ b,
i ~/ i,
i >> i,
- // i >>> i, // Requries triple-shift.
+ i >>> i,
i << i,
i + i,
-i,
diff --git a/tests/language/generic/generic_function_type_argument_test.dart b/tests/language/generic/generic_function_type_argument_test.dart
index c54516f..999125b 100644
--- a/tests/language/generic/generic_function_type_argument_test.dart
+++ b/tests/language/generic/generic_function_type_argument_test.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=generic-metadata
import "package:expect/expect.dart";
import "../static_type_helper.dart";
diff --git a/tests/language/generic/generic_metadata_test.dart b/tests/language/generic/generic_metadata_test.dart
index ce15283..4ff135b 100644
--- a/tests/language/generic/generic_metadata_test.dart
+++ b/tests/language/generic/generic_metadata_test.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=generic-metadata
// Check that metadata constructor invocations can have type arguments.
diff --git a/tests/language/null_aware/access_runtime_1_test.dart b/tests/language/null_aware/access_runtime_1_test.dart
deleted file mode 100644
index ba92ba5..0000000
--- a/tests/language/null_aware/access_runtime_1_test.dart
+++ /dev/null
@@ -1,58 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it does not appear on the LHS of an
-// assignment.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class B {}
-
-class C extends B {
- int? v;
- C(this.v);
- static int? staticInt;
-}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if property access using "?." is not
- // implemented. This makes status files easier to maintain.
- nullC()?.v;
-
- // e1?.id is equivalent to ((x) => x == null ? null : x.id)(e1).
- Expect.equals(null, nullC()?.v);
-
-
- // C?.id is equivalent to C.id.
-
-
-
- // The static type of e1?.d is the static type of e1.id.
-
-
-
-
-
-
-
- // Let T be the static type of e1 and let y be a fresh variable of type T.
- // Exactly the same static warnings that would be caused by y.id are also
- // generated in the case of e1?.id.
-
-
-
- // '?.' cannot be used to access toplevel properties in libraries imported via
- // prefix.
-
-
- // Nor can it be used to access the hashCode getter on the class Type.
-
-
-}
diff --git a/tests/language/null_aware/access_runtime_2_test.dart b/tests/language/null_aware/access_runtime_2_test.dart
deleted file mode 100644
index a1ade72..0000000
--- a/tests/language/null_aware/access_runtime_2_test.dart
+++ /dev/null
@@ -1,59 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it does not appear on the LHS of an
-// assignment.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class B {}
-
-class C extends B {
- int? v;
- C(this.v);
- static int? staticInt;
-}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if property access using "?." is not
- // implemented. This makes status files easier to maintain.
- nullC()?.v;
-
- // e1?.id is equivalent to ((x) => x == null ? null : x.id)(e1).
-
- var c = new C(1) as C?;
- Expect.equals(1, c?.v);
-
- // C?.id is equivalent to C.id.
-
-
-
- // The static type of e1?.d is the static type of e1.id.
-
-
-
-
-
-
-
- // Let T be the static type of e1 and let y be a fresh variable of type T.
- // Exactly the same static warnings that would be caused by y.id are also
- // generated in the case of e1?.id.
-
-
-
- // '?.' cannot be used to access toplevel properties in libraries imported via
- // prefix.
-
-
- // Nor can it be used to access the hashCode getter on the class Type.
-
-
-}
diff --git a/tests/language/null_aware/access_runtime_3_test.dart b/tests/language/null_aware/access_runtime_3_test.dart
deleted file mode 100644
index 633aa36..0000000
--- a/tests/language/null_aware/access_runtime_3_test.dart
+++ /dev/null
@@ -1,58 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it does not appear on the LHS of an
-// assignment.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class B {}
-
-class C extends B {
- int? v;
- C(this.v);
- static int? staticInt;
-}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if property access using "?." is not
- // implemented. This makes status files easier to maintain.
- nullC()?.v;
-
- // e1?.id is equivalent to ((x) => x == null ? null : x.id)(e1).
-
-
-
- // C?.id is equivalent to C.id.
- { C.staticInt = 1; Expect.equals(1, C?.staticInt); }
-
-
- // The static type of e1?.d is the static type of e1.id.
-
-
-
-
-
-
-
- // Let T be the static type of e1 and let y be a fresh variable of type T.
- // Exactly the same static warnings that would be caused by y.id are also
- // generated in the case of e1?.id.
-
-
-
- // '?.' cannot be used to access toplevel properties in libraries imported via
- // prefix.
-
-
- // Nor can it be used to access the hashCode getter on the class Type.
-
-
-}
diff --git a/tests/language/null_aware/access_runtime_4_test.dart b/tests/language/null_aware/access_runtime_4_test.dart
deleted file mode 100644
index 96462c6..0000000
--- a/tests/language/null_aware/access_runtime_4_test.dart
+++ /dev/null
@@ -1,58 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it does not appear on the LHS of an
-// assignment.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class B {}
-
-class C extends B {
- int? v;
- C(this.v);
- static int? staticInt;
-}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if property access using "?." is not
- // implemented. This makes status files easier to maintain.
- nullC()?.v;
-
- // e1?.id is equivalent to ((x) => x == null ? null : x.id)(e1).
-
-
-
- // C?.id is equivalent to C.id.
-
- { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt); }
-
- // The static type of e1?.d is the static type of e1.id.
-
-
-
-
-
-
-
- // Let T be the static type of e1 and let y be a fresh variable of type T.
- // Exactly the same static warnings that would be caused by y.id are also
- // generated in the case of e1?.id.
-
-
-
- // '?.' cannot be used to access toplevel properties in libraries imported via
- // prefix.
-
-
- // Nor can it be used to access the hashCode getter on the class Type.
-
-
-}
diff --git a/tests/language/null_aware/access_runtime_5_test.dart b/tests/language/null_aware/access_runtime_5_test.dart
deleted file mode 100644
index 6db60ce3..0000000
--- a/tests/language/null_aware/access_runtime_5_test.dart
+++ /dev/null
@@ -1,59 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it does not appear on the LHS of an
-// assignment.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class B {}
-
-class C extends B {
- int? v;
- C(this.v);
- static int? staticInt;
-}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if property access using "?." is not
- // implemented. This makes status files easier to maintain.
- nullC()?.v;
-
- // e1?.id is equivalent to ((x) => x == null ? null : x.id)(e1).
-
-
-
- // C?.id is equivalent to C.id.
-
-
-
- // The static type of e1?.d is the static type of e1.id.
- var c = new C(1) as C?;
- { int? i = c?.v; Expect.equals(1, i); }
-
-
-
-
-
-
- // Let T be the static type of e1 and let y be a fresh variable of type T.
- // Exactly the same static warnings that would be caused by y.id are also
- // generated in the case of e1?.id.
-
-
-
- // '?.' cannot be used to access toplevel properties in libraries imported via
- // prefix.
-
-
- // Nor can it be used to access the hashCode getter on the class Type.
-
-
-}
diff --git a/tests/language/null_aware/access_runtime_6_test.dart b/tests/language/null_aware/access_runtime_6_test.dart
deleted file mode 100644
index 5b4a999..0000000
--- a/tests/language/null_aware/access_runtime_6_test.dart
+++ /dev/null
@@ -1,58 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it does not appear on the LHS of an
-// assignment.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class B {}
-
-class C extends B {
- int? v;
- C(this.v);
- static int? staticInt;
-}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if property access using "?." is not
- // implemented. This makes status files easier to maintain.
- nullC()?.v;
-
- // e1?.id is equivalent to ((x) => x == null ? null : x.id)(e1).
-
-
-
- // C?.id is equivalent to C.id.
-
-
-
- // The static type of e1?.d is the static type of e1.id.
-
-
- { C.staticInt = 1; int? i = C?.staticInt; Expect.equals(1, i); }
-
-
-
-
- // Let T be the static type of e1 and let y be a fresh variable of type T.
- // Exactly the same static warnings that would be caused by y.id are also
- // generated in the case of e1?.id.
-
-
-
- // '?.' cannot be used to access toplevel properties in libraries imported via
- // prefix.
-
-
- // Nor can it be used to access the hashCode getter on the class Type.
-
-
-}
diff --git a/tests/language/null_aware/access_runtime_7_test.dart b/tests/language/null_aware/access_runtime_7_test.dart
deleted file mode 100644
index 7f53dc1..0000000
--- a/tests/language/null_aware/access_runtime_7_test.dart
+++ /dev/null
@@ -1,58 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it does not appear on the LHS of an
-// assignment.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class B {}
-
-class C extends B {
- int? v;
- C(this.v);
- static int? staticInt;
-}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if property access using "?." is not
- // implemented. This makes status files easier to maintain.
- nullC()?.v;
-
- // e1?.id is equivalent to ((x) => x == null ? null : x.id)(e1).
-
-
-
- // C?.id is equivalent to C.id.
-
-
-
- // The static type of e1?.d is the static type of e1.id.
-
-
-
- { h.C.staticInt = 1; int? i = h.C?.staticInt; Expect.equals(1, i); }
-
-
-
- // Let T be the static type of e1 and let y be a fresh variable of type T.
- // Exactly the same static warnings that would be caused by y.id are also
- // generated in the case of e1?.id.
-
-
-
- // '?.' cannot be used to access toplevel properties in libraries imported via
- // prefix.
-
-
- // Nor can it be used to access the hashCode getter on the class Type.
-
-
-}
diff --git a/tests/language/null_aware/access_runtime_test.dart b/tests/language/null_aware/access_runtime_test.dart
index 5d8a2c8..9495fef 100644
--- a/tests/language/null_aware/access_runtime_test.dart
+++ b/tests/language/null_aware/access_runtime_test.dart
@@ -1,6 +1,3 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -22,37 +19,34 @@
C? nullC() => null;
main() {
- // Make sure the "none" test fails if property access using "?." is not
- // implemented. This makes status files easier to maintain.
- nullC()?.v;
-
// e1?.id is equivalent to ((x) => x == null ? null : x.id)(e1).
+ Expect.equals(null, nullC()?.v);
-
+ C? c = new C(1) as dynamic;
+ Expect.equals(1, c?.v);
// C?.id is equivalent to C.id.
+ C.staticInt = 1;
+ Expect.equals(1, C?.staticInt);
+ h.C.staticInt = 1;
+ Expect.equals(1, h.C?.staticInt);
+ // The static type of e1?.id is the static type of e1.id.
+ {
+ int? i = c?.v;
+ Expect.equals(1, i);
+ }
- // The static type of e1?.d is the static type of e1.id.
+ {
+ C.staticInt = 1;
+ int? i = C?.staticInt;
+ Expect.equals(1, i);
+ }
-
-
-
-
-
-
- // Let T be the static type of e1 and let y be a fresh variable of type T.
- // Exactly the same static warnings that would be caused by y.id are also
- // generated in the case of e1?.id.
-
-
-
- // '?.' cannot be used to access toplevel properties in libraries imported via
- // prefix.
-
-
- // Nor can it be used to access the hashCode getter on the class Type.
-
-
+ {
+ h.C.staticInt = 1;
+ int? i = h.C?.staticInt;
+ Expect.equals(1, i);
+ }
}
diff --git a/tests/language/null_aware/access_test.dart b/tests/language/null_aware/access_test.dart
index 488a0df..b5e4b17 100644
--- a/tests/language/null_aware/access_test.dart
+++ b/tests/language/null_aware/access_test.dart
@@ -110,7 +110,7 @@
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
// [cfe] The getter 'bad' isn't defined for the class 'C'.
{
- var b = new C(1) as B?;
+ B? b = new C(1) as dynamic;
Expect.equals(1, b?.v);
// ^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
diff --git a/tests/language/null_aware/assignment_runtime_10_test.dart b/tests/language/null_aware/assignment_runtime_10_test.dart
deleted file mode 100644
index 91abae7..0000000
--- a/tests/language/null_aware/assignment_runtime_10_test.dart
+++ /dev/null
@@ -1,101 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears on the LHS of an
-// assignment.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-bad() {
- Expect.fail('Should not be executed');
-}
-
-class B {}
-
-class C extends B {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1).
-
-
-
- // C?.v = e2 is equivalent to C.v = e2.
-
-
-
- // The static type of e1?.v = e2 is the static type of e2.
-
-
-
-
-
-
-
- // Exactly the same errors that would be caused by e1.v = e2 are
- // also generated in the case of e1?.v = e2.
-
-
-
- // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1).
-
-
-
- // C?.v op= e2 is equivalent to C.v op= e2.
- { C.staticInt = 1; Expect.equals(3, C?.staticInt += 2); Expect.equals(3, C?.staticInt); }
-
- // The static type of e1?.v op= e2 is the static type of e1.v op e2.
-
-
-
-
- // Let T be the static type of e1 and let y be a fresh variable of type T.
- // Exactly the same errors that would be caused by y.v op e2 are
- // also generated in the case of e1?.v op= e2.
-
-
-
-
-
-
-
-
-
- // '?.' cannot be used to assign to toplevel properties in libraries imported
- // via prefix.
-
-
-
-}
diff --git a/tests/language/null_aware/assignment_runtime_11_test.dart b/tests/language/null_aware/assignment_runtime_11_test.dart
deleted file mode 100644
index ca60103..0000000
--- a/tests/language/null_aware/assignment_runtime_11_test.dart
+++ /dev/null
@@ -1,101 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears on the LHS of an
-// assignment.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-bad() {
- Expect.fail('Should not be executed');
-}
-
-class B {}
-
-class C extends B {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1).
-
-
-
- // C?.v = e2 is equivalent to C.v = e2.
-
-
-
- // The static type of e1?.v = e2 is the static type of e2.
-
-
-
-
-
-
-
- // Exactly the same errors that would be caused by e1.v = e2 are
- // also generated in the case of e1?.v = e2.
-
-
-
- // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1).
-
-
-
- // C?.v op= e2 is equivalent to C.v op= e2.
-
-
- // The static type of e1?.v op= e2 is the static type of e1.v op e2.
- { var d = new D(new E()) as D?; F? f = (d?.v += 1); Expect.identical(d!.v, f); }
-
-
-
- // Let T be the static type of e1 and let y be a fresh variable of type T.
- // Exactly the same errors that would be caused by y.v op e2 are
- // also generated in the case of e1?.v op= e2.
-
-
-
-
-
-
-
-
-
- // '?.' cannot be used to assign to toplevel properties in libraries imported
- // via prefix.
-
-
-
-}
diff --git a/tests/language/null_aware/assignment_runtime_12_test.dart b/tests/language/null_aware/assignment_runtime_12_test.dart
deleted file mode 100644
index c17f848..0000000
--- a/tests/language/null_aware/assignment_runtime_12_test.dart
+++ /dev/null
@@ -1,101 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears on the LHS of an
-// assignment.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-bad() {
- Expect.fail('Should not be executed');
-}
-
-class B {}
-
-class C extends B {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1).
-
-
-
- // C?.v = e2 is equivalent to C.v = e2.
-
-
-
- // The static type of e1?.v = e2 is the static type of e2.
-
-
-
-
-
-
-
- // Exactly the same errors that would be caused by e1.v = e2 are
- // also generated in the case of e1?.v = e2.
-
-
-
- // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1).
-
-
-
- // C?.v op= e2 is equivalent to C.v op= e2.
-
-
- // The static type of e1?.v op= e2 is the static type of e1.v op e2.
-
- { D.staticE = new E(); F? f = (D?.staticE += 1); Expect.identical(D.staticE, f); }
-
-
- // Let T be the static type of e1 and let y be a fresh variable of type T.
- // Exactly the same errors that would be caused by y.v op e2 are
- // also generated in the case of e1?.v op= e2.
-
-
-
-
-
-
-
-
-
- // '?.' cannot be used to assign to toplevel properties in libraries imported
- // via prefix.
-
-
-
-}
diff --git a/tests/language/null_aware/assignment_runtime_13_test.dart b/tests/language/null_aware/assignment_runtime_13_test.dart
deleted file mode 100644
index 961aff3..0000000
--- a/tests/language/null_aware/assignment_runtime_13_test.dart
+++ /dev/null
@@ -1,101 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears on the LHS of an
-// assignment.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-bad() {
- Expect.fail('Should not be executed');
-}
-
-class B {}
-
-class C extends B {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1).
-
-
-
- // C?.v = e2 is equivalent to C.v = e2.
-
-
-
- // The static type of e1?.v = e2 is the static type of e2.
-
-
-
-
-
-
-
- // Exactly the same errors that would be caused by e1.v = e2 are
- // also generated in the case of e1?.v = e2.
-
-
-
- // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1).
-
-
-
- // C?.v op= e2 is equivalent to C.v op= e2.
-
-
- // The static type of e1?.v op= e2 is the static type of e1.v op e2.
-
-
- { h.D.staticE = new h.E(); h.F? f = (h.D?.staticE += 1); Expect.identical(h.D.staticE, f); }
-
- // Let T be the static type of e1 and let y be a fresh variable of type T.
- // Exactly the same errors that would be caused by y.v op e2 are
- // also generated in the case of e1?.v op= e2.
-
-
-
-
-
-
-
-
-
- // '?.' cannot be used to assign to toplevel properties in libraries imported
- // via prefix.
-
-
-
-}
diff --git a/tests/language/null_aware/assignment_runtime_1_test.dart b/tests/language/null_aware/assignment_runtime_1_test.dart
deleted file mode 100644
index 121302d..0000000
--- a/tests/language/null_aware/assignment_runtime_1_test.dart
+++ /dev/null
@@ -1,101 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears on the LHS of an
-// assignment.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-bad() {
- Expect.fail('Should not be executed');
-}
-
-class B {}
-
-class C extends B {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1).
- Expect.equals(null, nullC()?.v = bad());
-
-
- // C?.v = e2 is equivalent to C.v = e2.
-
-
-
- // The static type of e1?.v = e2 is the static type of e2.
-
-
-
-
-
-
-
- // Exactly the same errors that would be caused by e1.v = e2 are
- // also generated in the case of e1?.v = e2.
-
-
-
- // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1).
-
-
-
- // C?.v op= e2 is equivalent to C.v op= e2.
-
-
- // The static type of e1?.v op= e2 is the static type of e1.v op e2.
-
-
-
-
- // Let T be the static type of e1 and let y be a fresh variable of type T.
- // Exactly the same errors that would be caused by y.v op e2 are
- // also generated in the case of e1?.v op= e2.
-
-
-
-
-
-
-
-
-
- // '?.' cannot be used to assign to toplevel properties in libraries imported
- // via prefix.
-
-
-
-}
diff --git a/tests/language/null_aware/assignment_runtime_2_test.dart b/tests/language/null_aware/assignment_runtime_2_test.dart
deleted file mode 100644
index bc0cdb6..0000000
--- a/tests/language/null_aware/assignment_runtime_2_test.dart
+++ /dev/null
@@ -1,101 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears on the LHS of an
-// assignment.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-bad() {
- Expect.fail('Should not be executed');
-}
-
-class B {}
-
-class C extends B {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1).
-
- { var c = new C(1) as C?; Expect.equals(2, c?.v = 2); Expect.equals(2, c!.v); }
-
- // C?.v = e2 is equivalent to C.v = e2.
-
-
-
- // The static type of e1?.v = e2 is the static type of e2.
-
-
-
-
-
-
-
- // Exactly the same errors that would be caused by e1.v = e2 are
- // also generated in the case of e1?.v = e2.
-
-
-
- // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1).
-
-
-
- // C?.v op= e2 is equivalent to C.v op= e2.
-
-
- // The static type of e1?.v op= e2 is the static type of e1.v op e2.
-
-
-
-
- // Let T be the static type of e1 and let y be a fresh variable of type T.
- // Exactly the same errors that would be caused by y.v op e2 are
- // also generated in the case of e1?.v op= e2.
-
-
-
-
-
-
-
-
-
- // '?.' cannot be used to assign to toplevel properties in libraries imported
- // via prefix.
-
-
-
-}
diff --git a/tests/language/null_aware/assignment_runtime_3_test.dart b/tests/language/null_aware/assignment_runtime_3_test.dart
deleted file mode 100644
index bc50d98..0000000
--- a/tests/language/null_aware/assignment_runtime_3_test.dart
+++ /dev/null
@@ -1,101 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears on the LHS of an
-// assignment.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-bad() {
- Expect.fail('Should not be executed');
-}
-
-class B {}
-
-class C extends B {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1).
-
-
-
- // C?.v = e2 is equivalent to C.v = e2.
- { C.staticInt = 1; Expect.equals(2, C?.staticInt = 2); Expect.equals(2, C.staticInt); }
-
-
- // The static type of e1?.v = e2 is the static type of e2.
-
-
-
-
-
-
-
- // Exactly the same errors that would be caused by e1.v = e2 are
- // also generated in the case of e1?.v = e2.
-
-
-
- // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1).
-
-
-
- // C?.v op= e2 is equivalent to C.v op= e2.
-
-
- // The static type of e1?.v op= e2 is the static type of e1.v op e2.
-
-
-
-
- // Let T be the static type of e1 and let y be a fresh variable of type T.
- // Exactly the same errors that would be caused by y.v op e2 are
- // also generated in the case of e1?.v op= e2.
-
-
-
-
-
-
-
-
-
- // '?.' cannot be used to assign to toplevel properties in libraries imported
- // via prefix.
-
-
-
-}
diff --git a/tests/language/null_aware/assignment_runtime_4_test.dart b/tests/language/null_aware/assignment_runtime_4_test.dart
deleted file mode 100644
index dcf3ab0..0000000
--- a/tests/language/null_aware/assignment_runtime_4_test.dart
+++ /dev/null
@@ -1,101 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears on the LHS of an
-// assignment.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-bad() {
- Expect.fail('Should not be executed');
-}
-
-class B {}
-
-class C extends B {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1).
-
-
-
- // C?.v = e2 is equivalent to C.v = e2.
-
- { h.C.staticInt = 1; Expect.equals(2, h.C?.staticInt = 2); Expect.equals(2, h.C.staticInt); }
-
- // The static type of e1?.v = e2 is the static type of e2.
-
-
-
-
-
-
-
- // Exactly the same errors that would be caused by e1.v = e2 are
- // also generated in the case of e1?.v = e2.
-
-
-
- // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1).
-
-
-
- // C?.v op= e2 is equivalent to C.v op= e2.
-
-
- // The static type of e1?.v op= e2 is the static type of e1.v op e2.
-
-
-
-
- // Let T be the static type of e1 and let y be a fresh variable of type T.
- // Exactly the same errors that would be caused by y.v op e2 are
- // also generated in the case of e1?.v op= e2.
-
-
-
-
-
-
-
-
-
- // '?.' cannot be used to assign to toplevel properties in libraries imported
- // via prefix.
-
-
-
-}
diff --git a/tests/language/null_aware/assignment_runtime_5_test.dart b/tests/language/null_aware/assignment_runtime_5_test.dart
deleted file mode 100644
index 9507557..0000000
--- a/tests/language/null_aware/assignment_runtime_5_test.dart
+++ /dev/null
@@ -1,101 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears on the LHS of an
-// assignment.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-bad() {
- Expect.fail('Should not be executed');
-}
-
-class B {}
-
-class C extends B {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1).
-
-
-
- // C?.v = e2 is equivalent to C.v = e2.
-
-
-
- // The static type of e1?.v = e2 is the static type of e2.
- { var d = new D(new E()) as D?; G g = new G(); F? f = (d?.v = g); Expect.identical(f, g); }
-
-
-
-
-
-
- // Exactly the same errors that would be caused by e1.v = e2 are
- // also generated in the case of e1?.v = e2.
-
-
-
- // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1).
-
-
-
- // C?.v op= e2 is equivalent to C.v op= e2.
-
-
- // The static type of e1?.v op= e2 is the static type of e1.v op e2.
-
-
-
-
- // Let T be the static type of e1 and let y be a fresh variable of type T.
- // Exactly the same errors that would be caused by y.v op e2 are
- // also generated in the case of e1?.v op= e2.
-
-
-
-
-
-
-
-
-
- // '?.' cannot be used to assign to toplevel properties in libraries imported
- // via prefix.
-
-
-
-}
diff --git a/tests/language/null_aware/assignment_runtime_6_test.dart b/tests/language/null_aware/assignment_runtime_6_test.dart
deleted file mode 100644
index e1a732b..0000000
--- a/tests/language/null_aware/assignment_runtime_6_test.dart
+++ /dev/null
@@ -1,101 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears on the LHS of an
-// assignment.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-bad() {
- Expect.fail('Should not be executed');
-}
-
-class B {}
-
-class C extends B {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1).
-
-
-
- // C?.v = e2 is equivalent to C.v = e2.
-
-
-
- // The static type of e1?.v = e2 is the static type of e2.
-
-
- { D.staticE = new E(); G g = new G(); F? f = (D?.staticE = g); Expect.identical(f, g); }
-
-
-
-
- // Exactly the same errors that would be caused by e1.v = e2 are
- // also generated in the case of e1?.v = e2.
-
-
-
- // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1).
-
-
-
- // C?.v op= e2 is equivalent to C.v op= e2.
-
-
- // The static type of e1?.v op= e2 is the static type of e1.v op e2.
-
-
-
-
- // Let T be the static type of e1 and let y be a fresh variable of type T.
- // Exactly the same errors that would be caused by y.v op e2 are
- // also generated in the case of e1?.v op= e2.
-
-
-
-
-
-
-
-
-
- // '?.' cannot be used to assign to toplevel properties in libraries imported
- // via prefix.
-
-
-
-}
diff --git a/tests/language/null_aware/assignment_runtime_7_test.dart b/tests/language/null_aware/assignment_runtime_7_test.dart
deleted file mode 100644
index 8a5ba98..0000000
--- a/tests/language/null_aware/assignment_runtime_7_test.dart
+++ /dev/null
@@ -1,101 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears on the LHS of an
-// assignment.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-bad() {
- Expect.fail('Should not be executed');
-}
-
-class B {}
-
-class C extends B {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1).
-
-
-
- // C?.v = e2 is equivalent to C.v = e2.
-
-
-
- // The static type of e1?.v = e2 is the static type of e2.
-
-
-
- { h.D.staticE = new h.E(); h.G g = new h.G(); h.F? f = (h.D?.staticE = g); Expect.identical(f, g); }
-
-
-
- // Exactly the same errors that would be caused by e1.v = e2 are
- // also generated in the case of e1?.v = e2.
-
-
-
- // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1).
-
-
-
- // C?.v op= e2 is equivalent to C.v op= e2.
-
-
- // The static type of e1?.v op= e2 is the static type of e1.v op e2.
-
-
-
-
- // Let T be the static type of e1 and let y be a fresh variable of type T.
- // Exactly the same errors that would be caused by y.v op e2 are
- // also generated in the case of e1?.v op= e2.
-
-
-
-
-
-
-
-
-
- // '?.' cannot be used to assign to toplevel properties in libraries imported
- // via prefix.
-
-
-
-}
diff --git a/tests/language/null_aware/assignment_runtime_8_test.dart b/tests/language/null_aware/assignment_runtime_8_test.dart
deleted file mode 100644
index 34f7359..0000000
--- a/tests/language/null_aware/assignment_runtime_8_test.dart
+++ /dev/null
@@ -1,102 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears on the LHS of an
-// assignment.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-int bad() {
- Expect.fail('Should not be executed');
- return -1;
-}
-
-class B {}
-
-class C extends B {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1).
-
-
-
- // C?.v = e2 is equivalent to C.v = e2.
-
-
-
- // The static type of e1?.v = e2 is the static type of e2.
-
-
-
-
-
-
-
- // Exactly the same errors that would be caused by e1.v = e2 are
- // also generated in the case of e1?.v = e2.
-
-
-
- // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1).
- Expect.equals(null, nullC()?.v += bad());
-
-
- // C?.v op= e2 is equivalent to C.v op= e2.
-
-
- // The static type of e1?.v op= e2 is the static type of e1.v op e2.
-
-
-
-
- // Let T be the static type of e1 and let y be a fresh variable of type T.
- // Exactly the same errors that would be caused by y.v op e2 are
- // also generated in the case of e1?.v op= e2.
-
-
-
-
-
-
-
-
-
- // '?.' cannot be used to assign to toplevel properties in libraries imported
- // via prefix.
-
-
-
-}
diff --git a/tests/language/null_aware/assignment_runtime_9_test.dart b/tests/language/null_aware/assignment_runtime_9_test.dart
deleted file mode 100644
index 0a16c52..0000000
--- a/tests/language/null_aware/assignment_runtime_9_test.dart
+++ /dev/null
@@ -1,101 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears on the LHS of an
-// assignment.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-bad() {
- Expect.fail('Should not be executed');
-}
-
-class B {}
-
-class C extends B {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1).
-
-
-
- // C?.v = e2 is equivalent to C.v = e2.
-
-
-
- // The static type of e1?.v = e2 is the static type of e2.
-
-
-
-
-
-
-
- // Exactly the same errors that would be caused by e1.v = e2 are
- // also generated in the case of e1?.v = e2.
-
-
-
- // e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1).
-
- { var c = new C(1) as C?; Expect.equals(3, c?.v += 2); Expect.equals(3, c!.v); }
-
- // C?.v op= e2 is equivalent to C.v op= e2.
-
-
- // The static type of e1?.v op= e2 is the static type of e1.v op e2.
-
-
-
-
- // Let T be the static type of e1 and let y be a fresh variable of type T.
- // Exactly the same errors that would be caused by y.v op e2 are
- // also generated in the case of e1?.v op= e2.
-
-
-
-
-
-
-
-
-
- // '?.' cannot be used to assign to toplevel properties in libraries imported
- // via prefix.
-
-
-
-}
diff --git a/tests/language/null_aware/assignment_runtime_test.dart b/tests/language/null_aware/assignment_runtime_test.dart
index af673ef..6e73e75 100644
--- a/tests/language/null_aware/assignment_runtime_test.dart
+++ b/tests/language/null_aware/assignment_runtime_test.dart
@@ -1,6 +1,3 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
@@ -18,7 +15,7 @@
class B {}
class C extends B {
- int v;
+ num v;
C(this.v);
static late int staticInt;
}
@@ -44,58 +41,75 @@
C? nullC() => null;
main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
// e1?.v = e2 is equivalent to ((x) => x == null ? null : x.v = e2)(e1).
-
-
+ Expect.equals(null, nullC()?.v = bad());
+ {
+ C? c = new C(1) as dynamic;
+ Expect.equals(2, c?.v = 2);
+ Expect.equals(2, c!.v);
+ }
// C?.v = e2 is equivalent to C.v = e2.
+ C.staticInt = 1;
+ Expect.equals(2, C?.staticInt = 2);
+ Expect.equals(2, C.staticInt);
-
+ h.C.staticInt = 1;
+ Expect.equals(2, h.C?.staticInt = 2);
+ Expect.equals(2, h.C.staticInt);
// The static type of e1?.v = e2 is the static type of e2.
+ {
+ D? d = new D(new E()) as dynamic;
+ G g = new G();
+ F? f = (d?.v = g);
+ Expect.identical(f, g);
+ }
+ {
+ D.staticE = new E();
+ G g = new G();
+ F? f = (D?.staticE = g);
+ Expect.identical(f, g);
+ }
-
-
-
-
+ h.D.staticE = new h.E();
+ h.G g = new h.G();
+ h.F? f = (h.D?.staticE = g);
+ Expect.identical(f, g);
// Exactly the same errors that would be caused by e1.v = e2 are
// also generated in the case of e1?.v = e2.
-
-
// e1?.v op= e2 is equivalent to ((x) => x?.v = x.v op e2)(e1).
-
-
+ Expect.equals(null, nullC()?.v += bad());
+ {
+ C? c = new C(1) as dynamic;
+ Expect.equals(3, c?.v += 2);
+ Expect.equals(3, c!.v);
+ }
// C?.v op= e2 is equivalent to C.v op= e2.
-
+ C.staticInt = 1;
+ Expect.equals(3, C?.staticInt += 2);
+ Expect.equals(3, C?.staticInt);
// The static type of e1?.v op= e2 is the static type of e1.v op e2.
+ {
+ D? d = new D(new E()) as dynamic;
+ F? f = (d?.v += 1);
+ Expect.identical(d!.v, f);
+ }
+ {
+ D.staticE = new E();
+ F? f = (D?.staticE += 1);
+ Expect.identical(D.staticE, f);
+ }
-
-
- // Let T be the static type of e1 and let y be a fresh variable of type T.
- // Exactly the same errors that would be caused by y.v op e2 are
- // also generated in the case of e1?.v op= e2.
-
-
-
-
-
-
-
-
-
- // '?.' cannot be used to assign to toplevel properties in libraries imported
- // via prefix.
-
-
-
+ {
+ h.D.staticE = new h.E();
+ h.F? f = (h.D?.staticE += 1);
+ Expect.identical(h.D.staticE, f);
+ }
}
diff --git a/tests/language/null_aware/assignment_test.dart b/tests/language/null_aware/assignment_test.dart
index 1d7f71a..02c3506 100644
--- a/tests/language/null_aware/assignment_test.dart
+++ b/tests/language/null_aware/assignment_test.dart
@@ -76,13 +76,13 @@
// The static type of e1?.v = e2 is the static type of e2.
{
- var d = new D(new E()) as D?;
+ D? d = new D(new E()) as dynamic;
G g = new G();
F? f = (d?.v = g);
Expect.identical(f, g);
}
{
- var d = new D(new E()) as D?;
+ D? d = new D(new E()) as dynamic;
E e = new G();
F? f = (d?.v = e);
// ^^^^^^^^
@@ -201,17 +201,16 @@
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
// [cfe] The setter 'bad' isn't defined for the class 'C'.
{
- B b = new C(1);
- b?.v += 2;
+ B bname = new C(1);
+ bname?.v += 2;
// ^
// [cfe] Operand of null-aware operation '?.' has type 'B' which excludes null.
-// ^^
-// [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
- // ^
+ // ^^
+ // [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
+ // ^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_GETTER
- // [cfe] The getter 'v' isn't defined for the class 'B'.
- // ^
// [analyzer] COMPILE_TIME_ERROR.UNDEFINED_SETTER
+ // [cfe] The getter 'v' isn't defined for the class 'B'.
// [cfe] The setter 'v' isn't defined for the class 'B'.
}
{
@@ -231,7 +230,6 @@
// ^^^^^^^^^
// [analyzer] COMPILE_TIME_ERROR.INVALID_ASSIGNMENT
// [cfe] A value of type 'G?' can't be assigned to a variable of type 'H?'.
- // ^
// [cfe] Operand of null-aware operation '?.' has type 'D' which excludes null.
// ^^
// [analyzer] STATIC_WARNING.INVALID_NULL_AWARE_OPERATOR
diff --git a/tests/language/null_aware/increment_decrement_runtime_10_test.dart b/tests/language/null_aware/increment_decrement_runtime_10_test.dart
deleted file mode 100644
index 1ee42a7..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_10_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
- { C.staticInt = 1; Expect.equals(1, C?.staticInt--); Expect.equals(0, C.staticInt); }
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_11_test.dart b/tests/language/null_aware/increment_decrement_runtime_11_test.dart
deleted file mode 100644
index 2a96102..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_11_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
-
- { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt--); Expect.equals(0, h.C.staticInt); }
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_12_test.dart b/tests/language/null_aware/increment_decrement_runtime_12_test.dart
deleted file mode 100644
index 4e9c166..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_12_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
- { E e1 = new E(); var d = new D(e1) as D?; E? e2 = d?.v--; Expect.identical(e1, e2); }
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_13_test.dart b/tests/language/null_aware/increment_decrement_runtime_13_test.dart
deleted file mode 100644
index 54a60b5..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_13_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
- { E e1 = new E(); D.staticE = e1; E? e2 = D?.staticE--; Expect.identical(e1, e2); }
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_14_test.dart b/tests/language/null_aware/increment_decrement_runtime_14_test.dart
deleted file mode 100644
index aedf157..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_14_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
- { h.E e1 = new h.E(); h.D.staticE = e1; h.E? e2 = h.D?.staticE--; Expect.identical(e1, e2); }
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_15_test.dart b/tests/language/null_aware/increment_decrement_runtime_15_test.dart
deleted file mode 100644
index 674833c..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_15_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
- Expect.equals(null, ++nullC()?.v);
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_16_test.dart b/tests/language/null_aware/increment_decrement_runtime_16_test.dart
deleted file mode 100644
index cfd1b8b..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_16_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
- { var c = new C(1) as C?; Expect.equals(2, ++c?.v); Expect.equals(2, c!.v); }
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_17_test.dart b/tests/language/null_aware/increment_decrement_runtime_17_test.dart
deleted file mode 100644
index 4997a21..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_17_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
- { C.staticInt = 1; Expect.equals(2, ++C?.staticInt); Expect.equals(2, C.staticInt); }
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_18_test.dart b/tests/language/null_aware/increment_decrement_runtime_18_test.dart
deleted file mode 100644
index c42e93a..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_18_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
- { h.C.staticInt = 1; Expect.equals(2, ++h.C?.staticInt); Expect.equals(2, h.C.staticInt); }
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_19_test.dart b/tests/language/null_aware/increment_decrement_runtime_19_test.dart
deleted file mode 100644
index 0677ac7..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_19_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
- { var d = new D(new E()) as D?; F? f = ++d?.v; Expect.identical(d!.v, f); }
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_1_test.dart b/tests/language/null_aware/increment_decrement_runtime_1_test.dart
deleted file mode 100644
index d23da62..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_1_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
- Expect.equals(null, nullC()?.v++);
-
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_20_test.dart b/tests/language/null_aware/increment_decrement_runtime_20_test.dart
deleted file mode 100644
index d3dc17e..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_20_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
- { D.staticE = new E(); F? f = ++D?.staticE; Expect.identical(D.staticE, f); }
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_21_test.dart b/tests/language/null_aware/increment_decrement_runtime_21_test.dart
deleted file mode 100644
index b12232c..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_21_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
- { h.D.staticE = new h.E(); h.F? f = ++h.D?.staticE; Expect.identical(h.D.staticE, f); }
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_22_test.dart b/tests/language/null_aware/increment_decrement_runtime_22_test.dart
deleted file mode 100644
index 59b625c..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_22_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
- Expect.equals(null, --nullC()?.v);
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_23_test.dart b/tests/language/null_aware/increment_decrement_runtime_23_test.dart
deleted file mode 100644
index 2927351..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_23_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
- { var c = new C(1) as C?; Expect.equals(0, --c?.v); Expect.equals(0, c!.v); }
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_24_test.dart b/tests/language/null_aware/increment_decrement_runtime_24_test.dart
deleted file mode 100644
index f80ef6e..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_24_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
- { C.staticInt = 1; Expect.equals(0, --C?.staticInt); Expect.equals(0, C.staticInt); }
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_25_test.dart b/tests/language/null_aware/increment_decrement_runtime_25_test.dart
deleted file mode 100644
index 83ef846..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_25_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
- { h.C.staticInt = 1; Expect.equals(0, --h.C?.staticInt); Expect.equals(0, h.C.staticInt); }
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_26_test.dart b/tests/language/null_aware/increment_decrement_runtime_26_test.dart
deleted file mode 100644
index 903c33a..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_26_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
- { var d = new D(new E()) as D?; F? f = --d?.v; Expect.identical(d!.v, f); }
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_27_test.dart b/tests/language/null_aware/increment_decrement_runtime_27_test.dart
deleted file mode 100644
index c753b8a..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_27_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
- { D.staticE = new E(); F? f = --D?.staticE; Expect.identical(D.staticE, f); }
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_28_test.dart b/tests/language/null_aware/increment_decrement_runtime_28_test.dart
deleted file mode 100644
index fbec38a..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_28_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
- { h.D.staticE = new h.E(); h.F? f = --h.D?.staticE; Expect.identical(h.D.staticE, f); }
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_2_test.dart b/tests/language/null_aware/increment_decrement_runtime_2_test.dart
deleted file mode 100644
index 3a29ccc..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_2_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
- { var c = new C(1) as C?; Expect.equals(1, c?.v++); Expect.equals(2, c!.v); }
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_3_test.dart b/tests/language/null_aware/increment_decrement_runtime_3_test.dart
deleted file mode 100644
index d28f21e..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_3_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
- { C.staticInt = 1; Expect.equals(1, C?.staticInt++); Expect.equals(2, C.staticInt); }
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_4_test.dart b/tests/language/null_aware/increment_decrement_runtime_4_test.dart
deleted file mode 100644
index d5a21b7..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_4_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
-
- { h.C.staticInt = 1; Expect.equals(1, h.C?.staticInt++); Expect.equals(2, h.C.staticInt); }
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_5_test.dart b/tests/language/null_aware/increment_decrement_runtime_5_test.dart
deleted file mode 100644
index 0cc85fb..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_5_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
- { E e1 = new E(); var d = new D(e1) as D?; E? e2 = d?.v++; Expect.identical(e1, e2); }
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_6_test.dart b/tests/language/null_aware/increment_decrement_runtime_6_test.dart
deleted file mode 100644
index 3d4f812..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_6_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
- { E e1 = new E(); D.staticE = e1; E? e2 = D?.staticE++; Expect.identical(e1, e2); }
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_7_test.dart b/tests/language/null_aware/increment_decrement_runtime_7_test.dart
deleted file mode 100644
index b9ae91d..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_7_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
- { h.E e1 = new h.E(); h.D.staticE = e1; h.E? e2 = h.D?.staticE++; Expect.identical(e1, e2); }
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_8_test.dart b/tests/language/null_aware/increment_decrement_runtime_8_test.dart
deleted file mode 100644
index 669b7ed..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_8_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
- Expect.equals(null, nullC()?.v--);
-
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_9_test.dart b/tests/language/null_aware/increment_decrement_runtime_9_test.dart
deleted file mode 100644
index 7b42679..0000000
--- a/tests/language/null_aware/increment_decrement_runtime_9_test.dart
+++ /dev/null
@@ -1,109 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it appears in a postincrement or
-// preincrement expression (or a postdecrement or predecrement expression).
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-class C {
- int v;
- C(this.v);
- static late int staticInt;
-}
-
-class D {
- E v;
- D(this.v);
- static late E staticE;
-}
-
-class E {
- G operator +(int i) => new I();
- G operator -(int i) => new I();
-}
-
-class F {}
-
-class G extends E implements F {}
-
-class H {}
-
-class I extends G implements H {}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if assignment to "?." is not implemented.
- // This makes status files easier to maintain.
- nullC()?.v = 1;
-
- // e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
-
- // C?.v++ is equivalent to C.v++.
-
-
-
- // The static type of e1?.v++ is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
- { var c = new C(1) as C?; Expect.equals(1, c?.v--); Expect.equals(0, c!.v); }
-
- // C?.v-- is equivalent to C.v--.
-
-
-
- // The static type of e1?.v-- is the same as the static type of e1.v.
-
-
-
-
-
-
-
- // ++e1?.v is equivalent to e1?.v += 1.
-
-
-
- // ++C?.v is equivalent to C?.v += 1.
-
-
-
- // The static type of ++e1?.v is the same as the static type of e1.v + 1.
-
-
-
-
-
-
-
- // --e1?.v is equivalent to e1?.v -= 1.
-
-
-
- // --C?.v is equivalent to C?.v -= 1.
-
-
-
- // The static type of --e1?.v is the same as the static type of e1.v - 1.
-
-
-
-
-
-
-}
diff --git a/tests/language/null_aware/increment_decrement_runtime_test.dart b/tests/language/null_aware/increment_decrement_runtime_test.dart
index 0ccc804..0229341 100644
--- a/tests/language/null_aware/increment_decrement_runtime_test.dart
+++ b/tests/language/null_aware/increment_decrement_runtime_test.dart
@@ -44,66 +44,161 @@
nullC()?.v = 1;
// e1?.v++ is equivalent to ((x) => x == null ? null : x.v++)(e1).
-
-
+ Expect.equals(null, nullC()?.v++);
+ {
+ C? c = new C(1) as dynamic;
+ Expect.equals(1, c?.v++);
+ Expect.equals(2, c!.v);
+ }
// C?.v++ is equivalent to C.v++.
-
-
+ {
+ C.staticInt = 1;
+ Expect.equals(1, C?.staticInt++);
+ Expect.equals(2, C.staticInt);
+ }
+ {
+ h.C.staticInt = 1;
+ Expect.equals(1, h.C?.staticInt++);
+ Expect.equals(2, h.C.staticInt);
+ }
// The static type of e1?.v++ is the same as the static type of e1.v.
+ {
+ E e1 = new E();
+ D? d = new D(e1) as dynamic;
+ E? e2 = d?.v++;
+ Expect.identical(e1, e2);
+ }
-
-
-
-
-
+ {
+ E e1 = new E();
+ D.staticE = e1;
+ E? e2 = D?.staticE++;
+ Expect.identical(e1, e2);
+ }
+ {
+ h.E e1 = new h.E();
+ h.D.staticE = e1;
+ h.E? e2 = h.D?.staticE++;
+ Expect.identical(e1, e2);
+ }
// e1?.v-- is equivalent to ((x) => x == null ? null : x.v--)(e1).
-
-
+ Expect.equals(null, nullC()?.v--);
+ {
+ C? c = new C(1) as dynamic;
+ Expect.equals(1, c?.v--);
+ Expect.equals(0, c!.v);
+ }
// C?.v-- is equivalent to C.v--.
-
-
+ {
+ C.staticInt = 1;
+ Expect.equals(1, C?.staticInt--);
+ Expect.equals(0, C.staticInt);
+ }
+ {
+ h.C.staticInt = 1;
+ Expect.equals(1, h.C?.staticInt--);
+ Expect.equals(0, h.C.staticInt);
+ }
// The static type of e1?.v-- is the same as the static type of e1.v.
+ {
+ E e1 = new E();
+ D? d = new D(e1) as dynamic;
+ E? e2 = d?.v--;
+ Expect.identical(e1, e2);
+ }
-
-
-
-
-
+ {
+ E e1 = new E();
+ D.staticE = e1;
+ E? e2 = D?.staticE--;
+ Expect.identical(e1, e2);
+ }
+ {
+ h.E e1 = new h.E();
+ h.D.staticE = e1;
+ h.E? e2 = h.D?.staticE--;
+ Expect.identical(e1, e2);
+ }
// ++e1?.v is equivalent to e1?.v += 1.
-
-
+ Expect.equals(null, ++nullC()?.v);
+ {
+ C? c = new C(1) as dynamic;
+ Expect.equals(2, ++c?.v);
+ Expect.equals(2, c!.v);
+ }
// ++C?.v is equivalent to C?.v += 1.
-
-
+ {
+ C.staticInt = 1;
+ Expect.equals(2, ++C?.staticInt);
+ Expect.equals(2, C.staticInt);
+ }
+ {
+ h.C.staticInt = 1;
+ Expect.equals(2, ++h.C?.staticInt);
+ Expect.equals(2, h.C.staticInt);
+ }
// The static type of ++e1?.v is the same as the static type of e1.v + 1.
+ {
+ D? d = new D(new E()) as dynamic;
+ F? f = ++d?.v;
+ Expect.identical(d!.v, f);
+ }
-
-
-
-
-
+ {
+ D? d = new D(new E()) as dynamic;
+ F? f = ++d?.v;
+ Expect.identical(d!.v, f);
+ }
+ {
+ h.D.staticE = new h.E();
+ h.F? f = ++h.D?.staticE;
+ Expect.identical(h.D.staticE, f);
+ }
// --e1?.v is equivalent to e1?.v -= 1.
-
-
+ Expect.equals(null, --nullC()?.v);
+ {
+ C? c = new C(1) as dynamic;
+ Expect.equals(0, --c?.v);
+ Expect.equals(0, c!.v);
+ }
// --C?.v is equivalent to C?.v -= 1.
-
-
+ {
+ C.staticInt = 1;
+ Expect.equals(0, --C?.staticInt);
+ Expect.equals(0, C.staticInt);
+ }
+ {
+ h.C.staticInt = 1;
+ Expect.equals(0, --h.C?.staticInt);
+ Expect.equals(0, h.C.staticInt);
+ }
// The static type of --e1?.v is the same as the static type of e1.v - 1.
+ {
+ D? d = new D(new E()) as dynamic;
+ F? f = --d?.v;
+ Expect.identical(d!.v, f);
+ }
+ {
+ D.staticE = new E();
+ F? f = --D?.staticE;
+ Expect.identical(D.staticE, f);
+ }
-
-
-
-
+ {
+ h.D.staticE = new h.E();
+ h.F? f = --h.D?.staticE;
+ Expect.identical(h.D.staticE, f);
+ }
}
diff --git a/tests/language/null_aware/invocation_runtime_1_test.dart b/tests/language/null_aware/invocation_runtime_1_test.dart
deleted file mode 100644
index e5e1ed7..0000000
--- a/tests/language/null_aware/invocation_runtime_1_test.dart
+++ /dev/null
@@ -1,65 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it is used to invoke a method.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-bad() {
- Expect.fail('Should not be executed');
-}
-
-class B {}
-
-class C extends B {
- f(callback()?) => callback!();
- int g(int callback()) => callback();
- static staticF(callback()) => callback();
- static int staticG(int callback()) => callback();
-}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if method invocation using "?." is not
- // implemented. This makes status files easier to maintain.
- nullC()?.f(null);
-
- // o?.m(...) is equivalent to ((x) => x == null ? null : x.m(...))(o).
- Expect.equals(null, nullC()?.f(bad()));
-
-
- // C?.m(...) is equivalent to C.m(...).
-
-
-
- // The static type of o?.m(...) is the same as the static type of
- // o.m(...).
-
-
-
-
-
-
-
-
-
- // Let T be the static type of o and let y be a fresh variable of type T.
- // Exactly the same static warnings that would be caused by y.m(...) are also
- // generated in the case of o?.m(...).
-
-
-
- // '?.' can't be used to access toplevel functions in libraries imported via
- // prefix.
-
-
- // Nor can it be used to access the toString method on the class Type.
-
-
-}
diff --git a/tests/language/null_aware/invocation_runtime_2_test.dart b/tests/language/null_aware/invocation_runtime_2_test.dart
deleted file mode 100644
index 8c11b27..0000000
--- a/tests/language/null_aware/invocation_runtime_2_test.dart
+++ /dev/null
@@ -1,66 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it is used to invoke a method.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-bad() {
- Expect.fail('Should not be executed');
-}
-
-class B {}
-
-class C extends B {
- f(callback()?) => callback!();
- int g(int callback()) => callback();
- static staticF(callback()) => callback();
- static int staticG(int callback()) => callback();
-}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if method invocation using "?." is not
- // implemented. This makes status files easier to maintain.
- nullC()?.f(null);
-
- // o?.m(...) is equivalent to ((x) => x == null ? null : x.m(...))(o).
-
- var c = C() as C?;
- Expect.equals(1, c?.f(() => 1));
-
- // C?.m(...) is equivalent to C.m(...).
-
-
-
- // The static type of o?.m(...) is the same as the static type of
- // o.m(...).
-
-
-
-
-
-
-
-
-
- // Let T be the static type of o and let y be a fresh variable of type T.
- // Exactly the same static warnings that would be caused by y.m(...) are also
- // generated in the case of o?.m(...).
-
-
-
- // '?.' can't be used to access toplevel functions in libraries imported via
- // prefix.
-
-
- // Nor can it be used to access the toString method on the class Type.
-
-
-}
diff --git a/tests/language/null_aware/invocation_runtime_3_test.dart b/tests/language/null_aware/invocation_runtime_3_test.dart
deleted file mode 100644
index 13f50a1..0000000
--- a/tests/language/null_aware/invocation_runtime_3_test.dart
+++ /dev/null
@@ -1,65 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it is used to invoke a method.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-bad() {
- Expect.fail('Should not be executed');
-}
-
-class B {}
-
-class C extends B {
- f(callback()?) => callback!();
- int g(int callback()) => callback();
- static staticF(callback()) => callback();
- static int staticG(int callback()) => callback();
-}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if method invocation using "?." is not
- // implemented. This makes status files easier to maintain.
- nullC()?.f(null);
-
- // o?.m(...) is equivalent to ((x) => x == null ? null : x.m(...))(o).
-
-
-
- // C?.m(...) is equivalent to C.m(...).
- Expect.equals(1, C?.staticF(() => 1));
-
-
- // The static type of o?.m(...) is the same as the static type of
- // o.m(...).
-
-
-
-
-
-
-
-
-
- // Let T be the static type of o and let y be a fresh variable of type T.
- // Exactly the same static warnings that would be caused by y.m(...) are also
- // generated in the case of o?.m(...).
-
-
-
- // '?.' can't be used to access toplevel functions in libraries imported via
- // prefix.
-
-
- // Nor can it be used to access the toString method on the class Type.
-
-
-}
diff --git a/tests/language/null_aware/invocation_runtime_4_test.dart b/tests/language/null_aware/invocation_runtime_4_test.dart
deleted file mode 100644
index ea6b6b1..0000000
--- a/tests/language/null_aware/invocation_runtime_4_test.dart
+++ /dev/null
@@ -1,65 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it is used to invoke a method.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-bad() {
- Expect.fail('Should not be executed');
-}
-
-class B {}
-
-class C extends B {
- f(callback()?) => callback!();
- int g(int callback()) => callback();
- static staticF(callback()) => callback();
- static int staticG(int callback()) => callback();
-}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if method invocation using "?." is not
- // implemented. This makes status files easier to maintain.
- nullC()?.f(null);
-
- // o?.m(...) is equivalent to ((x) => x == null ? null : x.m(...))(o).
-
-
-
- // C?.m(...) is equivalent to C.m(...).
-
- Expect.equals(1, h.C?.staticF(() => 1));
-
- // The static type of o?.m(...) is the same as the static type of
- // o.m(...).
-
-
-
-
-
-
-
-
-
- // Let T be the static type of o and let y be a fresh variable of type T.
- // Exactly the same static warnings that would be caused by y.m(...) are also
- // generated in the case of o?.m(...).
-
-
-
- // '?.' can't be used to access toplevel functions in libraries imported via
- // prefix.
-
-
- // Nor can it be used to access the toString method on the class Type.
-
-
-}
diff --git a/tests/language/null_aware/invocation_runtime_5_test.dart b/tests/language/null_aware/invocation_runtime_5_test.dart
deleted file mode 100644
index b95b1e5..0000000
--- a/tests/language/null_aware/invocation_runtime_5_test.dart
+++ /dev/null
@@ -1,65 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it is used to invoke a method.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-bad() {
- Expect.fail('Should not be executed');
-}
-
-class B {}
-
-class C extends B {
- f(callback()?) => callback!();
- int g(int callback()) => callback();
- static staticF(callback()) => callback();
- static int staticG(int callback()) => callback();
-}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if method invocation using "?." is not
- // implemented. This makes status files easier to maintain.
- nullC()?.f(null);
-
- // o?.m(...) is equivalent to ((x) => x == null ? null : x.m(...))(o).
-
-
-
- // C?.m(...) is equivalent to C.m(...).
-
-
-
- // The static type of o?.m(...) is the same as the static type of
- // o.m(...).
- { int? i = nullC()?.g(bad()); Expect.equals(null, i); }
-
-
-
-
-
-
-
-
- // Let T be the static type of o and let y be a fresh variable of type T.
- // Exactly the same static warnings that would be caused by y.m(...) are also
- // generated in the case of o?.m(...).
-
-
-
- // '?.' can't be used to access toplevel functions in libraries imported via
- // prefix.
-
-
- // Nor can it be used to access the toString method on the class Type.
-
-
-}
diff --git a/tests/language/null_aware/invocation_runtime_6_test.dart b/tests/language/null_aware/invocation_runtime_6_test.dart
deleted file mode 100644
index bbabd59..0000000
--- a/tests/language/null_aware/invocation_runtime_6_test.dart
+++ /dev/null
@@ -1,66 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it is used to invoke a method.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-bad() {
- Expect.fail('Should not be executed');
-}
-
-class B {}
-
-class C extends B {
- f(callback()?) => callback!();
- int g(int callback()) => callback();
- static staticF(callback()) => callback();
- static int staticG(int callback()) => callback();
-}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if method invocation using "?." is not
- // implemented. This makes status files easier to maintain.
- nullC()?.f(null);
-
- // o?.m(...) is equivalent to ((x) => x == null ? null : x.m(...))(o).
-
-
-
- // C?.m(...) is equivalent to C.m(...).
-
-
-
- // The static type of o?.m(...) is the same as the static type of
- // o.m(...).
-
- var c = new C() as C?;
- { int? i = c?.g(() => 1); Expect.equals(1, i); }
-
-
-
-
-
-
-
- // Let T be the static type of o and let y be a fresh variable of type T.
- // Exactly the same static warnings that would be caused by y.m(...) are also
- // generated in the case of o?.m(...).
-
-
-
- // '?.' can't be used to access toplevel functions in libraries imported via
- // prefix.
-
-
- // Nor can it be used to access the toString method on the class Type.
-
-
-}
diff --git a/tests/language/null_aware/invocation_runtime_7_test.dart b/tests/language/null_aware/invocation_runtime_7_test.dart
deleted file mode 100644
index 8bed5f0..0000000
--- a/tests/language/null_aware/invocation_runtime_7_test.dart
+++ /dev/null
@@ -1,65 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it is used to invoke a method.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-bad() {
- Expect.fail('Should not be executed');
-}
-
-class B {}
-
-class C extends B {
- f(callback()?) => callback!();
- int g(int callback()) => callback();
- static staticF(callback()) => callback();
- static int staticG(int callback()) => callback();
-}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if method invocation using "?." is not
- // implemented. This makes status files easier to maintain.
- nullC()?.f(null);
-
- // o?.m(...) is equivalent to ((x) => x == null ? null : x.m(...))(o).
-
-
-
- // C?.m(...) is equivalent to C.m(...).
-
-
-
- // The static type of o?.m(...) is the same as the static type of
- // o.m(...).
-
-
-
-
- { int? i = C?.staticG(() => 1); Expect.equals(1, i); }
-
-
-
-
- // Let T be the static type of o and let y be a fresh variable of type T.
- // Exactly the same static warnings that would be caused by y.m(...) are also
- // generated in the case of o?.m(...).
-
-
-
- // '?.' can't be used to access toplevel functions in libraries imported via
- // prefix.
-
-
- // Nor can it be used to access the toString method on the class Type.
-
-
-}
diff --git a/tests/language/null_aware/invocation_runtime_8_test.dart b/tests/language/null_aware/invocation_runtime_8_test.dart
deleted file mode 100644
index 62f8c4a..0000000
--- a/tests/language/null_aware/invocation_runtime_8_test.dart
+++ /dev/null
@@ -1,65 +0,0 @@
-// TODO(multitest): This was automatically migrated from a multitest and may
-// contain strange or dead code.
-
-// Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE file.
-
-// Verify semantics of the ?. operator when it is used to invoke a method.
-
-import "package:expect/expect.dart";
-import "conditional_access_helper.dart" as h;
-
-bad() {
- Expect.fail('Should not be executed');
-}
-
-class B {}
-
-class C extends B {
- f(callback()?) => callback!();
- int g(int callback()) => callback();
- static staticF(callback()) => callback();
- static int staticG(int callback()) => callback();
-}
-
-C? nullC() => null;
-
-main() {
- // Make sure the "none" test fails if method invocation using "?." is not
- // implemented. This makes status files easier to maintain.
- nullC()?.f(null);
-
- // o?.m(...) is equivalent to ((x) => x == null ? null : x.m(...))(o).
-
-
-
- // C?.m(...) is equivalent to C.m(...).
-
-
-
- // The static type of o?.m(...) is the same as the static type of
- // o.m(...).
-
-
-
-
-
- { int? i = h.C?.staticG(() => 1); Expect.equals(1, i); }
-
-
-
- // Let T be the static type of o and let y be a fresh variable of type T.
- // Exactly the same static warnings that would be caused by y.m(...) are also
- // generated in the case of o?.m(...).
-
-
-
- // '?.' can't be used to access toplevel functions in libraries imported via
- // prefix.
-
-
- // Nor can it be used to access the toString method on the class Type.
-
-
-}
diff --git a/tests/language/null_aware/invocation_runtime_test.dart b/tests/language/null_aware/invocation_runtime_test.dart
index 8956053..a4bd1d5 100644
--- a/tests/language/null_aware/invocation_runtime_test.dart
+++ b/tests/language/null_aware/invocation_runtime_test.dart
@@ -26,40 +26,30 @@
C? nullC() => null;
main() {
- // Make sure the "none" test fails if method invocation using "?." is not
- // implemented. This makes status files easier to maintain.
- nullC()?.f(null);
-
// o?.m(...) is equivalent to ((x) => x == null ? null : x.m(...))(o).
-
-
-
+ Expect.equals(null, nullC()?.f(bad()));
+ C? c = C() as dynamic;
+ Expect.equals(1, c?.f(() => 1));
// C?.m(...) is equivalent to C.m(...).
-
-
+ Expect.equals(1, C?.staticF(() => 1));
+ Expect.equals(1, h.C?.staticF(() => 1));
// The static type of o?.m(...) is the same as the static type of
// o.m(...).
-
-
-
-
-
-
-
-
-
- // Let T be the static type of o and let y be a fresh variable of type T.
- // Exactly the same static warnings that would be caused by y.m(...) are also
- // generated in the case of o?.m(...).
-
-
-
- // '?.' can't be used to access toplevel functions in libraries imported via
- // prefix.
-
-
- // Nor can it be used to access the toString method on the class Type.
-
-
+ {
+ int? i = nullC()?.g(bad());
+ Expect.equals(null, i);
+ }
+ {
+ int? i = c?.g(() => 1);
+ Expect.equals(1, i);
+ }
+ {
+ int? i = C?.staticG(() => 1);
+ Expect.equals(1, i);
+ }
+ {
+ int? i = h.C?.staticG(() => 1);
+ Expect.equals(1, i);
+ }
}
diff --git a/tests/language/operator/operator_triple_shift_error_test.dart b/tests/language/operator/operator_triple_shift_error_test.dart
index 1b2bf5bb..5f0ad8a 100644
--- a/tests/language/operator/operator_triple_shift_error_test.dart
+++ b/tests/language/operator/operator_triple_shift_error_test.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=triple-shift
// Can only be declared with exactly one required positional parameter.
class C2 {
diff --git a/tests/language/operator/operator_triple_shift_test.dart b/tests/language/operator/operator_triple_shift_test.dart
index 2bbb811..5e58859 100644
--- a/tests/language/operator/operator_triple_shift_test.dart
+++ b/tests/language/operator/operator_triple_shift_test.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=triple-shift
import "package:expect/expect.dart";
diff --git a/tests/language/operator/unsigned_right_shift_test.dart b/tests/language/operator/unsigned_right_shift_test.dart
index ddbaf51..feabddd 100644
--- a/tests/language/operator/unsigned_right_shift_test.dart
+++ b/tests/language/operator/unsigned_right_shift_test.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=triple-shift
import "package:expect/expect.dart";
import "package:async_helper/async_helper.dart";
diff --git a/tests/language/regress/regress45313_test.dart b/tests/language/regress/regress45313_test.dart
index 0c6a5a1..840e809 100644
--- a/tests/language/regress/regress45313_test.dart
+++ b/tests/language/regress/regress45313_test.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=generic-metadata
import "package:expect/expect.dart";
diff --git a/tests/language/regress/regress45443_test.dart b/tests/language/regress/regress45443_test.dart
index a979342..d7f6aa6 100644
--- a/tests/language/regress/regress45443_test.dart
+++ b/tests/language/regress/regress45443_test.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=generic-metadata
class C1<T extends void Function<TT extends T>()> {}
diff --git a/tests/language/regress/regress45763_test.dart b/tests/language/regress/regress45763_test.dart
index 1efd68d..df83793 100644
--- a/tests/language/regress/regress45763_test.dart
+++ b/tests/language/regress/regress45763_test.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=generic-metadata
import "package:expect/expect.dart";
diff --git a/tests/language/vm/checked_smi_op_test.dart b/tests/language/vm/checked_smi_op_test.dart
index f1ae4a6..af75f6d 100644
--- a/tests/language/vm/checked_smi_op_test.dart
+++ b/tests/language/vm/checked_smi_op_test.dart
@@ -2,7 +2,6 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-// SharedOptions=--enable-experiment=triple-shift
// VMOptions=
// VMOptions=--use_slow_path
diff --git a/tests/language_2/extension_methods/static_extension_constant_lib.dart b/tests/language_2/extension_methods/static_extension_constant_lib.dart
index be388d1..96355f1 100644
--- a/tests/language_2/extension_methods/static_extension_constant_lib.dart
+++ b/tests/language_2/extension_methods/static_extension_constant_lib.dart
@@ -11,7 +11,6 @@
bool operator ^(Object other) => true;
int operator ~/(Object other) => 0;
int operator >>(Object other) => 1;
- // int operator >>>(Object other) => 2; // Requires triple-shift.
int operator <<(Object other) => 0;
int operator +(Object other) => 0;
double operator -() => 1.0;
@@ -41,7 +40,6 @@
b ^ b,
i ~/ i,
i >> i,
- // i >>> i, // Requries triple-shift.
i << i,
i + i,
-i,
diff --git a/tests/language_2/extension_methods/static_extension_constant_test.dart b/tests/language_2/extension_methods/static_extension_constant_test.dart
index b5fadbd..0d28ef6 100644
--- a/tests/language_2/extension_methods/static_extension_constant_test.dart
+++ b/tests/language_2/extension_methods/static_extension_constant_test.dart
@@ -26,7 +26,6 @@
b ^ b,
i ~/ i,
i >> i,
- // i >>> i, // Requries triple-shift.
i << i,
i + i,
-i,
diff --git a/tests/standalone/standalone.status b/tests/standalone/standalone.status
index bc31c1d..3c981bc 100644
--- a/tests/standalone/standalone.status
+++ b/tests/standalone/standalone.status
@@ -81,7 +81,6 @@
[ $system == macos && ($runtime == dart_precompiled || $runtime == vm) ]
io/raw_secure_server_socket_test: Crash
io/raw_server_socket_cancel_test: Skip # Issue 28182 # This test sometimes hangs on Mac.
-io/secure_server_client_certificate_test: Skip # Re-enable once the bots have been updated. Issue #26057
io/socket_many_connections_test: Skip # This test fails with "Too many open files" on the Mac OS buildbot. This is expected as MacOS by default runs with a very low number of allowed open files ('ulimit -n' says something like 256).
[ $arch == arm || $arch == arm64 || $runtime != vm || $system == android ]
diff --git a/tests/standalone_2/standalone_2.status b/tests/standalone_2/standalone_2.status
index 53879fd..df81919 100644
--- a/tests/standalone_2/standalone_2.status
+++ b/tests/standalone_2/standalone_2.status
@@ -88,7 +88,6 @@
[ $system == macos && ($runtime == dart_precompiled || $runtime == vm) ]
io/raw_secure_server_socket_test: Crash
io/raw_server_socket_cancel_test: Skip # Issue 28182 # This test sometimes hangs on Mac.
-io/secure_server_client_certificate_test: Skip # Re-enable once the bots have been updated. Issue #26057
io/socket_many_connections_test: Skip # This test fails with "Too many open files" on the Mac OS buildbot. This is expected as MacOS by default runs with a very low number of allowed open files ('ulimit -n' says something like 256).
[ $arch == arm || $arch == arm64 || $runtime != vm || $system == android ]
diff --git a/third_party/.gitignore b/third_party/.gitignore
index 0bd8a83..779e818c 100644
--- a/third_party/.gitignore
+++ b/third_party/.gitignore
@@ -7,7 +7,6 @@
!pkg_tested
!/tcmalloc
!d8
-!7zip.tar.gz.sha1
!firefox_jsshell
!clang.tar.gz.sha1
!unittest.tar.gz.sha1
diff --git a/third_party/7zip.tar.gz.sha1 b/third_party/7zip.tar.gz.sha1
deleted file mode 100644
index 83e790b..0000000
--- a/third_party/7zip.tar.gz.sha1
+++ /dev/null
@@ -1 +0,0 @@
-22fe352b3c39c4281a599cf8576abef80ec44cc9
\ No newline at end of file
diff --git a/tools/VERSION b/tools/VERSION
index f7875ea..4af193d 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 14
PATCH 0
-PRERELEASE 111
+PRERELEASE 112
PRERELEASE_PATCH 0
\ No newline at end of file
diff --git a/tools/bots/dart_sdk.py b/tools/bots/dart_sdk.py
index 0193969..d876320 100755
--- a/tools/bots/dart_sdk.py
+++ b/tools/bots/dart_sdk.py
@@ -74,7 +74,6 @@
DartArchiveUploadSDKs(BUILD_OS, arch, sdk_zip)
-
def DartArchiveUploadSDKs(system, arch, sdk_zip):
namer = bot_utils.GCSNamer(CHANNEL, bot_utils.ReleaseType.RAW)
git_number = utils.GetArchiveVersion()
@@ -171,26 +170,12 @@
def CreateZip(directory, target_file):
- if 'win' in BUILD_OS:
- CreateZipWindows(directory, target_file)
- else:
- CreateZipPosix(directory, target_file)
-
-
-def CreateZipPosix(directory, target_file):
- with utils.ChangedWorkingDirectory(os.path.dirname(directory)):
- command = ['zip', '-yrq9', target_file, os.path.basename(directory)]
- Run(command)
-
-
-def CreateZipWindows(directory, target_file):
- with utils.ChangedWorkingDirectory(os.path.dirname(directory)):
- zip_win = os.path.join(bot_utils.DART_DIR, 'third_party', '7zip', '7za')
- command = [
- zip_win, 'a', '-tzip', target_file,
- os.path.basename(directory)
- ]
- Run(command)
+ root = os.path.dirname(directory)
+ base = os.path.basename(directory)
+ f = shutil.make_archive(target_file, 'zip', root, base)
+ # make_archive will appened '.zip' to the filename, so we have to rename
+ # to avoid having it being '.zip.zip'
+ shutil.move(f, target_file)
def FileDelete(f):
diff --git a/tools/bots/test_matrix.json b/tools/bots/test_matrix.json
index 39d7272..bc961e1 100644
--- a/tools/bots/test_matrix.json
+++ b/tools/bots/test_matrix.json
@@ -3097,6 +3097,14 @@
]
},
{
+ "name": "analyze runtime/tests/concurrency/generate_stress_test.dart",
+ "script": "out/ReleaseX64/dart-sdk/bin/dart",
+ "arguments": [
+ "analyze",
+ "runtime/tests/concurrency/generate_stress_test.dart"
+ ]
+ },
+ {
"name": "analyze pkg/analysis_server",
"script": "out/ReleaseX64/dart-sdk/bin/dart",
"arguments": [
@@ -3707,6 +3715,99 @@
},
{
"builders": [
+ "iso-stress-linux"
+ ],
+ "meta": {
+ "description": "This configuration is used for isolate stress testing."
+ },
+ "steps": [
+ {
+ "name": "Build Dart VM - JIT and AOT",
+ "script": "tools/build.py",
+ "arguments": [
+ "--mode=debug,release",
+ "--arch=x64",
+ "runtime_kernel",
+ "dart_precompiled_runtime"
+ ]
+ },
+ {
+ "name": "Build Dart VM - JIT and AOT (Release TSAN)",
+ "script": "tools/build.py",
+ "arguments": [
+ "--mode=release",
+ "--arch=x64",
+ "--sanitizer=tsan",
+ "runtime_kernel",
+ "dart_precompiled_runtime"
+ ]
+ },
+ {
+ "name": "Generate Isolate Stress Test",
+ "script": "out/ReleaseX64/dart",
+ "arguments": [
+ "runtime/tests/concurrency/generate_stress_test.dart"
+ ]
+ },
+ {
+ "name": "Generate Isolate Stress Test - JIT Dill",
+ "script": "out/ReleaseX64/dart",
+ "arguments": [
+ "pkg/vm/bin/gen_kernel.dart",
+ "--platform=out/ReleaseX64/vm_platform_strong.dill",
+ "--no-aot",
+ "--no-sound-null-safety",
+ "-o", "runtime/tests/concurrency/generated_stress_test.dart.jit.dill",
+ "runtime/tests/concurrency/generated_stress_test.dart"
+ ]
+ },
+ {
+ "name": "Generate Isolate Stress Test - JIT Dill NNBD",
+ "script": "out/ReleaseX64/dart",
+ "arguments": [
+ "pkg/vm/bin/gen_kernel.dart",
+ "--platform=out/ReleaseX64/vm_platform_strong.dill",
+ "--no-aot",
+ "-o", "runtime/tests/concurrency/generated_stress_test_nnbd.dart.jit.dill",
+ "runtime/tests/concurrency/generated_stress_test_nnbd.dart"
+ ]
+ },
+ {
+ "name": "Generate Isolate Stress Test - AOT Dill",
+ "script": "out/ReleaseX64/dart",
+ "arguments": [
+ "pkg/vm/bin/gen_kernel.dart",
+ "--platform=out/ReleaseX64/vm_platform_strong.dill",
+ "--aot",
+ "--no-sound-null-safety",
+ "-o", "runtime/tests/concurrency/generated_stress_test.dart.aot.dill",
+ "runtime/tests/concurrency/generated_stress_test.dart"
+ ]
+ },
+ {
+ "name": "Generate Isolate Stress Test - AOT Dill NNBD",
+ "script": "out/ReleaseX64/dart",
+ "arguments": [
+ "pkg/vm/bin/gen_kernel.dart",
+ "--platform=out/ReleaseX64/vm_platform_strong.dill",
+ "--aot",
+ "-o", "runtime/tests/concurrency/generated_stress_test_nnbd.dart.aot.dill",
+ "runtime/tests/concurrency/generated_stress_test_nnbd.dart"
+ ]
+ },
+ {
+ "name": "Run Isolate Stress Tests",
+ "script": "out/ReleaseX64/dart",
+ "arguments": [
+ "runtime/tests/concurrency/run_stress_test_shards.dart"
+ ],
+ "shards": 10,
+ "fileset": "vm-kernel"
+ }
+ ]
+ },
+ {
+ "builders": [
"vm-kernel-precomp-linux-debug-simarm_x64",
"vm-kernel-precomp-linux-release-simarm_x64"
],
diff --git a/tools/experimental_features.yaml b/tools/experimental_features.yaml
index d527d2a..c171b62 100644
--- a/tools/experimental_features.yaml
+++ b/tools/experimental_features.yaml
@@ -110,7 +110,7 @@
help: "Sound variance"
alternative-invalidation-strategy:
- help: "Alternative invalidation strategy for incremental compilation"
+ help: "Alternative invalidation strategy for incremental compilation."
category: "CFE"
value-class:
@@ -125,6 +125,12 @@
constructor-tearoffs:
help: "Allow constructor tear-offs and explicit generic instantiations."
+# Experiment flag only used for testing.
+ test-experiment:
+ help: >-
+ Has no effect. Can be used for testing the --enable-experiment
+ command line functionality.
+
#
# Flags below this line are shipped, retired, or rejected, cannot be specified
# on the command line, and will eventually be removed.