Version 2.11.0-186.0.dev
Merge commit '78e30b039e07fb0a16e5972caf6f5543fd13e9c8' into 'dev'
diff --git a/DEPS b/DEPS
index d0e3e35..a124f6b 100644
--- a/DEPS
+++ b/DEPS
@@ -44,7 +44,7 @@
# co19 is a cipd package. Use update.sh in tests/co19[_2] to update these
# hashes. It requires access to the dart-build-access group, which EngProd
# has.
- "co19_rev": "53dd55a31d345320a6aa2b6eea0467f868b72377",
+ "co19_rev": "01adc3471b81d3bceb9bbe775ed1262b1b89cc8a",
"co19_2_rev": "e48b3090826cf40b8037648f19d211e8eab1b4b6",
# The internal benchmarks to use. See go/dart-benchmarks-internal
@@ -529,7 +529,7 @@
"packages": [
{
"package": "dart/cfe/dart2js_dills",
- "version": "binary_version:45",
+ "version": "binary_version:46",
}
],
"dep_type": "cipd",
diff --git a/pkg/analyzer/lib/error/error.dart b/pkg/analyzer/lib/error/error.dart
index 67b4f36..70db8db 100644
--- a/pkg/analyzer/lib/error/error.dart
+++ b/pkg/analyzer/lib/error/error.dart
@@ -260,6 +260,7 @@
CompileTimeErrorCode.LATE_FINAL_FIELD_WITH_CONST_CONSTRUCTOR,
CompileTimeErrorCode.LATE_FINAL_LOCAL_ALREADY_ASSIGNED,
CompileTimeErrorCode.LIST_ELEMENT_TYPE_NOT_ASSIGNABLE,
+ CompileTimeErrorCode.MAIN_IS_NOT_FUNCTION,
CompileTimeErrorCode.MAP_ENTRY_NOT_IN_MAP,
CompileTimeErrorCode.MAP_KEY_TYPE_NOT_ASSIGNABLE,
CompileTimeErrorCode.MAP_VALUE_TYPE_NOT_ASSIGNABLE,
diff --git a/pkg/analyzer/lib/src/error/best_practices_verifier.dart b/pkg/analyzer/lib/src/error/best_practices_verifier.dart
index d94a231..8517699 100644
--- a/pkg/analyzer/lib/src/error/best_practices_verifier.dart
+++ b/pkg/analyzer/lib/src/error/best_practices_verifier.dart
@@ -413,20 +413,14 @@
[field.name, overriddenElement.enclosingElement.name]);
}
- var expression = field.initializer;
-
- var element = _getElement(expression);
- if (element != null) {
- if (element is PropertyAccessorElement && element.isSynthetic) {
- element = (element as PropertyAccessorElement).variable;
- }
- if (element.hasOrInheritsDoNotStore) {
- _errorReporter.reportErrorForNode(
- HintCode.ASSIGNMENT_OF_DO_NOT_STORE,
- expression,
- [element.name],
- );
- }
+ var expressionMap =
+ _getSubExpressionsMarkedDoNotStore(field.initializer);
+ for (var entry in expressionMap.entries) {
+ _errorReporter.reportErrorForNode(
+ HintCode.ASSIGNMENT_OF_DO_NOT_STORE,
+ entry.key,
+ [entry.value.name],
+ );
}
}
} finally {
@@ -1382,15 +1376,17 @@
if (_inDoNotStoreMember) {
return;
}
- var element = _getElement(expression);
- if (element != null && element.hasOrInheritsDoNotStore) {
+ var expressionMap = _getSubExpressionsMarkedDoNotStore(expression);
+ if (expressionMap.isNotEmpty) {
Declaration parent = expression.thisOrAncestorMatching(
(e) => e is FunctionDeclaration || e is MethodDeclaration);
- _errorReporter.reportErrorForNode(
- HintCode.RETURN_OF_DO_NOT_STORE,
- expression,
- [element.name, parent.declaredElement.displayName],
- );
+ for (var entry in expressionMap.entries) {
+ _errorReporter.reportErrorForNode(
+ HintCode.RETURN_OF_DO_NOT_STORE,
+ entry.key,
+ [entry.value.name, parent.declaredElement.displayName],
+ );
+ }
}
}
@@ -1537,7 +1533,13 @@
}
}
- Element _getElement(Expression expression) {
+ /// Return subexpressions that are marked `@doNotStore`, as a map so that
+ /// corresponding elements can be used in the diagnostic message.
+ Map<Expression, Element> _getSubExpressionsMarkedDoNotStore(
+ Expression expression,
+ {Map<Expression, Element> addTo}) {
+ var expressions = addTo ?? <Expression, Element>{};
+
Element element;
if (expression is PropertyAccess) {
element = expression.propertyName.staticElement;
@@ -1553,13 +1555,26 @@
if (element is FunctionElement || element is MethodElement) {
element = null;
}
+ } else if (expression is ConditionalExpression) {
+ _getSubExpressionsMarkedDoNotStore(expression.elseExpression,
+ addTo: expressions);
+ _getSubExpressionsMarkedDoNotStore(expression.thenExpression,
+ addTo: expressions);
+ } else if (expression is BinaryExpression) {
+ _getSubExpressionsMarkedDoNotStore(expression.leftOperand,
+ addTo: expressions);
+ _getSubExpressionsMarkedDoNotStore(expression.rightOperand,
+ addTo: expressions);
}
- if (element != null) {
- if (element is PropertyAccessorElement && element.isSynthetic) {
- element = (element as PropertyAccessorElement).variable;
- }
+ if (element is PropertyAccessorElement && element.isSynthetic) {
+ element = (element as PropertyAccessorElement).variable;
}
- return element;
+
+ if (element != null && element.hasOrInheritsDoNotStore) {
+ expressions[expression] = element;
+ }
+
+ return expressions;
}
bool _isLibraryInWorkspacePackage(LibraryElement library) {
diff --git a/pkg/analyzer/lib/src/error/codes.dart b/pkg/analyzer/lib/src/error/codes.dart
index ac58a82..4c17cc04 100644
--- a/pkg/analyzer/lib/src/error/codes.dart
+++ b/pkg/analyzer/lib/src/error/codes.dart
@@ -5460,6 +5460,12 @@
"The element type '{0}' can't be assigned to the list type '{1}'.",
hasPublishedDocs: true);
+ static const CompileTimeErrorCode MAIN_IS_NOT_FUNCTION = CompileTimeErrorCode(
+ 'MAIN_IS_NOT_FUNCTION',
+ "The declaration named 'main' must be a function.",
+ correction: "Try using a different name for this declaration.",
+ );
+
/**
* No parameters.
*/
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index 696581e..bb5328a 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -449,6 +449,7 @@
_checkForFinalNotInitializedInClass(members);
_checkForBadFunctionUse(node);
_checkForWrongTypeParameterVarianceInSuperinterfaces();
+ _checkForMainFunction(node.name);
super.visitClassDeclaration(node);
} finally {
_isInNativeClass = false;
@@ -466,6 +467,7 @@
_enclosingClass = node.declaredElement;
_checkClassInheritance(
node, node.superclass, node.withClause, node.implementsClause);
+ _checkForMainFunction(node.name);
_checkForWrongTypeParameterVarianceInSuperinterfaces();
} finally {
_enclosingClass = outerClassElement;
@@ -724,6 +726,7 @@
_checkForTypeAnnotationDeferredClass(returnType);
_returnTypeVerifier.verifyReturnType(returnType);
_checkForImplicitDynamicReturn(node.name, node.declaredElement);
+ _checkForMainFunction(node.name);
super.visitFunctionDeclaration(node);
});
}
@@ -770,6 +773,7 @@
void visitFunctionTypeAlias(FunctionTypeAlias node) {
_checkForBuiltInIdentifierAsName(
node.name, CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME);
+ _checkForMainFunction(node.name);
_checkForTypeAliasCannotReferenceItself(node, node.declaredElement);
super.visitFunctionTypeAlias(node);
}
@@ -805,6 +809,7 @@
void visitGenericTypeAlias(GenericTypeAlias node) {
_checkForBuiltInIdentifierAsName(
node.name, CompileTimeErrorCode.BUILT_IN_IDENTIFIER_AS_TYPEDEF_NAME);
+ _checkForMainFunction(node.name);
_checkForTypeAliasCannotReferenceItself(node, node.declaredElement);
super.visitGenericTypeAlias(node);
}
@@ -970,6 +975,7 @@
_checkForConflictingClassMembers();
_checkForFinalNotInitializedInClass(members);
+ _checkForMainFunction(node.name);
_checkForWrongTypeParameterVarianceInSuperinterfaces();
// _checkForBadFunctionUse(node);
super.visitMixinDeclaration(node);
@@ -1193,6 +1199,11 @@
void visitTopLevelVariableDeclaration(TopLevelVariableDeclaration node) {
_checkForFinalNotInitialized(node.variables);
_checkForNotInitializedNonNullableVariable(node.variables);
+
+ for (var declaration in node.variables.variables) {
+ _checkForMainFunction(declaration.name);
+ }
+
super.visitTopLevelVariableDeclaration(node);
}
@@ -3094,6 +3105,31 @@
}
}
+ void _checkForMainFunction(SimpleIdentifier nameNode) {
+ if (!_currentLibrary.isNonNullableByDefault) {
+ return;
+ }
+
+ var element = nameNode.staticElement;
+
+ // We should only check exported declarations, i.e. top-level.
+ if (element.enclosingElement is! CompilationUnitElement) {
+ return;
+ }
+
+ if (element.displayName != 'main') {
+ return;
+ }
+
+ if (element is! FunctionElement) {
+ _errorReporter.reportErrorForNode(
+ CompileTimeErrorCode.MAIN_IS_NOT_FUNCTION,
+ nameNode,
+ );
+ return;
+ }
+ }
+
void _checkForMapTypeNotAssignable(SetOrMapLiteral literal) {
// Determine the map's key and value types. We base this on the static type
// and not the literal's type arguments because in strong mode, the type
diff --git a/pkg/analyzer/test/src/diagnostics/assignment_of_do_not_store_test.dart b/pkg/analyzer/test/src/diagnostics/assignment_of_do_not_store_test.dart
index ef2c8c2..ccdfcf5 100644
--- a/pkg/analyzer/test/src/diagnostics/assignment_of_do_not_store_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/assignment_of_do_not_store_test.dart
@@ -34,7 +34,8 @@
String f = A().v;
}
''', [
- error(HintCode.ASSIGNMENT_OF_DO_NOT_STORE, 106, 5),
+ error(HintCode.ASSIGNMENT_OF_DO_NOT_STORE, 106, 5,
+ messageContains: "'v'"),
]);
}
@@ -176,4 +177,59 @@
error(HintCode.ASSIGNMENT_OF_DO_NOT_STORE, 83, 1),
]);
}
+
+ test_topLevelVariable_binaryExpression() async {
+ await assertErrorsInCode('''
+import 'package:meta/meta.dart';
+
+@doNotStore
+final v = '';
+
+class A {
+ final f = v ?? v;
+}
+''', [
+ error(HintCode.ASSIGNMENT_OF_DO_NOT_STORE, 83, 1),
+ error(HintCode.ASSIGNMENT_OF_DO_NOT_STORE, 88, 1),
+ ]);
+ }
+
+ test_topLevelVariable_libraryAnnotation() async {
+ testFilePath;
+ newFile('$testPackageLibPath/library.dart', content: '''
+@doNotStore
+library lib;
+
+import 'package:meta/meta.dart';
+
+final v = '';
+''');
+
+ await assertErrorsInCode('''
+import 'library.dart';
+
+class A {
+ final f = v;
+}
+''', [
+ error(HintCode.ASSIGNMENT_OF_DO_NOT_STORE, 46, 1),
+ ]);
+ }
+
+ test_topLevelVariable_ternary() async {
+ await assertErrorsInCode('''
+import 'package:meta/meta.dart';
+
+@doNotStore
+final v = '';
+
+class A {
+ static bool c;
+ final f = c ? v : v;
+}
+''', [
+ error(HintCode.ASSIGNMENT_OF_DO_NOT_STORE, 104, 1),
+ error(HintCode.ASSIGNMENT_OF_DO_NOT_STORE, 108, 1),
+ ]);
+ }
}
diff --git a/pkg/analyzer/test/src/diagnostics/main_is_not_function_test.dart b/pkg/analyzer/test/src/diagnostics/main_is_not_function_test.dart
new file mode 100644
index 0000000..6b5921d
--- /dev/null
+++ b/pkg/analyzer/test/src/diagnostics/main_is_not_function_test.dart
@@ -0,0 +1,97 @@
+// Copyright (c) 2020, 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 'package:analyzer/src/error/codes.dart';
+import 'package:test_reflective_loader/test_reflective_loader.dart';
+
+import '../dart/resolution/context_collection_resolution.dart';
+
+main() {
+ defineReflectiveSuite(() {
+ defineReflectiveTests(MainIsNotFunctionTest);
+ defineReflectiveTests(MainIsNotFunctionWithNullSafetyTest);
+ });
+}
+
+@reflectiveTest
+class MainIsNotFunctionTest extends PubPackageResolutionTest
+ with MainIsNotFunctionTestCases {}
+
+mixin MainIsNotFunctionTestCases on PubPackageResolutionTest {
+ test_class() async {
+ await resolveTestCode('''
+class main {}
+''');
+ assertErrorsInResult(expectedErrorsByNullability(nullable: [
+ error(CompileTimeErrorCode.MAIN_IS_NOT_FUNCTION, 6, 4),
+ ], legacy: []));
+ }
+
+ test_classAlias() async {
+ await resolveTestCode('''
+class A {}
+mixin M {}
+class main = A with M;
+''');
+ assertErrorsInResult(expectedErrorsByNullability(nullable: [
+ error(CompileTimeErrorCode.MAIN_IS_NOT_FUNCTION, 28, 4),
+ ], legacy: []));
+ }
+
+ test_function() async {
+ await assertNoErrorsInCode('''
+void main() {}
+''');
+ }
+
+ test_getter() async {
+ await resolveTestCode('''
+int get main => 0;
+''');
+ assertErrorsInResult(expectedErrorsByNullability(nullable: [
+ error(CompileTimeErrorCode.MAIN_IS_NOT_FUNCTION, 8, 4),
+ ], legacy: []));
+ }
+
+ test_mixin() async {
+ await resolveTestCode('''
+class A {}
+mixin main on A {}
+''');
+ assertErrorsInResult(expectedErrorsByNullability(nullable: [
+ error(CompileTimeErrorCode.MAIN_IS_NOT_FUNCTION, 17, 4),
+ ], legacy: []));
+ }
+
+ test_typedef() async {
+ await resolveTestCode('''
+typedef main = void Function();
+''');
+ assertErrorsInResult(expectedErrorsByNullability(nullable: [
+ error(CompileTimeErrorCode.MAIN_IS_NOT_FUNCTION, 8, 4),
+ ], legacy: []));
+ }
+
+ test_typedef_legacy() async {
+ await resolveTestCode('''
+typedef void main();
+''');
+ assertErrorsInResult(expectedErrorsByNullability(nullable: [
+ error(CompileTimeErrorCode.MAIN_IS_NOT_FUNCTION, 13, 4),
+ ], legacy: []));
+ }
+
+ test_variable() async {
+ await resolveTestCode('''
+var main = 0;
+''');
+ assertErrorsInResult(expectedErrorsByNullability(nullable: [
+ error(CompileTimeErrorCode.MAIN_IS_NOT_FUNCTION, 4, 4),
+ ], legacy: []));
+ }
+}
+
+@reflectiveTest
+class MainIsNotFunctionWithNullSafetyTest extends PubPackageResolutionTest
+ with WithNullSafetyMixin, MainIsNotFunctionTestCases {}
diff --git a/pkg/analyzer/test/src/diagnostics/return_of_do_not_store_test.dart b/pkg/analyzer/test/src/diagnostics/return_of_do_not_store_test.dart
index 51c1819..c747e6a 100644
--- a/pkg/analyzer/test/src/diagnostics/return_of_do_not_store_test.dart
+++ b/pkg/analyzer/test/src/diagnostics/return_of_do_not_store_test.dart
@@ -63,6 +63,44 @@
]);
}
+ test_returnFromGetter_binaryExpression() async {
+ await assertErrorsInCode('''
+import 'package:meta/meta.dart';
+
+@doNotStore
+String _v = '';
+
+@doNotStore
+String _v2 = '';
+
+var b = true;
+
+String get v => _v ?? _v2;
+''', [
+ error(HintCode.RETURN_OF_DO_NOT_STORE, 124, 2, messageContains: '_v'),
+ error(HintCode.RETURN_OF_DO_NOT_STORE, 130, 3, messageContains: '_v2'),
+ ]);
+ }
+
+ test_returnFromGetter_ternary() async {
+ await assertErrorsInCode('''
+import 'package:meta/meta.dart';
+
+@doNotStore
+String _v = '';
+
+@doNotStore
+String _v2 = '';
+
+var b = true;
+
+String get v => b ? _v : _v2;
+''', [
+ error(HintCode.RETURN_OF_DO_NOT_STORE, 128, 2),
+ error(HintCode.RETURN_OF_DO_NOT_STORE, 133, 3),
+ ]);
+ }
+
test_returnFromMethod() async {
await assertErrorsInCode('''
import 'package:meta/meta.dart';
diff --git a/pkg/analyzer/test/src/diagnostics/test_all.dart b/pkg/analyzer/test/src/diagnostics/test_all.dart
index bc65f4c..a6b7ec6 100644
--- a/pkg/analyzer/test/src/diagnostics/test_all.dart
+++ b/pkg/analyzer/test/src/diagnostics/test_all.dart
@@ -344,6 +344,7 @@
as late_final_local_already_assigned;
import 'list_element_type_not_assignable_test.dart'
as list_element_type_not_assignable;
+import 'main_is_not_function_test.dart' as main_is_not_function;
import 'map_entry_not_in_map_test.dart' as map_entry_not_in_map;
import 'map_key_type_not_assignable_test.dart' as map_key_type_not_assignable;
import 'map_value_type_not_assignable_test.dart'
@@ -872,6 +873,7 @@
late_final_field_with_const_constructor.main();
late_final_local_already_assigned.main();
list_element_type_not_assignable.main();
+ main_is_not_function.main();
map_entry_not_in_map.main();
map_key_type_not_assignable.main();
map_value_type_not_assignable.main();
diff --git a/pkg/compiler/lib/src/inferrer/builder_kernel.dart b/pkg/compiler/lib/src/inferrer/builder_kernel.dart
index b240200..f11b3fb 100644
--- a/pkg/compiler/lib/src/inferrer/builder_kernel.dart
+++ b/pkg/compiler/lib/src/inferrer/builder_kernel.dart
@@ -1454,13 +1454,6 @@
}
@override
- TypeInformation visitDirectPropertyGet(ir.DirectPropertyGet node) {
- TypeInformation receiverType = thisType;
- return handlePropertyGet(node, node.receiver, receiverType, node.target,
- isThis: true);
- }
-
- @override
TypeInformation visitPropertySet(ir.PropertySet node) {
TypeInformation receiverType = visit(node.receiver);
Selector selector = _elementMap.getSelector(node);
diff --git a/pkg/compiler/lib/src/ir/cached_static_type.dart b/pkg/compiler/lib/src/ir/cached_static_type.dart
index aa385c4..9e12e6c 100644
--- a/pkg/compiler/lib/src/ir/cached_static_type.dart
+++ b/pkg/compiler/lib/src/ir/cached_static_type.dart
@@ -52,10 +52,6 @@
ir.DartType visitPropertyGet(ir.PropertyGet node) => _getStaticType(node);
@override
- ir.DartType visitDirectPropertyGet(ir.DirectPropertyGet node) =>
- _getStaticType(node);
-
- @override
ir.DartType visitSuperPropertyGet(ir.SuperPropertyGet node) =>
_getStaticType(node);
@@ -64,10 +60,6 @@
_getStaticType(node);
@override
- ir.DartType visitDirectMethodInvocation(ir.DirectMethodInvocation node) =>
- _getStaticType(node);
-
- @override
ir.DartType visitStaticInvocation(ir.StaticInvocation node) =>
_getStaticType(node);
diff --git a/pkg/compiler/lib/src/ir/impact.dart b/pkg/compiler/lib/src/ir/impact.dart
index 60dc75f3..0dfcc55 100644
--- a/pkg/compiler/lib/src/ir/impact.dart
+++ b/pkg/compiler/lib/src/ir/impact.dart
@@ -565,21 +565,6 @@
}
@override
- void handleDirectMethodInvocation(
- ir.DirectMethodInvocation node,
- ir.DartType receiverType,
- ArgumentTypes argumentTypes,
- ir.DartType returnType) {
- registerInstanceInvocation(
- receiverType,
- ClassRelation.exact,
- node.target,
- node.arguments.positional.length,
- _getNamedArguments(node.arguments),
- node.arguments.types);
- }
-
- @override
void handlePropertyGet(
ir.PropertyGet node, ir.DartType receiverType, ir.DartType resultType) {
ClassRelation relation = computeClassRelationFromType(receiverType);
@@ -591,12 +576,6 @@
}
@override
- void handleDirectPropertyGet(ir.DirectPropertyGet node,
- ir.DartType receiverType, ir.DartType resultType) {
- registerInstanceGet(receiverType, ClassRelation.exact, node.target);
- }
-
- @override
void handlePropertySet(
ir.PropertySet node, ir.DartType receiverType, ir.DartType valueType) {
ClassRelation relation = computeClassRelationFromType(receiverType);
@@ -608,12 +587,6 @@
}
@override
- void handleDirectPropertySet(ir.DirectPropertySet node,
- ir.DartType receiverType, ir.DartType valueType) {
- registerInstanceSet(receiverType, ClassRelation.exact, node.target);
- }
-
- @override
void handleSuperMethodInvocation(ir.SuperMethodInvocation node,
ArgumentTypes argumentTypes, ir.DartType returnType) {
registerSuperInvocation(node.name, node.arguments.positional.length,
diff --git a/pkg/compiler/lib/src/ir/scope_visitor.dart b/pkg/compiler/lib/src/ir/scope_visitor.dart
index 0dacf07..74ac0b9 100644
--- a/pkg/compiler/lib/src/ir/scope_visitor.dart
+++ b/pkg/compiler/lib/src/ir/scope_visitor.dart
@@ -1053,19 +1053,6 @@
}
@override
- EvaluationComplexity visitDirectPropertyGet(ir.DirectPropertyGet node) {
- node.receiver = _handleExpression(node.receiver);
- return const EvaluationComplexity.lazy();
- }
-
- @override
- EvaluationComplexity visitDirectPropertySet(ir.DirectPropertySet node) {
- node.receiver = _handleExpression(node.receiver);
- node.value = _handleExpression(node.value);
- return const EvaluationComplexity.lazy();
- }
-
- @override
EvaluationComplexity visitNot(ir.Not node) {
node.operand = _handleExpression(node.operand);
EvaluationComplexity complexity = _lastExpressionComplexity;
diff --git a/pkg/compiler/lib/src/ir/static_type.dart b/pkg/compiler/lib/src/ir/static_type.dart
index bcc2bf3..4472ff8 100644
--- a/pkg/compiler/lib/src/ir/static_type.dart
+++ b/pkg/compiler/lib/src/ir/static_type.dart
@@ -325,61 +325,6 @@
return valueType;
}
- void handleDirectPropertyGet(ir.DirectPropertyGet node,
- ir.DartType receiverType, ir.DartType resultType) {}
-
- @override
- ir.DartType visitDirectPropertyGet(ir.DirectPropertyGet node) {
- ir.DartType receiverType = visitNode(node.receiver);
- ir.Class superclass = node.target.enclosingClass;
- receiverType = getTypeAsInstanceOf(receiverType, superclass);
- ir.DartType resultType = ir.Substitution.fromInterfaceType(receiverType)
- .substituteType(node.target.getterType);
- _expressionTypeCache[node] = resultType;
- handleDirectPropertyGet(node, receiverType, resultType);
- return resultType;
- }
-
- void handleDirectMethodInvocation(
- ir.DirectMethodInvocation node,
- ir.DartType receiverType,
- ArgumentTypes argumentTypes,
- ir.DartType returnType) {}
-
- @override
- ir.DartType visitDirectMethodInvocation(ir.DirectMethodInvocation node) {
- ir.DartType receiverType = visitNode(node.receiver);
- ArgumentTypes argumentTypes = _visitArguments(node.arguments);
- ir.DartType returnType;
- if (typeEnvironment.isSpecialCasedBinaryOperator(node.target)) {
- ir.DartType argumentType = argumentTypes.positional[0];
- returnType = typeEnvironment.getTypeOfSpecialCasedBinaryOperator(
- receiverType, argumentType);
- } else {
- ir.Class superclass = node.target.enclosingClass;
- receiverType = getTypeAsInstanceOf(receiverType, superclass);
- ir.DartType returnType = ir.Substitution.fromInterfaceType(receiverType)
- .substituteType(node.target.function.returnType);
- returnType = ir.Substitution.fromPairs(
- node.target.function.typeParameters, node.arguments.types)
- .substituteType(returnType);
- }
- _expressionTypeCache[node] = returnType;
- handleDirectMethodInvocation(node, receiverType, argumentTypes, returnType);
- return returnType;
- }
-
- void handleDirectPropertySet(ir.DirectPropertySet node,
- ir.DartType receiverType, ir.DartType valueType) {}
-
- @override
- ir.DartType visitDirectPropertySet(ir.DirectPropertySet node) {
- ir.DartType receiverType = visitNode(node.receiver);
- ir.DartType valueType = super.visitDirectPropertySet(node);
- handleDirectPropertySet(node, receiverType, valueType);
- return valueType;
- }
-
/// Returns `true` if [interfaceTarget] is an arithmetic operator whose result
/// type is computed using both the receiver type and the argument type.
///
diff --git a/pkg/compiler/lib/src/ir/static_type_base.dart b/pkg/compiler/lib/src/ir/static_type_base.dart
index b62c4c9..a19523e 100644
--- a/pkg/compiler/lib/src/ir/static_type_base.dart
+++ b/pkg/compiler/lib/src/ir/static_type_base.dart
@@ -164,11 +164,6 @@
}
@override
- ir.DartType visitDirectPropertySet(ir.DirectPropertySet node) {
- return visitNode(node.value);
- }
-
- @override
ThisInterfaceType visitThisExpression(ir.ThisExpression node) => thisType;
@override
diff --git a/pkg/compiler/lib/src/js_model/element_map.dart b/pkg/compiler/lib/src/js_model/element_map.dart
index 18cde59..b26e902 100644
--- a/pkg/compiler/lib/src/js_model/element_map.dart
+++ b/pkg/compiler/lib/src/js_model/element_map.dart
@@ -174,9 +174,6 @@
/// Returns the inferred receiver type of the dynamic [read].
AbstractValue receiverTypeOfGet(ir.PropertyGet read);
- /// Returns the inferred receiver type of the direct [read].
- AbstractValue receiverTypeOfDirectGet(ir.DirectPropertyGet read);
-
/// Returns the inferred receiver type of the dynamic [write].
AbstractValue receiverTypeOfSet(
ir.PropertySet write, AbstractValueDomain abstractValueDomain);
diff --git a/pkg/compiler/lib/src/js_model/element_map_impl.dart b/pkg/compiler/lib/src/js_model/element_map_impl.dart
index b3f9cb7..4c5e0a1 100644
--- a/pkg/compiler/lib/src/js_model/element_map_impl.dart
+++ b/pkg/compiler/lib/src/js_model/element_map_impl.dart
@@ -1262,9 +1262,6 @@
if (node is ir.PropertyGet) {
return getGetterSelector(node.name);
}
- if (node is ir.DirectPropertyGet) {
- return getGetterSelector(node.target.name);
- }
if (node is ir.SuperPropertyGet) {
return getGetterSelector(node.name);
}
diff --git a/pkg/compiler/lib/src/js_model/js_strategy.dart b/pkg/compiler/lib/src/js_model/js_strategy.dart
index b8614dd..42ced5b 100644
--- a/pkg/compiler/lib/src/js_model/js_strategy.dart
+++ b/pkg/compiler/lib/src/js_model/js_strategy.dart
@@ -533,11 +533,6 @@
}
@override
- AbstractValue receiverTypeOfDirectGet(ir.DirectPropertyGet node) {
- return _targetResults.typeOfReceiver(node);
- }
-
- @override
AbstractValue receiverTypeOfSet(
ir.PropertySet node, AbstractValueDomain abstractValueDomain) {
return _targetResults.typeOfReceiver(node);
diff --git a/pkg/compiler/lib/src/serialization/node_indexer.dart b/pkg/compiler/lib/src/serialization/node_indexer.dart
index e20df93..edc81ae 100644
--- a/pkg/compiler/lib/src/serialization/node_indexer.dart
+++ b/pkg/compiler/lib/src/serialization/node_indexer.dart
@@ -123,24 +123,6 @@
}
@override
- void visitDirectPropertyGet(ir.DirectPropertyGet node) {
- registerNode(node);
- super.visitDirectPropertyGet(node);
- }
-
- @override
- void visitDirectPropertySet(ir.DirectPropertySet node) {
- registerNode(node);
- super.visitDirectPropertySet(node);
- }
-
- @override
- void visitDirectMethodInvocation(ir.DirectMethodInvocation node) {
- registerNode(node);
- super.visitDirectMethodInvocation(node);
- }
-
- @override
void visitStaticInvocation(ir.StaticInvocation node) {
registerNode(node);
super.visitStaticInvocation(node);
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart
index d80c190..842d6e6 100644
--- a/pkg/compiler/lib/src/ssa/builder_kernel.dart
+++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -3460,33 +3460,6 @@
}
@override
- void visitDirectPropertyGet(ir.DirectPropertyGet node) {
- node.receiver.accept(this);
- HInstruction receiver = pop();
-
- // Fake direct call with a dynamic call.
- // TODO(sra): Implement direct invocations properly.
- _pushDynamicInvocation(
- node,
- _getStaticType(node.receiver),
- _typeInferenceMap.receiverTypeOfDirectGet(node),
- new Selector.getter(_elementMap.getMember(node.target).memberName),
- <HInstruction>[receiver],
- const <DartType>[],
- _sourceInformationBuilder.buildGet(node));
- }
-
- @override
- void visitDirectPropertySet(ir.DirectPropertySet node) {
- throw new UnimplementedError('ir.DirectPropertySet');
- }
-
- @override
- void visitDirectMethodInvocation(ir.DirectMethodInvocation node) {
- throw new UnimplementedError('ir.DirectMethodInvocation');
- }
-
- @override
void visitSuperPropertySet(ir.SuperPropertySet node) {
SourceInformation sourceInformation =
_sourceInformationBuilder.buildAssignment(node);
@@ -7073,14 +7046,6 @@
}
@override
- visitDirectPropertyGet(ir.DirectPropertyGet node) {
- registerCall();
- registerRegularNode();
- registerReductiveNode();
- visit(node.receiver);
- }
-
- @override
visitPropertySet(ir.PropertySet node) {
registerCall();
registerRegularNode();
@@ -7091,15 +7056,6 @@
}
@override
- visitDirectPropertySet(ir.DirectPropertySet node) {
- registerCall();
- registerRegularNode();
- registerReductiveNode();
- visit(node.receiver);
- visit(node.value);
- }
-
- @override
visitVariableGet(ir.VariableGet node) {
if (discountParameters && node.variable.parent is ir.FunctionNode) return;
registerRegularNode();
diff --git a/pkg/dev_compiler/lib/src/kernel/compiler.dart b/pkg/dev_compiler/lib/src/kernel/compiler.dart
index c5ec2e9..cd7ebd3 100644
--- a/pkg/dev_compiler/lib/src/kernel/compiler.dart
+++ b/pkg/dev_compiler/lib/src/kernel/compiler.dart
@@ -4216,16 +4216,6 @@
node.receiver, node.interfaceTarget, node.value, node.name.text);
}
- @override
- js_ast.Expression visitDirectPropertyGet(DirectPropertyGet node) {
- return _emitPropertyGet(node.receiver, node.target);
- }
-
- @override
- js_ast.Expression visitDirectPropertySet(DirectPropertySet node) {
- return _emitPropertySet(node.receiver, node.target, node.value);
- }
-
js_ast.Expression _emitPropertyGet(Expression receiver, Member member,
[String memberName]) {
memberName ??= member.name.text;
@@ -4360,11 +4350,6 @@
return methodCall;
}
- @override
- js_ast.Expression visitDirectMethodInvocation(DirectMethodInvocation node) {
- return _emitMethodCall(node.receiver, node.target, node.arguments, node);
- }
-
js_ast.Expression _emitMethodCall(Expression receiver, Member target,
Arguments arguments, InvocationExpression node) {
var name = node.name.text;
@@ -5285,10 +5270,6 @@
return _emitEqualityOperator(operand.receiver, operand.interfaceTarget,
operand.arguments.positional[0],
negated: true);
- } else if (operand is DirectMethodInvocation && operand.name.text == '==') {
- return _emitEqualityOperator(
- operand.receiver, operand.target, operand.arguments.positional[0],
- negated: true);
} else if (operand is StaticInvocation &&
operand.target == _coreTypes.identicalProcedure) {
return _emitCoreIdenticalCall(operand.arguments.positional,
diff --git a/pkg/dev_compiler/lib/src/kernel/kernel_helpers.dart b/pkg/dev_compiler/lib/src/kernel/kernel_helpers.dart
index 0cac386..a2c50dd 100644
--- a/pkg/dev_compiler/lib/src/kernel/kernel_helpers.dart
+++ b/pkg/dev_compiler/lib/src/kernel/kernel_helpers.dart
@@ -189,11 +189,7 @@
}
Expression getInvocationReceiver(InvocationExpression node) =>
- node is MethodInvocation
- ? node.receiver
- : node is DirectMethodInvocation
- ? node.receiver
- : null;
+ node is MethodInvocation ? node.receiver : null;
bool isInlineJS(Member e) =>
e is Procedure &&
diff --git a/pkg/dev_compiler/lib/src/kernel/nullable_inference.dart b/pkg/dev_compiler/lib/src/kernel/nullable_inference.dart
index 1040ac9..32c687f 100644
--- a/pkg/dev_compiler/lib/src/kernel/nullable_inference.dart
+++ b/pkg/dev_compiler/lib/src/kernel/nullable_inference.dart
@@ -89,13 +89,6 @@
bool visitPropertySet(PropertySet node) => isNullable(node.value);
@override
- bool visitDirectPropertyGet(DirectPropertyGet node) =>
- _getterIsNullable(node.target);
-
- @override
- bool visitDirectPropertySet(DirectPropertySet node) => isNullable(node.value);
-
- @override
bool visitSuperPropertyGet(SuperPropertyGet node) =>
_getterIsNullable(node.interfaceTarget);
@@ -113,10 +106,6 @@
node.interfaceTarget, node.name.text, node.receiver);
@override
- bool visitDirectMethodInvocation(DirectMethodInvocation node) =>
- _invocationIsNullable(node.target, node.name.text, node.receiver);
-
- @override
bool visitSuperMethodInvocation(SuperMethodInvocation node) =>
_invocationIsNullable(node.interfaceTarget, node.name.text);
diff --git a/pkg/dev_compiler/lib/src/kernel/target.dart b/pkg/dev_compiler/lib/src/kernel/target.dart
index a005aae..2982b8d 100644
--- a/pkg/dev_compiler/lib/src/kernel/target.dart
+++ b/pkg/dev_compiler/lib/src/kernel/target.dart
@@ -384,32 +384,14 @@
}
@override
- void visitDirectPropertyGet(DirectPropertyGet node) {
- _checkTearoff(node.target);
- super.visitDirectPropertyGet(node);
- }
-
- @override
void visitPropertySet(PropertySet node) {
_checkTarget(node.receiver, node.interfaceTarget);
super.visitPropertySet(node);
}
@override
- void visitDirectPropertySet(DirectPropertySet node) {
- _checkTarget(node.receiver, node.target);
- super.visitDirectPropertySet(node);
- }
-
- @override
void visitMethodInvocation(MethodInvocation node) {
_checkTarget(node.receiver, node.interfaceTarget);
super.visitMethodInvocation(node);
}
-
- @override
- void visitDirectMethodInvocation(DirectMethodInvocation node) {
- _checkTarget(node.receiver, node.target);
- super.visitDirectMethodInvocation(node);
- }
}
diff --git a/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart b/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
index ea3518e..d9d852a 100644
--- a/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
@@ -2356,21 +2356,6 @@
bool performIs(Constant constant, {bool strongMode}) {
assert(strongMode != null);
if (strongMode) {
- // In strong checking mode: if e evaluates to a value v and v has
- // runtime type S, an instance check e is T occurring in a legacy
- // library or an opted-in library is evaluated as follows:
- //
- // If v is null and T is a legacy type,
- // return LEGACY_SUBTYPE(T, NULL) || LEGACY_SUBTYPE(Object, T)
- // Otherwise return NNBD_SUBTYPE(S, T)
- if (constant is NullConstant &&
- type.nullability == Nullability.legacy) {
- // Unreachable: Mixed strong mode is no longer supported.
- return typeEnvironment.isSubtypeOf(type, typeEnvironment.nullType,
- SubtypeCheckMode.ignoringNullabilities) ||
- typeEnvironment.isSubtypeOf(typeEnvironment.objectLegacyRawType,
- type, SubtypeCheckMode.ignoringNullabilities);
- }
return isSubtype(constant, type, SubtypeCheckMode.withNullabilities);
} else {
// In weak checking mode: if e evaluates to a value v and v has runtime
@@ -2859,12 +2844,6 @@
}
}
- DartType lookupParameterValue(TypeParameter parameter) {
- final DartType value = _typeVariables[parameter];
- assert(value != null);
- return value;
- }
-
Constant lookupVariable(VariableDeclaration variable) {
Constant value = _variables[variable];
if (value is UnevaluatedConstant) {
diff --git a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
index 76e41cb..9e96eec 100644
--- a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
@@ -107,24 +107,6 @@
}
@override
- ExpressionInferenceResult visitDirectMethodInvocation(
- DirectMethodInvocation node, DartType typeContext) {
- return _unhandledExpression(node, typeContext);
- }
-
- @override
- ExpressionInferenceResult visitDirectPropertyGet(
- DirectPropertyGet node, DartType typeContext) {
- return _unhandledExpression(node, typeContext);
- }
-
- @override
- ExpressionInferenceResult visitDirectPropertySet(
- DirectPropertySet node, DartType typeContext) {
- return _unhandledExpression(node, typeContext);
- }
-
- @override
ExpressionInferenceResult visitFileUriExpression(
FileUriExpression node, DartType typeContext) {
return _unhandledExpression(node, typeContext);
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_constants.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_constants.dart
index 61f54880..cf9d6cb 100644
--- a/pkg/front_end/lib/src/fasta/kernel/kernel_constants.dart
+++ b/pkg/front_end/lib/src/fasta/kernel/kernel_constants.dart
@@ -4,6 +4,7 @@
library fasta.kernel_constants;
+import 'package:front_end/src/fasta/builder/library_builder.dart';
import 'package:kernel/ast.dart' show InvalidExpression;
import '../fasta_codes.dart' show LocatedMessage;
@@ -19,9 +20,27 @@
@override
void report(LocatedMessage message, List<LocatedMessage> context) {
- loader.addProblem(
- message.messageObject, message.charOffset, message.length, message.uri,
- context: context);
+ // Try to find library.
+ LibraryBuilder builder = loader.builders[message.uri];
+ if (builder == null) {
+ for (LibraryBuilder candidate in loader.builders.values) {
+ if (candidate.fileUri == message.uri) {
+ // Found it.
+ builder = candidate;
+ break;
+ }
+ }
+ }
+ if (builder == null) {
+ // TODO(jensj): Probably a part or something.
+ loader.addProblem(message.messageObject, message.charOffset,
+ message.length, message.uri,
+ context: context);
+ } else {
+ builder.addProblem(message.messageObject, message.charOffset,
+ message.length, message.uri,
+ context: context);
+ }
}
@override
diff --git a/pkg/front_end/test/comments_on_certain_arguments_tool.dart b/pkg/front_end/test/comments_on_certain_arguments_tool.dart
index c0ff2cb..41045b5 100644
--- a/pkg/front_end/test/comments_on_certain_arguments_tool.dart
+++ b/pkg/front_end/test/comments_on_certain_arguments_tool.dart
@@ -170,11 +170,6 @@
}
}
- void visitDirectMethodInvocation(DirectMethodInvocation node) {
- super.visitDirectMethodInvocation(node);
- note(node.targetReference.node, node.arguments, node);
- }
-
void visitSuperMethodInvocation(SuperMethodInvocation node) {
super.visitSuperMethodInvocation(node);
note(node.interfaceTargetReference.node, node.arguments, node);
diff --git a/pkg/front_end/testcases/agnostic/as.dart.strong.expect b/pkg/front_end/testcases/agnostic/as.dart.strong.expect
index a8f9bcc..2afa361 100644
--- a/pkg/front_end/testcases/agnostic/as.dart.strong.expect
+++ b/pkg/front_end/testcases/agnostic/as.dart.strong.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/agnostic/as.dart:5:20: Error: Constant evaluation error:
// const a = <Null>[] as List<int>;
@@ -21,7 +22,6 @@
// const b = <int?>[] as List<int>;
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/agnostic/as.dart.strong.transformed.expect b/pkg/front_end/testcases/agnostic/as.dart.strong.transformed.expect
index a8f9bcc..2afa361 100644
--- a/pkg/front_end/testcases/agnostic/as.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/agnostic/as.dart.strong.transformed.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/agnostic/as.dart:5:20: Error: Constant evaluation error:
// const a = <Null>[] as List<int>;
@@ -21,7 +22,6 @@
// const b = <int?>[] as List<int>;
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/agnostic/identical.dart.strong.expect b/pkg/front_end/testcases/agnostic/identical.dart.strong.expect
index c195846..fd8a51e 100644
--- a/pkg/front_end/testcases/agnostic/identical.dart.strong.expect
+++ b/pkg/front_end/testcases/agnostic/identical.dart.strong.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/agnostic/identical.dart:7:11: Error: Constant evaluation error:
// const c = identical(a, b);
@@ -11,7 +12,6 @@
// const c = identical(a, b);
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/agnostic/identical.dart.strong.transformed.expect b/pkg/front_end/testcases/agnostic/identical.dart.strong.transformed.expect
index c195846..fd8a51e 100644
--- a/pkg/front_end/testcases/agnostic/identical.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/agnostic/identical.dart.strong.transformed.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/agnostic/identical.dart:7:11: Error: Constant evaluation error:
// const c = identical(a, b);
@@ -11,7 +12,6 @@
// const c = identical(a, b);
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/agnostic/is.dart.strong.expect b/pkg/front_end/testcases/agnostic/is.dart.strong.expect
index 4686996..82dac4a 100644
--- a/pkg/front_end/testcases/agnostic/is.dart.strong.expect
+++ b/pkg/front_end/testcases/agnostic/is.dart.strong.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/agnostic/is.dart:5:20: Error: Constant evaluation error:
// const a = <Null>[] is List<int>;
@@ -21,7 +22,6 @@
// const b = <int?>[] is List<int>;
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/agnostic/is.dart.strong.transformed.expect b/pkg/front_end/testcases/agnostic/is.dart.strong.transformed.expect
index 4686996..82dac4a 100644
--- a/pkg/front_end/testcases/agnostic/is.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/agnostic/is.dart.strong.transformed.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/agnostic/is.dart:5:20: Error: Constant evaluation error:
// const a = <Null>[] is List<int>;
@@ -21,7 +22,6 @@
// const b = <int?>[] is List<int>;
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/agnostic/map.dart.strong.expect b/pkg/front_end/testcases/agnostic/map.dart.strong.expect
index e976e83..021aca0 100644
--- a/pkg/front_end/testcases/agnostic/map.dart.strong.expect
+++ b/pkg/front_end/testcases/agnostic/map.dart.strong.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/agnostic/map.dart:7:11: Error: Constant evaluation error:
// const c = {a: 0, b: 1};
@@ -11,7 +12,6 @@
// const c = {a: 0, b: 1};
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/agnostic/map.dart.strong.transformed.expect b/pkg/front_end/testcases/agnostic/map.dart.strong.transformed.expect
index e976e83..021aca0 100644
--- a/pkg/front_end/testcases/agnostic/map.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/agnostic/map.dart.strong.transformed.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/agnostic/map.dart:7:11: Error: Constant evaluation error:
// const c = {a: 0, b: 1};
@@ -11,7 +12,6 @@
// const c = {a: 0, b: 1};
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/agnostic/map.dart.weak.expect b/pkg/front_end/testcases/agnostic/map.dart.weak.expect
index 8b33ddc..1d3e649 100644
--- a/pkg/front_end/testcases/agnostic/map.dart.weak.expect
+++ b/pkg/front_end/testcases/agnostic/map.dart.weak.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/agnostic/map.dart:7:11: Error: Constant evaluation error:
// const c = {a: 0, b: 1};
@@ -11,7 +12,6 @@
// const c = {a: 0, b: 1};
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/agnostic/map.dart.weak.transformed.expect b/pkg/front_end/testcases/agnostic/map.dart.weak.transformed.expect
index 8b33ddc..1d3e649 100644
--- a/pkg/front_end/testcases/agnostic/map.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/agnostic/map.dart.weak.transformed.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/agnostic/map.dart:7:11: Error: Constant evaluation error:
// const c = {a: 0, b: 1};
@@ -11,7 +12,6 @@
// const c = {a: 0, b: 1};
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/agnostic/set.dart.strong.expect b/pkg/front_end/testcases/agnostic/set.dart.strong.expect
index b92b78e..ad0fc3d 100644
--- a/pkg/front_end/testcases/agnostic/set.dart.strong.expect
+++ b/pkg/front_end/testcases/agnostic/set.dart.strong.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/agnostic/set.dart:7:11: Error: Constant evaluation error:
// const c = {a, b};
@@ -11,7 +12,6 @@
// const c = {a, b};
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/agnostic/set.dart.strong.transformed.expect b/pkg/front_end/testcases/agnostic/set.dart.strong.transformed.expect
index b92b78e..ad0fc3d 100644
--- a/pkg/front_end/testcases/agnostic/set.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/agnostic/set.dart.strong.transformed.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/agnostic/set.dart:7:11: Error: Constant evaluation error:
// const c = {a, b};
@@ -11,7 +12,6 @@
// const c = {a, b};
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/agnostic/set.dart.weak.expect b/pkg/front_end/testcases/agnostic/set.dart.weak.expect
index 9864f71..f33d0a9 100644
--- a/pkg/front_end/testcases/agnostic/set.dart.weak.expect
+++ b/pkg/front_end/testcases/agnostic/set.dart.weak.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/agnostic/set.dart:7:11: Error: Constant evaluation error:
// const c = {a, b};
@@ -11,7 +12,6 @@
// const c = {a, b};
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/agnostic/set.dart.weak.transformed.expect b/pkg/front_end/testcases/agnostic/set.dart.weak.transformed.expect
index 9864f71..f33d0a9 100644
--- a/pkg/front_end/testcases/agnostic/set.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/agnostic/set.dart.weak.transformed.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/agnostic/set.dart:7:11: Error: Constant evaluation error:
// const c = {a, b};
@@ -11,7 +12,6 @@
// const c = {a, b};
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/constant_truncate.dart.strong.expect b/pkg/front_end/testcases/general/constant_truncate.dart.strong.expect
index 5e6673e..c07b061 100644
--- a/pkg/front_end/testcases/general/constant_truncate.dart.strong.expect
+++ b/pkg/front_end/testcases/general/constant_truncate.dart.strong.expect
@@ -1,5 +1,6 @@
+library;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/general/constant_truncate.dart:5:14: Error: Constant evaluation error:
// const a0 = 0 ~/ 0; // error
@@ -301,7 +302,6 @@
// const f5 = double.negativeInfinity ~/ double.negativeInfinity; // error
// ^
//
-library;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/constant_truncate.dart.strong.transformed.expect b/pkg/front_end/testcases/general/constant_truncate.dart.strong.transformed.expect
index 9d88e9d..dc0d52e 100644
--- a/pkg/front_end/testcases/general/constant_truncate.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/constant_truncate.dart.strong.transformed.expect
@@ -1,5 +1,6 @@
+library;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/general/constant_truncate.dart:5:14: Error: Constant evaluation error:
// const a0 = 0 ~/ 0; // error
@@ -301,7 +302,6 @@
// const f5 = double.negativeInfinity ~/ double.negativeInfinity; // error
// ^
//
-library;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/constants/const_asserts.dart.strong.expect b/pkg/front_end/testcases/general/constants/const_asserts.dart.strong.expect
index 5d77622..2f17318 100644
--- a/pkg/front_end/testcases/general/constants/const_asserts.dart.strong.expect
+++ b/pkg/front_end/testcases/general/constants/const_asserts.dart.strong.expect
@@ -1,5 +1,15 @@
+library;
//
-// Problems in component:
+// Problems in library:
+//
+// pkg/front_end/testcases/general/constants/const_asserts.dart:17:51: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
+// const Foo.withInvalidCondition(this.x) : assert(x);
+// ^
+//
+// pkg/front_end/testcases/general/constants/const_asserts.dart:19:21: Error: Constant expression expected.
+// Try inserting 'const'.
+// : assert(bool.fromEnvironment("foo", defaultValue: null));
+// ^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/general/constants/const_asserts.dart:32:24: Error: Constant evaluation error:
// const Foo foo2 = const Foo(0);
@@ -111,19 +121,6 @@
// const Bar bar6 = const Bar.withEmptyMessage(0);
// ^
//
-library;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/general/constants/const_asserts.dart:17:51: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
-// const Foo.withInvalidCondition(this.x) : assert(x);
-// ^
-//
-// pkg/front_end/testcases/general/constants/const_asserts.dart:19:21: Error: Constant expression expected.
-// Try inserting 'const'.
-// : assert(bool.fromEnvironment("foo", defaultValue: null));
-// ^^^^^^^^^^^^^^^
-//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/constants/const_asserts.dart.strong.transformed.expect b/pkg/front_end/testcases/general/constants/const_asserts.dart.strong.transformed.expect
index d5afd92..5302b40 100644
--- a/pkg/front_end/testcases/general/constants/const_asserts.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/const_asserts.dart.strong.transformed.expect
@@ -1,5 +1,15 @@
+library;
//
-// Problems in component:
+// Problems in library:
+//
+// pkg/front_end/testcases/general/constants/const_asserts.dart:17:51: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
+// const Foo.withInvalidCondition(this.x) : assert(x);
+// ^
+//
+// pkg/front_end/testcases/general/constants/const_asserts.dart:19:21: Error: Constant expression expected.
+// Try inserting 'const'.
+// : assert(bool.fromEnvironment("foo", defaultValue: null));
+// ^^^^^^^^^^^^^^^
//
// pkg/front_end/testcases/general/constants/const_asserts.dart:32:24: Error: Constant evaluation error:
// const Foo foo2 = const Foo(0);
@@ -111,19 +121,6 @@
// const Bar bar6 = const Bar.withEmptyMessage(0);
// ^
//
-library;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/general/constants/const_asserts.dart:17:51: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
-// const Foo.withInvalidCondition(this.x) : assert(x);
-// ^
-//
-// pkg/front_end/testcases/general/constants/const_asserts.dart:19:21: Error: Constant expression expected.
-// Try inserting 'const'.
-// : assert(bool.fromEnvironment("foo", defaultValue: null));
-// ^^^^^^^^^^^^^^^
-//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/constants/const_collections.dart.strong.expect b/pkg/front_end/testcases/general/constants/const_collections.dart.strong.expect
index c6c94c1..e193519 100644
--- a/pkg/front_end/testcases/general/constants/const_collections.dart.strong.expect
+++ b/pkg/front_end/testcases/general/constants/const_collections.dart.strong.expect
@@ -1,5 +1,44 @@
+library;
//
-// Problems in component:
+// Problems in library:
+//
+// pkg/front_end/testcases/general/constants/const_collections.dart:23:51: Error: Unexpected type 'int' of a spread. Expected 'dynamic' or an Iterable.
+// const List<String> barWithIntSpread = [...foo, ...fortyTwo];
+// ^
+//
+// pkg/front_end/testcases/general/constants/const_collections.dart:25:51: Error: Unexpected type 'Map<String, String>' of a spread. Expected 'dynamic' or an Iterable.
+// - 'Map' is from 'dart:core'.
+// const List<String> barWithMapSpread = [...foo, ...quux];
+// ^
+//
+// pkg/front_end/testcases/general/constants/const_collections.dart:41:50: Error: Unexpected type 'int' of a map spread entry. Expected 'dynamic' or a Map.
+// const Set<String> quxWithIntSpread = {...baz, ...fortyTwo};
+// ^
+//
+// pkg/front_end/testcases/general/constants/const_collections.dart:41:50: Error: Expected ',' before this.
+// const Set<String> quxWithIntSpread = {...baz, ...fortyTwo};
+// ^
+//
+// pkg/front_end/testcases/general/constants/const_collections.dart:42:38: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+// const Set<String> quxWithMapSpread = {...baz, ...quux};
+// ^
+//
+// pkg/front_end/testcases/general/constants/const_collections.dart:48:59: Error: A value of type 'CustomIterable' can't be assigned to a variable of type 'String'.
+// - 'CustomIterable' is from 'pkg/front_end/testcases/general/constants/const_collections.dart'.
+// const Set<String> quxWithCustomIterableSpread3 = {...baz, customIterable};
+// ^
+//
+// pkg/front_end/testcases/general/constants/const_collections.dart:58:60: Error: Unexpected type 'int' of a map spread entry. Expected 'dynamic' or a Map.
+// const Map<String, String> quuzWithIntSpread = {...quux, ...fortyTwo};
+// ^
+//
+// pkg/front_end/testcases/general/constants/const_collections.dart:59:47: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+// const Map<String, String> quuzWithSetSpread = {...quux, ...baz};
+// ^
+//
+// pkg/front_end/testcases/general/constants/const_collections.dart:60:46: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+// const Map<String, String> mapWithSetSpread = {...baz};
+// ^
//
// pkg/front_end/testcases/general/constants/const_collections.dart:22:40: Error: Constant evaluation error:
// const List<String> barWithNullSpread = [...foo, ...nullList];
@@ -174,48 +213,6 @@
// const Map<int, int> mapWithDuplicates = {42: 42, 42: 42};
// ^
//
-library;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/general/constants/const_collections.dart:23:51: Error: Unexpected type 'int' of a spread. Expected 'dynamic' or an Iterable.
-// const List<String> barWithIntSpread = [...foo, ...fortyTwo];
-// ^
-//
-// pkg/front_end/testcases/general/constants/const_collections.dart:25:51: Error: Unexpected type 'Map<String, String>' of a spread. Expected 'dynamic' or an Iterable.
-// - 'Map' is from 'dart:core'.
-// const List<String> barWithMapSpread = [...foo, ...quux];
-// ^
-//
-// pkg/front_end/testcases/general/constants/const_collections.dart:41:50: Error: Unexpected type 'int' of a map spread entry. Expected 'dynamic' or a Map.
-// const Set<String> quxWithIntSpread = {...baz, ...fortyTwo};
-// ^
-//
-// pkg/front_end/testcases/general/constants/const_collections.dart:41:50: Error: Expected ',' before this.
-// const Set<String> quxWithIntSpread = {...baz, ...fortyTwo};
-// ^
-//
-// pkg/front_end/testcases/general/constants/const_collections.dart:42:38: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
-// const Set<String> quxWithMapSpread = {...baz, ...quux};
-// ^
-//
-// pkg/front_end/testcases/general/constants/const_collections.dart:48:59: Error: A value of type 'CustomIterable' can't be assigned to a variable of type 'String'.
-// - 'CustomIterable' is from 'pkg/front_end/testcases/general/constants/const_collections.dart'.
-// const Set<String> quxWithCustomIterableSpread3 = {...baz, customIterable};
-// ^
-//
-// pkg/front_end/testcases/general/constants/const_collections.dart:58:60: Error: Unexpected type 'int' of a map spread entry. Expected 'dynamic' or a Map.
-// const Map<String, String> quuzWithIntSpread = {...quux, ...fortyTwo};
-// ^
-//
-// pkg/front_end/testcases/general/constants/const_collections.dart:59:47: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
-// const Map<String, String> quuzWithSetSpread = {...quux, ...baz};
-// ^
-//
-// pkg/front_end/testcases/general/constants/const_collections.dart:60:46: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
-// const Map<String, String> mapWithSetSpread = {...baz};
-// ^
-//
import self as self;
import "dart:collection" as col;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/constants/const_collections.dart.strong.transformed.expect b/pkg/front_end/testcases/general/constants/const_collections.dart.strong.transformed.expect
index 0bbe0da..23d8ad3 100644
--- a/pkg/front_end/testcases/general/constants/const_collections.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/const_collections.dart.strong.transformed.expect
@@ -1,5 +1,44 @@
+library;
//
-// Problems in component:
+// Problems in library:
+//
+// pkg/front_end/testcases/general/constants/const_collections.dart:23:51: Error: Unexpected type 'int' of a spread. Expected 'dynamic' or an Iterable.
+// const List<String> barWithIntSpread = [...foo, ...fortyTwo];
+// ^
+//
+// pkg/front_end/testcases/general/constants/const_collections.dart:25:51: Error: Unexpected type 'Map<String, String>' of a spread. Expected 'dynamic' or an Iterable.
+// - 'Map' is from 'dart:core'.
+// const List<String> barWithMapSpread = [...foo, ...quux];
+// ^
+//
+// pkg/front_end/testcases/general/constants/const_collections.dart:41:50: Error: Unexpected type 'int' of a map spread entry. Expected 'dynamic' or a Map.
+// const Set<String> quxWithIntSpread = {...baz, ...fortyTwo};
+// ^
+//
+// pkg/front_end/testcases/general/constants/const_collections.dart:41:50: Error: Expected ',' before this.
+// const Set<String> quxWithIntSpread = {...baz, ...fortyTwo};
+// ^
+//
+// pkg/front_end/testcases/general/constants/const_collections.dart:42:38: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+// const Set<String> quxWithMapSpread = {...baz, ...quux};
+// ^
+//
+// pkg/front_end/testcases/general/constants/const_collections.dart:48:59: Error: A value of type 'CustomIterable' can't be assigned to a variable of type 'String'.
+// - 'CustomIterable' is from 'pkg/front_end/testcases/general/constants/const_collections.dart'.
+// const Set<String> quxWithCustomIterableSpread3 = {...baz, customIterable};
+// ^
+//
+// pkg/front_end/testcases/general/constants/const_collections.dart:58:60: Error: Unexpected type 'int' of a map spread entry. Expected 'dynamic' or a Map.
+// const Map<String, String> quuzWithIntSpread = {...quux, ...fortyTwo};
+// ^
+//
+// pkg/front_end/testcases/general/constants/const_collections.dart:59:47: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+// const Map<String, String> quuzWithSetSpread = {...quux, ...baz};
+// ^
+//
+// pkg/front_end/testcases/general/constants/const_collections.dart:60:46: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
+// const Map<String, String> mapWithSetSpread = {...baz};
+// ^
//
// pkg/front_end/testcases/general/constants/const_collections.dart:22:40: Error: Constant evaluation error:
// const List<String> barWithNullSpread = [...foo, ...nullList];
@@ -174,48 +213,6 @@
// const Map<int, int> mapWithDuplicates = {42: 42, 42: 42};
// ^
//
-library;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/general/constants/const_collections.dart:23:51: Error: Unexpected type 'int' of a spread. Expected 'dynamic' or an Iterable.
-// const List<String> barWithIntSpread = [...foo, ...fortyTwo];
-// ^
-//
-// pkg/front_end/testcases/general/constants/const_collections.dart:25:51: Error: Unexpected type 'Map<String, String>' of a spread. Expected 'dynamic' or an Iterable.
-// - 'Map' is from 'dart:core'.
-// const List<String> barWithMapSpread = [...foo, ...quux];
-// ^
-//
-// pkg/front_end/testcases/general/constants/const_collections.dart:41:50: Error: Unexpected type 'int' of a map spread entry. Expected 'dynamic' or a Map.
-// const Set<String> quxWithIntSpread = {...baz, ...fortyTwo};
-// ^
-//
-// pkg/front_end/testcases/general/constants/const_collections.dart:41:50: Error: Expected ',' before this.
-// const Set<String> quxWithIntSpread = {...baz, ...fortyTwo};
-// ^
-//
-// pkg/front_end/testcases/general/constants/const_collections.dart:42:38: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
-// const Set<String> quxWithMapSpread = {...baz, ...quux};
-// ^
-//
-// pkg/front_end/testcases/general/constants/const_collections.dart:48:59: Error: A value of type 'CustomIterable' can't be assigned to a variable of type 'String'.
-// - 'CustomIterable' is from 'pkg/front_end/testcases/general/constants/const_collections.dart'.
-// const Set<String> quxWithCustomIterableSpread3 = {...baz, customIterable};
-// ^
-//
-// pkg/front_end/testcases/general/constants/const_collections.dart:58:60: Error: Unexpected type 'int' of a map spread entry. Expected 'dynamic' or a Map.
-// const Map<String, String> quuzWithIntSpread = {...quux, ...fortyTwo};
-// ^
-//
-// pkg/front_end/testcases/general/constants/const_collections.dart:59:47: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
-// const Map<String, String> quuzWithSetSpread = {...quux, ...baz};
-// ^
-//
-// pkg/front_end/testcases/general/constants/const_collections.dart:60:46: Error: Both Iterable and Map spread elements encountered in ambiguous literal.
-// const Map<String, String> mapWithSetSpread = {...baz};
-// ^
-//
import self as self;
import "dart:collection" as col;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart.strong.expect b/pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart.strong.expect
index 351a41d..a425f18 100644
--- a/pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart.strong.expect
+++ b/pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart.strong.expect
@@ -1,5 +1,30 @@
+library;
//
-// Problems in component:
+// Problems in library:
+//
+// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:13:23: Error: '+' is not a prefix operator.
+// Try removing '+'.
+// const int unaryPlus = +2;
+// ^
+//
+// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:6:30: Error: The operator '>>>' isn't defined for the class 'int'.
+// Try correcting the operator to an existing operator, or defining a '>>>' operator.
+// const int shiftNegative2 = 2 >>> -1;
+// ^^^
+//
+// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:9:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+// const int divZero = 2 / 0;
+// ^
+//
+// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:27:29: Error: The operator '>>>' isn't defined for the class 'int'.
+// Try correcting the operator to an existing operator, or defining a '>>>' operator.
+// const int binaryShift2 = 84 >>> 1;
+// ^^^
+//
+// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:28:29: Error: The operator '>>>' isn't defined for the class 'int'.
+// Try correcting the operator to an existing operator, or defining a '>>>' operator.
+// const int binaryShift3 = 21 >>> 64;
+// ^^^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:5:30: Error: Constant evaluation error:
// const int shiftNegative1 = 2 << -1;
@@ -71,34 +96,6 @@
// const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
// ^
//
-library;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:13:23: Error: '+' is not a prefix operator.
-// Try removing '+'.
-// const int unaryPlus = +2;
-// ^
-//
-// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:6:30: Error: The operator '>>>' isn't defined for the class 'int'.
-// Try correcting the operator to an existing operator, or defining a '>>>' operator.
-// const int shiftNegative2 = 2 >>> -1;
-// ^^^
-//
-// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:9:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
-// const int divZero = 2 / 0;
-// ^
-//
-// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:27:29: Error: The operator '>>>' isn't defined for the class 'int'.
-// Try correcting the operator to an existing operator, or defining a '>>>' operator.
-// const int binaryShift2 = 84 >>> 1;
-// ^^^
-//
-// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:28:29: Error: The operator '>>>' isn't defined for the class 'int'.
-// Try correcting the operator to an existing operator, or defining a '>>>' operator.
-// const int binaryShift3 = 21 >>> 64;
-// ^^^
-//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart.strong.transformed.expect b/pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart.strong.transformed.expect
index 351a41d..a425f18 100644
--- a/pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart.strong.transformed.expect
@@ -1,5 +1,30 @@
+library;
//
-// Problems in component:
+// Problems in library:
+//
+// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:13:23: Error: '+' is not a prefix operator.
+// Try removing '+'.
+// const int unaryPlus = +2;
+// ^
+//
+// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:6:30: Error: The operator '>>>' isn't defined for the class 'int'.
+// Try correcting the operator to an existing operator, or defining a '>>>' operator.
+// const int shiftNegative2 = 2 >>> -1;
+// ^^^
+//
+// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:9:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+// const int divZero = 2 / 0;
+// ^
+//
+// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:27:29: Error: The operator '>>>' isn't defined for the class 'int'.
+// Try correcting the operator to an existing operator, or defining a '>>>' operator.
+// const int binaryShift2 = 84 >>> 1;
+// ^^^
+//
+// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:28:29: Error: The operator '>>>' isn't defined for the class 'int'.
+// Try correcting the operator to an existing operator, or defining a '>>>' operator.
+// const int binaryShift3 = 21 >>> 64;
+// ^^^
//
// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:5:30: Error: Constant evaluation error:
// const int shiftNegative1 = 2 << -1;
@@ -71,34 +96,6 @@
// const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
// ^
//
-library;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:13:23: Error: '+' is not a prefix operator.
-// Try removing '+'.
-// const int unaryPlus = +2;
-// ^
-//
-// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:6:30: Error: The operator '>>>' isn't defined for the class 'int'.
-// Try correcting the operator to an existing operator, or defining a '>>>' operator.
-// const int shiftNegative2 = 2 >>> -1;
-// ^^^
-//
-// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:9:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
-// const int divZero = 2 / 0;
-// ^
-//
-// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:27:29: Error: The operator '>>>' isn't defined for the class 'int'.
-// Try correcting the operator to an existing operator, or defining a '>>>' operator.
-// const int binaryShift2 = 84 >>> 1;
-// ^^^
-//
-// pkg/front_end/testcases/general/constants/js_semantics/number_folds.dart:28:29: Error: The operator '>>>' isn't defined for the class 'int'.
-// Try correcting the operator to an existing operator, or defining a '>>>' operator.
-// const int binaryShift3 = 21 >>> 64;
-// ^^^
-//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/constants/no_experiments/various.dart.strong.expect b/pkg/front_end/testcases/general/constants/no_experiments/various.dart.strong.expect
index d69a863..d856926 100644
--- a/pkg/front_end/testcases/general/constants/no_experiments/various.dart.strong.expect
+++ b/pkg/front_end/testcases/general/constants/no_experiments/various.dart.strong.expect
@@ -1,5 +1,6 @@
+library;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/general/constants/no_experiments/various.dart:5:40: Error: Constant evaluation error:
// const Symbol tripleShiftSymbol = const Symbol(">>>");
@@ -11,7 +12,6 @@
// const Symbol tripleShiftSymbol = const Symbol(">>>");
// ^
//
-library;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/constants/no_experiments/various.dart.strong.transformed.expect b/pkg/front_end/testcases/general/constants/no_experiments/various.dart.strong.transformed.expect
index d69a863..d856926 100644
--- a/pkg/front_end/testcases/general/constants/no_experiments/various.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/no_experiments/various.dart.strong.transformed.expect
@@ -1,5 +1,6 @@
+library;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/general/constants/no_experiments/various.dart:5:40: Error: Constant evaluation error:
// const Symbol tripleShiftSymbol = const Symbol(">>>");
@@ -11,7 +12,6 @@
// const Symbol tripleShiftSymbol = const Symbol(">>>");
// ^
//
-library;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/constants/number_folds.dart.strong.expect b/pkg/front_end/testcases/general/constants/number_folds.dart.strong.expect
index 551adf0..f20a0df 100644
--- a/pkg/front_end/testcases/general/constants/number_folds.dart.strong.expect
+++ b/pkg/front_end/testcases/general/constants/number_folds.dart.strong.expect
@@ -1,5 +1,30 @@
+library;
//
-// Problems in component:
+// Problems in library:
+//
+// pkg/front_end/testcases/general/constants/number_folds.dart:13:23: Error: '+' is not a prefix operator.
+// Try removing '+'.
+// const int unaryPlus = +2;
+// ^
+//
+// pkg/front_end/testcases/general/constants/number_folds.dart:6:30: Error: The operator '>>>' isn't defined for the class 'int'.
+// Try correcting the operator to an existing operator, or defining a '>>>' operator.
+// const int shiftNegative2 = 2 >>> -1;
+// ^^^
+//
+// pkg/front_end/testcases/general/constants/number_folds.dart:9:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+// const int divZero = 2 / 0;
+// ^
+//
+// pkg/front_end/testcases/general/constants/number_folds.dart:27:29: Error: The operator '>>>' isn't defined for the class 'int'.
+// Try correcting the operator to an existing operator, or defining a '>>>' operator.
+// const int binaryShift2 = 84 >>> 1;
+// ^^^
+//
+// pkg/front_end/testcases/general/constants/number_folds.dart:28:29: Error: The operator '>>>' isn't defined for the class 'int'.
+// Try correcting the operator to an existing operator, or defining a '>>>' operator.
+// const int binaryShift3 = 21 >>> 64;
+// ^^^
//
// pkg/front_end/testcases/general/constants/number_folds.dart:5:30: Error: Constant evaluation error:
// const int shiftNegative1 = 2 << -1;
@@ -71,34 +96,6 @@
// const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
// ^
//
-library;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/general/constants/number_folds.dart:13:23: Error: '+' is not a prefix operator.
-// Try removing '+'.
-// const int unaryPlus = +2;
-// ^
-//
-// pkg/front_end/testcases/general/constants/number_folds.dart:6:30: Error: The operator '>>>' isn't defined for the class 'int'.
-// Try correcting the operator to an existing operator, or defining a '>>>' operator.
-// const int shiftNegative2 = 2 >>> -1;
-// ^^^
-//
-// pkg/front_end/testcases/general/constants/number_folds.dart:9:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
-// const int divZero = 2 / 0;
-// ^
-//
-// pkg/front_end/testcases/general/constants/number_folds.dart:27:29: Error: The operator '>>>' isn't defined for the class 'int'.
-// Try correcting the operator to an existing operator, or defining a '>>>' operator.
-// const int binaryShift2 = 84 >>> 1;
-// ^^^
-//
-// pkg/front_end/testcases/general/constants/number_folds.dart:28:29: Error: The operator '>>>' isn't defined for the class 'int'.
-// Try correcting the operator to an existing operator, or defining a '>>>' operator.
-// const int binaryShift3 = 21 >>> 64;
-// ^^^
-//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/constants/number_folds.dart.strong.transformed.expect b/pkg/front_end/testcases/general/constants/number_folds.dart.strong.transformed.expect
index 551adf0..f20a0df 100644
--- a/pkg/front_end/testcases/general/constants/number_folds.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/number_folds.dart.strong.transformed.expect
@@ -1,5 +1,30 @@
+library;
//
-// Problems in component:
+// Problems in library:
+//
+// pkg/front_end/testcases/general/constants/number_folds.dart:13:23: Error: '+' is not a prefix operator.
+// Try removing '+'.
+// const int unaryPlus = +2;
+// ^
+//
+// pkg/front_end/testcases/general/constants/number_folds.dart:6:30: Error: The operator '>>>' isn't defined for the class 'int'.
+// Try correcting the operator to an existing operator, or defining a '>>>' operator.
+// const int shiftNegative2 = 2 >>> -1;
+// ^^^
+//
+// pkg/front_end/testcases/general/constants/number_folds.dart:9:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
+// const int divZero = 2 / 0;
+// ^
+//
+// pkg/front_end/testcases/general/constants/number_folds.dart:27:29: Error: The operator '>>>' isn't defined for the class 'int'.
+// Try correcting the operator to an existing operator, or defining a '>>>' operator.
+// const int binaryShift2 = 84 >>> 1;
+// ^^^
+//
+// pkg/front_end/testcases/general/constants/number_folds.dart:28:29: Error: The operator '>>>' isn't defined for the class 'int'.
+// Try correcting the operator to an existing operator, or defining a '>>>' operator.
+// const int binaryShift3 = 21 >>> 64;
+// ^^^
//
// pkg/front_end/testcases/general/constants/number_folds.dart:5:30: Error: Constant evaluation error:
// const int shiftNegative1 = 2 << -1;
@@ -71,34 +96,6 @@
// const int doubleTruncateDivNaN = 84.2 ~/ doubleNan;
// ^
//
-library;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/general/constants/number_folds.dart:13:23: Error: '+' is not a prefix operator.
-// Try removing '+'.
-// const int unaryPlus = +2;
-// ^
-//
-// pkg/front_end/testcases/general/constants/number_folds.dart:6:30: Error: The operator '>>>' isn't defined for the class 'int'.
-// Try correcting the operator to an existing operator, or defining a '>>>' operator.
-// const int shiftNegative2 = 2 >>> -1;
-// ^^^
-//
-// pkg/front_end/testcases/general/constants/number_folds.dart:9:23: Error: A value of type 'double' can't be assigned to a variable of type 'int'.
-// const int divZero = 2 / 0;
-// ^
-//
-// pkg/front_end/testcases/general/constants/number_folds.dart:27:29: Error: The operator '>>>' isn't defined for the class 'int'.
-// Try correcting the operator to an existing operator, or defining a '>>>' operator.
-// const int binaryShift2 = 84 >>> 1;
-// ^^^
-//
-// pkg/front_end/testcases/general/constants/number_folds.dart:28:29: Error: The operator '>>>' isn't defined for the class 'int'.
-// Try correcting the operator to an existing operator, or defining a '>>>' operator.
-// const int binaryShift3 = 21 >>> 64;
-// ^^^
-//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/constants/various.dart.strong.expect b/pkg/front_end/testcases/general/constants/various.dart.strong.expect
index eb69153..a6df3e4 100644
--- a/pkg/front_end/testcases/general/constants/various.dart.strong.expect
+++ b/pkg/front_end/testcases/general/constants/various.dart.strong.expect
@@ -1,5 +1,104 @@
+library;
//
-// Problems in component:
+// Problems in library:
+//
+// pkg/front_end/testcases/general/constants/various.dart:162:3: Error: A const constructor can't have a body.
+// Try removing either the 'const' keyword or the body.
+// const ClassWithNonEmptyConstConstructor() {
+// ^^^^^
+//
+// pkg/front_end/testcases/general/constants/various.dart:76:14: Error: Not a constant expression.
+// const x1 = --x;
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:77:14: Error: Not a constant expression.
+// const x2 = ++x;
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:78:12: Error: Not a constant expression.
+// const x3 = x--;
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:79:12: Error: Not a constant expression.
+// const x4 = x++;
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:82:14: Error: Setter not found: 'y'.
+// const y1 = --y;
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:83:14: Error: Setter not found: 'y'.
+// const y2 = ++y;
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:84:12: Error: Setter not found: 'y'.
+// const y3 = y--;
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:85:12: Error: Setter not found: 'y'.
+// const y4 = y++;
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:140:24: Error: Not a constant expression.
+// const function_const = () {};
+// ^^
+//
+// pkg/front_end/testcases/general/constants/various.dart:180:14: Error: Can't access 'this' in a field initializer to read 'y'.
+// final z1 = y;
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:99:4: Error: The class 'AbstractClass' is abstract and can't be instantiated.
+// @AbstractClass()
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/constants/various.dart:99:4: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
+// Try using a constructor or factory that is 'const'.
+// @AbstractClass()
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:102:4: Error: The class 'AbstractClassWithConstructor' is abstract and can't be instantiated.
+// @AbstractClassWithConstructor()
+// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/constants/various.dart:102:4: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
+// Try using a constructor or factory that is 'const'.
+// @AbstractClassWithConstructor()
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:118:39: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
+// Try using a constructor or factory that is 'const'.
+// const ExtendsFoo1 extendsFoo1 = const ExtendsFoo1();
+// ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/constants/various.dart:121:9: Error: The superclass, 'Foo', has no unnamed constructor that takes no arguments.
+// const ExtendsFoo2();
+// ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/constants/various.dart:180:14: Error: Not a constant expression.
+// final z1 = y;
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:181:14: Error: Not a constant expression.
+// final z2 = x;
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:96:11: Error: The class 'AbstractClassWithConstructor' is abstract and can't be instantiated.
+// const AbstractClassWithConstructor();
+// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/constants/various.dart:96:11: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
+// Try using a constructor or factory that is 'const'.
+// const AbstractClassWithConstructor();
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:168:11: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
+// Try using a constructor or factory that is 'const'.
+// const ClassWithNonEmptyConstConstructor();
+// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/constants/various.dart:114:7: Error: The superclass, 'Foo', has no unnamed constructor that takes no arguments.
+// class ExtendsFoo1 extends Foo {
+// ^
//
// pkg/front_end/testcases/general/constants/various.dart:10:34: Error: Constant evaluation error:
// const bool notBarFromEnvOrNull = !barFromEnvOrNull;
@@ -206,108 +305,6 @@
// final z2 = x;
// ^
//
-library;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/general/constants/various.dart:162:3: Error: A const constructor can't have a body.
-// Try removing either the 'const' keyword or the body.
-// const ClassWithNonEmptyConstConstructor() {
-// ^^^^^
-//
-// pkg/front_end/testcases/general/constants/various.dart:76:14: Error: Not a constant expression.
-// const x1 = --x;
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:77:14: Error: Not a constant expression.
-// const x2 = ++x;
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:78:12: Error: Not a constant expression.
-// const x3 = x--;
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:79:12: Error: Not a constant expression.
-// const x4 = x++;
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:82:14: Error: Setter not found: 'y'.
-// const y1 = --y;
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:83:14: Error: Setter not found: 'y'.
-// const y2 = ++y;
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:84:12: Error: Setter not found: 'y'.
-// const y3 = y--;
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:85:12: Error: Setter not found: 'y'.
-// const y4 = y++;
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:140:24: Error: Not a constant expression.
-// const function_const = () {};
-// ^^
-//
-// pkg/front_end/testcases/general/constants/various.dart:180:14: Error: Can't access 'this' in a field initializer to read 'y'.
-// final z1 = y;
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:99:4: Error: The class 'AbstractClass' is abstract and can't be instantiated.
-// @AbstractClass()
-// ^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/general/constants/various.dart:99:4: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
-// Try using a constructor or factory that is 'const'.
-// @AbstractClass()
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:102:4: Error: The class 'AbstractClassWithConstructor' is abstract and can't be instantiated.
-// @AbstractClassWithConstructor()
-// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/general/constants/various.dart:102:4: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
-// Try using a constructor or factory that is 'const'.
-// @AbstractClassWithConstructor()
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:118:39: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
-// Try using a constructor or factory that is 'const'.
-// const ExtendsFoo1 extendsFoo1 = const ExtendsFoo1();
-// ^^^^^^^^^^^
-//
-// pkg/front_end/testcases/general/constants/various.dart:121:9: Error: The superclass, 'Foo', has no unnamed constructor that takes no arguments.
-// const ExtendsFoo2();
-// ^^^^^^^^^^^
-//
-// pkg/front_end/testcases/general/constants/various.dart:180:14: Error: Not a constant expression.
-// final z1 = y;
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:181:14: Error: Not a constant expression.
-// final z2 = x;
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:96:11: Error: The class 'AbstractClassWithConstructor' is abstract and can't be instantiated.
-// const AbstractClassWithConstructor();
-// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/general/constants/various.dart:96:11: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
-// Try using a constructor or factory that is 'const'.
-// const AbstractClassWithConstructor();
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:168:11: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
-// Try using a constructor or factory that is 'const'.
-// const ClassWithNonEmptyConstConstructor();
-// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/general/constants/various.dart:114:7: Error: The superclass, 'Foo', has no unnamed constructor that takes no arguments.
-// class ExtendsFoo1 extends Foo {
-// ^
-//
import self as self;
import "dart:core" as core;
import "dart:_internal" as _in;
diff --git a/pkg/front_end/testcases/general/constants/various.dart.strong.transformed.expect b/pkg/front_end/testcases/general/constants/various.dart.strong.transformed.expect
index e9451ab..c27c932 100644
--- a/pkg/front_end/testcases/general/constants/various.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/various.dart.strong.transformed.expect
@@ -1,5 +1,104 @@
+library;
//
-// Problems in component:
+// Problems in library:
+//
+// pkg/front_end/testcases/general/constants/various.dart:162:3: Error: A const constructor can't have a body.
+// Try removing either the 'const' keyword or the body.
+// const ClassWithNonEmptyConstConstructor() {
+// ^^^^^
+//
+// pkg/front_end/testcases/general/constants/various.dart:76:14: Error: Not a constant expression.
+// const x1 = --x;
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:77:14: Error: Not a constant expression.
+// const x2 = ++x;
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:78:12: Error: Not a constant expression.
+// const x3 = x--;
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:79:12: Error: Not a constant expression.
+// const x4 = x++;
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:82:14: Error: Setter not found: 'y'.
+// const y1 = --y;
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:83:14: Error: Setter not found: 'y'.
+// const y2 = ++y;
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:84:12: Error: Setter not found: 'y'.
+// const y3 = y--;
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:85:12: Error: Setter not found: 'y'.
+// const y4 = y++;
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:140:24: Error: Not a constant expression.
+// const function_const = () {};
+// ^^
+//
+// pkg/front_end/testcases/general/constants/various.dart:180:14: Error: Can't access 'this' in a field initializer to read 'y'.
+// final z1 = y;
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:99:4: Error: The class 'AbstractClass' is abstract and can't be instantiated.
+// @AbstractClass()
+// ^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/constants/various.dart:99:4: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
+// Try using a constructor or factory that is 'const'.
+// @AbstractClass()
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:102:4: Error: The class 'AbstractClassWithConstructor' is abstract and can't be instantiated.
+// @AbstractClassWithConstructor()
+// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/constants/various.dart:102:4: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
+// Try using a constructor or factory that is 'const'.
+// @AbstractClassWithConstructor()
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:118:39: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
+// Try using a constructor or factory that is 'const'.
+// const ExtendsFoo1 extendsFoo1 = const ExtendsFoo1();
+// ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/constants/various.dart:121:9: Error: The superclass, 'Foo', has no unnamed constructor that takes no arguments.
+// const ExtendsFoo2();
+// ^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/constants/various.dart:180:14: Error: Not a constant expression.
+// final z1 = y;
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:181:14: Error: Not a constant expression.
+// final z2 = x;
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:96:11: Error: The class 'AbstractClassWithConstructor' is abstract and can't be instantiated.
+// const AbstractClassWithConstructor();
+// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/constants/various.dart:96:11: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
+// Try using a constructor or factory that is 'const'.
+// const AbstractClassWithConstructor();
+// ^
+//
+// pkg/front_end/testcases/general/constants/various.dart:168:11: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
+// Try using a constructor or factory that is 'const'.
+// const ClassWithNonEmptyConstConstructor();
+// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+//
+// pkg/front_end/testcases/general/constants/various.dart:114:7: Error: The superclass, 'Foo', has no unnamed constructor that takes no arguments.
+// class ExtendsFoo1 extends Foo {
+// ^
//
// pkg/front_end/testcases/general/constants/various.dart:10:34: Error: Constant evaluation error:
// const bool notBarFromEnvOrNull = !barFromEnvOrNull;
@@ -206,108 +305,6 @@
// final z2 = x;
// ^
//
-library;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/general/constants/various.dart:162:3: Error: A const constructor can't have a body.
-// Try removing either the 'const' keyword or the body.
-// const ClassWithNonEmptyConstConstructor() {
-// ^^^^^
-//
-// pkg/front_end/testcases/general/constants/various.dart:76:14: Error: Not a constant expression.
-// const x1 = --x;
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:77:14: Error: Not a constant expression.
-// const x2 = ++x;
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:78:12: Error: Not a constant expression.
-// const x3 = x--;
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:79:12: Error: Not a constant expression.
-// const x4 = x++;
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:82:14: Error: Setter not found: 'y'.
-// const y1 = --y;
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:83:14: Error: Setter not found: 'y'.
-// const y2 = ++y;
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:84:12: Error: Setter not found: 'y'.
-// const y3 = y--;
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:85:12: Error: Setter not found: 'y'.
-// const y4 = y++;
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:140:24: Error: Not a constant expression.
-// const function_const = () {};
-// ^^
-//
-// pkg/front_end/testcases/general/constants/various.dart:180:14: Error: Can't access 'this' in a field initializer to read 'y'.
-// final z1 = y;
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:99:4: Error: The class 'AbstractClass' is abstract and can't be instantiated.
-// @AbstractClass()
-// ^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/general/constants/various.dart:99:4: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
-// Try using a constructor or factory that is 'const'.
-// @AbstractClass()
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:102:4: Error: The class 'AbstractClassWithConstructor' is abstract and can't be instantiated.
-// @AbstractClassWithConstructor()
-// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/general/constants/various.dart:102:4: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
-// Try using a constructor or factory that is 'const'.
-// @AbstractClassWithConstructor()
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:118:39: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
-// Try using a constructor or factory that is 'const'.
-// const ExtendsFoo1 extendsFoo1 = const ExtendsFoo1();
-// ^^^^^^^^^^^
-//
-// pkg/front_end/testcases/general/constants/various.dart:121:9: Error: The superclass, 'Foo', has no unnamed constructor that takes no arguments.
-// const ExtendsFoo2();
-// ^^^^^^^^^^^
-//
-// pkg/front_end/testcases/general/constants/various.dart:180:14: Error: Not a constant expression.
-// final z1 = y;
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:181:14: Error: Not a constant expression.
-// final z2 = x;
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:96:11: Error: The class 'AbstractClassWithConstructor' is abstract and can't be instantiated.
-// const AbstractClassWithConstructor();
-// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/general/constants/various.dart:96:11: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
-// Try using a constructor or factory that is 'const'.
-// const AbstractClassWithConstructor();
-// ^
-//
-// pkg/front_end/testcases/general/constants/various.dart:168:11: Error: Cannot invoke a non-'const' constructor where a const expression is expected.
-// Try using a constructor or factory that is 'const'.
-// const ClassWithNonEmptyConstConstructor();
-// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-//
-// pkg/front_end/testcases/general/constants/various.dart:114:7: Error: The superclass, 'Foo', has no unnamed constructor that takes no arguments.
-// class ExtendsFoo1 extends Foo {
-// ^
-//
import self as self;
import "dart:core" as core;
import "dart:_internal" as _in;
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.strong.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.strong.expect
index 9ad7ac5..aa75ba9 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.strong.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.strong.expect
@@ -1,5 +1,10 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
+//
+// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:16:51: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
+// const Foo.withInvalidCondition(this.x) : assert(x);
+// ^
//
// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:26:24: Error: Constant evaluation error:
// const Foo foo2 = const Foo(0);
@@ -61,14 +66,6 @@
// const Bar bar4 = const Bar.withoutMessage(0);
// ^
//
-library /*isNonNullableByDefault*/;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:16:51: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
-// const Foo.withInvalidCondition(this.x) : assert(x);
-// ^
-//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.strong.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.strong.transformed.expect
index d4deb80..84a0f93 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart.strong.transformed.expect
@@ -1,5 +1,10 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
+//
+// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:16:51: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
+// const Foo.withInvalidCondition(this.x) : assert(x);
+// ^
//
// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:26:24: Error: Constant evaluation error:
// const Foo foo2 = const Foo(0);
@@ -61,14 +66,6 @@
// const Bar bar4 = const Bar.withoutMessage(0);
// ^
//
-library /*isNonNullableByDefault*/;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_asserts.dart:16:51: Error: A value of type 'int' can't be assigned to a variable of type 'bool'.
-// const Foo.withInvalidCondition(this.x) : assert(x);
-// ^
-//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.strong.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.strong.expect
index 83d7801..eadc725 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.strong.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.strong.expect
@@ -1,5 +1,10 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
+//
+// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart:27:7: Error: Expected 2 type arguments.
+// const Map<bool> MapWithUnevaluated = {
+// ^
//
// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart:25:26: Error: Constant evaluation error:
// const setNotAgnosticOK = {a, b};
@@ -21,14 +26,6 @@
// const mapNotAgnosticOK = {a: 0, b: 1};
// ^
//
-library /*isNonNullableByDefault*/;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart:27:7: Error: Expected 2 type arguments.
-// const Map<bool> MapWithUnevaluated = {
-// ^
-//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.strong.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.strong.transformed.expect
index 44be456..461ccb6 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart.strong.transformed.expect
@@ -1,5 +1,10 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
+//
+// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart:27:7: Error: Expected 2 type arguments.
+// const Map<bool> MapWithUnevaluated = {
+// ^
//
// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart:25:26: Error: Constant evaluation error:
// const setNotAgnosticOK = {a, b};
@@ -21,14 +26,6 @@
// const mapNotAgnosticOK = {a: 0, b: 1};
// ^
//
-library /*isNonNullableByDefault*/;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/const_collections.dart:27:7: Error: Expected 2 type arguments.
-// const Map<bool> MapWithUnevaluated = {
-// ^
-//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.expect
index 349600b..3950e82 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.expect
@@ -1,28 +1,3 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:22:29: Error: Constant evaluation error:
-// const fromDeferredLib = lib.x;
-// ^
-// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:22:29: Context: 'lib' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded.
-// Try moving the constant from the deferred library, or removing 'deferred' from the import.
-//
-// const fromDeferredLib = lib.x;
-// ^
-// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:22:7: Context: While analyzing:
-// const fromDeferredLib = lib.x;
-// ^
-//
-// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:77:44: Error: Constant evaluation error:
-// const Symbol symbolWithInvalidName = const Symbol("42");
-// ^
-// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:77:51: Context: The symbol name must be a valid public Dart member name, public constructor name, or library name, optionally qualified, but was '"42"'.
-// const Symbol symbolWithInvalidName = const Symbol("42");
-// ^
-// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:77:14: Context: While analyzing:
-// const Symbol symbolWithInvalidName = const Symbol("42");
-// ^
-//
library /*isNonNullableByDefault*/;
//
// Problems in library:
@@ -58,6 +33,28 @@
// const bool initialized =
// ^
//
+// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:22:29: Error: Constant evaluation error:
+// const fromDeferredLib = lib.x;
+// ^
+// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:22:29: Context: 'lib' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded.
+// Try moving the constant from the deferred library, or removing 'deferred' from the import.
+//
+// const fromDeferredLib = lib.x;
+// ^
+// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:22:7: Context: While analyzing:
+// const fromDeferredLib = lib.x;
+// ^
+//
+// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:77:44: Error: Constant evaluation error:
+// const Symbol symbolWithInvalidName = const Symbol("42");
+// ^
+// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:77:51: Context: The symbol name must be a valid public Dart member name, public constructor name, or library name, optionally qualified, but was '"42"'.
+// const Symbol symbolWithInvalidName = const Symbol("42");
+// ^
+// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:77:14: Context: While analyzing:
+// const Symbol symbolWithInvalidName = const Symbol("42");
+// ^
+//
import self as self;
import "dart:core" as core;
import "dart:_internal" as _in;
diff --git a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.transformed.expect b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.transformed.expect
index dbea8ca..0d34728 100644
--- a/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart.strong.transformed.expect
@@ -1,28 +1,3 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:22:29: Error: Constant evaluation error:
-// const fromDeferredLib = lib.x;
-// ^
-// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:22:29: Context: 'lib' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded.
-// Try moving the constant from the deferred library, or removing 'deferred' from the import.
-//
-// const fromDeferredLib = lib.x;
-// ^
-// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:22:7: Context: While analyzing:
-// const fromDeferredLib = lib.x;
-// ^
-//
-// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:77:44: Error: Constant evaluation error:
-// const Symbol symbolWithInvalidName = const Symbol("42");
-// ^
-// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:77:51: Context: The symbol name must be a valid public Dart member name, public constructor name, or library name, optionally qualified, but was '"42"'.
-// const Symbol symbolWithInvalidName = const Symbol("42");
-// ^
-// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:77:14: Context: While analyzing:
-// const Symbol symbolWithInvalidName = const Symbol("42");
-// ^
-//
library /*isNonNullableByDefault*/;
//
// Problems in library:
@@ -58,6 +33,28 @@
// const bool initialized =
// ^
//
+// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:22:29: Error: Constant evaluation error:
+// const fromDeferredLib = lib.x;
+// ^
+// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:22:29: Context: 'lib' can't be used in a constant expression because it's marked as 'deferred' which means it isn't available until loaded.
+// Try moving the constant from the deferred library, or removing 'deferred' from the import.
+//
+// const fromDeferredLib = lib.x;
+// ^
+// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:22:7: Context: While analyzing:
+// const fromDeferredLib = lib.x;
+// ^
+//
+// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:77:44: Error: Constant evaluation error:
+// const Symbol symbolWithInvalidName = const Symbol("42");
+// ^
+// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:77:51: Context: The symbol name must be a valid public Dart member name, public constructor name, or library name, optionally qualified, but was '"42"'.
+// const Symbol symbolWithInvalidName = const Symbol("42");
+// ^
+// pkg/front_end/testcases/general/constants/with_unevaluated_agnostic/various.dart:77:14: Context: While analyzing:
+// const Symbol symbolWithInvalidName = const Symbol("42");
+// ^
+//
import self as self;
import "dart:core" as core;
import "dart:_internal" as _in;
diff --git a/pkg/front_end/testcases/general/error_locations/error_location_01.dart.strong.expect b/pkg/front_end/testcases/general/error_locations/error_location_01.dart.strong.expect
index 8159055..7b42d92 100644
--- a/pkg/front_end/testcases/general/error_locations/error_location_01.dart.strong.expect
+++ b/pkg/front_end/testcases/general/error_locations/error_location_01.dart.strong.expect
@@ -1,13 +1,3 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/general/error_locations/error_location_01_lib2.dart:8:9: Error: Constant evaluation error:
-// const Foo(0);
-// ^
-// pkg/front_end/testcases/general/error_locations/error_location_01_lib1.dart:6:31: Context: This assertion failed.
-// const Foo(int i) : assert(i > 0);
-// ^
-//
library;
import self as self;
import "error_location_01_lib1.dart" as err;
@@ -45,6 +35,16 @@
}
library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/error_locations/error_location_01_lib2.dart:8:9: Error: Constant evaluation error:
+// const Foo(0);
+// ^
+// pkg/front_end/testcases/general/error_locations/error_location_01_lib1.dart:6:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+//
import self as err2;
import "org-dartlang-testcase:///error_location_01_lib1.dart";
diff --git a/pkg/front_end/testcases/general/error_locations/error_location_01.dart.strong.transformed.expect b/pkg/front_end/testcases/general/error_locations/error_location_01.dart.strong.transformed.expect
index 8159055..7b42d92 100644
--- a/pkg/front_end/testcases/general/error_locations/error_location_01.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/error_locations/error_location_01.dart.strong.transformed.expect
@@ -1,13 +1,3 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/general/error_locations/error_location_01_lib2.dart:8:9: Error: Constant evaluation error:
-// const Foo(0);
-// ^
-// pkg/front_end/testcases/general/error_locations/error_location_01_lib1.dart:6:31: Context: This assertion failed.
-// const Foo(int i) : assert(i > 0);
-// ^
-//
library;
import self as self;
import "error_location_01_lib1.dart" as err;
@@ -45,6 +35,16 @@
}
library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/error_locations/error_location_01_lib2.dart:8:9: Error: Constant evaluation error:
+// const Foo(0);
+// ^
+// pkg/front_end/testcases/general/error_locations/error_location_01_lib1.dart:6:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+//
import self as err2;
import "org-dartlang-testcase:///error_location_01_lib1.dart";
diff --git a/pkg/front_end/testcases/general/error_locations/error_location_02.dart.strong.expect b/pkg/front_end/testcases/general/error_locations/error_location_02.dart.strong.expect
index e1d2f71..1aae9ef 100644
--- a/pkg/front_end/testcases/general/error_locations/error_location_02.dart.strong.expect
+++ b/pkg/front_end/testcases/general/error_locations/error_location_02.dart.strong.expect
@@ -1,26 +1,3 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/general/error_locations/error_location_02_lib3.dart:7:19: Error: Constant evaluation error:
-// const fooField2 = fooField;
-// ^
-// pkg/front_end/testcases/general/error_locations/error_location_02_lib1.dart:6:31: Context: This assertion failed.
-// const Foo(int i) : assert(i > 0);
-// ^
-// pkg/front_end/testcases/general/error_locations/error_location_02_lib3.dart:7:7: Context: While analyzing:
-// const fooField2 = fooField;
-// ^
-//
-// pkg/front_end/testcases/general/error_locations/error_location_02_lib2.dart:7:24: Error: Constant evaluation error:
-// const fooField = const Foo(0);
-// ^
-// pkg/front_end/testcases/general/error_locations/error_location_02_lib1.dart:6:31: Context: This assertion failed.
-// const Foo(int i) : assert(i > 0);
-// ^
-// pkg/front_end/testcases/general/error_locations/error_location_02_lib2.dart:7:7: Context: While analyzing:
-// const fooField = const Foo(0);
-// ^
-//
library;
import self as self;
import "error_location_02_lib1.dart" as err;
@@ -59,6 +36,19 @@
}
library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/error_locations/error_location_02_lib2.dart:7:24: Error: Constant evaluation error:
+// const fooField = const Foo(0);
+// ^
+// pkg/front_end/testcases/general/error_locations/error_location_02_lib1.dart:6:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+// pkg/front_end/testcases/general/error_locations/error_location_02_lib2.dart:7:7: Context: While analyzing:
+// const fooField = const Foo(0);
+// ^
+//
import self as self2;
import "error_location_02_lib1.dart" as err;
@@ -67,6 +57,19 @@
static const field err::Foo* fooField = invalid-expression "This assertion failed.";
library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/error_locations/error_location_02_lib3.dart:7:19: Error: Constant evaluation error:
+// const fooField2 = fooField;
+// ^
+// pkg/front_end/testcases/general/error_locations/error_location_02_lib1.dart:6:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+// pkg/front_end/testcases/general/error_locations/error_location_02_lib3.dart:7:7: Context: While analyzing:
+// const fooField2 = fooField;
+// ^
+//
import self as self3;
import "error_location_02_lib1.dart" as err;
diff --git a/pkg/front_end/testcases/general/error_locations/error_location_02.dart.strong.transformed.expect b/pkg/front_end/testcases/general/error_locations/error_location_02.dart.strong.transformed.expect
index e1d2f71..1aae9ef 100644
--- a/pkg/front_end/testcases/general/error_locations/error_location_02.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/error_locations/error_location_02.dart.strong.transformed.expect
@@ -1,26 +1,3 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/general/error_locations/error_location_02_lib3.dart:7:19: Error: Constant evaluation error:
-// const fooField2 = fooField;
-// ^
-// pkg/front_end/testcases/general/error_locations/error_location_02_lib1.dart:6:31: Context: This assertion failed.
-// const Foo(int i) : assert(i > 0);
-// ^
-// pkg/front_end/testcases/general/error_locations/error_location_02_lib3.dart:7:7: Context: While analyzing:
-// const fooField2 = fooField;
-// ^
-//
-// pkg/front_end/testcases/general/error_locations/error_location_02_lib2.dart:7:24: Error: Constant evaluation error:
-// const fooField = const Foo(0);
-// ^
-// pkg/front_end/testcases/general/error_locations/error_location_02_lib1.dart:6:31: Context: This assertion failed.
-// const Foo(int i) : assert(i > 0);
-// ^
-// pkg/front_end/testcases/general/error_locations/error_location_02_lib2.dart:7:7: Context: While analyzing:
-// const fooField = const Foo(0);
-// ^
-//
library;
import self as self;
import "error_location_02_lib1.dart" as err;
@@ -59,6 +36,19 @@
}
library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/error_locations/error_location_02_lib2.dart:7:24: Error: Constant evaluation error:
+// const fooField = const Foo(0);
+// ^
+// pkg/front_end/testcases/general/error_locations/error_location_02_lib1.dart:6:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+// pkg/front_end/testcases/general/error_locations/error_location_02_lib2.dart:7:7: Context: While analyzing:
+// const fooField = const Foo(0);
+// ^
+//
import self as self2;
import "error_location_02_lib1.dart" as err;
@@ -67,6 +57,19 @@
static const field err::Foo* fooField = invalid-expression "This assertion failed.";
library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/error_locations/error_location_02_lib3.dart:7:19: Error: Constant evaluation error:
+// const fooField2 = fooField;
+// ^
+// pkg/front_end/testcases/general/error_locations/error_location_02_lib1.dart:6:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+// pkg/front_end/testcases/general/error_locations/error_location_02_lib3.dart:7:7: Context: While analyzing:
+// const fooField2 = fooField;
+// ^
+//
import self as self3;
import "error_location_02_lib1.dart" as err;
diff --git a/pkg/front_end/testcases/general/error_locations/error_location_03.dart.strong.expect b/pkg/front_end/testcases/general/error_locations/error_location_03.dart.strong.expect
index c8f681b..18b8f4f 100644
--- a/pkg/front_end/testcases/general/error_locations/error_location_03.dart.strong.expect
+++ b/pkg/front_end/testcases/general/error_locations/error_location_03.dart.strong.expect
@@ -1,26 +1,3 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/general/error_locations/error_location_03_lib2.dart:7:24: Error: Constant evaluation error:
-// const fooField = const Foo(0);
-// ^
-// pkg/front_end/testcases/general/error_locations/error_location_03_lib1.dart:6:31: Context: This assertion failed.
-// const Foo(int i) : assert(i > 0);
-// ^
-// pkg/front_end/testcases/general/error_locations/error_location_03_lib2.dart:7:7: Context: While analyzing:
-// const fooField = const Foo(0);
-// ^
-//
-// pkg/front_end/testcases/general/error_locations/error_location_03_lib3.dart:7:25: Error: Constant evaluation error:
-// const fooField2 = const Foo(0);
-// ^
-// pkg/front_end/testcases/general/error_locations/error_location_03_lib1.dart:6:31: Context: This assertion failed.
-// const Foo(int i) : assert(i > 0);
-// ^
-// pkg/front_end/testcases/general/error_locations/error_location_03_lib3.dart:7:7: Context: While analyzing:
-// const fooField2 = const Foo(0);
-// ^
-//
library;
import self as self;
import "error_location_03_lib1.dart" as err;
@@ -60,6 +37,19 @@
}
library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/error_locations/error_location_03_lib2.dart:7:24: Error: Constant evaluation error:
+// const fooField = const Foo(0);
+// ^
+// pkg/front_end/testcases/general/error_locations/error_location_03_lib1.dart:6:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+// pkg/front_end/testcases/general/error_locations/error_location_03_lib2.dart:7:7: Context: While analyzing:
+// const fooField = const Foo(0);
+// ^
+//
import self as self2;
import "error_location_03_lib1.dart" as err;
@@ -68,6 +58,19 @@
static const field err::Foo* fooField = invalid-expression "This assertion failed.";
library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/error_locations/error_location_03_lib3.dart:7:25: Error: Constant evaluation error:
+// const fooField2 = const Foo(0);
+// ^
+// pkg/front_end/testcases/general/error_locations/error_location_03_lib1.dart:6:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+// pkg/front_end/testcases/general/error_locations/error_location_03_lib3.dart:7:7: Context: While analyzing:
+// const fooField2 = const Foo(0);
+// ^
+//
import self as self3;
import "error_location_03_lib1.dart" as err;
diff --git a/pkg/front_end/testcases/general/error_locations/error_location_03.dart.strong.transformed.expect b/pkg/front_end/testcases/general/error_locations/error_location_03.dart.strong.transformed.expect
index c8f681b..18b8f4f 100644
--- a/pkg/front_end/testcases/general/error_locations/error_location_03.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/error_locations/error_location_03.dart.strong.transformed.expect
@@ -1,26 +1,3 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/general/error_locations/error_location_03_lib2.dart:7:24: Error: Constant evaluation error:
-// const fooField = const Foo(0);
-// ^
-// pkg/front_end/testcases/general/error_locations/error_location_03_lib1.dart:6:31: Context: This assertion failed.
-// const Foo(int i) : assert(i > 0);
-// ^
-// pkg/front_end/testcases/general/error_locations/error_location_03_lib2.dart:7:7: Context: While analyzing:
-// const fooField = const Foo(0);
-// ^
-//
-// pkg/front_end/testcases/general/error_locations/error_location_03_lib3.dart:7:25: Error: Constant evaluation error:
-// const fooField2 = const Foo(0);
-// ^
-// pkg/front_end/testcases/general/error_locations/error_location_03_lib1.dart:6:31: Context: This assertion failed.
-// const Foo(int i) : assert(i > 0);
-// ^
-// pkg/front_end/testcases/general/error_locations/error_location_03_lib3.dart:7:7: Context: While analyzing:
-// const fooField2 = const Foo(0);
-// ^
-//
library;
import self as self;
import "error_location_03_lib1.dart" as err;
@@ -60,6 +37,19 @@
}
library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/error_locations/error_location_03_lib2.dart:7:24: Error: Constant evaluation error:
+// const fooField = const Foo(0);
+// ^
+// pkg/front_end/testcases/general/error_locations/error_location_03_lib1.dart:6:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+// pkg/front_end/testcases/general/error_locations/error_location_03_lib2.dart:7:7: Context: While analyzing:
+// const fooField = const Foo(0);
+// ^
+//
import self as self2;
import "error_location_03_lib1.dart" as err;
@@ -68,6 +58,19 @@
static const field err::Foo* fooField = invalid-expression "This assertion failed.";
library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/error_locations/error_location_03_lib3.dart:7:25: Error: Constant evaluation error:
+// const fooField2 = const Foo(0);
+// ^
+// pkg/front_end/testcases/general/error_locations/error_location_03_lib1.dart:6:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+// pkg/front_end/testcases/general/error_locations/error_location_03_lib3.dart:7:7: Context: While analyzing:
+// const fooField2 = const Foo(0);
+// ^
+//
import self as self3;
import "error_location_03_lib1.dart" as err;
diff --git a/pkg/front_end/testcases/general/error_locations/error_location_04.dart.strong.expect b/pkg/front_end/testcases/general/error_locations/error_location_04.dart.strong.expect
index 1170883..972534b 100644
--- a/pkg/front_end/testcases/general/error_locations/error_location_04.dart.strong.expect
+++ b/pkg/front_end/testcases/general/error_locations/error_location_04.dart.strong.expect
@@ -1,13 +1,3 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/general/error_locations/error_location_04_lib2.dart:9:27: Error: Constant evaluation error:
-// const Bar() : x = const Foo(0);
-// ^
-// pkg/front_end/testcases/general/error_locations/error_location_04_lib1.dart:6:31: Context: This assertion failed.
-// const Foo(int i) : assert(i > 0);
-// ^
-//
library;
import self as self;
import "error_location_04_lib1.dart" as err;
@@ -45,6 +35,16 @@
}
library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/error_locations/error_location_04_lib2.dart:9:27: Error: Constant evaluation error:
+// const Bar() : x = const Foo(0);
+// ^
+// pkg/front_end/testcases/general/error_locations/error_location_04_lib1.dart:6:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+//
import self as err2;
import "dart:core" as core;
import "error_location_04_lib1.dart" as err;
diff --git a/pkg/front_end/testcases/general/error_locations/error_location_04.dart.strong.transformed.expect b/pkg/front_end/testcases/general/error_locations/error_location_04.dart.strong.transformed.expect
index 1170883..972534b 100644
--- a/pkg/front_end/testcases/general/error_locations/error_location_04.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/error_locations/error_location_04.dart.strong.transformed.expect
@@ -1,13 +1,3 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/general/error_locations/error_location_04_lib2.dart:9:27: Error: Constant evaluation error:
-// const Bar() : x = const Foo(0);
-// ^
-// pkg/front_end/testcases/general/error_locations/error_location_04_lib1.dart:6:31: Context: This assertion failed.
-// const Foo(int i) : assert(i > 0);
-// ^
-//
library;
import self as self;
import "error_location_04_lib1.dart" as err;
@@ -45,6 +35,16 @@
}
library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general/error_locations/error_location_04_lib2.dart:9:27: Error: Constant evaluation error:
+// const Bar() : x = const Foo(0);
+// ^
+// pkg/front_end/testcases/general/error_locations/error_location_04_lib1.dart:6:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+//
import self as err2;
import "dart:core" as core;
import "error_location_04_lib1.dart" as err;
diff --git a/pkg/front_end/testcases/general/ffi_sample.dart.strong.transformed.expect b/pkg/front_end/testcases/general/ffi_sample.dart.strong.transformed.expect
index 97266d3..c402dca 100644
--- a/pkg/front_end/testcases/general/ffi_sample.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/ffi_sample.dart.strong.transformed.expect
@@ -44,7 +44,7 @@
get next() → ffi::Pointer<self::Coordinate*>*
return ffi::_fromAddress<self::Coordinate*>(ffi::_loadIntPtr(this.{ffi::Struct::_addressOf}, (#C12).{core::List::[]}(ffi::_abi())));
set next(ffi::Pointer<self::Coordinate*>* #v) → void
- return ffi::_storeIntPtr(this.{ffi::Struct::_addressOf}, (#C12).{core::List::[]}(ffi::_abi()), #v.{=ffi::Pointer::address});
+ return ffi::_storeIntPtr(this.{ffi::Struct::_addressOf}, (#C12).{core::List::[]}(ffi::_abi()), #v.{ffi::Pointer::address});
}
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general/issue43290.dart.strong.expect b/pkg/front_end/testcases/general/issue43290.dart.strong.expect
index 9edb793..053b66cc 100644
--- a/pkg/front_end/testcases/general/issue43290.dart.strong.expect
+++ b/pkg/front_end/testcases/general/issue43290.dart.strong.expect
@@ -1,5 +1,14 @@
+library;
//
-// Problems in component:
+// Problems in library:
+//
+// pkg/front_end/testcases/general/issue43290.dart:11:25: Error: Not a constant expression.
+// const Class(length: length);
+// ^^^^^^
+//
+// pkg/front_end/testcases/general/issue43290.dart:19:15: Error: Not a constant expression.
+// const a = length;
+// ^^^^^^
//
// pkg/front_end/testcases/general/issue43290.dart:7:11: Error: Constant evaluation error:
// const Class(length: this.length);
@@ -35,18 +44,6 @@
// const a = length;
// ^
//
-library;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/general/issue43290.dart:11:25: Error: Not a constant expression.
-// const Class(length: length);
-// ^^^^^^
-//
-// pkg/front_end/testcases/general/issue43290.dart:19:15: Error: Not a constant expression.
-// const a = length;
-// ^^^^^^
-//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/issue43290.dart.strong.transformed.expect b/pkg/front_end/testcases/general/issue43290.dart.strong.transformed.expect
index 9edb793..053b66cc 100644
--- a/pkg/front_end/testcases/general/issue43290.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/issue43290.dart.strong.transformed.expect
@@ -1,5 +1,14 @@
+library;
//
-// Problems in component:
+// Problems in library:
+//
+// pkg/front_end/testcases/general/issue43290.dart:11:25: Error: Not a constant expression.
+// const Class(length: length);
+// ^^^^^^
+//
+// pkg/front_end/testcases/general/issue43290.dart:19:15: Error: Not a constant expression.
+// const a = length;
+// ^^^^^^
//
// pkg/front_end/testcases/general/issue43290.dart:7:11: Error: Constant evaluation error:
// const Class(length: this.length);
@@ -35,18 +44,6 @@
// const a = length;
// ^
//
-library;
-//
-// Problems in library:
-//
-// pkg/front_end/testcases/general/issue43290.dart:11:25: Error: Not a constant expression.
-// const Class(length: length);
-// ^^^^^^
-//
-// pkg/front_end/testcases/general/issue43290.dart:19:15: Error: Not a constant expression.
-// const a = length;
-// ^^^^^^
-//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/general/mixin_constructors_with_default_values.dart.strong.expect b/pkg/front_end/testcases/general/mixin_constructors_with_default_values.dart.strong.expect
index 0c0d538..daa1e5a 100644
--- a/pkg/front_end/testcases/general/mixin_constructors_with_default_values.dart.strong.expect
+++ b/pkg/front_end/testcases/general/mixin_constructors_with_default_values.dart.strong.expect
@@ -1,5 +1,6 @@
+library;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/general/mixin_constructors_with_default_values.dart:9:15: Error: Constant evaluation error:
// C({a: 0, b: T}) : trace = "a: $a, b: $b";
@@ -11,7 +12,6 @@
// C({a: 0, b: T}) : trace = "a: $a, b: $b";
// ^
//
-library;
import self as self;
import "dart:core" as core;
import "package:expect/expect.dart" as exp;
diff --git a/pkg/front_end/testcases/general/mixin_constructors_with_default_values.dart.strong.transformed.expect b/pkg/front_end/testcases/general/mixin_constructors_with_default_values.dart.strong.transformed.expect
index 0cc126e..fe40abd 100644
--- a/pkg/front_end/testcases/general/mixin_constructors_with_default_values.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/general/mixin_constructors_with_default_values.dart.strong.transformed.expect
@@ -1,5 +1,6 @@
+library;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/general/mixin_constructors_with_default_values.dart:9:15: Error: Constant evaluation error:
// C({a: 0, b: T}) : trace = "a: $a, b: $b";
@@ -11,7 +12,6 @@
// C({a: 0, b: T}) : trace = "a: $a, b: $b";
// ^
//
-library;
import self as self;
import "dart:core" as core;
import "package:expect/expect.dart" as exp;
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_01.dart.weak.expect b/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_01.dart.weak.expect
index dcb5fa0..01eb26d 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_01.dart.weak.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_01.dart.weak.expect
@@ -1,13 +1,3 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_01_lib2.dart:10:9: Error: Constant evaluation error:
-// const Foo(0);
-// ^
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_01_lib1.dart:8:31: Context: This assertion failed.
-// const Foo(int i) : assert(i > 0);
-// ^
-//
library;
import self as self;
import "error_location_01_lib1.dart" as err;
@@ -45,6 +35,16 @@
}
library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_01_lib2.dart:10:9: Error: Constant evaluation error:
+// const Foo(0);
+// ^
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_01_lib1.dart:8:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+//
import self as err2;
import "org-dartlang-testcase:///error_location_01_lib1.dart";
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_01.dart.weak.transformed.expect b/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_01.dart.weak.transformed.expect
index dcb5fa0..01eb26d 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_01.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_01.dart.weak.transformed.expect
@@ -1,13 +1,3 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_01_lib2.dart:10:9: Error: Constant evaluation error:
-// const Foo(0);
-// ^
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_01_lib1.dart:8:31: Context: This assertion failed.
-// const Foo(int i) : assert(i > 0);
-// ^
-//
library;
import self as self;
import "error_location_01_lib1.dart" as err;
@@ -45,6 +35,16 @@
}
library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_01_lib2.dart:10:9: Error: Constant evaluation error:
+// const Foo(0);
+// ^
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_01_lib1.dart:8:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+//
import self as err2;
import "org-dartlang-testcase:///error_location_01_lib1.dart";
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02.dart.weak.expect b/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02.dart.weak.expect
index e9d28b1..323bb1d 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02.dart.weak.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02.dart.weak.expect
@@ -1,26 +1,3 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02_lib3.dart:9:19: Error: Constant evaluation error:
-// const fooField2 = fooField;
-// ^
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02_lib1.dart:8:31: Context: This assertion failed.
-// const Foo(int i) : assert(i > 0);
-// ^
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02_lib3.dart:9:7: Context: While analyzing:
-// const fooField2 = fooField;
-// ^
-//
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02_lib2.dart:9:24: Error: Constant evaluation error:
-// const fooField = const Foo(0);
-// ^
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02_lib1.dart:8:31: Context: This assertion failed.
-// const Foo(int i) : assert(i > 0);
-// ^
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02_lib2.dart:9:7: Context: While analyzing:
-// const fooField = const Foo(0);
-// ^
-//
library;
import self as self;
import "error_location_02_lib1.dart" as err;
@@ -59,6 +36,19 @@
}
library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02_lib2.dart:9:24: Error: Constant evaluation error:
+// const fooField = const Foo(0);
+// ^
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02_lib1.dart:8:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02_lib2.dart:9:7: Context: While analyzing:
+// const fooField = const Foo(0);
+// ^
+//
import self as self2;
import "error_location_02_lib1.dart" as err;
@@ -67,6 +57,19 @@
static const field err::Foo* fooField = invalid-expression "This assertion failed.";
library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02_lib3.dart:9:19: Error: Constant evaluation error:
+// const fooField2 = fooField;
+// ^
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02_lib1.dart:8:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02_lib3.dart:9:7: Context: While analyzing:
+// const fooField2 = fooField;
+// ^
+//
import self as self3;
import "error_location_02_lib1.dart" as err;
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02.dart.weak.transformed.expect b/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02.dart.weak.transformed.expect
index e9d28b1..323bb1d 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02.dart.weak.transformed.expect
@@ -1,26 +1,3 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02_lib3.dart:9:19: Error: Constant evaluation error:
-// const fooField2 = fooField;
-// ^
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02_lib1.dart:8:31: Context: This assertion failed.
-// const Foo(int i) : assert(i > 0);
-// ^
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02_lib3.dart:9:7: Context: While analyzing:
-// const fooField2 = fooField;
-// ^
-//
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02_lib2.dart:9:24: Error: Constant evaluation error:
-// const fooField = const Foo(0);
-// ^
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02_lib1.dart:8:31: Context: This assertion failed.
-// const Foo(int i) : assert(i > 0);
-// ^
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02_lib2.dart:9:7: Context: While analyzing:
-// const fooField = const Foo(0);
-// ^
-//
library;
import self as self;
import "error_location_02_lib1.dart" as err;
@@ -59,6 +36,19 @@
}
library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02_lib2.dart:9:24: Error: Constant evaluation error:
+// const fooField = const Foo(0);
+// ^
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02_lib1.dart:8:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02_lib2.dart:9:7: Context: While analyzing:
+// const fooField = const Foo(0);
+// ^
+//
import self as self2;
import "error_location_02_lib1.dart" as err;
@@ -67,6 +57,19 @@
static const field err::Foo* fooField = invalid-expression "This assertion failed.";
library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02_lib3.dart:9:19: Error: Constant evaluation error:
+// const fooField2 = fooField;
+// ^
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02_lib1.dart:8:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_02_lib3.dart:9:7: Context: While analyzing:
+// const fooField2 = fooField;
+// ^
+//
import self as self3;
import "error_location_02_lib1.dart" as err;
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03.dart.weak.expect b/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03.dart.weak.expect
index f9e1e20..e0eca30 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03.dart.weak.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03.dart.weak.expect
@@ -1,26 +1,3 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03_lib2.dart:9:24: Error: Constant evaluation error:
-// const fooField = const Foo(0);
-// ^
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03_lib1.dart:8:31: Context: This assertion failed.
-// const Foo(int i) : assert(i > 0);
-// ^
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03_lib2.dart:9:7: Context: While analyzing:
-// const fooField = const Foo(0);
-// ^
-//
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03_lib3.dart:9:25: Error: Constant evaluation error:
-// const fooField2 = const Foo(0);
-// ^
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03_lib1.dart:8:31: Context: This assertion failed.
-// const Foo(int i) : assert(i > 0);
-// ^
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03_lib3.dart:9:7: Context: While analyzing:
-// const fooField2 = const Foo(0);
-// ^
-//
library;
import self as self;
import "error_location_03_lib1.dart" as err;
@@ -60,6 +37,19 @@
}
library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03_lib2.dart:9:24: Error: Constant evaluation error:
+// const fooField = const Foo(0);
+// ^
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03_lib1.dart:8:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03_lib2.dart:9:7: Context: While analyzing:
+// const fooField = const Foo(0);
+// ^
+//
import self as self2;
import "error_location_03_lib1.dart" as err;
@@ -68,6 +58,19 @@
static const field err::Foo* fooField = invalid-expression "This assertion failed.";
library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03_lib3.dart:9:25: Error: Constant evaluation error:
+// const fooField2 = const Foo(0);
+// ^
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03_lib1.dart:8:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03_lib3.dart:9:7: Context: While analyzing:
+// const fooField2 = const Foo(0);
+// ^
+//
import self as self3;
import "error_location_03_lib1.dart" as err;
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03.dart.weak.transformed.expect b/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03.dart.weak.transformed.expect
index f9e1e20..e0eca30 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03.dart.weak.transformed.expect
@@ -1,26 +1,3 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03_lib2.dart:9:24: Error: Constant evaluation error:
-// const fooField = const Foo(0);
-// ^
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03_lib1.dart:8:31: Context: This assertion failed.
-// const Foo(int i) : assert(i > 0);
-// ^
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03_lib2.dart:9:7: Context: While analyzing:
-// const fooField = const Foo(0);
-// ^
-//
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03_lib3.dart:9:25: Error: Constant evaluation error:
-// const fooField2 = const Foo(0);
-// ^
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03_lib1.dart:8:31: Context: This assertion failed.
-// const Foo(int i) : assert(i > 0);
-// ^
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03_lib3.dart:9:7: Context: While analyzing:
-// const fooField2 = const Foo(0);
-// ^
-//
library;
import self as self;
import "error_location_03_lib1.dart" as err;
@@ -60,6 +37,19 @@
}
library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03_lib2.dart:9:24: Error: Constant evaluation error:
+// const fooField = const Foo(0);
+// ^
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03_lib1.dart:8:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03_lib2.dart:9:7: Context: While analyzing:
+// const fooField = const Foo(0);
+// ^
+//
import self as self2;
import "error_location_03_lib1.dart" as err;
@@ -68,6 +58,19 @@
static const field err::Foo* fooField = invalid-expression "This assertion failed.";
library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03_lib3.dart:9:25: Error: Constant evaluation error:
+// const fooField2 = const Foo(0);
+// ^
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03_lib1.dart:8:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_03_lib3.dart:9:7: Context: While analyzing:
+// const fooField2 = const Foo(0);
+// ^
+//
import self as self3;
import "error_location_03_lib1.dart" as err;
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_04.dart.weak.expect b/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_04.dart.weak.expect
index 558b630..eaf451a 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_04.dart.weak.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_04.dart.weak.expect
@@ -1,13 +1,3 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_04_lib2.dart:11:27: Error: Constant evaluation error:
-// const Bar() : x = const Foo(0);
-// ^
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_04_lib1.dart:8:31: Context: This assertion failed.
-// const Foo(int i) : assert(i > 0);
-// ^
-//
library;
import self as self;
import "error_location_04_lib1.dart" as err;
@@ -45,6 +35,16 @@
}
library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_04_lib2.dart:11:27: Error: Constant evaluation error:
+// const Bar() : x = const Foo(0);
+// ^
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_04_lib1.dart:8:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+//
import self as err2;
import "dart:core" as core;
import "error_location_04_lib1.dart" as err;
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_04.dart.weak.transformed.expect b/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_04.dart.weak.transformed.expect
index 558b630..eaf451a 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_04.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_04.dart.weak.transformed.expect
@@ -1,13 +1,3 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_04_lib2.dart:11:27: Error: Constant evaluation error:
-// const Bar() : x = const Foo(0);
-// ^
-// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_04_lib1.dart:8:31: Context: This assertion failed.
-// const Foo(int i) : assert(i > 0);
-// ^
-//
library;
import self as self;
import "error_location_04_lib1.dart" as err;
@@ -45,6 +35,16 @@
}
library;
+//
+// Problems in library:
+//
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_04_lib2.dart:11:27: Error: Constant evaluation error:
+// const Bar() : x = const Foo(0);
+// ^
+// pkg/front_end/testcases/general_nnbd_opt_out/error_locations/error_location_04_lib1.dart:8:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+//
import self as err2;
import "dart:core" as core;
import "error_location_04_lib1.dart" as err;
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/ffi_sample.dart.weak.transformed.expect b/pkg/front_end/testcases/general_nnbd_opt_out/ffi_sample.dart.weak.transformed.expect
index 97266d3..c402dca 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/ffi_sample.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/ffi_sample.dart.weak.transformed.expect
@@ -44,7 +44,7 @@
get next() → ffi::Pointer<self::Coordinate*>*
return ffi::_fromAddress<self::Coordinate*>(ffi::_loadIntPtr(this.{ffi::Struct::_addressOf}, (#C12).{core::List::[]}(ffi::_abi())));
set next(ffi::Pointer<self::Coordinate*>* #v) → void
- return ffi::_storeIntPtr(this.{ffi::Struct::_addressOf}, (#C12).{core::List::[]}(ffi::_abi()), #v.{=ffi::Pointer::address});
+ return ffi::_storeIntPtr(this.{ffi::Struct::_addressOf}, (#C12).{core::List::[]}(ffi::_abi()), #v.{ffi::Pointer::address});
}
static method main() → dynamic {}
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/mixin_constructors_with_default_values.dart.weak.expect b/pkg/front_end/testcases/general_nnbd_opt_out/mixin_constructors_with_default_values.dart.weak.expect
index 1edf01c..b2d2a0f 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/mixin_constructors_with_default_values.dart.weak.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/mixin_constructors_with_default_values.dart.weak.expect
@@ -1,5 +1,6 @@
+library;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/general_nnbd_opt_out/mixin_constructors_with_default_values.dart:11:15: Error: Constant evaluation error:
// C({a: 0, b: T}) : trace = "a: $a, b: $b";
@@ -11,7 +12,6 @@
// C({a: 0, b: T}) : trace = "a: $a, b: $b";
// ^
//
-library;
import self as self;
import "dart:core" as core;
import "package:expect/expect.dart" as exp;
diff --git a/pkg/front_end/testcases/general_nnbd_opt_out/mixin_constructors_with_default_values.dart.weak.transformed.expect b/pkg/front_end/testcases/general_nnbd_opt_out/mixin_constructors_with_default_values.dart.weak.transformed.expect
index 363663f..d0d4423 100644
--- a/pkg/front_end/testcases/general_nnbd_opt_out/mixin_constructors_with_default_values.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/general_nnbd_opt_out/mixin_constructors_with_default_values.dart.weak.transformed.expect
@@ -1,5 +1,6 @@
+library;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/general_nnbd_opt_out/mixin_constructors_with_default_values.dart:11:15: Error: Constant evaluation error:
// C({a: 0, b: T}) : trace = "a: $a, b: $b";
@@ -11,7 +12,6 @@
// C({a: 0, b: T}) : trace = "a: $a, b: $b";
// ^
//
-library;
import self as self;
import "dart:core" as core;
import "package:expect/expect.dart" as exp;
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/ffi_01.yaml.world.1.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/ffi_01.yaml.world.1.expect
index deaa189..07b6c80 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/ffi_01.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/ffi_01.yaml.world.1.expect
@@ -36,7 +36,7 @@
get next() → dart.ffi::Pointer<lib::Coordinate*>*
return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::Struct::_addressOf}, (#C12).{dart.core::List::[]}(dart.ffi::_abi())));
set next(dart.ffi::Pointer<lib::Coordinate*>* #v) → void
- return dart.ffi::_storeIntPtr(this.{dart.ffi::Struct::_addressOf}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()), #v.{=dart.ffi::Pointer::address});
+ return dart.ffi::_storeIntPtr(this.{dart.ffi::Struct::_addressOf}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()), #v.{dart.ffi::Pointer::address});
}
}
library from "org-dartlang-test:///main.dart" as main {
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/ffi_01.yaml.world.2.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/ffi_01.yaml.world.2.expect
index 142aced..c592dbf 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/ffi_01.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/ffi_01.yaml.world.2.expect
@@ -36,7 +36,7 @@
get next() → dart.ffi::Pointer<lib::Coordinate*>*
return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::Struct::_addressOf}, (#C12).{dart.core::List::[]}(dart.ffi::_abi())));
set next(dart.ffi::Pointer<lib::Coordinate*>* #v) → void
- return dart.ffi::_storeIntPtr(this.{dart.ffi::Struct::_addressOf}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()), #v.{=dart.ffi::Pointer::address});
+ return dart.ffi::_storeIntPtr(this.{dart.ffi::Struct::_addressOf}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()), #v.{dart.ffi::Pointer::address});
}
}
library from "org-dartlang-test:///main.dart" as main {
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/ffi_02.yaml.world.1.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/ffi_02.yaml.world.1.expect
index 69a75ed..fae41df 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/ffi_02.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/ffi_02.yaml.world.1.expect
@@ -36,7 +36,7 @@
get next() → dart.ffi::Pointer<lib::Coordinate*>*
return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::Struct::_addressOf}, (#C12).{dart.core::List::[]}(dart.ffi::_abi())));
set next(dart.ffi::Pointer<lib::Coordinate*>* #v) → void
- return dart.ffi::_storeIntPtr(this.{dart.ffi::Struct::_addressOf}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()), #v.{=dart.ffi::Pointer::address});
+ return dart.ffi::_storeIntPtr(this.{dart.ffi::Struct::_addressOf}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()), #v.{dart.ffi::Pointer::address});
}
}
library from "org-dartlang-test:///main.dart" as main {
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_35.yaml.world.1.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_35.yaml.world.1.expect
index deaa189..07b6c80 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_35.yaml.world.1.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_35.yaml.world.1.expect
@@ -36,7 +36,7 @@
get next() → dart.ffi::Pointer<lib::Coordinate*>*
return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::Struct::_addressOf}, (#C12).{dart.core::List::[]}(dart.ffi::_abi())));
set next(dart.ffi::Pointer<lib::Coordinate*>* #v) → void
- return dart.ffi::_storeIntPtr(this.{dart.ffi::Struct::_addressOf}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()), #v.{=dart.ffi::Pointer::address});
+ return dart.ffi::_storeIntPtr(this.{dart.ffi::Struct::_addressOf}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()), #v.{dart.ffi::Pointer::address});
}
}
library from "org-dartlang-test:///main.dart" as main {
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_35.yaml.world.2.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_35.yaml.world.2.expect
index 53a7be9..879c497 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_35.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_35.yaml.world.2.expect
@@ -36,7 +36,7 @@
get next() → dart.ffi::Pointer<lib::Coordinate*>*
return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::Struct::_addressOf}, (#C12).{dart.core::List::[]}(dart.ffi::_abi())));
set next(dart.ffi::Pointer<lib::Coordinate*>* #v) → void
- return dart.ffi::_storeIntPtr(this.{dart.ffi::Struct::_addressOf}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()), #v.{=dart.ffi::Pointer::address});
+ return dart.ffi::_storeIntPtr(this.{dart.ffi::Struct::_addressOf}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()), #v.{dart.ffi::Pointer::address});
}
}
library from "org-dartlang-test:///main.dart" as main {
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_35.yaml.world.3.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_35.yaml.world.3.expect
index d5c77ed..c31f270 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_35.yaml.world.3.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/no_outline_change_35.yaml.world.3.expect
@@ -37,7 +37,7 @@
get next() → dart.ffi::Pointer<lib::Coordinate*>*
return dart.ffi::_fromAddress<lib::Coordinate*>(dart.ffi::_loadIntPtr(this.{dart.ffi::Struct::_addressOf}, (#C12).{dart.core::List::[]}(dart.ffi::_abi())));
set next(dart.ffi::Pointer<lib::Coordinate*>* #v) → void
- return dart.ffi::_storeIntPtr(this.{dart.ffi::Struct::_addressOf}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()), #v.{=dart.ffi::Pointer::address});
+ return dart.ffi::_storeIntPtr(this.{dart.ffi::Struct::_addressOf}, (#C12).{dart.core::List::[]}(dart.ffi::_abi()), #v.{dart.ffi::Pointer::address});
}
}
library from "org-dartlang-test:///main.dart" as main {
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/reissue_errors_10.yaml.world.2.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/reissue_errors_10.yaml.world.2.expect
index b92a1ea..d5f5815 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/reissue_errors_10.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/reissue_errors_10.yaml.world.2.expect
@@ -21,12 +21,38 @@
}
}
library from "org-dartlang-test:///lib2.dart" as lib2 {
+//
+// Problems in library:
+//
+// org-dartlang-test:///lib2.dart:2:24: Error: Constant evaluation error:
+// const fooField = const Foo(0);
+// ^
+// org-dartlang-test:///lib.dart:2:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+// org-dartlang-test:///lib2.dart:2:7: Context: While analyzing:
+// const fooField = const Foo(0);
+// ^
+//
import "org-dartlang-test:///lib.dart";
static const field lib::Foo* fooField = invalid-expression "This assertion failed.";
}
library from "org-dartlang-test:///lib3.dart" as lib3 {
+//
+// Problems in library:
+//
+// org-dartlang-test:///lib3.dart:2:25: Error: Constant evaluation error:
+// const fooField2 = const Foo(0);
+// ^
+// org-dartlang-test:///lib.dart:2:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+// org-dartlang-test:///lib3.dart:2:7: Context: While analyzing:
+// const fooField2 = const Foo(0);
+// ^
+//
import "org-dartlang-test:///lib.dart";
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/reissue_errors_10.yaml.world.3.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/reissue_errors_10.yaml.world.3.expect
index a37c20f..b78ad6f 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/reissue_errors_10.yaml.world.3.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/reissue_errors_10.yaml.world.3.expect
@@ -27,6 +27,19 @@
static const field lib::Foo* fooField = #C1;
}
library from "org-dartlang-test:///lib3.dart" as lib3 {
+//
+// Problems in library:
+//
+// org-dartlang-test:///lib3.dart:2:25: Error: Constant evaluation error:
+// const fooField2 = const Foo(0);
+// ^
+// org-dartlang-test:///lib.dart:2:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+// org-dartlang-test:///lib3.dart:2:7: Context: While analyzing:
+// const fooField2 = const Foo(0);
+// ^
+//
import "org-dartlang-test:///lib.dart";
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/reissue_errors_10.yaml.world.4.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/reissue_errors_10.yaml.world.4.expect
index 7ebf557..b991c2c 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/reissue_errors_10.yaml.world.4.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/reissue_errors_10.yaml.world.4.expect
@@ -21,6 +21,19 @@
}
}
library from "org-dartlang-test:///lib2.dart" as lib2 {
+//
+// Problems in library:
+//
+// org-dartlang-test:///lib2.dart:2:24: Error: Constant evaluation error:
+// const fooField = const Foo(0);
+// ^
+// org-dartlang-test:///lib.dart:2:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+// org-dartlang-test:///lib2.dart:2:7: Context: While analyzing:
+// const fooField = const Foo(0);
+// ^
+//
import "org-dartlang-test:///lib.dart";
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/reissue_errors_11.yaml.world.2.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/reissue_errors_11.yaml.world.2.expect
index da804b5..0749995 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/reissue_errors_11.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/reissue_errors_11.yaml.world.2.expect
@@ -21,6 +21,16 @@
}
}
library from "org-dartlang-test:///lib2.dart" as lib2 {
+//
+// Problems in library:
+//
+// org-dartlang-test:///lib2.dart:4:27: Error: Constant evaluation error:
+// const Bar() : x = const Foo(0);
+// ^
+// org-dartlang-test:///lib.dart:2:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+//
import "org-dartlang-test:///lib.dart";
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/reissue_errors_8.yaml.world.2.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/reissue_errors_8.yaml.world.2.expect
index ff534c4..a3c1c19 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/reissue_errors_8.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/reissue_errors_8.yaml.world.2.expect
@@ -21,6 +21,16 @@
}
}
library from "org-dartlang-test:///lib2.dart" as lib2 {
+//
+// Problems in library:
+//
+// org-dartlang-test:///lib2.dart:3:9: Error: Constant evaluation error:
+// const Foo(0);
+// ^
+// org-dartlang-test:///lib.dart:2:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+//
import "org-dartlang-test:///lib.dart";
diff --git a/pkg/front_end/testcases/incremental_initialize_from_dill/reissue_errors_9.yaml.world.2.expect b/pkg/front_end/testcases/incremental_initialize_from_dill/reissue_errors_9.yaml.world.2.expect
index 503ce20..20b5e7e 100644
--- a/pkg/front_end/testcases/incremental_initialize_from_dill/reissue_errors_9.yaml.world.2.expect
+++ b/pkg/front_end/testcases/incremental_initialize_from_dill/reissue_errors_9.yaml.world.2.expect
@@ -21,12 +21,38 @@
}
}
library from "org-dartlang-test:///lib2.dart" as lib2 {
+//
+// Problems in library:
+//
+// org-dartlang-test:///lib2.dart:2:24: Error: Constant evaluation error:
+// const fooField = const Foo(0);
+// ^
+// org-dartlang-test:///lib.dart:2:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+// org-dartlang-test:///lib2.dart:2:7: Context: While analyzing:
+// const fooField = const Foo(0);
+// ^
+//
import "org-dartlang-test:///lib.dart";
static const field lib::Foo* fooField = invalid-expression "This assertion failed.";
}
library from "org-dartlang-test:///lib3.dart" as lib3 {
+//
+// Problems in library:
+//
+// org-dartlang-test:///lib3.dart:2:19: Error: Constant evaluation error:
+// const fooField2 = fooField;
+// ^
+// org-dartlang-test:///lib.dart:2:31: Context: This assertion failed.
+// const Foo(int i) : assert(i > 0);
+// ^
+// org-dartlang-test:///lib3.dart:2:7: Context: While analyzing:
+// const fooField2 = fooField;
+// ^
+//
import "org-dartlang-test:///lib2.dart";
diff --git a/pkg/front_end/testcases/nnbd/constant_null_check.dart.strong.expect b/pkg/front_end/testcases/nnbd/constant_null_check.dart.strong.expect
index ca8683f..a0b9eae 100644
--- a/pkg/front_end/testcases/nnbd/constant_null_check.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/constant_null_check.dart.strong.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/nnbd/constant_null_check.dart:9:17: Error: Constant evaluation error:
// const int? d = c!;
@@ -21,7 +22,6 @@
// const Class f = const Class(c);
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/nnbd/constant_null_check.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/constant_null_check.dart.strong.transformed.expect
index ca8683f..a0b9eae 100644
--- a/pkg/front_end/testcases/nnbd/constant_null_check.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/constant_null_check.dart.strong.transformed.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/nnbd/constant_null_check.dart:9:17: Error: Constant evaluation error:
// const int? d = c!;
@@ -21,7 +22,6 @@
// const Class f = const Class(c);
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/nnbd/constant_null_check.dart.weak.expect b/pkg/front_end/testcases/nnbd/constant_null_check.dart.weak.expect
index ca8683f..a0b9eae 100644
--- a/pkg/front_end/testcases/nnbd/constant_null_check.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/constant_null_check.dart.weak.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/nnbd/constant_null_check.dart:9:17: Error: Constant evaluation error:
// const int? d = c!;
@@ -21,7 +22,6 @@
// const Class f = const Class(c);
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/nnbd/constant_null_check.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/constant_null_check.dart.weak.transformed.expect
index ca8683f..a0b9eae 100644
--- a/pkg/front_end/testcases/nnbd/constant_null_check.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/constant_null_check.dart.weak.transformed.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/nnbd/constant_null_check.dart:9:17: Error: Constant evaluation error:
// const int? d = c!;
@@ -21,7 +22,6 @@
// const Class f = const Class(c);
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.weak.expect b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.weak.expect
index 7ede780..f936ed5 100644
--- a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.weak.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart:8:12: Error: Constant evaluation error:
// const c2 = {a: 0, b: 1};
@@ -21,7 +22,6 @@
// const c3 = {a, b};
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.weak.transformed.expect
index 7ede780..f936ed5 100644
--- a/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart.weak.transformed.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/nnbd/from_agnostic/from_agnostic.dart:8:12: Error: Constant evaluation error:
// const c2 = {a: 0, b: 1};
@@ -21,7 +22,6 @@
// const c3 = {a, b};
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/nnbd/issue41657.dart.strong.expect b/pkg/front_end/testcases/nnbd/issue41657.dart.strong.expect
index f69417a..0e06724 100644
--- a/pkg/front_end/testcases/nnbd/issue41657.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/issue41657.dart.strong.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/nnbd/issue41657.dart:10:41: Error: Constant evaluation error:
// const assertLegacySubtyping1 = <Null>[] as List<int>;
@@ -23,7 +24,6 @@
// const assertLegacySubtyping2 = <int?>[] as List<int>;
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/nnbd/issue41657.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/issue41657.dart.strong.transformed.expect
index f69417a..0e06724 100644
--- a/pkg/front_end/testcases/nnbd/issue41657.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/issue41657.dart.strong.transformed.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/nnbd/issue41657.dart:10:41: Error: Constant evaluation error:
// const assertLegacySubtyping1 = <Null>[] as List<int>;
@@ -23,7 +24,6 @@
// const assertLegacySubtyping2 = <int?>[] as List<int>;
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.strong.expect b/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.strong.expect
index 6ec69f6..f6d9603 100644
--- a/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.strong.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart:61:9: Error: Constant evaluation error:
// const ClassWithFunction<Object>(objectFunction); // ok in weak mode
@@ -133,7 +134,6 @@
// const ClassWithFunction(dynamic value) : field = value as T Function(T);
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.strong.transformed.expect
index 6ec69f6..f6d9603 100644
--- a/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.strong.transformed.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart:61:9: Error: Constant evaluation error:
// const ClassWithFunction<Object>(objectFunction); // ok in weak mode
@@ -133,7 +134,6 @@
// const ClassWithFunction(dynamic value) : field = value as T Function(T);
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.weak.expect b/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.weak.expect
index 37e43f1..03c1430 100644
--- a/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.weak.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart:65:9: Error: Constant evaluation error:
// const Class<num>(''); // error
@@ -125,7 +126,6 @@
// const ClassWithFunction(dynamic value) : field = value as T Function(T);
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.weak.transformed.expect
index 37e43f1..03c1430 100644
--- a/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart.weak.transformed.expect
@@ -1,5 +1,6 @@
+library /*isNonNullableByDefault*/;
//
-// Problems in component:
+// Problems in library:
//
// pkg/front_end/testcases/nnbd/potentially_constant_type_as.dart:65:9: Error: Constant evaluation error:
// const Class<num>(''); // error
@@ -125,7 +126,6 @@
// const ClassWithFunction(dynamic value) : field = value as T Function(T);
// ^
//
-library /*isNonNullableByDefault*/;
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/nnbd/switch_redesign_types.dart.strong.expect b/pkg/front_end/testcases/nnbd/switch_redesign_types.dart.strong.expect
index bd7eee5..c678c28 100644
--- a/pkg/front_end/testcases/nnbd/switch_redesign_types.dart.strong.expect
+++ b/pkg/front_end/testcases/nnbd/switch_redesign_types.dart.strong.expect
@@ -1,16 +1,3 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/nnbd/switch_redesign_types.dart:37:16: Error: Case expression 'D {}' does not have a primitive operator '=='.
-// - 'D' is from 'pkg/front_end/testcases/nnbd/switch_redesign_types.dart'.
-// case const D(42): // Error: D has custom operator ==.
-// ^
-//
-// pkg/front_end/testcases/nnbd/switch_redesign_types.dart:39:10: Error: Case expression 'D {}' does not have a primitive operator '=='.
-// - 'D' is from 'pkg/front_end/testcases/nnbd/switch_redesign_types.dart'.
-// case x: // Error: D has custom operator ==.
-// ^
-//
library /*isNonNullableByDefault*/;
//
// Problems in library:
@@ -32,6 +19,16 @@
// switch (b) {
// ^
//
+// pkg/front_end/testcases/nnbd/switch_redesign_types.dart:37:16: Error: Case expression 'D {}' does not have a primitive operator '=='.
+// - 'D' is from 'pkg/front_end/testcases/nnbd/switch_redesign_types.dart'.
+// case const D(42): // Error: D has custom operator ==.
+// ^
+//
+// pkg/front_end/testcases/nnbd/switch_redesign_types.dart:39:10: Error: Case expression 'D {}' does not have a primitive operator '=='.
+// - 'D' is from 'pkg/front_end/testcases/nnbd/switch_redesign_types.dart'.
+// case x: // Error: D has custom operator ==.
+// ^
+//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/nnbd/switch_redesign_types.dart.strong.transformed.expect b/pkg/front_end/testcases/nnbd/switch_redesign_types.dart.strong.transformed.expect
index bd7eee5..c678c28 100644
--- a/pkg/front_end/testcases/nnbd/switch_redesign_types.dart.strong.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/switch_redesign_types.dart.strong.transformed.expect
@@ -1,16 +1,3 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/nnbd/switch_redesign_types.dart:37:16: Error: Case expression 'D {}' does not have a primitive operator '=='.
-// - 'D' is from 'pkg/front_end/testcases/nnbd/switch_redesign_types.dart'.
-// case const D(42): // Error: D has custom operator ==.
-// ^
-//
-// pkg/front_end/testcases/nnbd/switch_redesign_types.dart:39:10: Error: Case expression 'D {}' does not have a primitive operator '=='.
-// - 'D' is from 'pkg/front_end/testcases/nnbd/switch_redesign_types.dart'.
-// case x: // Error: D has custom operator ==.
-// ^
-//
library /*isNonNullableByDefault*/;
//
// Problems in library:
@@ -32,6 +19,16 @@
// switch (b) {
// ^
//
+// pkg/front_end/testcases/nnbd/switch_redesign_types.dart:37:16: Error: Case expression 'D {}' does not have a primitive operator '=='.
+// - 'D' is from 'pkg/front_end/testcases/nnbd/switch_redesign_types.dart'.
+// case const D(42): // Error: D has custom operator ==.
+// ^
+//
+// pkg/front_end/testcases/nnbd/switch_redesign_types.dart:39:10: Error: Case expression 'D {}' does not have a primitive operator '=='.
+// - 'D' is from 'pkg/front_end/testcases/nnbd/switch_redesign_types.dart'.
+// case x: // Error: D has custom operator ==.
+// ^
+//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/nnbd/switch_redesign_types.dart.weak.expect b/pkg/front_end/testcases/nnbd/switch_redesign_types.dart.weak.expect
index bd7eee5..c678c28 100644
--- a/pkg/front_end/testcases/nnbd/switch_redesign_types.dart.weak.expect
+++ b/pkg/front_end/testcases/nnbd/switch_redesign_types.dart.weak.expect
@@ -1,16 +1,3 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/nnbd/switch_redesign_types.dart:37:16: Error: Case expression 'D {}' does not have a primitive operator '=='.
-// - 'D' is from 'pkg/front_end/testcases/nnbd/switch_redesign_types.dart'.
-// case const D(42): // Error: D has custom operator ==.
-// ^
-//
-// pkg/front_end/testcases/nnbd/switch_redesign_types.dart:39:10: Error: Case expression 'D {}' does not have a primitive operator '=='.
-// - 'D' is from 'pkg/front_end/testcases/nnbd/switch_redesign_types.dart'.
-// case x: // Error: D has custom operator ==.
-// ^
-//
library /*isNonNullableByDefault*/;
//
// Problems in library:
@@ -32,6 +19,16 @@
// switch (b) {
// ^
//
+// pkg/front_end/testcases/nnbd/switch_redesign_types.dart:37:16: Error: Case expression 'D {}' does not have a primitive operator '=='.
+// - 'D' is from 'pkg/front_end/testcases/nnbd/switch_redesign_types.dart'.
+// case const D(42): // Error: D has custom operator ==.
+// ^
+//
+// pkg/front_end/testcases/nnbd/switch_redesign_types.dart:39:10: Error: Case expression 'D {}' does not have a primitive operator '=='.
+// - 'D' is from 'pkg/front_end/testcases/nnbd/switch_redesign_types.dart'.
+// case x: // Error: D has custom operator ==.
+// ^
+//
import self as self;
import "dart:core" as core;
diff --git a/pkg/front_end/testcases/nnbd/switch_redesign_types.dart.weak.transformed.expect b/pkg/front_end/testcases/nnbd/switch_redesign_types.dart.weak.transformed.expect
index bd7eee5..c678c28 100644
--- a/pkg/front_end/testcases/nnbd/switch_redesign_types.dart.weak.transformed.expect
+++ b/pkg/front_end/testcases/nnbd/switch_redesign_types.dart.weak.transformed.expect
@@ -1,16 +1,3 @@
-//
-// Problems in component:
-//
-// pkg/front_end/testcases/nnbd/switch_redesign_types.dart:37:16: Error: Case expression 'D {}' does not have a primitive operator '=='.
-// - 'D' is from 'pkg/front_end/testcases/nnbd/switch_redesign_types.dart'.
-// case const D(42): // Error: D has custom operator ==.
-// ^
-//
-// pkg/front_end/testcases/nnbd/switch_redesign_types.dart:39:10: Error: Case expression 'D {}' does not have a primitive operator '=='.
-// - 'D' is from 'pkg/front_end/testcases/nnbd/switch_redesign_types.dart'.
-// case x: // Error: D has custom operator ==.
-// ^
-//
library /*isNonNullableByDefault*/;
//
// Problems in library:
@@ -32,6 +19,16 @@
// switch (b) {
// ^
//
+// pkg/front_end/testcases/nnbd/switch_redesign_types.dart:37:16: Error: Case expression 'D {}' does not have a primitive operator '=='.
+// - 'D' is from 'pkg/front_end/testcases/nnbd/switch_redesign_types.dart'.
+// case const D(42): // Error: D has custom operator ==.
+// ^
+//
+// pkg/front_end/testcases/nnbd/switch_redesign_types.dart:39:10: Error: Case expression 'D {}' does not have a primitive operator '=='.
+// - 'D' is from 'pkg/front_end/testcases/nnbd/switch_redesign_types.dart'.
+// case x: // Error: D has custom operator ==.
+// ^
+//
import self as self;
import "dart:core" as core;
diff --git a/pkg/kernel/binary.md b/pkg/kernel/binary.md
index b36cb0c..aade49b 100644
--- a/pkg/kernel/binary.md
+++ b/pkg/kernel/binary.md
@@ -143,7 +143,7 @@
type ComponentFile {
UInt32 magic = 0x90ABCDEF;
- UInt32 formatVersion = 45;
+ UInt32 formatVersion = 46;
Byte[10] shortSdkHash;
List<String> problemsAsJson; // Described in problems.md.
Library[] libraries;
@@ -613,23 +613,6 @@
MemberReference interfaceTargetOrigin; // May be NullReference.
}
-type DirectPropertyGet extends Expression {
- Byte tag = 15; // Note: tag is out of order
- FileOffset fileOffset;
- Expression receiver;
- MemberReference target;
- MemberReference targetOrigin; // May be NullReference.
-}
-
-type DirectPropertySet extends Expression {
- Byte tag = 16; // Note: tag is out of order
- FileOffset fileOffset;
- Expression receiver;
- MemberReference target;
- MemberReference targetOrigin; // May be NullReference.
- Expression value;
-}
-
type StaticGet extends Expression {
Byte tag = 26;
FileOffset fileOffset;
@@ -676,15 +659,6 @@
MemberReference interfaceTargetOrigin; // May be NullReference.
}
-type DirectMethodInvocation extends Expression {
- Byte tag = 17; // Note: tag is out of order
- FileOffset fileOffset;
- Expression receiver;
- MemberReference target;
- MemberReference targetOrigin; // May be NullReference.
- Arguments arguments;
-}
-
type StaticInvocation extends Expression {
Byte tag = 30;
FileOffset fileOffset;
diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart
index a82fc45..e9b6940 100644
--- a/pkg/kernel/lib/ast.dart
+++ b/pkg/kernel/lib/ast.dart
@@ -3362,203 +3362,6 @@
}
}
-/// Directly read a field, call a getter, or tear off a method.
-class DirectPropertyGet extends Expression {
- Expression receiver;
- Reference targetReference;
-
- DirectPropertyGet(Expression receiver, Member target)
- : this.byReference(receiver, getMemberReference(target));
-
- DirectPropertyGet.byReference(this.receiver, this.targetReference) {
- receiver?.parent = this;
- }
-
- Member get target => targetReference?.asMember;
-
- void set target(Member target) {
- targetReference = getMemberReference(target);
- }
-
- Name get name => target?.name;
-
- visitChildren(Visitor v) {
- receiver?.accept(v);
- target?.acceptReference(v);
- }
-
- transformChildren(Transformer v) {
- if (receiver != null) {
- receiver = receiver.accept<TreeNode>(v);
- receiver?.parent = this;
- }
- }
-
- R accept<R>(ExpressionVisitor<R> v) => v.visitDirectPropertyGet(this);
- R accept1<R, A>(ExpressionVisitor1<R, A> v, A arg) =>
- v.visitDirectPropertyGet(this, arg);
-
- DartType getStaticType(StaticTypeContext context) {
- Class superclass = target.enclosingClass;
- var receiverType = receiver.getStaticTypeAsInstanceOf(superclass, context);
- return Substitution.fromInterfaceType(receiverType)
- .substituteType(target.getterType);
- }
-
- @override
- String toString() {
- return "DirectPropertyGet(${toStringInternal()})";
- }
-
- @override
- void toTextInternal(AstPrinter printer) {
- printer.writeExpression(receiver,
- minimumPrecedence: astToText.Precedence.PRIMARY);
- printer.write('.');
- printer.writeInterfaceMemberName(targetReference, name);
- }
-}
-
-/// Directly assign a field, or call a setter.
-///
-/// Evaluates to the value of [value].
-class DirectPropertySet extends Expression {
- Expression receiver;
- Reference targetReference;
- Expression value;
-
- DirectPropertySet(Expression receiver, Member target, Expression value)
- : this.byReference(receiver, getMemberReference(target), value);
-
- DirectPropertySet.byReference(
- this.receiver, this.targetReference, this.value) {
- receiver?.parent = this;
- value?.parent = this;
- }
-
- Member get target => targetReference?.asMember;
-
- void set target(Member target) {
- targetReference = getMemberReference(target);
- }
-
- Name get name => target?.name;
-
- visitChildren(Visitor v) {
- receiver?.accept(v);
- target?.acceptReference(v);
- value?.accept(v);
- }
-
- transformChildren(Transformer v) {
- if (receiver != null) {
- receiver = receiver.accept<TreeNode>(v);
- receiver?.parent = this;
- }
- if (value != null) {
- value = value.accept<TreeNode>(v);
- value?.parent = this;
- }
- }
-
- R accept<R>(ExpressionVisitor<R> v) => v.visitDirectPropertySet(this);
- R accept1<R, A>(ExpressionVisitor1<R, A> v, A arg) =>
- v.visitDirectPropertySet(this, arg);
-
- DartType getStaticType(StaticTypeContext context) =>
- value.getStaticType(context);
-
- @override
- String toString() {
- return "DirectPropertySet(${toStringInternal()})";
- }
-
- @override
- void toTextInternal(AstPrinter printer) {
- printer.writeExpression(receiver,
- minimumPrecedence: astToText.Precedence.PRIMARY);
- printer.write('.');
- printer.writeInterfaceMemberName(targetReference, name);
- printer.write(' = ');
- printer.writeExpression(value);
- }
-}
-
-/// Directly call an instance method, bypassing ordinary dispatch.
-class DirectMethodInvocation extends InvocationExpression {
- Expression receiver;
- Reference targetReference;
- Arguments arguments;
-
- DirectMethodInvocation(
- Expression receiver, Procedure target, Arguments arguments)
- : this.byReference(receiver, getMemberReference(target), arguments);
-
- DirectMethodInvocation.byReference(
- this.receiver, this.targetReference, this.arguments) {
- receiver?.parent = this;
- arguments?.parent = this;
- }
-
- Procedure get target => targetReference?.asProcedure;
-
- void set target(Procedure target) {
- targetReference = getMemberReference(target);
- }
-
- Name get name => target?.name;
-
- visitChildren(Visitor v) {
- receiver?.accept(v);
- target?.acceptReference(v);
- arguments?.accept(v);
- }
-
- transformChildren(Transformer v) {
- if (receiver != null) {
- receiver = receiver.accept<TreeNode>(v);
- receiver?.parent = this;
- }
- if (arguments != null) {
- arguments = arguments.accept<TreeNode>(v);
- arguments?.parent = this;
- }
- }
-
- R accept<R>(ExpressionVisitor<R> v) => v.visitDirectMethodInvocation(this);
- R accept1<R, A>(ExpressionVisitor1<R, A> v, A arg) =>
- v.visitDirectMethodInvocation(this, arg);
-
- DartType getStaticType(StaticTypeContext context) {
- if (context.typeEnvironment.isSpecialCasedBinaryOperator(target)) {
- return context.typeEnvironment.getTypeOfSpecialCasedBinaryOperator(
- receiver.getStaticType(context),
- arguments.positional[0].getStaticType(context));
- }
- Class superclass = target.enclosingClass;
- var receiverType = receiver.getStaticTypeAsInstanceOf(superclass, context);
- var returnType = Substitution.fromInterfaceType(receiverType)
- .substituteType(target.function.returnType);
- return Substitution.fromPairs(
- target.function.typeParameters, arguments.types)
- .substituteType(returnType);
- }
-
- @override
- String toString() {
- return "DirectMethodInvocation(${toStringInternal()})";
- }
-
- @override
- void toTextInternal(AstPrinter printer) {
- printer.writeExpression(receiver,
- minimumPrecedence: astToText.Precedence.PRIMARY);
- printer.write('.');
- printer.writeInterfaceMemberName(targetReference, name);
- printer.writeArguments(arguments);
- }
-}
-
/// Expression of form `super.field`.
///
/// This may invoke a getter, read a field, or tear off a method.
diff --git a/pkg/kernel/lib/binary/ast_from_binary.dart b/pkg/kernel/lib/binary/ast_from_binary.dart
index 34b3512..01e245c 100644
--- a/pkg/kernel/lib/binary/ast_from_binary.dart
+++ b/pkg/kernel/lib/binary/ast_from_binary.dart
@@ -1720,16 +1720,6 @@
return new SuperPropertySet.byReference(readName(), readExpression(),
readInstanceMemberReference(allowNull: true))
..fileOffset = offset;
- case Tag.DirectPropertyGet:
- int offset = readOffset();
- return new DirectPropertyGet.byReference(
- readExpression(), readInstanceMemberReference())
- ..fileOffset = offset;
- case Tag.DirectPropertySet:
- int offset = readOffset();
- return new DirectPropertySet.byReference(
- readExpression(), readInstanceMemberReference(), readExpression())
- ..fileOffset = offset;
case Tag.StaticGet:
int offset = readOffset();
return new StaticGet.byReference(readMemberReference())
@@ -1750,11 +1740,6 @@
return new SuperMethodInvocation.byReference(readName(),
readArguments(), readInstanceMemberReference(allowNull: true))
..fileOffset = offset;
- case Tag.DirectMethodInvocation:
- int offset = readOffset();
- return new DirectMethodInvocation.byReference(
- readExpression(), readInstanceMemberReference(), readArguments())
- ..fileOffset = offset;
case Tag.StaticInvocation:
int offset = readOffset();
return new StaticInvocation.byReference(
diff --git a/pkg/kernel/lib/binary/ast_to_binary.dart b/pkg/kernel/lib/binary/ast_to_binary.dart
index 9489134..2dbc82f 100644
--- a/pkg/kernel/lib/binary/ast_to_binary.dart
+++ b/pkg/kernel/lib/binary/ast_to_binary.dart
@@ -1445,23 +1445,6 @@
}
@override
- void visitDirectPropertyGet(DirectPropertyGet node) {
- writeByte(Tag.DirectPropertyGet);
- writeOffset(node.fileOffset);
- writeNode(node.receiver);
- writeNonNullInstanceMemberReference(node.targetReference);
- }
-
- @override
- void visitDirectPropertySet(DirectPropertySet node) {
- writeByte(Tag.DirectPropertySet);
- writeOffset(node.fileOffset);
- writeNode(node.receiver);
- writeNonNullInstanceMemberReference(node.targetReference);
- writeNode(node.value);
- }
-
- @override
void visitStaticGet(StaticGet node) {
writeByte(Tag.StaticGet);
writeOffset(node.fileOffset);
@@ -1496,15 +1479,6 @@
}
@override
- void visitDirectMethodInvocation(DirectMethodInvocation node) {
- writeByte(Tag.DirectMethodInvocation);
- writeOffset(node.fileOffset);
- writeNode(node.receiver);
- writeNonNullInstanceMemberReference(node.targetReference);
- writeArgumentsNode(node.arguments);
- }
-
- @override
void visitStaticInvocation(StaticInvocation node) {
writeByte(node.isConst ? Tag.ConstStaticInvocation : Tag.StaticInvocation);
writeOffset(node.fileOffset);
diff --git a/pkg/kernel/lib/binary/tag.dart b/pkg/kernel/lib/binary/tag.dart
index a70bec0..2bbc968 100644
--- a/pkg/kernel/lib/binary/tag.dart
+++ b/pkg/kernel/lib/binary/tag.dart
@@ -29,9 +29,6 @@
// Expressions
static const int CheckLibraryIsLoaded = 13;
static const int LoadLibrary = 14;
- static const int DirectPropertyGet = 15;
- static const int DirectPropertySet = 16;
- static const int DirectMethodInvocation = 17;
static const int ConstStaticInvocation = 18;
static const int InvalidExpression = 19;
static const int VariableGet = 20;
@@ -149,7 +146,7 @@
/// Internal version of kernel binary format.
/// Bump it when making incompatible changes in kernel binaries.
/// Keep in sync with runtime/vm/kernel_binary.h, pkg/kernel/binary.md.
- static const int BinaryFormatVersion = 45;
+ static const int BinaryFormatVersion = 46;
}
abstract class ConstantTag {
diff --git a/pkg/kernel/lib/clone.dart b/pkg/kernel/lib/clone.dart
index e326843..507d6a1 100644
--- a/pkg/kernel/lib/clone.dart
+++ b/pkg/kernel/lib/clone.dart
@@ -138,16 +138,6 @@
clone(node.value), node.interfaceTargetReference);
}
- visitDirectPropertyGet(DirectPropertyGet node) {
- return new DirectPropertyGet.byReference(
- clone(node.receiver), node.targetReference);
- }
-
- visitDirectPropertySet(DirectPropertySet node) {
- return new DirectPropertySet.byReference(
- clone(node.receiver), node.targetReference, clone(node.value));
- }
-
visitSuperPropertyGet(SuperPropertyGet node) {
return new SuperPropertyGet.byReference(
node.name, node.interfaceTargetReference);
@@ -171,11 +161,6 @@
clone(node.arguments), node.interfaceTargetReference);
}
- visitDirectMethodInvocation(DirectMethodInvocation node) {
- return new DirectMethodInvocation.byReference(
- clone(node.receiver), node.targetReference, clone(node.arguments));
- }
-
visitSuperMethodInvocation(SuperMethodInvocation node) {
return new SuperMethodInvocation.byReference(
node.name, clone(node.arguments), node.interfaceTargetReference);
diff --git a/pkg/kernel/lib/text/ast_to_text.dart b/pkg/kernel/lib/text/ast_to_text.dart
index da9af2b..3e253af 100644
--- a/pkg/kernel/lib/text/ast_to_text.dart
+++ b/pkg/kernel/lib/text/ast_to_text.dart
@@ -1345,14 +1345,6 @@
writeNode(node.arguments);
}
- visitDirectMethodInvocation(DirectMethodInvocation node) {
- writeExpression(node.receiver, Precedence.PRIMARY);
- writeSymbol('.{=');
- writeMemberReferenceFromReference(node.targetReference);
- writeSymbol('}');
- writeNode(node.arguments);
- }
-
visitSuperMethodInvocation(SuperMethodInvocation node) {
writeWord('super');
writeSymbol('.');
@@ -1772,22 +1764,6 @@
writeExpression(node.value);
}
- visitDirectPropertyGet(DirectPropertyGet node) {
- writeExpression(node.receiver, Precedence.PRIMARY);
- writeSymbol('.{=');
- writeMemberReferenceFromReference(node.targetReference);
- writeSymbol('}');
- }
-
- visitDirectPropertySet(DirectPropertySet node) {
- writeExpression(node.receiver, Precedence.PRIMARY);
- writeSymbol('.{=');
- writeMemberReferenceFromReference(node.targetReference);
- writeSymbol('}');
- writeSpaced('=');
- writeExpression(node.value);
- }
-
visitStaticGet(StaticGet node) {
writeMemberReferenceFromReference(node.targetReference);
}
@@ -2479,7 +2455,6 @@
int visitInvalidExpression(InvalidExpression node) => CALLEE;
int visitMethodInvocation(MethodInvocation node) => CALLEE;
int visitSuperMethodInvocation(SuperMethodInvocation node) => CALLEE;
- int visitDirectMethodInvocation(DirectMethodInvocation node) => CALLEE;
int visitStaticInvocation(StaticInvocation node) => CALLEE;
int visitConstructorInvocation(ConstructorInvocation node) => CALLEE;
int visitNot(Not node) => PREFIX;
@@ -2511,8 +2486,6 @@
int visitPropertySet(PropertySet node) => EXPRESSION;
int visitSuperPropertyGet(SuperPropertyGet node) => PRIMARY;
int visitSuperPropertySet(SuperPropertySet node) => EXPRESSION;
- int visitDirectPropertyGet(DirectPropertyGet node) => PRIMARY;
- int visitDirectPropertySet(DirectPropertySet node) => EXPRESSION;
int visitStaticGet(StaticGet node) => PRIMARY;
int visitStaticSet(StaticSet node) => EXPRESSION;
int visitLet(Let node) => EXPRESSION;
diff --git a/pkg/kernel/lib/text/text_serializer.dart b/pkg/kernel/lib/text/text_serializer.dart
index 60a3e19..e633d04 100644
--- a/pkg/kernel/lib/text/text_serializer.dart
+++ b/pkg/kernel/lib/text/text_serializer.dart
@@ -83,16 +83,10 @@
String visitVariableSet(VariableSet _) => "set-var";
String visitStaticGet(StaticGet _) => "get-static";
String visitStaticSet(StaticSet _) => "set-static";
- String visitDirectPropertyGet(DirectPropertyGet _) => "get-direct-prop";
- String visitDirectPropertySet(DirectPropertySet _) => "set-direct-prop";
String visitStaticInvocation(StaticInvocation expression) {
return expression.isConst ? "invoke-const-static" : "invoke-static";
}
- String visitDirectMethodInvocation(DirectMethodInvocation _) {
- return "invoke-direct-method";
- }
-
String visitConstructorInvocation(ConstructorInvocation expression) {
return expression.isConst
? "invoke-const-constructor"
@@ -564,42 +558,6 @@
return new StaticSet.byReference(tuple.first.getReference(), tuple.second);
}
-TextSerializer<DirectPropertyGet> directPropertyGetSerializer = new Wrapped(
- unwrapDirectPropertyGet,
- wrapDirectPropertyGet,
- new Tuple2Serializer(
- expressionSerializer, const CanonicalNameSerializer()));
-
-Tuple2<Expression, CanonicalName> unwrapDirectPropertyGet(
- DirectPropertyGet expression) {
- return new Tuple2(
- expression.receiver, expression.targetReference.canonicalName);
-}
-
-DirectPropertyGet wrapDirectPropertyGet(
- Tuple2<Expression, CanonicalName> tuple) {
- return new DirectPropertyGet.byReference(
- tuple.first, tuple.second.getReference());
-}
-
-TextSerializer<DirectPropertySet> directPropertySetSerializer = new Wrapped(
- unwrapDirectPropertySet,
- wrapDirectPropertySet,
- new Tuple3Serializer(expressionSerializer, const CanonicalNameSerializer(),
- expressionSerializer));
-
-Tuple3<Expression, CanonicalName, Expression> unwrapDirectPropertySet(
- DirectPropertySet expression) {
- return new Tuple3(expression.receiver,
- expression.targetReference.canonicalName, expression.value);
-}
-
-DirectPropertySet wrapDirectPropertySet(
- Tuple3<Expression, CanonicalName, Expression> tuple) {
- return new DirectPropertySet.byReference(
- tuple.first, tuple.second.getReference(), tuple.third);
-}
-
TextSerializer<StaticInvocation> staticInvocationSerializer = new Wrapped(
unwrapStaticInvocation,
wrapStaticInvocation,
@@ -629,25 +587,6 @@
isConst: true);
}
-TextSerializer<DirectMethodInvocation> directMethodInvocationSerializer =
- new Wrapped(
- unwrapDirectMethodInvocation,
- wrapDirectMethodInvocation,
- new Tuple3Serializer(expressionSerializer,
- const CanonicalNameSerializer(), argumentsSerializer));
-
-Tuple3<Expression, CanonicalName, Arguments> unwrapDirectMethodInvocation(
- DirectMethodInvocation expression) {
- return new Tuple3(expression.receiver,
- expression.targetReference.canonicalName, expression.arguments);
-}
-
-DirectMethodInvocation wrapDirectMethodInvocation(
- Tuple3<Expression, CanonicalName, Arguments> tuple) {
- return new DirectMethodInvocation.byReference(
- tuple.first, tuple.second.getReference(), tuple.third);
-}
-
TextSerializer<ConstructorInvocation> constructorInvocationSerializer =
new Wrapped(
unwrapConstructorInvocation,
@@ -2098,11 +2037,8 @@
"set-var": variableSetSerializer,
"get-static": staticGetSerializer,
"set-static": staticSetSerializer,
- "get-direct-prop": directPropertyGetSerializer,
- "set-direct-prop": directPropertySetSerializer,
"invoke-static": staticInvocationSerializer,
"invoke-const-static": constStaticInvocationSerializer,
- "invoke-direct-method": directMethodInvocationSerializer,
"invoke-constructor": constructorInvocationSerializer,
"invoke-const-constructor": constConstructorInvocationSerializer,
"fun": functionExpressionSerializer,
diff --git a/pkg/kernel/lib/transformations/async.dart b/pkg/kernel/lib/transformations/async.dart
index 5c32065..37c9ea9 100644
--- a/pkg/kernel/lib/transformations/async.dart
+++ b/pkg/kernel/lib/transformations/async.dart
@@ -213,7 +213,6 @@
TreeNode visitVariableSet(VariableSet expr) => unary(expr);
TreeNode visitPropertyGet(PropertyGet expr) => unary(expr);
- TreeNode visitDirectPropertyGet(DirectPropertyGet expr) => unary(expr);
TreeNode visitSuperPropertySet(SuperPropertySet expr) => unary(expr);
TreeNode visitStaticSet(StaticSet expr) => unary(expr);
TreeNode visitNot(Not expr) => unary(expr);
@@ -228,13 +227,6 @@
});
}
- TreeNode visitDirectPropertySet(DirectPropertySet expr) {
- return transform(expr, () {
- expr.value = expr.value.accept<TreeNode>(this)..parent = expr;
- expr.receiver = expr.receiver.accept<TreeNode>(this)..parent = expr;
- });
- }
-
TreeNode visitArguments(Arguments args) {
for (var named in args.named.reversed) {
named.value = named.value.accept<TreeNode>(this)..parent = named;
@@ -255,13 +247,6 @@
});
}
- TreeNode visitDirectMethodInvocation(DirectMethodInvocation expr) {
- return transform(expr, () {
- visitArguments(expr.arguments);
- expr.receiver = expr.receiver.accept<TreeNode>(this)..parent = expr;
- });
- }
-
TreeNode visitSuperMethodInvocation(SuperMethodInvocation expr) {
return transform(expr, () {
visitArguments(expr.arguments);
diff --git a/pkg/kernel/lib/transformations/mixin_full_resolution.dart b/pkg/kernel/lib/transformations/mixin_full_resolution.dart
index 374651e..8af53bf 100644
--- a/pkg/kernel/lib/transformations/mixin_full_resolution.dart
+++ b/pkg/kernel/lib/transformations/mixin_full_resolution.dart
@@ -19,20 +19,14 @@
CoreTypes coreTypes,
ClassHierarchy hierarchy,
List<Library> libraries,
- ReferenceFromIndex referenceFromIndex,
- {bool doSuperResolution: true}) {
- new MixinFullResolution(targetInfo, coreTypes, hierarchy,
- doSuperResolution: doSuperResolution)
+ ReferenceFromIndex referenceFromIndex) {
+ new MixinFullResolution(targetInfo, coreTypes, hierarchy)
.transform(libraries, referenceFromIndex);
}
/// Replaces all mixin applications with regular classes, cloning all fields
/// and procedures from the mixed-in class, cloning all constructors from the
/// base class.
-///
-/// When [doSuperResolution] constructor parameter is [true], super calls
-/// (as well as super initializer invocations) are also resolved to their
-/// targets in this pass.
class MixinFullResolution {
final Target targetInfo;
final CoreTypes coreTypes;
@@ -44,13 +38,7 @@
/// valid anymore.
ClassHierarchy hierarchy;
- // This enables `super` resolution transformation, which is not compatible
- // with Dart VM's requirements around incremental compilation and has been
- // moved to Dart VM itself.
- final bool doSuperResolution;
-
- MixinFullResolution(this.targetInfo, this.coreTypes, this.hierarchy,
- {this.doSuperResolution: true});
+ MixinFullResolution(this.targetInfo, this.coreTypes, this.hierarchy);
/// Transform the given new [libraries]. It is expected that all other
/// libraries have already been transformed.
@@ -73,22 +61,6 @@
// We might need to update the class hierarchy.
hierarchy =
hierarchy.applyMemberChanges(transformedClasses, findDescendants: true);
-
- if (!doSuperResolution) {
- return;
- }
- // Resolve all super call expressions and super initializers.
- for (var library in libraries) {
- for (var class_ in library.classes) {
- for (var procedure in class_.procedures) {
- if (procedure.containsSuperCalls) {
- new SuperCallResolutionTransformer(
- hierarchy, coreTypes, class_.superclass, targetInfo)
- .visit(procedure);
- }
- }
- }
- }
}
transformClass(
@@ -252,162 +224,3 @@
class_.isEliminatedMixin = true;
}
}
-
-class SuperCallResolutionTransformer extends Transformer {
- final ClassHierarchy hierarchy;
- final CoreTypes coreTypes;
- final Class lookupClass;
- final Target targetInfo;
-
- SuperCallResolutionTransformer(
- this.hierarchy, this.coreTypes, this.lookupClass, this.targetInfo);
-
- TreeNode visit(TreeNode node) => node.accept(this);
-
- visitSuperPropertyGet(SuperPropertyGet node) {
- Member target = hierarchy.getDispatchTarget(lookupClass, node.name);
- if (target != null) {
- return new DirectPropertyGet(new ThisExpression(), target)
- ..fileOffset = node.fileOffset;
- } else {
- return _callNoSuchMethod(node.name.text, new Arguments.empty(), node,
- isGetter: true, isSuper: true);
- }
- }
-
- visitSuperPropertySet(SuperPropertySet node) {
- Member target =
- hierarchy.getDispatchTarget(lookupClass, node.name, setter: true);
- if (target != null) {
- return new DirectPropertySet(
- new ThisExpression(), target, visit(node.value))
- ..fileOffset = node.fileOffset;
- } else {
- // Call has to return right-hand-side.
- VariableDeclaration rightHandSide =
- new VariableDeclaration.forValue(visit(node.value));
- Expression result = _callNoSuchMethod(
- node.name.text, new Arguments([new VariableGet(rightHandSide)]), node,
- isSetter: true, isSuper: true);
- VariableDeclaration call = new VariableDeclaration.forValue(result);
- return new Let(
- rightHandSide, new Let(call, new VariableGet(rightHandSide)));
- }
- }
-
- visitSuperMethodInvocation(SuperMethodInvocation node) {
- Member target = hierarchy.getDispatchTarget(lookupClass, node.name);
- Arguments visitedArguments = visit(node.arguments);
- if (target is Procedure &&
- !target.isAccessor &&
- _callIsLegal(target.function, visitedArguments)) {
- return new DirectMethodInvocation(
- new ThisExpression(), target, visitedArguments)
- ..fileOffset = node.fileOffset;
- } else if (target == null || (target is Procedure && !target.isAccessor)) {
- // Target not found at all, or call was illegal.
- return _callNoSuchMethod(node.name.text, visitedArguments, node,
- isSuper: true);
- } else {
- return new MethodInvocation(
- new DirectPropertyGet(new ThisExpression(), target),
- new Name('call'),
- visitedArguments)
- ..fileOffset = node.fileOffset;
- }
- }
-
- /// Create a call to no such method.
- Expression _callNoSuchMethod(
- String methodName, Arguments methodArguments, TreeNode node,
- {isSuper: false, isGetter: false, isSetter: false}) {
- Member noSuchMethod =
- hierarchy.getDispatchTarget(lookupClass, new Name("noSuchMethod"));
- String methodNameUsed = (isGetter)
- ? "get:$methodName"
- : (isSetter)
- ? "set:$methodName="
- : methodName;
- if (noSuchMethod != null &&
- noSuchMethod.function.positionalParameters.length == 1 &&
- noSuchMethod.function.namedParameters.isEmpty) {
- // We have a correct noSuchMethod method.
- ConstructorInvocation invocation = _createInvocation(
- methodNameUsed, methodArguments, isSuper, new ThisExpression());
- return new DirectMethodInvocation(
- new ThisExpression(), noSuchMethod, new Arguments([invocation]))
- ..fileOffset = node.fileOffset;
- } else {
- // Incorrect noSuchMethod method: Call noSuchMethod on Object
- // with Invocation of noSuchMethod as the method that did not exist.
- noSuchMethod = hierarchy.getDispatchTarget(
- coreTypes.objectClass, new Name("noSuchMethod"));
- ConstructorInvocation invocation = _createInvocation(
- methodNameUsed, methodArguments, isSuper, new ThisExpression());
- ConstructorInvocation invocationPrime = _createInvocation("noSuchMethod",
- new Arguments([invocation]), false, new ThisExpression());
- return new DirectMethodInvocation(
- new ThisExpression(), noSuchMethod, new Arguments([invocationPrime]))
- ..fileOffset = node.fileOffset;
- }
- }
-
- /// Creates an "new _InvocationMirror(...)" invocation.
- ConstructorInvocation _createInvocation(String methodName,
- Arguments callArguments, bool isSuperInvocation, Expression receiver) {
- return targetInfo.instantiateInvocation(
- coreTypes, receiver, methodName, callArguments, -1, isSuperInvocation);
- }
-
- /// Check that a call to the targetFunction is legal given the arguments.
- ///
- /// I.e. check that the number of positional parameters and the names of the
- /// given named parameters represents a valid call to the function.
- bool _callIsLegal(FunctionNode targetFunction, Arguments arguments) {
- if ((targetFunction.requiredParameterCount > arguments.positional.length) ||
- (targetFunction.positionalParameters.length <
- arguments.positional.length)) {
- // Given too few or too many positional arguments
- return false;
- }
-
- // Do we give named that we don't take?
- Set<String> givenNamed = arguments.named.map((v) => v.name).toSet();
- Set<String> takenNamed =
- targetFunction.namedParameters.map((v) => v.name).toSet();
- givenNamed.removeAll(takenNamed);
- return givenNamed.isEmpty;
- }
-}
-
-class SuperInitializerResolutionTransformer extends InitializerVisitor {
- final Class lookupClass;
-
- SuperInitializerResolutionTransformer(this.lookupClass);
-
- transformInitializers(List<Initializer> initializers) {
- for (var initializer in initializers) {
- initializer.accept(this);
- }
- }
-
- visitSuperInitializer(SuperInitializer node) {
- Constructor constructor = node.target;
- if (constructor.enclosingClass != lookupClass) {
- // If [node] refers to a constructor target which is not directly the
- // superclass but some indirect base class then this is because classes in
- // the middle are mixin applications. These mixin applications will have
- // received a forwarding constructor which we are required to use instead.
- for (var replacement in lookupClass.constructors) {
- if (constructor.name == replacement.name) {
- node.target = replacement;
- return null;
- }
- }
-
- throw new Exception(
- 'Could not find a generative constructor named "${constructor.name}" '
- 'in lookup class "${lookupClass.name}"!');
- }
- }
-}
diff --git a/pkg/kernel/lib/type_checker.dart b/pkg/kernel/lib/type_checker.dart
index d3869e2..ff94bf8 100644
--- a/pkg/kernel/lib/type_checker.dart
+++ b/pkg/kernel/lib/type_checker.dart
@@ -456,27 +456,6 @@
}
@override
- DartType visitDirectMethodInvocation(DirectMethodInvocation node) {
- return handleCall(node.arguments, node.target.getterType,
- receiver: getReceiverType(node, node.receiver, node.target));
- }
-
- @override
- DartType visitDirectPropertyGet(DirectPropertyGet node) {
- var receiver = getReceiverType(node, node.receiver, node.target);
- return receiver.substituteType(node.target.getterType);
- }
-
- @override
- DartType visitDirectPropertySet(DirectPropertySet node) {
- var receiver = getReceiverType(node, node.receiver, node.target);
- var value = visitExpression(node.value);
- checkAssignable(node, value,
- receiver.substituteType(node.target.setterType, contravariant: true));
- return value;
- }
-
- @override
DartType visitDoubleLiteral(DoubleLiteral node) {
return environment.coreTypes.doubleLegacyRawType;
}
diff --git a/pkg/kernel/lib/verifier.dart b/pkg/kernel/lib/verifier.dart
index 1e02a78..e40ab13f 100644
--- a/pkg/kernel/lib/verifier.dart
+++ b/pkg/kernel/lib/verifier.dart
@@ -574,45 +574,6 @@
}
@override
- visitDirectPropertyGet(DirectPropertyGet node) {
- visitChildren(node);
- if (node.target == null) {
- problem(node, "DirectPropertyGet without target.");
- }
- if (!node.target.hasGetter) {
- problem(node, "DirectPropertyGet of '${node.target}' without getter.");
- }
- if (!node.target.isInstanceMember) {
- problem(
- node,
- "DirectPropertyGet of '${node.target}' that isn't an"
- " instance member.");
- }
- }
-
- @override
- visitDirectPropertySet(DirectPropertySet node) {
- visitChildren(node);
- if (node.target == null) {
- problem(node, "DirectPropertySet without target.");
- }
- if (!node.target.hasSetter) {
- problem(node, "DirectPropertySet of '${node.target}' without setter.");
- }
- if (!node.target.isInstanceMember) {
- problem(node, "DirectPropertySet of '${node.target}' that is static.");
- }
- }
-
- @override
- visitDirectMethodInvocation(DirectMethodInvocation node) {
- checkTargetedInvocation(node.target, node);
- if (node.receiver == null) {
- problem(node, "DirectMethodInvocation without receiver.");
- }
- }
-
- @override
visitConstructorInvocation(ConstructorInvocation node) {
checkTargetedInvocation(node.target, node);
if (node.target.enclosingClass.isAbstract) {
diff --git a/pkg/kernel/lib/visitor.dart b/pkg/kernel/lib/visitor.dart
index fadb45f..5cbe74c 100644
--- a/pkg/kernel/lib/visitor.dart
+++ b/pkg/kernel/lib/visitor.dart
@@ -19,15 +19,11 @@
R visitVariableSet(VariableSet node) => defaultExpression(node);
R visitPropertyGet(PropertyGet node) => defaultExpression(node);
R visitPropertySet(PropertySet node) => defaultExpression(node);
- R visitDirectPropertyGet(DirectPropertyGet node) => defaultExpression(node);
- R visitDirectPropertySet(DirectPropertySet node) => defaultExpression(node);
R visitSuperPropertyGet(SuperPropertyGet node) => defaultExpression(node);
R visitSuperPropertySet(SuperPropertySet node) => defaultExpression(node);
R visitStaticGet(StaticGet node) => defaultExpression(node);
R visitStaticSet(StaticSet node) => defaultExpression(node);
R visitMethodInvocation(MethodInvocation node) => defaultExpression(node);
- R visitDirectMethodInvocation(DirectMethodInvocation node) =>
- defaultExpression(node);
R visitSuperMethodInvocation(SuperMethodInvocation node) =>
defaultExpression(node);
R visitStaticInvocation(StaticInvocation node) => defaultExpression(node);
@@ -148,15 +144,11 @@
R visitVariableSet(VariableSet node) => defaultExpression(node);
R visitPropertyGet(PropertyGet node) => defaultExpression(node);
R visitPropertySet(PropertySet node) => defaultExpression(node);
- R visitDirectPropertyGet(DirectPropertyGet node) => defaultExpression(node);
- R visitDirectPropertySet(DirectPropertySet node) => defaultExpression(node);
R visitSuperPropertyGet(SuperPropertyGet node) => defaultExpression(node);
R visitSuperPropertySet(SuperPropertySet node) => defaultExpression(node);
R visitStaticGet(StaticGet node) => defaultExpression(node);
R visitStaticSet(StaticSet node) => defaultExpression(node);
R visitMethodInvocation(MethodInvocation node) => defaultExpression(node);
- R visitDirectMethodInvocation(DirectMethodInvocation node) =>
- defaultExpression(node);
R visitSuperMethodInvocation(SuperMethodInvocation node) =>
defaultExpression(node);
R visitStaticInvocation(StaticInvocation node) => defaultExpression(node);
@@ -667,10 +659,6 @@
R visitVariableSet(VariableSet node, T arg) => defaultExpression(node, arg);
R visitPropertyGet(PropertyGet node, T arg) => defaultExpression(node, arg);
R visitPropertySet(PropertySet node, T arg) => defaultExpression(node, arg);
- R visitDirectPropertyGet(DirectPropertyGet node, T arg) =>
- defaultExpression(node, arg);
- R visitDirectPropertySet(DirectPropertySet node, T arg) =>
- defaultExpression(node, arg);
R visitSuperPropertyGet(SuperPropertyGet node, T arg) =>
defaultExpression(node, arg);
R visitSuperPropertySet(SuperPropertySet node, T arg) =>
@@ -679,8 +667,6 @@
R visitStaticSet(StaticSet node, T arg) => defaultExpression(node, arg);
R visitMethodInvocation(MethodInvocation node, T arg) =>
defaultExpression(node, arg);
- R visitDirectMethodInvocation(DirectMethodInvocation node, T arg) =>
- defaultExpression(node, arg);
R visitSuperMethodInvocation(SuperMethodInvocation node, T arg) =>
defaultExpression(node, arg);
R visitStaticInvocation(StaticInvocation node, T arg) =>
diff --git a/pkg/kernel/test/text_serializer_from_kernel_nodes_test.dart b/pkg/kernel/test/text_serializer_from_kernel_nodes_test.dart
index bc84c87..7a55d99 100644
--- a/pkg/kernel/test/text_serializer_from_kernel_nodes_test.dart
+++ b/pkg/kernel/test/text_serializer_from_kernel_nodes_test.dart
@@ -220,11 +220,10 @@
new VariableDeclaration('x', type: const DynamicType());
return new TestCase<Statement>(
name: '/* suppose A {dynamic field;} A x; */ x.{A::field};',
- node: new ExpressionStatement(new DirectPropertyGet.byReference(
- new VariableGet(x), field.reference)),
+ node: new ExpressionStatement(new PropertyGet.byReference(
+ new VariableGet(x), field.name, field.reference)),
expectation: ''
- '(expr (get-direct-prop (get-var "x^0" _)'
- ' "package:foo/bar.dart::A::@fields::field"))',
+ '(expr (get-prop (get-var "x^0" _) (public "field")))',
makeSerializationState: () =>
new SerializationState(new SerializationEnvironment(null)
..addBinder(x, nameClue: 'x')
@@ -249,11 +248,13 @@
new VariableDeclaration('x', type: const DynamicType());
return new TestCase<Statement>(
name: '/* suppose A {dynamic field;} A x; */ x.{A::field} = 42;',
- node: new ExpressionStatement(new DirectPropertySet.byReference(
- new VariableGet(x), field.reference, new IntLiteral(42))),
+ node: new ExpressionStatement(PropertySet.byReference(
+ new VariableGet(x),
+ field.name,
+ new IntLiteral(42),
+ field.reference)),
expectation: ''
- '(expr (set-direct-prop (get-var "x^0" _)'
- ' "package:foo/bar.dart::A::@fields::field" (int 42)))',
+ '(expr (set-prop (get-var "x^0" _) (public "field") (int 42)))',
makeSerializationState: () =>
new SerializationState(new SerializationEnvironment(null)
..addBinder(x, nameClue: 'x')
@@ -280,11 +281,13 @@
new VariableDeclaration('x', type: const DynamicType());
return new TestCase<Statement>(
name: '/* suppose A {foo() {...}} A x; */ x.{A::foo}();',
- node: new ExpressionStatement(new DirectMethodInvocation.byReference(
- new VariableGet(x), method.reference, new Arguments([]))),
+ node: new ExpressionStatement(new MethodInvocation.byReference(
+ new VariableGet(x),
+ method.name,
+ new Arguments([]),
+ method.reference)),
expectation: ''
- '(expr (invoke-direct-method (get-var "x^0" _)'
- ' "package:foo/bar.dart::A::@methods::foo"'
+ '(expr (invoke-method (get-var "x^0" _) (public "foo")'
' () () ()))',
makeSerializationState: () =>
new SerializationState(new SerializationEnvironment(null)
@@ -522,7 +525,8 @@
if (roundTripInput != testCase.expectation) {
failures.add(''
"* initial serialization for test '${testCase.name}'"
- " gave output '${roundTripInput}'");
+ " gave output '${roundTripInput}'"
+ " but expected '${testCase.expectation}'");
}
TreeNode deserialized =
diff --git a/pkg/kernel/test/verify_test.dart b/pkg/kernel/test/verify_test.dart
index 6bf0a97..0e5a207 100644
--- a/pkg/kernel/test/verify_test.dart
+++ b/pkg/kernel/test/verify_test.dart
@@ -236,7 +236,7 @@
'Dangling field get',
(TestHarness test) {
Field orphan = new Field(new Name('foo'));
- test.addNode(new DirectPropertyGet(new NullLiteral(), orphan));
+ test.addNode(new PropertyGet(new NullLiteral(), orphan.name, orphan));
return orphan;
},
(Node node) => "Dangling reference to '$node', parent is: 'null'.",
diff --git a/pkg/vm/lib/bytecode/gen_bytecode.dart b/pkg/vm/lib/bytecode/gen_bytecode.dart
index 1846f60..94a02db 100644
--- a/pkg/vm/lib/bytecode/gen_bytecode.dart
+++ b/pkg/vm/lib/bytecode/gen_bytecode.dart
@@ -2928,8 +2928,7 @@
(expr is VariableSet ||
expr is PropertySet ||
expr is StaticSet ||
- expr is SuperPropertySet ||
- expr is DirectPropertySet);
+ expr is SuperPropertySet);
void _createArgumentsArray(int temp, List<DartType> typeArgs,
List<Expression> args, bool storeLastArgumentToTemp) {
@@ -3075,55 +3074,6 @@
}
@override
- visitDirectMethodInvocation(DirectMethodInvocation node) {
- final args = node.arguments;
- _genArguments(node.receiver, args);
- final target = node.target;
- if (target is Procedure && !target.isGetter && !target.isSetter) {
- _genDirectCallWithArgs(target, args, hasReceiver: true, node: node);
- } else {
- throw new UnsupportedOperationError(
- 'Unsupported DirectMethodInvocation with target ${target.runtimeType} $target');
- }
- }
-
- @override
- visitDirectPropertyGet(DirectPropertyGet node) {
- _generateNode(node.receiver);
- final target = node.target;
- if (target is Field || (target is Procedure && target.isGetter)) {
- _genDirectCall(target, objectTable.getArgDescHandle(1), 1,
- isGet: true, node: node);
- } else {
- throw new UnsupportedOperationError(
- 'Unsupported DirectPropertyGet with ${target.runtimeType} $target');
- }
- }
-
- @override
- visitDirectPropertySet(DirectPropertySet node) {
- final int temp = locals.tempIndexInFrame(node);
- final bool hasResult = !isExpressionWithoutResult(node);
-
- _generateNode(node.receiver);
- _generateNode(node.value);
-
- if (hasResult) {
- asm.emitStoreLocal(temp);
- }
-
- final target = node.target;
- assert(target is Field || (target is Procedure && target.isSetter));
- _genDirectCall(target, objectTable.getArgDescHandle(2), 2,
- isSet: true, node: node);
- asm.emitDrop1();
-
- if (hasResult) {
- asm.emitPush(temp);
- }
- }
-
- @override
visitFunctionExpression(FunctionExpression node) {
_genClosure(node, '<anonymous closure>', node.function);
}
diff --git a/pkg/vm/lib/bytecode/local_vars.dart b/pkg/vm/lib/bytecode/local_vars.dart
index 5ba6c9c..882fb58 100644
--- a/pkg/vm/lib/bytecode/local_vars.dart
+++ b/pkg/vm/lib/bytecode/local_vars.dart
@@ -1369,11 +1369,6 @@
}
@override
- visitDirectPropertySet(DirectPropertySet node) {
- _visit(node, temps: 1);
- }
-
- @override
visitSuperMethodInvocation(SuperMethodInvocation node) {
_visit(node, temps: 1);
}
diff --git a/pkg/vm/lib/target/vm.dart b/pkg/vm/lib/target/vm.dart
index 8c74da4..59a24ab 100644
--- a/pkg/vm/lib/target/vm.dart
+++ b/pkg/vm/lib/target/vm.dart
@@ -153,8 +153,7 @@
{void logger(String msg),
ChangedStructureNotifier changedStructureNotifier}) {
transformMixins.transformLibraries(
- this, coreTypes, hierarchy, libraries, referenceFromIndex,
- doSuperResolution: false /* resolution is done in Dart VM */);
+ this, coreTypes, hierarchy, libraries, referenceFromIndex);
logger?.call("Transformed mixin applications");
transformFfi.ReplacedMembers replacedFields =
diff --git a/pkg/vm/lib/transformations/ffi_definitions.dart b/pkg/vm/lib/transformations/ffi_definitions.dart
index 0027255..13498bc 100644
--- a/pkg/vm/lib/transformations/ffi_definitions.dart
+++ b/pkg/vm/lib/transformations/ffi_definitions.dart
@@ -441,8 +441,9 @@
Expression argumentExpression = VariableGet(argument)
..fileOffset = fileOffset;
if (isPointer) {
- argumentExpression = DirectPropertyGet(argumentExpression, addressGetter)
- ..fileOffset = fileOffset;
+ argumentExpression =
+ PropertyGet(argumentExpression, addressGetter.name, addressGetter)
+ ..fileOffset = fileOffset;
}
return ReturnStatement(StaticInvocation(
storeMethod,
diff --git a/pkg/vm/lib/transformations/no_dynamic_invocations_annotator.dart b/pkg/vm/lib/transformations/no_dynamic_invocations_annotator.dart
index d2b01c3..e838c80 100644
--- a/pkg/vm/lib/transformations/no_dynamic_invocations_annotator.dart
+++ b/pkg/vm/lib/transformations/no_dynamic_invocations_annotator.dart
@@ -190,17 +190,6 @@
}
@override
- visitDirectMethodInvocation(DirectMethodInvocation node) {
- super.visitDirectMethodInvocation(node);
-
- Selector selector;
- if (node.receiver is! ThisExpression) {
- nonThisSelectors
- .add(selector ??= new Selector.doInvoke(node.target.name));
- }
- }
-
- @override
visitPropertyGet(PropertyGet node) {
super.visitPropertyGet(node);
@@ -220,20 +209,6 @@
}
@override
- visitDirectPropertyGet(DirectPropertyGet node) {
- super.visitDirectPropertyGet(node);
-
- if (node.receiver is! ThisExpression) {
- nonThisSelectors.add(new Selector.doGet(node.target.name));
- }
-
- final target = node.target;
- if (target is Procedure && target.kind == ProcedureKind.Method) {
- tearOffSelectors.add(new Selector.doInvoke(target.name));
- }
- }
-
- @override
visitPropertySet(PropertySet node) {
super.visitPropertySet(node);
@@ -246,14 +221,4 @@
}
}
}
-
- @override
- visitDirectPropertySet(DirectPropertySet node) {
- super.visitDirectPropertySet(node);
-
- Selector selector;
- if (node.receiver is! ThisExpression) {
- nonThisSelectors.add(selector ??= new Selector.doSet(node.target.name));
- }
- }
}
diff --git a/pkg/vm/lib/transformations/type_flow/summary_collector.dart b/pkg/vm/lib/transformations/type_flow/summary_collector.dart
index fb0fc33..a9fbc07 100644
--- a/pkg/vm/lib/transformations/type_flow/summary_collector.dart
+++ b/pkg/vm/lib/transformations/type_flow/summary_collector.dart
@@ -1502,53 +1502,6 @@
}
@override
- TypeExpr visitDirectMethodInvocation(DirectMethodInvocation node) {
- final receiver = _visit(node.receiver);
- final args = _visitArguments(receiver, node.arguments);
- final target = node.target;
- assert(target is! Field);
- assert(!target.isGetter && !target.isSetter);
- if (receiver is ThisExpression) {
- _entryPointsListener.recordMemberCalledViaThis(target);
- } else {
- // Conservatively record direct invocations with non-this receiver
- // as being done via interface selectors.
- _entryPointsListener.recordMemberCalledViaInterfaceSelector(target);
- }
- return _makeCall(node, new DirectSelector(target), args);
- }
-
- @override
- TypeExpr visitDirectPropertyGet(DirectPropertyGet node) {
- final receiver = _visit(node.receiver);
- final args = new Args<TypeExpr>([receiver]);
- final target = node.target;
- // No need to record this invocation as performed via this or via interface
- // selector as PropertyGet invocations are not tracked at all.
- return _makeCall(
- node, new DirectSelector(target, callKind: CallKind.PropertyGet), args);
- }
-
- @override
- TypeExpr visitDirectPropertySet(DirectPropertySet node) {
- final receiver = _visit(node.receiver);
- final value = _visit(node.value);
- final args = new Args<TypeExpr>([receiver, value]);
- final target = node.target;
- assert((target is Field) || ((target is Procedure) && target.isSetter));
- if (receiver is ThisExpression) {
- _entryPointsListener.recordMemberCalledViaThis(target);
- } else {
- // Conservatively record direct invocations with non-this receiver
- // as being done via interface selectors.
- _entryPointsListener.recordMemberCalledViaInterfaceSelector(target);
- }
- _makeCall(
- node, new DirectSelector(target, callKind: CallKind.PropertySet), args);
- return value;
- }
-
- @override
TypeExpr visitFunctionExpression(FunctionExpression node) {
_handleNestedFunctionNode(node.function);
// TODO(alexmarkov): support function types.
diff --git a/pkg/vm/lib/transformations/type_flow/transformer.dart b/pkg/vm/lib/transformations/type_flow/transformer.dart
index cdd95b2..cf64db8 100644
--- a/pkg/vm/lib/transformations/type_flow/transformer.dart
+++ b/pkg/vm/lib/transformations/type_flow/transformer.dart
@@ -438,24 +438,6 @@
}
@override
- visitDirectMethodInvocation(DirectMethodInvocation node) {
- _annotateCallSite(node, node.target);
- super.visitDirectMethodInvocation(node);
- }
-
- @override
- visitDirectPropertyGet(DirectPropertyGet node) {
- _annotateCallSite(node, node.target);
- super.visitDirectPropertyGet(node);
- }
-
- @override
- visitDirectPropertySet(DirectPropertySet node) {
- _annotateCallSite(node, node.target);
- super.visitDirectPropertySet(node);
- }
-
- @override
visitSuperMethodInvocation(SuperMethodInvocation node) {
_annotateCallSite(node, node.interfaceTarget);
super.visitSuperMethodInvocation(node);
@@ -1228,48 +1210,6 @@
}
@override
- TreeNode visitDirectMethodInvocation(DirectMethodInvocation node) {
- node.transformChildren(this);
- if (_isUnreachable(node)) {
- return _makeUnreachableCall(
- _flattenArguments(node.arguments, receiver: node.receiver));
- } else {
- assert(shaker.isMemberBodyReachable(node.target),
- "Target should be reachable: $node");
- return node;
- }
- }
-
- @override
- TreeNode visitDirectPropertyGet(DirectPropertyGet node) {
- node.transformChildren(this);
- if (_isUnreachable(node)) {
- return _makeUnreachableCall([node.receiver]);
- } else {
- final target = node.target;
- assert(shaker.isMemberBodyReachable(target),
- "Target should be reachable: $node");
- assert(target is! Field || shaker.isFieldGetterReachable(target),
- "Unexpected target in DirectProperyGet: $node");
- return node;
- }
- }
-
- @override
- TreeNode visitDirectPropertySet(DirectPropertySet node) {
- node.transformChildren(this);
- if (_isUnreachable(node)) {
- return _makeUnreachableCall([node.receiver, node.value]);
- } else {
- assert(shaker.isMemberBodyReachable(node.target),
- "Target should be reachable: $node");
- node.target =
- fieldMorpher.adjustInstanceCallTarget(node.target, isSetter: true);
- return node;
- }
- }
-
- @override
TreeNode visitConstructorInvocation(ConstructorInvocation node) {
node.transformChildren(this);
if (_isUnreachable(node)) {
diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
index 71ecb18..148a24a 100644
--- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
+++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.cc
@@ -1284,10 +1284,6 @@
return BuildPropertyGet(position);
case kPropertySet:
return BuildPropertySet(position);
- case kDirectPropertyGet:
- return BuildDirectPropertyGet(position);
- case kDirectPropertySet:
- return BuildDirectPropertySet(position);
case kSuperPropertyGet:
return BuildSuperPropertyGet(position);
case kSuperPropertySet:
@@ -1300,8 +1296,6 @@
return BuildMethodInvocation(position);
case kSuperMethodInvocation:
return BuildSuperMethodInvocation(position);
- case kDirectMethodInvocation:
- return BuildDirectMethodInvocation(position);
case kStaticInvocation:
return BuildStaticInvocation(position);
case kConstructorInvocation:
@@ -2668,92 +2662,6 @@
return instructions;
}
-Fragment StreamingFlowGraphBuilder::BuildDirectPropertyGet(TokenPosition* p) {
- const intptr_t offset = ReaderOffset() - 1; // Include the tag.
- const TokenPosition position = ReadPosition(); // read position.
- if (p != NULL) *p = position;
-
- const InferredTypeMetadata result_type =
- inferred_type_metadata_helper_.GetInferredType(offset);
-
- const Tag receiver_tag = PeekTag(); // peek tag for receiver.
- Fragment instructions = BuildExpression(); // read receiver.
- const NameIndex kernel_name =
- ReadInterfaceMemberNameReference(); // read target_reference.
-
- Function& target = Function::ZoneHandle(Z);
- if (H.IsProcedure(kernel_name)) {
- if (H.IsGetter(kernel_name)) {
- target =
- H.LookupMethodByMember(kernel_name, H.DartGetterName(kernel_name));
- } else if (receiver_tag == kThisExpression) {
- // Undo stack change for the BuildExpression.
- Pop();
-
- target =
- H.LookupMethodByMember(kernel_name, H.DartMethodName(kernel_name));
- target = target.ImplicitClosureFunction();
- ASSERT(!target.IsNull());
-
- // Generate inline code for allocating closure object with context which
- // captures `this`.
- return BuildImplicitClosureCreation(target);
- } else {
- // Need to create implicit closure (tear-off), receiver != this.
- // Ensure method extractor exists and call it directly.
- const Function& target_method = Function::ZoneHandle(
- Z,
- H.LookupMethodByMember(kernel_name, H.DartMethodName(kernel_name)));
- const String& getter_name = H.DartGetterName(kernel_name);
- target = target_method.GetMethodExtractor(getter_name);
- }
- } else {
- ASSERT(H.IsField(kernel_name));
- const String& getter_name = H.DartGetterName(kernel_name);
- target = H.LookupMethodByMember(kernel_name, getter_name);
- ASSERT(target.IsGetterFunction() || target.IsImplicitGetterFunction());
- }
-
- // Static calls are marked as "no-rebind", which is currently safe because
- // DirectPropertyGet are only used in enums (index in toString) and enums
- // can't change their structure during hot reload.
- // If there are other sources of DirectPropertyGet in the future, this code
- // have to be adjusted.
- return instructions + StaticCall(position, target, 1, Array::null_array(),
- ICData::kNoRebind, &result_type);
-}
-
-Fragment StreamingFlowGraphBuilder::BuildDirectPropertySet(TokenPosition* p) {
- const TokenPosition position = ReadPosition(); // read position.
- if (p != NULL) *p = position;
-
- Fragment instructions(MakeTemp());
- LocalVariable* value = MakeTemporary();
-
- instructions += BuildExpression(); // read receiver.
-
- const NameIndex target_reference =
- ReadInterfaceMemberNameReference(); // read target_reference.
- const String& method_name = H.DartSetterName(target_reference);
- const Function& target = Function::ZoneHandle(
- Z, H.LookupMethodByMember(target_reference, method_name));
- ASSERT(target.IsSetterFunction() || target.IsImplicitSetterFunction());
-
- instructions += BuildExpression(); // read value.
- instructions += StoreLocal(TokenPosition::kNoSource, value);
-
- // Static calls are marked as "no-rebind", which is currently safe because
- // DirectPropertyGet are only used in enums (index in toString) and enums
- // can't change their structure during hot reload.
- // If there are other sources of DirectPropertyGet in the future, this code
- // have to be adjusted.
- instructions +=
- StaticCall(position, target, 2, Array::null_array(), ICData::kNoRebind,
- /* result_type = */ NULL);
-
- return instructions + Drop();
-}
-
Fragment StreamingFlowGraphBuilder::BuildStaticGet(TokenPosition* p) {
ASSERT(Error::Handle(Z, H.thread()->sticky_error()).IsNull());
const intptr_t offset = ReaderOffset() - 1; // Include the tag.
@@ -3063,72 +2971,6 @@
return instructions;
}
-Fragment StreamingFlowGraphBuilder::BuildDirectMethodInvocation(
- TokenPosition* p) {
- const intptr_t offset = ReaderOffset() - 1; // Include the tag.
- TokenPosition position = ReadPosition(); // read offset.
- if (p != NULL) *p = position;
-
- const InferredTypeMetadata result_type =
- inferred_type_metadata_helper_.GetInferredType(offset);
-
- Tag receiver_tag = PeekTag(); // peek tag for receiver.
-
- Fragment instructions;
- intptr_t type_args_len = 0;
- {
- AlternativeReadingScope alt(&reader_);
- SkipExpression(); // skip receiver
- ReadInterfaceMemberNameReference(); // skip target reference
- ReadUInt(); // read argument count.
- intptr_t list_length = ReadListLength(); // read types list length.
- if (list_length > 0) {
- const TypeArguments& type_arguments =
- T.BuildTypeArguments(list_length); // read types.
- instructions += TranslateInstantiatedTypeArguments(type_arguments);
- }
- type_args_len = list_length;
- }
-
- instructions += BuildExpression(); // read receiver.
-
- NameIndex kernel_name =
- ReadInterfaceMemberNameReference(); // read target_reference.
- const String& method_name = H.DartProcedureName(kernel_name);
- const Token::Kind token_kind =
- MethodTokenRecognizer::RecognizeTokenKind(method_name);
-
- // Detect comparison with null.
- if ((token_kind == Token::kEQ || token_kind == Token::kNE) &&
- PeekArgumentsCount() == 1 &&
- (receiver_tag == kNullLiteral ||
- PeekArgumentsFirstPositionalTag() == kNullLiteral)) {
- ASSERT(type_args_len == 0);
- // "==" or "!=" with null on either side.
- instructions +=
- BuildArguments(NULL /* names */, NULL /* arg count */,
- NULL /* positional arg count */); // read arguments.
- Token::Kind strict_cmp_kind =
- token_kind == Token::kEQ ? Token::kEQ_STRICT : Token::kNE_STRICT;
- return instructions +
- StrictCompare(position, strict_cmp_kind, /*number_check = */ true);
- }
-
- const Function& target =
- Function::ZoneHandle(Z, H.LookupMethodByMember(kernel_name, method_name));
-
- Array& argument_names = Array::ZoneHandle(Z);
- intptr_t argument_count, positional_argument_count;
- instructions +=
- BuildArguments(&argument_names, &argument_count,
- &positional_argument_count); // read arguments.
- ++argument_count;
-
- return instructions + StaticCall(position, target, argument_count,
- argument_names, ICData::kNoRebind,
- &result_type, type_args_len);
-}
-
Fragment StreamingFlowGraphBuilder::BuildSuperMethodInvocation(
TokenPosition* p) {
const intptr_t offset = ReaderOffset() - 1; // Include the tag.
diff --git a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h
index 65ea0bd..2f4b90f 100644
--- a/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h
+++ b/runtime/vm/compiler/frontend/kernel_binary_flowgraph.h
@@ -295,12 +295,9 @@
Fragment build_rest_of_actuals);
Fragment BuildSuperPropertyGet(TokenPosition* position);
Fragment BuildSuperPropertySet(TokenPosition* position);
- Fragment BuildDirectPropertyGet(TokenPosition* position);
- Fragment BuildDirectPropertySet(TokenPosition* position);
Fragment BuildStaticGet(TokenPosition* position);
Fragment BuildStaticSet(TokenPosition* position);
Fragment BuildMethodInvocation(TokenPosition* position);
- Fragment BuildDirectMethodInvocation(TokenPosition* position);
Fragment BuildSuperMethodInvocation(TokenPosition* position);
Fragment BuildStaticInvocation(TokenPosition* position);
Fragment BuildConstructorInvocation(TokenPosition* position);
diff --git a/runtime/vm/compiler/frontend/kernel_fingerprints.cc b/runtime/vm/compiler/frontend/kernel_fingerprints.cc
index 1b53cde..51ddf29 100644
--- a/runtime/vm/compiler/frontend/kernel_fingerprints.cc
+++ b/runtime/vm/compiler/frontend/kernel_fingerprints.cc
@@ -400,17 +400,6 @@
CalculateExpressionFingerprint(); // read value.
CalculateSetterNameFingerprint(); // read interface_target_reference.
return;
- case kDirectPropertyGet:
- ReadPosition(); // read position.
- CalculateExpressionFingerprint(); // read receiver.
- CalculateInterfaceMemberNameFingerprint(); // read target_reference.
- return;
- case kDirectPropertySet:
- ReadPosition(); // read position.
- CalculateExpressionFingerprint(); // read receiver.
- CalculateInterfaceMemberNameFingerprint(); // read target_reference.
- CalculateExpressionFingerprint(); // read value·
- return;
case kStaticGet:
ReadPosition(); // read position.
CalculateCanonicalNameFingerprint(); // read target_reference.
@@ -433,12 +422,6 @@
CalculateArgumentsFingerprint(); // read arguments.
CalculateInterfaceMemberNameFingerprint(); // read target_reference.
return;
- case kDirectMethodInvocation:
- ReadPosition(); // read position.
- CalculateExpressionFingerprint(); // read receiver.
- CalculateInterfaceMemberNameFingerprint(); // read target_reference.
- CalculateArgumentsFingerprint(); // read arguments.
- return;
case kStaticInvocation:
ReadPosition(); // read position.
CalculateCanonicalNameFingerprint(); // read target_reference.
diff --git a/runtime/vm/compiler/frontend/kernel_translation_helper.cc b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
index 22acd1c..ff40a8b 100644
--- a/runtime/vm/compiler/frontend/kernel_translation_helper.cc
+++ b/runtime/vm/compiler/frontend/kernel_translation_helper.cc
@@ -2332,17 +2332,6 @@
SkipExpression(); // read value.
SkipInterfaceMemberNameReference(); // read interface_target_reference.
return;
- case kDirectPropertyGet:
- ReadPosition(); // read position.
- SkipExpression(); // read receiver.
- SkipInterfaceMemberNameReference(); // read target_reference.
- return;
- case kDirectPropertySet:
- ReadPosition(); // read position.
- SkipExpression(); // read receiver.
- SkipInterfaceMemberNameReference(); // read target_reference.
- SkipExpression(); // read value·
- return;
case kStaticGet:
ReadPosition(); // read position.
SkipCanonicalNameReference(); // read target_reference.
@@ -2365,12 +2354,6 @@
SkipArguments(); // read arguments.
SkipInterfaceMemberNameReference(); // read interface_target_reference.
return;
- case kDirectMethodInvocation:
- ReadPosition(); // read position.
- SkipExpression(); // read receiver.
- SkipInterfaceMemberNameReference(); // read target_reference.
- SkipArguments(); // read arguments.
- return;
case kStaticInvocation:
ReadPosition(); // read position.
SkipCanonicalNameReference(); // read procedure_reference.
diff --git a/runtime/vm/compiler/frontend/scope_builder.cc b/runtime/vm/compiler/frontend/scope_builder.cc
index b859d99..56e1dda 100644
--- a/runtime/vm/compiler/frontend/scope_builder.cc
+++ b/runtime/vm/compiler/frontend/scope_builder.cc
@@ -755,17 +755,6 @@
// read interface_target_reference.
helper_.SkipInterfaceMemberNameReference();
return;
- case kDirectPropertyGet:
- helper_.ReadPosition(); // read position.
- VisitExpression(); // read receiver.
- helper_.SkipInterfaceMemberNameReference(); // read target_reference.
- return;
- case kDirectPropertySet:
- helper_.ReadPosition(); // read position.
- VisitExpression(); // read receiver.
- helper_.SkipInterfaceMemberNameReference(); // read target_reference.
- VisitExpression(); // read value·
- return;
case kSuperPropertyGet:
HandleLoadReceiver();
helper_.ReadPosition(); // read position.
@@ -796,12 +785,6 @@
// read interface_target_reference.
helper_.SkipInterfaceMemberNameReference();
return;
- case kDirectMethodInvocation:
- helper_.ReadPosition(); // read position.
- VisitExpression(); // read receiver.
- helper_.SkipInterfaceMemberNameReference(); // read target_reference.
- VisitArguments(); // read arguments.
- return;
case kSuperMethodInvocation:
HandleLoadReceiver();
helper_.ReadPosition(); // read position.
diff --git a/runtime/vm/kernel_binary.h b/runtime/vm/kernel_binary.h
index bc9203b..e794427 100644
--- a/runtime/vm/kernel_binary.h
+++ b/runtime/vm/kernel_binary.h
@@ -20,8 +20,8 @@
static const uint32_t kMagicProgramFile = 0x90ABCDEFu;
// Both version numbers are inclusive.
-static const uint32_t kMinSupportedKernelFormatVersion = 45;
-static const uint32_t kMaxSupportedKernelFormatVersion = 45;
+static const uint32_t kMinSupportedKernelFormatVersion = 46;
+static const uint32_t kMaxSupportedKernelFormatVersion = 46;
// Keep in sync with package:kernel/lib/binary/tag.dart
#define KERNEL_TAG_LIST(V) \
@@ -42,9 +42,6 @@
V(AssertInitializer, 12) \
V(CheckLibraryIsLoaded, 13) \
V(LoadLibrary, 14) \
- V(DirectPropertyGet, 15) \
- V(DirectPropertySet, 16) \
- V(DirectMethodInvocation, 17) \
V(ConstStaticInvocation, 18) \
V(InvalidExpression, 19) \
V(VariableGet, 20) \
diff --git a/tests/co19/co19-co19.status b/tests/co19/co19-co19.status
index 7600e13..f93ebee 100644
--- a/tests/co19/co19-co19.status
+++ b/tests/co19/co19-co19.status
@@ -26,15 +26,8 @@
Language/Statements/Expression_Statements/syntax_t06: Skip # Type aliases are not fully implemented
Language/Types/Type_Aliases/built-in_types_t11: Skip # Triple shift is not implemented yet
LanguageFeatures/Extension-methods/explicit_extension_member_invocation_A15_t09: Skip # Triple shift is not implemented yet
-LanguageFeatures/Instantiate-to-bound/*: Skip # Not migrated to NNBD
-LanguageFeatures/Instantiate-to-bound/class/*: Skip # Not migrated to NNBD
-LanguageFeatures/Instantiate-to-bound/class/dynamic/*: Skip # Not migrated to NNBD
LanguageFeatures/Instantiate-to-bound/class/static/*: Skip # Not migrated to NNBD
-LanguageFeatures/Instantiate-to-bound/nonfunction_typedef/*: Skip # Not migrated to NNBD
-LanguageFeatures/Instantiate-to-bound/nonfunction_typedef/dynamic/*: Skip # Not migrated to NNBD
LanguageFeatures/Instantiate-to-bound/nonfunction_typedef/static/*: Skip # Not migrated to NNBD
-LanguageFeatures/Instantiate-to-bound/typedef/*: Skip # Not migrated to NNBD
-LanguageFeatures/Instantiate-to-bound/typedef/dynamic/*: Skip # Not migrated to NNBD
LanguageFeatures/Instantiate-to-bound/typedef/static/*: Skip # Not migrated to NNBD
LanguageFeatures/Simple-bounds/dynamic/type-aliases/*: Skip # Type aliases are not fully implemented
LanguageFeatures/Simple-bounds/static/type-aliases/*: Skip # Type aliases are not fully implemented
diff --git a/tests/co19/co19-runtime.status b/tests/co19/co19-runtime.status
index f34b3eb..0a91266 100644
--- a/tests/co19/co19-runtime.status
+++ b/tests/co19/co19-runtime.status
@@ -12,5 +12,8 @@
[ $compiler != dart2js && $runtime != none && $runtime != vm && !$checked ]
LibTest/async/Future/catchError_A03_t05: RuntimeError
+[ $mode == debug && $nnbd != legacy && $runtime == dart_precompiled ]
+LibTest/collection/ListMixin/ListMixin_class_A01_t05: SkipSlow # Issue 43614
+
[ $compiler == fasta || $runtime == dart_precompiled || $runtime == vm ]
LibTest/html/*: SkipByDesign # dart:html not supported on VM.
diff --git a/tools/VERSION b/tools/VERSION
index 30c4f2b..6113aa7 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 11
PATCH 0
-PRERELEASE 185
+PRERELEASE 186
PRERELEASE_PATCH 0
\ No newline at end of file