Version 2.14.0-49.0.dev Merge commit '6a7aaf5bc3e2bfd9da9be17962c75914c8bdaf75' into 'dev'
diff --git a/DEPS b/DEPS index a7cc76e..da99e64 100644 --- a/DEPS +++ b/DEPS
@@ -39,12 +39,12 @@ # Checked-in SDK version. The checked-in SDK is a Dart SDK distribution in a # cipd package used to run Dart scripts in the build and test infrastructure. - "sdk_tag": "version:2.12.0", + "sdk_tag": "version:2.13.0-211.13.beta", # 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": "8c5fea8a51cf8c35724ddf136248350bb307d344", + "co19_rev": "13f010c4047c4c7d52afe67ecc57ebc415ea4ea8", "co19_2_rev": "f7f583366396cb1457e58c9bfb6d6e53dc21d741", # The internal benchmarks to use. See go/dart-benchmarks-internal
diff --git a/build/config/mac/mac_sdk.gni b/build/config/mac/mac_sdk.gni index e93ede0..ae8cd00 100644 --- a/build/config/mac/mac_sdk.gni +++ b/build/config/mac/mac_sdk.gni
@@ -6,9 +6,9 @@ declare_args() { # Minimum supported version of the Mac SDK. - mac_sdk_min = "10.8" + mac_sdk_min = "10.13" - # Path to a specific version of the Mac SDKJ, not including a backslash at + # Path to a specific version of the Mac SDK, not including a backslash at # the end. If empty, the path to the lowest version greater than or equal to # mac_sdk_min is used. mac_sdk_path = ""
diff --git a/pkg/compiler/lib/src/ir/scope_visitor.dart b/pkg/compiler/lib/src/ir/scope_visitor.dart index abaff07..2a6ddc4 100644 --- a/pkg/compiler/lib/src/ir/scope_visitor.dart +++ b/pkg/compiler/lib/src/ir/scope_visitor.dart
@@ -879,7 +879,7 @@ } @override - EvaluationComplexity visitMapEntry(ir.MapEntry node) { + EvaluationComplexity visitMapLiteralEntry(ir.MapLiteralEntry node) { node.key = _handleExpression(node.key); EvaluationComplexity keyComplexity = _lastExpressionComplexity;
diff --git a/pkg/compiler/lib/src/ir/static_type.dart b/pkg/compiler/lib/src/ir/static_type.dart index 224a793..0ea8c89 100644 --- a/pkg/compiler/lib/src/ir/static_type.dart +++ b/pkg/compiler/lib/src/ir/static_type.dart
@@ -1572,7 +1572,7 @@ } @override - Null visitMapEntry(ir.MapEntry entry) { + Null visitMapLiteralEntry(ir.MapLiteralEntry entry) { visitNode(entry.key); visitNode(entry.value); }
diff --git a/pkg/compiler/lib/src/kernel/dart2js_target.dart b/pkg/compiler/lib/src/kernel/dart2js_target.dart index 96cd1ad..c10c0e9 100644 --- a/pkg/compiler/lib/src/kernel/dart2js_target.dart +++ b/pkg/compiler/lib/src/kernel/dart2js_target.dart
@@ -185,9 +185,9 @@ new ir.ListLiteral( arguments.types.map((t) => new ir.TypeLiteral(t)).toList()), new ir.ListLiteral(arguments.positional)..fileOffset = offset, - new ir.MapLiteral(new List<ir.MapEntry>.from( + new ir.MapLiteral(new List<ir.MapLiteralEntry>.from( arguments.named.map((ir.NamedExpression arg) { - return new ir.MapEntry( + return new ir.MapLiteralEntry( new ir.StringLiteral(arg.name)..fileOffset = arg.fileOffset, arg.value) ..fileOffset = arg.fileOffset;
diff --git a/pkg/compiler/lib/src/ssa/builder_kernel.dart b/pkg/compiler/lib/src/ssa/builder_kernel.dart index c9a40cd..498c686 100644 --- a/pkg/compiler/lib/src/ssa/builder_kernel.dart +++ b/pkg/compiler/lib/src/ssa/builder_kernel.dart
@@ -3214,7 +3214,7 @@ // The map literal constructors take the key-value pairs as a List List<HInstruction> constructorArgs = <HInstruction>[]; - for (ir.MapEntry mapEntry in node.entries) { + for (ir.MapLiteralEntry mapEntry in node.entries) { mapEntry.key.accept(this); constructorArgs.add(pop()); mapEntry.value.accept(this); @@ -3287,7 +3287,7 @@ } @override - void visitMapEntry(ir.MapEntry node) { + void visitMapLiteralEntry(ir.MapLiteralEntry node) { failedAt(CURRENT_ELEMENT_SPANNABLE, 'ir.MapEntry should be handled in visitMapLiteral'); } @@ -4269,7 +4269,7 @@ selector = new Selector.indexSet(); } else { if (namedArgumentsLiteral is ir.MapLiteral) { - namedArgumentsLiteral.entries.forEach((ir.MapEntry entry) { + namedArgumentsLiteral.entries.forEach((ir.MapLiteralEntry entry) { String key = _readStringLiteral(entry.key); namedArguments[key] = entry.value; });
diff --git a/pkg/dev_compiler/lib/src/kernel/compiler.dart b/pkg/dev_compiler/lib/src/kernel/compiler.dart index cba549e..791ada2 100644 --- a/pkg/dev_compiler/lib/src/kernel/compiler.dart +++ b/pkg/dev_compiler/lib/src/kernel/compiler.dart
@@ -10,7 +10,7 @@ import 'package:kernel/class_hierarchy.dart'; import 'package:kernel/core_types.dart'; -import 'package:kernel/kernel.dart' hide MapEntry; +import 'package:kernel/kernel.dart'; import 'package:kernel/library_index.dart'; import 'package:kernel/src/dart_type_equivalence.dart'; import 'package:kernel/type_algebra.dart';
diff --git a/pkg/dev_compiler/lib/src/kernel/target.dart b/pkg/dev_compiler/lib/src/kernel/target.dart index c585aa4..473b404 100644 --- a/pkg/dev_compiler/lib/src/kernel/target.dart +++ b/pkg/dev_compiler/lib/src/kernel/target.dart
@@ -217,7 +217,7 @@ if (arguments.named.isNotEmpty) MapLiteral([ for (var n in arguments.named) - MapEntry(SymbolLiteral(n.name), n.value) + MapLiteralEntry(SymbolLiteral(n.name), n.value) ], keyType: coreTypes.symbolLegacyRawType), ]; return createInvocation('method', ctorArgs);
diff --git a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart index e7d9500..2164ae6 100644 --- a/pkg/front_end/lib/src/fasta/kernel/body_builder.dart +++ b/pkg/front_end/lib/src/fasta/kernel/body_builder.dart
@@ -2919,7 +2919,7 @@ } else { assert(conditionStatement is EmptyStatement); } - if (entry is MapEntry) { + if (entry is MapLiteralEntry) { ForMapEntry result = forest.createForMapEntry( offsetForToken(forToken), variables, condition, updates, entry); typeInferrer?.assignedVariables?.endNode(result); @@ -3115,7 +3115,7 @@ List<Expression> expressions = <Expression>[]; if (setOrMapEntries != null) { for (dynamic entry in setOrMapEntries) { - if (entry is MapEntry) { + if (entry is MapLiteralEntry) { // TODO(danrubel): report the error on the colon addProblem(fasta.templateExpectedButGot.withArguments(','), entry.fileOffset, 1); @@ -3163,7 +3163,7 @@ // TODO(danrubel): Revise this to handle control flow and spread if (elem == invalidCollectionElement) { setOrMapEntries.removeAt(i); - } else if (elem is MapEntry) { + } else if (elem is MapLiteralEntry) { setOrMapEntries[i] = elem; } else { setOrMapEntries[i] = toValue(elem); @@ -3186,7 +3186,7 @@ : null; for (int i = 0; i < setOrMapEntries.length; ++i) { - if (setOrMapEntries[i] is! MapEntry && + if (setOrMapEntries[i] is! MapLiteralEntry && !isConvertibleToMapEntry(setOrMapEntries[i])) { hasSetEntry = true; } @@ -3201,10 +3201,10 @@ if (isSet) { buildLiteralSet(typeArguments, constKeyword, leftBrace, setOrMapEntries); } else { - List<MapEntry> mapEntries = - new List<MapEntry>.filled(setOrMapEntries.length, null); + List<MapLiteralEntry> mapEntries = + new List<MapLiteralEntry>.filled(setOrMapEntries.length, null); for (int i = 0; i < setOrMapEntries.length; ++i) { - if (setOrMapEntries[i] is MapEntry) { + if (setOrMapEntries[i] is MapLiteralEntry) { mapEntries[i] = setOrMapEntries[i]; } else { mapEntries[i] = convertToMapEntry(setOrMapEntries[i], this, @@ -3237,7 +3237,7 @@ } void buildLiteralMap(List<UnresolvedType> typeArguments, Token constKeyword, - Token leftBrace, List<MapEntry> entries) { + Token leftBrace, List<MapLiteralEntry> entries) { DartType keyType; DartType valueType; if (typeArguments != null) { @@ -4780,7 +4780,7 @@ // Resolve the top of the stack so that if it's a delayed assignment it // happens before we go into the else block. Object node = pop(); - if (node is! MapEntry) node = toValue(node); + if (node is! MapLiteralEntry) node = toValue(node); // This is matched by the call to [beginNode] in // [handleThenControlFlow] and by the call to [storeInfo] in // [endIfElseControlFlow]. @@ -4797,7 +4797,7 @@ transformCollections = true; TreeNode node; - if (entry is MapEntry) { + if (entry is MapLiteralEntry) { node = forest.createIfMapEntry( offsetForToken(ifToken), toValue(condition), entry); } else { @@ -4822,13 +4822,13 @@ transformCollections = true; TreeNode node; - if (thenEntry is MapEntry) { - if (elseEntry is MapEntry) { + if (thenEntry is MapLiteralEntry) { + if (elseEntry is MapLiteralEntry) { node = forest.createIfMapEntry( offsetForToken(ifToken), toValue(condition), thenEntry, elseEntry); } else if (elseEntry is ControlFlowElement) { - MapEntry elseMapEntry = - elseEntry.toMapEntry(typeInferrer?.assignedVariables?.reassignInfo); + MapLiteralEntry elseMapEntry = elseEntry + .toMapLiteralEntry(typeInferrer?.assignedVariables?.reassignInfo); if (elseMapEntry != null) { node = forest.createIfMapEntry(offsetForToken(ifToken), toValue(condition), thenEntry, elseMapEntry); @@ -4836,7 +4836,7 @@ int offset = elseEntry is Expression ? elseEntry.fileOffset : offsetForToken(ifToken); - node = new MapEntry( + node = new MapLiteralEntry( buildProblem( fasta.messageCantDisambiguateAmbiguousInformation, offset, 1), new NullLiteral()) @@ -4846,16 +4846,16 @@ int offset = elseEntry is Expression ? elseEntry.fileOffset : offsetForToken(ifToken); - node = new MapEntry( + node = new MapLiteralEntry( buildProblem(fasta.templateExpectedAfterButGot.withArguments(':'), offset, 1), new NullLiteral()) ..fileOffset = offsetForToken(ifToken); } - } else if (elseEntry is MapEntry) { + } else if (elseEntry is MapLiteralEntry) { if (thenEntry is ControlFlowElement) { - MapEntry thenMapEntry = - thenEntry.toMapEntry(typeInferrer?.assignedVariables?.reassignInfo); + MapLiteralEntry thenMapEntry = thenEntry + .toMapLiteralEntry(typeInferrer?.assignedVariables?.reassignInfo); if (thenMapEntry != null) { node = forest.createIfMapEntry(offsetForToken(ifToken), toValue(condition), thenMapEntry, elseEntry); @@ -4863,7 +4863,7 @@ int offset = thenEntry is Expression ? thenEntry.fileOffset : offsetForToken(ifToken); - node = new MapEntry( + node = new MapLiteralEntry( buildProblem( fasta.messageCantDisambiguateAmbiguousInformation, offset, 1), new NullLiteral()) @@ -4873,7 +4873,7 @@ int offset = thenEntry is Expression ? thenEntry.fileOffset : offsetForToken(ifToken); - node = new MapEntry( + node = new MapLiteralEntry( buildProblem(fasta.templateExpectedAfterButGot.withArguments(':'), offset, 1), new NullLiteral()) @@ -5257,7 +5257,7 @@ typeInferrer?.assignedVariables?.pushNode(assignedVariablesNodeInfo); VariableDeclaration variable = elements.variable; Expression problem = elements.expressionProblem; - if (entry is MapEntry) { + if (entry is MapLiteralEntry) { ForInMapEntry result = forest.createForInMapEntry( offsetForToken(forToken), variable,
diff --git a/pkg/front_end/lib/src/fasta/kernel/collections.dart b/pkg/front_end/lib/src/fasta/kernel/collections.dart index b29d126..c4b3d01 100644 --- a/pkg/front_end/lib/src/fasta/kernel/collections.dart +++ b/pkg/front_end/lib/src/fasta/kernel/collections.dart
@@ -45,14 +45,15 @@ R accept1<R, A>(ExpressionVisitor1<R, A> v, A arg) => v.defaultExpression(this, arg); - /// Returns this control flow element as a [MapEntry], or `null` if this - /// control flow element cannot be converted into a [MapEntry]. + /// Returns this control flow element as a [MapLiteralEntry], or `null` if + /// this control flow element cannot be converted into a [MapLiteralEntry]. /// /// [onConvertElement] is called when a [ForElement], [ForInElement], or /// [IfElement] is converted to a [ForMapEntry], [ForInMapEntry], or /// [IfMapEntry], respectively. // TODO(johnniwinther): Merge this with [convertToMapEntry]. - MapEntry toMapEntry(void onConvertElement(TreeNode from, TreeNode to)); + MapLiteralEntry toMapLiteralEntry( + void onConvertElement(TreeNode from, TreeNode to)); } /// A spread element in a list or set literal. @@ -92,7 +93,8 @@ } @override - SpreadMapEntry toMapEntry(void onConvertElement(TreeNode from, TreeNode to)) { + SpreadMapEntry toMapLiteralEntry( + void onConvertElement(TreeNode from, TreeNode to)) { return new SpreadMapEntry(expression, isNullAware)..fileOffset = fileOffset; } @@ -163,18 +165,19 @@ } @override - MapEntry toMapEntry(void onConvertElement(TreeNode from, TreeNode to)) { - MapEntry thenEntry; + MapLiteralEntry toMapLiteralEntry( + void onConvertElement(TreeNode from, TreeNode to)) { + MapLiteralEntry thenEntry; if (then is ControlFlowElement) { ControlFlowElement thenElement = then; - thenEntry = thenElement.toMapEntry(onConvertElement); + thenEntry = thenElement.toMapLiteralEntry(onConvertElement); } if (thenEntry == null) return null; - MapEntry otherwiseEntry; + MapLiteralEntry otherwiseEntry; if (otherwise != null) { if (otherwise is ControlFlowElement) { ControlFlowElement otherwiseElement = otherwise; - otherwiseEntry = otherwiseElement.toMapEntry(onConvertElement); + otherwiseEntry = otherwiseElement.toMapLiteralEntry(onConvertElement); } if (otherwiseEntry == null) return null; } @@ -253,11 +256,12 @@ } @override - MapEntry toMapEntry(void onConvertElement(TreeNode from, TreeNode to)) { - MapEntry bodyEntry; + MapLiteralEntry toMapLiteralEntry( + void onConvertElement(TreeNode from, TreeNode to)) { + MapLiteralEntry bodyEntry; if (body is ControlFlowElement) { ControlFlowElement bodyElement = body; - bodyEntry = bodyElement.toMapEntry(onConvertElement); + bodyEntry = bodyElement.toMapLiteralEntry(onConvertElement); } if (bodyEntry == null) return null; ForMapEntry result = @@ -369,11 +373,12 @@ } @override - MapEntry toMapEntry(void onConvertElement(TreeNode from, TreeNode to)) { - MapEntry bodyEntry; + MapLiteralEntry toMapLiteralEntry( + void onConvertElement(TreeNode from, TreeNode to)) { + MapLiteralEntry bodyEntry; if (body is ControlFlowElement) { ControlFlowElement bodyElement = body; - bodyEntry = bodyElement.toMapEntry(onConvertElement); + bodyEntry = bodyElement.toMapLiteralEntry(onConvertElement); } if (bodyEntry == null) return null; ForInMapEntry result = new ForInMapEntry(variable, iterable, @@ -395,7 +400,7 @@ } } -mixin ControlFlowMapEntry implements MapEntry { +mixin ControlFlowMapEntry implements MapLiteralEntry { @override Expression get key { throw new UnsupportedError('ControlFlowMapEntry.key getter'); @@ -483,8 +488,8 @@ /// An 'if' element in a map literal. class IfMapEntry extends TreeNode with ControlFlowMapEntry { Expression condition; - MapEntry then; - MapEntry otherwise; + MapLiteralEntry then; + MapLiteralEntry otherwise; IfMapEntry(this.condition, this.then, this.otherwise) { condition?.parent = this; @@ -522,11 +527,11 @@ condition?.parent = this; } if (then != null) { - then = v.transformOrRemove(then, dummyMapEntry); + then = v.transformOrRemove(then, dummyMapLiteralEntry); then?.parent = this; } if (otherwise != null) { - otherwise = v.transformOrRemove(otherwise, dummyMapEntry); + otherwise = v.transformOrRemove(otherwise, dummyMapLiteralEntry); otherwise?.parent = this; } } @@ -547,7 +552,7 @@ final List<VariableDeclaration> variables; // May be empty, but not null. Expression condition; // May be null. final List<Expression> updates; // May be empty, but not null. - MapEntry body; + MapLiteralEntry body; ForMapEntry(this.variables, this.condition, this.updates, this.body) { setParents(variables, this); @@ -587,7 +592,7 @@ } v.transformExpressionList(updates, this); if (body != null) { - body = v.transformOrRemove(body, dummyMapEntry); + body = v.transformOrRemove(body, dummyMapLiteralEntry); body?.parent = this; } } @@ -609,7 +614,7 @@ Expression iterable; Expression syntheticAssignment; // May be null. Statement expressionEffects; // May be null. - MapEntry body; + MapLiteralEntry body; Expression problem; // May be null. bool isAsync; // True if this is an 'await for' loop. @@ -685,7 +690,7 @@ expressionEffects?.parent = this; } if (body != null) { - body = v.transformOrRemove(body, dummyMapEntry); + body = v.transformOrRemove(body, dummyMapLiteralEntry); body?.parent = this; } if (problem != null) { @@ -712,7 +717,7 @@ /// [onConvertMapEntry] is called when a [ForMapEntry], [ForInMapEntry], or /// [IfMapEntry] is converted to a [ForElement], [ForInElement], or [IfElement], /// respectively. -Expression convertToElement(MapEntry entry, InferenceHelper helper, +Expression convertToElement(MapLiteralEntry entry, InferenceHelper helper, void onConvertMapEntry(TreeNode from, TreeNode to)) { if (entry is SpreadMapEntry) { return new SpreadElement(entry.expression, entry.isNullAware) @@ -780,14 +785,14 @@ return false; } -/// Convert [element] to a [MapEntry], if possible. If [element] cannot be -/// converted an error reported through [helper] and a map entry holding an +/// Convert [element] to a [MapLiteralEntry], if possible. If [element] cannot +/// be converted an error reported through [helper] and a map entry holding an /// invalid expression is returned. /// /// [onConvertElement] is called when a [ForElement], [ForInElement], or /// [IfElement] is converted to a [ForMapEntry], [ForInMapEntry], or /// [IfMapEntry], respectively. -MapEntry convertToMapEntry(Expression element, InferenceHelper helper, +MapLiteralEntry convertToMapEntry(Expression element, InferenceHelper helper, void onConvertElement(TreeNode from, TreeNode to)) { if (element is SpreadElement) { return new SpreadMapEntry(element.expression, element.isNullAware) @@ -827,7 +832,7 @@ onConvertElement(element, result); return result; } - return new MapEntry( + return new MapLiteralEntry( helper.buildProblem( templateExpectedAfterButGot.withArguments(':'), element.fileOffset,
diff --git a/pkg/front_end/lib/src/fasta/kernel/constant_collection_builders.dart b/pkg/front_end/lib/src/fasta/kernel/constant_collection_builders.dart index 6d95ecf..a11857d 100644 --- a/pkg/front_end/lib/src/fasta/kernel/constant_collection_builders.dart +++ b/pkg/front_end/lib/src/fasta/kernel/constant_collection_builders.dart
@@ -228,7 +228,7 @@ /// /// Returns [null] on success and an error-"constant" on failure, as such the /// return value should be checked. - AbortConstant add(MapEntry element) { + AbortConstant add(MapLiteralEntry element) { Constant key = evaluator._evaluateSubexpression(element.key); if (key is AbortConstant) return key; Constant value = evaluator._evaluateSubexpression(element.value); @@ -236,9 +236,10 @@ if (evaluator.shouldBeUnevaluated) { parts.add(evaluator.unevaluated( element.key, - new MapLiteral( - [new MapEntry(evaluator.extract(key), evaluator.extract(value))], - isConst: true))); + new MapLiteral([ + new MapLiteralEntry( + evaluator.extract(key), evaluator.extract(value)) + ], isConst: true))); return null; } else { return addConstant(key, value, element.key, element.value);
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 35a2f67..ea72f96 100644 --- a/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart +++ b/pkg/front_end/lib/src/fasta/kernel/constant_evaluator.dart
@@ -1413,7 +1413,7 @@ // We therefore reset it before each call, combine it and set it correctly // at the end. bool wasOrBecameUnevaluated = seenUnevaluatedChild; - for (MapEntry element in node.entries) { + for (MapLiteralEntry element in node.entries) { seenUnevaluatedChild = false; AbortConstant error = builder.add(element); wasOrBecameUnevaluated |= seenUnevaluatedChild;
diff --git a/pkg/front_end/lib/src/fasta/kernel/forest.dart b/pkg/front_end/lib/src/fasta/kernel/forest.dart index 9be6294..9839741 100644 --- a/pkg/front_end/lib/src/fasta/kernel/forest.dart +++ b/pkg/front_end/lib/src/fasta/kernel/forest.dart
@@ -154,7 +154,7 @@ /// if the second type argument cannot be resolved. The list of [entries] is a /// list of the representations of the map entries. MapLiteral createMapLiteral(int fileOffset, DartType keyType, - DartType valueType, List<MapEntry> entries, + DartType valueType, List<MapLiteralEntry> entries, {bool isConst}) { assert(fileOffset != null); assert(isConst != null); @@ -193,9 +193,10 @@ /// [fileOffset]. The [key] is the representation of the expression used to /// compute the key. The [value] is the representation of the expression used /// to compute the value. - MapEntry createMapEntry(int fileOffset, Expression key, Expression value) { + MapLiteralEntry createMapEntry( + int fileOffset, Expression key, Expression value) { assert(fileOffset != null); - return new MapEntry(key, value)..fileOffset = fileOffset; + return new MapLiteralEntry(key, value)..fileOffset = fileOffset; } Expression createLoadLibrary( @@ -234,8 +235,9 @@ return new IfElement(condition, then, otherwise)..fileOffset = fileOffset; } - MapEntry createIfMapEntry(int fileOffset, Expression condition, MapEntry then, - [MapEntry otherwise]) { + MapLiteralEntry createIfMapEntry( + int fileOffset, Expression condition, MapLiteralEntry then, + [MapLiteralEntry otherwise]) { assert(fileOffset != null); return new IfMapEntry(condition, then, otherwise)..fileOffset = fileOffset; } @@ -251,12 +253,12 @@ ..fileOffset = fileOffset; } - MapEntry createForMapEntry( + MapLiteralEntry createForMapEntry( int fileOffset, List<VariableDeclaration> variables, Expression condition, List<Expression> updates, - MapEntry body) { + MapLiteralEntry body) { assert(fileOffset != null); return new ForMapEntry(variables, condition, updates, body) ..fileOffset = fileOffset; @@ -278,13 +280,13 @@ ..fileOffset = fileOffset; } - MapEntry createForInMapEntry( + MapLiteralEntry createForInMapEntry( int fileOffset, VariableDeclaration variable, Expression iterable, Expression synthesizedAssignment, Statement expressionEffects, - MapEntry body, + MapLiteralEntry body, Expression problem, {bool isAsync: false}) { assert(fileOffset != null);
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 38e815c..8324530 100644 --- a/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart +++ b/pkg/front_end/lib/src/fasta/kernel/inference_visitor.dart
@@ -1934,8 +1934,8 @@ // actualTypesForSet, only inferMapEntry adds exactly one element to that // list: the actual type of the iterable spread elements in case the map // literal will be disambiguated as a set literal later. - MapEntry inferMapEntry( - MapEntry entry, + MapLiteralEntry inferMapEntry( + MapLiteralEntry entry, TreeNode parent, DartType inferredKeyType, DartType inferredValueType, @@ -1968,12 +1968,12 @@ DartType actualElementType = getSpreadElementType(spreadType, spreadTypeBound, entry.isNullAware); - MapEntry replacement = entry; + MapLiteralEntry replacement = entry; if (typeChecksNeeded) { if (actualKeyType == null) { if (inferrer.coreTypes.isNull(spreadTypeBound) && !entry.isNullAware) { - replacement = new MapEntry( + replacement = new MapLiteralEntry( inferrer.helper.buildProblem( templateNonNullAwareSpreadIsNull.withArguments( spreadType, inferrer.isNonNullableByDefault), @@ -2014,7 +2014,7 @@ entry, (type) => !type.isPotentiallyNullable)); _copyNonPromotionReasonToReplacement(entry, problem); - replacement = new MapEntry(problem, new NullLiteral()) + replacement = new MapLiteralEntry(problem, new NullLiteral()) ..fileOffset = entry.fileOffset; } } else if (spreadTypeBound is InterfaceType) { @@ -2128,7 +2128,7 @@ if (keyError != null || valueError != null) { keyError ??= new NullLiteral(); valueError ??= new NullLiteral(); - replacement = new MapEntry(keyError, valueError) + replacement = new MapLiteralEntry(keyError, valueError) ..fileOffset = entry.fileOffset; } } @@ -2181,7 +2181,7 @@ // Note that this recursive invocation of inferMapEntry will add two types // to actualTypes; they are the actual types of the current invocation if // the 'else' branch is empty. - MapEntry then = inferMapEntry( + MapLiteralEntry then = inferMapEntry( entry.then, entry, inferredKeyType, @@ -2194,7 +2194,7 @@ inferenceNeeded, typeChecksNeeded); entry.then = then..parent = entry; - MapEntry otherwise; + MapLiteralEntry otherwise; if (entry.otherwise != null) { inferrer.flowAnalysis.ifStatement_elseBegin(); // We need to modify the actual types added in the recursive call to @@ -2282,7 +2282,7 @@ } inferrer.flowAnalysis.for_bodyBegin(null, entry.condition); // Actual types are added by the recursive call. - MapEntry body = inferMapEntry( + MapLiteralEntry body = inferMapEntry( entry.body, entry, inferredKeyType, @@ -2334,7 +2334,7 @@ entry.problem = problemResult.expression..parent = entry; } // Actual types are added by the recursive call. - MapEntry body = inferMapEntry( + MapLiteralEntry body = inferMapEntry( entry.body, entry, inferredKeyType, @@ -2375,16 +2375,16 @@ } } - MapEntry checkMapEntry( - MapEntry entry, + MapLiteralEntry checkMapEntry( + MapLiteralEntry entry, DartType keyType, DartType valueType, Map<TreeNode, DartType> inferredSpreadTypes, Map<Expression, DartType> inferredConditionTypes) { // It's disambiguated as a map literal. - MapEntry replacement = entry; + MapLiteralEntry replacement = entry; if (iterableSpreadOffset != null) { - replacement = new MapEntry( + replacement = new MapLiteralEntry( inferrer.helper.buildProblem( templateSpreadMapEntryTypeMismatch.withArguments( iterableSpreadType, inferrer.isNonNullableByDefault), @@ -2404,12 +2404,12 @@ entry.expression = expression..parent = entry; } } else if (entry is IfMapEntry) { - MapEntry then = checkMapEntry(entry.then, keyType, valueType, + MapLiteralEntry then = checkMapEntry(entry.then, keyType, valueType, inferredSpreadTypes, inferredConditionTypes); entry.then = then..parent = entry; if (entry.otherwise != null) { - MapEntry otherwise = checkMapEntry(entry.otherwise, keyType, valueType, - inferredSpreadTypes, inferredConditionTypes); + MapLiteralEntry otherwise = checkMapEntry(entry.otherwise, keyType, + valueType, inferredSpreadTypes, inferredConditionTypes); entry.otherwise = otherwise..parent = entry; } } else if (entry is ForMapEntry) { @@ -2421,11 +2421,11 @@ entry.condition); entry.condition = condition..parent = entry; } - MapEntry body = checkMapEntry(entry.body, keyType, valueType, + MapLiteralEntry body = checkMapEntry(entry.body, keyType, valueType, inferredSpreadTypes, inferredConditionTypes); entry.body = body..parent = entry; } else if (entry is ForInMapEntry) { - MapEntry body = checkMapEntry(entry.body, keyType, valueType, + MapLiteralEntry body = checkMapEntry(entry.body, keyType, valueType, inferredSpreadTypes, inferredConditionTypes); entry.body = body..parent = entry; } else { @@ -2526,7 +2526,7 @@ <DartType>[inferredKeyType, inferredValueType]); } for (int index = 0; index < node.entries.length; ++index) { - MapEntry entry = node.entries[index]; + MapLiteralEntry entry = node.entries[index]; entry = inferMapEntry( entry, node, @@ -2648,7 +2648,7 @@ } if (typeChecksNeeded) { for (int index = 0; index < node.entries.length; ++index) { - MapEntry entry = checkMapEntry(node.entries[index], node.keyType, + MapLiteralEntry entry = checkMapEntry(node.entries[index], node.keyType, node.valueType, inferredSpreadTypes, inferredConditionTypes); node.entries[index] = entry..parent = node; }
diff --git a/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart b/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart index 3282aea..06d76b7 100644 --- a/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart +++ b/pkg/front_end/lib/src/fasta/kernel/kernel_ast_api.dart
@@ -47,7 +47,7 @@ ListLiteral, LocalInitializer, Location, - MapEntry, + MapLiteralEntry, MapLiteral, Member, MethodInvocation,
diff --git a/pkg/front_end/lib/src/fasta/kernel/transform_collections.dart b/pkg/front_end/lib/src/fasta/kernel/transform_collections.dart index d017229..60ea42b 100644 --- a/pkg/front_end/lib/src/fasta/kernel/transform_collections.dart +++ b/pkg/front_end/lib/src/fasta/kernel/transform_collections.dart
@@ -459,7 +459,7 @@ } void _translateEntry( - MapEntry entry, + MapLiteralEntry entry, InterfaceType receiverType, DartType keyType, DartType valueType, @@ -480,7 +480,7 @@ } } - void _addNormalEntry(MapEntry entry, InterfaceType receiverType, + void _addNormalEntry(MapLiteralEntry entry, InterfaceType receiverType, VariableDeclaration result, List<Statement> body) { body.add(_createExpressionStatement(_createIndexSet(entry.fileOffset, _createVariableGet(result), receiverType, entry.key, entry.value))); @@ -741,7 +741,7 @@ // If there were no control-flow entries we are done. if (i == node.entries.length) return node; - MapLiteral makeLiteral(int fileOffset, List<MapEntry> entries) { + MapLiteral makeLiteral(int fileOffset, List<MapLiteralEntry> entries) { return _createMapLiteral( fileOffset, node.keyType, node.valueType, entries, isConst: true); @@ -749,13 +749,14 @@ // Build a concatenation node. List<Expression> parts = []; - List<MapEntry> currentPart = i > 0 ? node.entries.sublist(0, i) : null; + List<MapLiteralEntry> currentPart = + i > 0 ? node.entries.sublist(0, i) : null; DartType collectionType = _typeEnvironment.mapType( node.keyType, node.valueType, _currentLibrary.nonNullable); for (; i < node.entries.length; ++i) { - MapEntry entry = node.entries[i]; + MapLiteralEntry entry = node.entries[i]; if (entry is SpreadMapEntry) { if (currentPart != null) { parts.add(makeLiteral(node.fileOffset, currentPart)); @@ -789,7 +790,7 @@ unhandled("${entry.runtimeType}", "_translateConstMap", entry.fileOffset, getFileUri(entry)); } else { - currentPart ??= <MapEntry>[]; + currentPart ??= <MapLiteralEntry>[]; currentPart.add(entry.accept<TreeNode>(this)); } } @@ -846,7 +847,7 @@ } MapLiteral _createMapLiteral(int fileOffset, DartType keyType, - DartType valueType, List<MapEntry> entries, + DartType valueType, List<MapLiteralEntry> entries, {bool isConst: false}) { assert(fileOffset != null); assert(fileOffset != TreeNode.noOffset);
diff --git a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart index 3276b83..0a1c8bb 100644 --- a/pkg/front_end/lib/src/fasta/source/source_library_builder.dart +++ b/pkg/front_end/lib/src/fasta/source/source_library_builder.dart
@@ -16,7 +16,7 @@ import 'package:front_end/src/fasta/dill/dill_library_builder.dart' show DillLibraryBuilder; -import 'package:kernel/ast.dart' hide Combinator, MapEntry; +import 'package:kernel/ast.dart' hide Combinator, MapLiteralEntry; import 'package:kernel/class_hierarchy.dart' show ClassHierarchy;
diff --git a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart index 8111748..ad072b3 100644 --- a/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart +++ b/pkg/front_end/lib/src/fasta/type_inference/type_inferrer.dart
@@ -4,14 +4,12 @@ // @dart = 2.9 -import 'dart:core' hide MapEntry; -import 'dart:core' as core; +import 'dart:core'; import 'package:_fe_analyzer_shared/src/flow_analysis/flow_analysis.dart'; import 'package:_fe_analyzer_shared/src/testing/id.dart'; import 'package:_fe_analyzer_shared/src/util/link.dart'; -import 'package:front_end/src/fasta/kernel/class_hierarchy_builder.dart'; import 'package:kernel/ast.dart'; import 'package:kernel/class_hierarchy.dart' show ClassHierarchy; @@ -286,7 +284,7 @@ if (whyNotPromoted != null && whyNotPromoted.isNotEmpty) { _WhyNotPromotedVisitor whyNotPromotedVisitor = new _WhyNotPromotedVisitor(this); - for (core.MapEntry<DartType, NonPromotionReason> entry + for (MapEntry<DartType, NonPromotionReason> entry in whyNotPromoted.entries) { if (!typeFilter(entry.key)) continue; LocatedMessage message = entry.value.accept(whyNotPromotedVisitor);
diff --git a/pkg/front_end/test/id_tests/why_not_promoted_test.dart b/pkg/front_end/test/id_tests/why_not_promoted_test.dart index 0b0b6ee..d339adc 100644 --- a/pkg/front_end/test/id_tests/why_not_promoted_test.dart +++ b/pkg/front_end/test/id_tests/why_not_promoted_test.dart
@@ -14,7 +14,7 @@ import 'package:front_end/src/fasta/type_inference/type_inference_engine.dart'; import 'package:front_end/src/testing/id_testing_helper.dart'; import 'package:front_end/src/testing/id_testing_utils.dart'; -import 'package:kernel/ast.dart' hide Variance, MapEntry; +import 'package:kernel/ast.dart' hide Variance, MapLiteralEntry; main(List<String> args) async { Directory dataDir = new Directory.fromUri(
diff --git a/pkg/front_end/test/lint_test.status b/pkg/front_end/test/lint_test.status index 4b2a34a..14ac1b5 100644 --- a/pkg/front_end/test/lint_test.status +++ b/pkg/front_end/test/lint_test.status
@@ -36,10 +36,7 @@ front_end/lib/src/fasta/source/scope_listener/Exports: Fail front_end/lib/src/fasta/source/source_class_builder/ImportsTwice: Fail front_end/lib/src/fasta/source/value_kinds/ImportsTwice: Fail -front_end/lib/src/fasta/type_inference/type_inferrer/ImportsTwice: Fail front_end/lib/src/testing/id_testing_helper/Exports: Fail -kernel/lib/ast/ImportsTwice: Fail kernel/lib/ast/Exports: Fail kernel/lib/kernel/Exports: Fail kernel/lib/testing/type_parser_environment/ImportsTwice: Fail -kernel/lib/text/ast_to_text/ImportsTwice: Fail
diff --git a/pkg/front_end/testcases/general/issue45700.dart b/pkg/front_end/testcases/general/issue45700.crash_dart similarity index 100% rename from pkg/front_end/testcases/general/issue45700.dart rename to pkg/front_end/testcases/general/issue45700.crash_dart
diff --git a/pkg/front_end/testcases/general/issue45700.dart.textual_outline.expect b/pkg/front_end/testcases/general/issue45700.crash_dart.textual_outline.expect similarity index 100% rename from pkg/front_end/testcases/general/issue45700.dart.textual_outline.expect rename to pkg/front_end/testcases/general/issue45700.crash_dart.textual_outline.expect
diff --git a/pkg/front_end/testcases/general/issue45700.dart.weak.expect b/pkg/front_end/testcases/general/issue45700.crash_dart.weak.expect similarity index 70% rename from pkg/front_end/testcases/general/issue45700.dart.weak.expect rename to pkg/front_end/testcases/general/issue45700.crash_dart.weak.expect index e33f323..a03c56f 100644 --- a/pkg/front_end/testcases/general/issue45700.dart.weak.expect +++ b/pkg/front_end/testcases/general/issue45700.crash_dart.weak.expect
@@ -2,7 +2,7 @@ // // Problems in library: // -// pkg/front_end/testcases/general/issue45700.dart:5:7: Error: Can't use a function type as supertype. +// pkg/front_end/testcases/general/issue45700.crash_dart:5:7: Error: Can't use a function type as supertype. // mixin M on Function() {} // ^ //
diff --git a/pkg/front_end/testcases/general/issue45700.dart.weak.outline.expect b/pkg/front_end/testcases/general/issue45700.crash_dart.weak.outline.expect similarity index 70% rename from pkg/front_end/testcases/general/issue45700.dart.weak.outline.expect rename to pkg/front_end/testcases/general/issue45700.crash_dart.weak.outline.expect index bca7ff6..2c993ea 100644 --- a/pkg/front_end/testcases/general/issue45700.dart.weak.outline.expect +++ b/pkg/front_end/testcases/general/issue45700.crash_dart.weak.outline.expect
@@ -2,7 +2,7 @@ // // Problems in library: // -// pkg/front_end/testcases/general/issue45700.dart:5:7: Error: Can't use a function type as supertype. +// pkg/front_end/testcases/general/issue45700.crash_dart:5:7: Error: Can't use a function type as supertype. // mixin M on Function() {} // ^ //
diff --git a/pkg/front_end/testcases/general/issue45700.dart.weak.expect b/pkg/front_end/testcases/general/issue45700.crash_dart.weak.transformed.expect similarity index 70% copy from pkg/front_end/testcases/general/issue45700.dart.weak.expect copy to pkg/front_end/testcases/general/issue45700.crash_dart.weak.transformed.expect index e33f323..a03c56f 100644 --- a/pkg/front_end/testcases/general/issue45700.dart.weak.expect +++ b/pkg/front_end/testcases/general/issue45700.crash_dart.weak.transformed.expect
@@ -2,7 +2,7 @@ // // Problems in library: // -// pkg/front_end/testcases/general/issue45700.dart:5:7: Error: Can't use a function type as supertype. +// pkg/front_end/testcases/general/issue45700.crash_dart:5:7: Error: Can't use a function type as supertype. // mixin M on Function() {} // ^ //
diff --git a/pkg/front_end/testcases/general/issue45700.dart.weak.transformed.expect b/pkg/front_end/testcases/general/issue45700.dart.weak.transformed.expect deleted file mode 100644 index e33f323..0000000 --- a/pkg/front_end/testcases/general/issue45700.dart.weak.transformed.expect +++ /dev/null
@@ -1,14 +0,0 @@ -library /*isNonNullableByDefault*/; -// -// Problems in library: -// -// pkg/front_end/testcases/general/issue45700.dart:5:7: Error: Can't use a function type as supertype. -// mixin M on Function() {} -// ^ -// -import self as self; -import "dart:core" as core; - -abstract class M extends core::Object /*isMixinDeclaration*/ { -} -static method main() → void {}
diff --git a/pkg/front_end/testcases/textual_outline.status b/pkg/front_end/testcases/textual_outline.status index ef59299..da0c0e1 100644 --- a/pkg/front_end/testcases/textual_outline.status +++ b/pkg/front_end/testcases/textual_outline.status
@@ -65,7 +65,7 @@ general/issue42997: FormatterCrash general/issue43363: FormatterCrash general/issue45490: FormatterCrash -general/issue45700: FormatterCrash +general/issue45700.crash: FormatterCrash general/many_errors: FormatterCrash general/null_safety_invalid_experiment: FormatterCrash general/null_safety_invalid_experiment_and_language_version: FormatterCrash
diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart index 029f7b9..9f0dc34 100644 --- a/pkg/kernel/lib/ast.dart +++ b/pkg/kernel/lib/ast.dart
@@ -65,7 +65,6 @@ library kernel.ast; import 'dart:core'; -import 'dart:core' as core show MapEntry; import 'dart:collection' show ListBase; import 'dart:convert' show utf8; @@ -7892,7 +7891,7 @@ bool isConst; DartType keyType; // Not null, defaults to DynamicType. DartType valueType; // Not null, defaults to DynamicType. - final List<MapEntry> entries; + final List<MapLiteralEntry> entries; MapLiteral(this.entries, {this.keyType: const DynamicType(), @@ -7968,20 +7967,21 @@ } } -class MapEntry extends TreeNode { +class MapLiteralEntry extends TreeNode { Expression key; Expression value; - MapEntry(this.key, this.value) { + MapLiteralEntry(this.key, this.value) { key.parent = this; value.parent = this; } @override - R accept<R>(TreeVisitor<R> v) => v.visitMapEntry(this); + R accept<R>(TreeVisitor<R> v) => v.visitMapLiteralEntry(this); @override - R accept1<R, A>(TreeVisitor1<R, A> v, A arg) => v.visitMapEntry(this, arg); + R accept1<R, A>(TreeVisitor1<R, A> v, A arg) => + v.visitMapLiteralEntry(this, arg); @override void visitChildren(Visitor v) { @@ -12954,7 +12954,7 @@ /// can't have metadata attached to them. Also, metadata is not saved on /// Block nodes inside BlockExpressions. static bool isSupported(Node node) { - return !(node is MapEntry || + return !(node is MapLiteralEntry || node is Catch || (node is Block && node.parent is BlockExpression)); } @@ -13324,7 +13324,7 @@ // `-1` is used as a dummy default value. -1); int i = 0; - for (core.MapEntry entry in map.entries) { + for (MapEntry entry in map.entries) { entryHashes[i++] = combine(entry.key.hashCode, entry.value.hashCode); } entryHashes.sort(); @@ -13733,12 +13733,13 @@ /// constructor. final TypeParameter dummyTypeParameter = new TypeParameter(); -/// Non-nullable [MapEntry] dummy value. +/// Non-nullable [MapLiteralEntry] dummy value. /// /// This is used as the removal sentinel in [RemovingTransformer] and can be /// used for instance as a dummy initial value for the `List.filled` /// constructor. -final MapEntry dummyMapEntry = new MapEntry(dummyExpression, dummyExpression); +final MapLiteralEntry dummyMapLiteralEntry = + new MapLiteralEntry(dummyExpression, dummyExpression); /// Non-nullable [Arguments] dummy value. ///
diff --git a/pkg/kernel/lib/binary/ast_from_binary.dart b/pkg/kernel/lib/binary/ast_from_binary.dart index adc7012..2f49538 100644 --- a/pkg/kernel/lib/binary/ast_from_binary.dart +++ b/pkg/kernel/lib/binary/ast_from_binary.dart
@@ -2496,14 +2496,14 @@ return new ConstantExpression(constant, type)..fileOffset = offset; } - List<MapEntry> readMapEntryList() { + List<MapLiteralEntry> readMapEntryList() { int length = readUInt30(); - return new List<MapEntry>.generate(length, (_) => readMapEntry(), + return new List<MapLiteralEntry>.generate(length, (_) => readMapEntry(), growable: useGrowableLists); } - MapEntry readMapEntry() { - return new MapEntry(readExpression(), readExpression()); + MapLiteralEntry readMapEntry() { + return new MapLiteralEntry(readExpression(), readExpression()); } List<Statement> readStatementList() {
diff --git a/pkg/kernel/lib/binary/ast_to_binary.dart b/pkg/kernel/lib/binary/ast_to_binary.dart index c2c35282..7252dcc 100644 --- a/pkg/kernel/lib/binary/ast_to_binary.dart +++ b/pkg/kernel/lib/binary/ast_to_binary.dart
@@ -1932,7 +1932,7 @@ } @override - void visitMapEntry(MapEntry node) { + void visitMapLiteralEntry(MapLiteralEntry node) { // Note: there is no tag on MapEntry writeNode(node.key); writeNode(node.value);
diff --git a/pkg/kernel/lib/class_hierarchy.dart b/pkg/kernel/lib/class_hierarchy.dart index 09d259d..e1a99a8 100644 --- a/pkg/kernel/lib/class_hierarchy.dart +++ b/pkg/kernel/lib/class_hierarchy.dart
@@ -8,7 +8,7 @@ import 'dart:math'; import 'dart:typed_data'; -import 'ast.dart' hide MapEntry; +import 'ast.dart'; import 'core_types.dart'; import 'type_algebra.dart'; import 'src/heap.dart';
diff --git a/pkg/kernel/lib/clone.dart b/pkg/kernel/lib/clone.dart index 62b04d9..da80fd1 100644 --- a/pkg/kernel/lib/clone.dart +++ b/pkg/kernel/lib/clone.dart
@@ -317,8 +317,8 @@ isConst: node.isConst); } - visitMapEntry(MapEntry node) { - return new MapEntry(clone(node.key), clone(node.value)); + visitMapLiteralEntry(MapLiteralEntry node) { + return new MapLiteralEntry(clone(node.key), clone(node.value)); } visitAwaitExpression(AwaitExpression node) {
diff --git a/pkg/kernel/lib/src/bounds_checks.dart b/pkg/kernel/lib/src/bounds_checks.dart index d1cdd54..b3e9a44 100644 --- a/pkg/kernel/lib/src/bounds_checks.dart +++ b/pkg/kernel/lib/src/bounds_checks.dart
@@ -4,7 +4,7 @@ import 'package:kernel/src/replacement_visitor.dart'; -import '../ast.dart' hide MapEntry; +import '../ast.dart'; import '../type_algebra.dart' show Substitution, substitute;
diff --git a/pkg/kernel/lib/src/printer.dart b/pkg/kernel/lib/src/printer.dart index b184440..3d28d32 100644 --- a/pkg/kernel/lib/src/printer.dart +++ b/pkg/kernel/lib/src/printer.dart
@@ -223,7 +223,7 @@ node.toTextInternal(this); } - void writeMapEntry(MapEntry node) { + void writeMapEntry(MapLiteralEntry node) { node.toTextInternal(this); }
diff --git a/pkg/kernel/lib/text/ast_to_text.dart b/pkg/kernel/lib/text/ast_to_text.dart index 5066b0a..dc1c1d6 100644 --- a/pkg/kernel/lib/text/ast_to_text.dart +++ b/pkg/kernel/lib/text/ast_to_text.dart
@@ -4,9 +4,7 @@ library kernel.ast_to_text; -import 'dart:core' hide MapEntry; -import 'dart:core' as core show MapEntry; - +import 'dart:core'; import 'dart:convert' show json; import '../ast.dart'; @@ -1787,7 +1785,7 @@ writeSymbol('}'); } - visitMapEntry(MapEntry node) { + visitMapLiteralEntry(MapLiteralEntry node) { writeExpression(node.key); writeComma(':'); writeExpression(node.value); @@ -2636,8 +2634,7 @@ } writeSymbol(' {'); - writeList(node.fieldValues.entries, - (core.MapEntry<Reference, Constant> entry) { + writeList(node.fieldValues.entries, (MapEntry<Reference, Constant> entry) { if (entry.key.node != null) { writeWord('${entry.key.asField.name.text}'); } else {
diff --git a/pkg/kernel/lib/text/text_serializer.dart b/pkg/kernel/lib/text/text_serializer.dart index ac705f2..a9ddadc 100644 --- a/pkg/kernel/lib/text/text_serializer.dart +++ b/pkg/kernel/lib/text/text_serializer.dart
@@ -372,7 +372,7 @@ List<Expression> entries = new List.filled(2 * expression.entries.length, dummyExpression); for (int from = 0, to = 0; from < expression.entries.length; ++from) { - MapEntry entry = expression.entries[from]; + MapLiteralEntry entry = expression.entries[from]; entries[to++] = entry.key; entries[to++] = entry.value; } @@ -380,10 +380,10 @@ } MapLiteral wrapMapLiteral(Tuple3<DartType, DartType, List<Expression>> tuple) { - List<MapEntry> entries = - new List.filled(tuple.third.length ~/ 2, dummyMapEntry); + List<MapLiteralEntry> entries = + new List.filled(tuple.third.length ~/ 2, dummyMapLiteralEntry); for (int from = 0, to = 0; to < entries.length; ++to) { - entries[to] = new MapEntry(tuple.third[from++], tuple.third[from++]); + entries[to] = new MapLiteralEntry(tuple.third[from++], tuple.third[from++]); } return new MapLiteral(entries, keyType: tuple.first, valueType: tuple.second, isConst: false); @@ -397,10 +397,10 @@ MapLiteral wrapConstMapLiteral( Tuple3<DartType, DartType, List<Expression>> tuple) { - List<MapEntry> entries = - new List.filled(tuple.third.length ~/ 2, dummyMapEntry); + List<MapLiteralEntry> entries = + new List.filled(tuple.third.length ~/ 2, dummyMapLiteralEntry); for (int from = 0, to = 0; to < entries.length; ++to) { - entries[to] = new MapEntry(tuple.third[from++], tuple.third[from++]); + entries[to] = new MapLiteralEntry(tuple.third[from++], tuple.third[from++]); } return new MapLiteral(entries, keyType: tuple.first, valueType: tuple.second, isConst: true);
diff --git a/pkg/kernel/lib/type_checker.dart b/pkg/kernel/lib/type_checker.dart index d078850..e8fa6a3 100644 --- a/pkg/kernel/lib/type_checker.dart +++ b/pkg/kernel/lib/type_checker.dart
@@ -550,7 +550,7 @@ @override DartType visitMapLiteral(MapLiteral node) { - for (MapEntry entry in node.entries) { + for (MapLiteralEntry entry in node.entries) { entry.key = checkAndDowncastExpression(entry.key, node.keyType); entry.value = checkAndDowncastExpression(entry.value, node.valueType); }
diff --git a/pkg/kernel/lib/visitor.dart b/pkg/kernel/lib/visitor.dart index c40fde0..b9ca9ac 100644 --- a/pkg/kernel/lib/visitor.dart +++ b/pkg/kernel/lib/visitor.dart
@@ -319,7 +319,7 @@ R visitNamedExpression(NamedExpression node) => defaultTreeNode(node); R visitSwitchCase(SwitchCase node) => defaultTreeNode(node); R visitCatch(Catch node) => defaultTreeNode(node); - R visitMapEntry(MapEntry node) => defaultTreeNode(node); + R visitMapLiteralEntry(MapLiteralEntry node) => defaultTreeNode(node); R visitComponent(Component node) => defaultTreeNode(node); } @@ -510,7 +510,8 @@ defaultTreeNode(node, arg); R visitSwitchCase(SwitchCase node, A arg) => defaultTreeNode(node, arg); R visitCatch(Catch node, A arg) => defaultTreeNode(node, arg); - R visitMapEntry(MapEntry node, A arg) => defaultTreeNode(node, arg); + R visitMapLiteralEntry(MapLiteralEntry node, A arg) => + defaultTreeNode(node, arg); R visitComponent(Component node, A arg) => defaultTreeNode(node, arg); } @@ -1354,12 +1355,13 @@ transformList(nodes, parent, dummyNamedExpression); } - /// Transforms or removes [MapEntry] nodes in [nodes] as children of [parent]. + /// Transforms or removes [MapLiteralEntry] nodes in [nodes] as children of + /// [parent]. /// /// This is convenience method for calling [transformList] with removal - /// sentinel for [MapEntry] nodes. - void transformMapEntryList(List<MapEntry> nodes, TreeNode parent) { - transformList(nodes, parent, dummyMapEntry); + /// sentinel for [MapLiteralEntry] nodes. + void transformMapEntryList(List<MapLiteralEntry> nodes, TreeNode parent) { + transformList(nodes, parent, dummyMapLiteralEntry); } /// Transforms or removes [Statement] nodes in [nodes] as children of
diff --git a/pkg/vm/lib/target/vm.dart b/pkg/vm/lib/target/vm.dart index d80ff52..815f38d 100644 --- a/pkg/vm/lib/target/vm.dart +++ b/pkg/vm/lib/target/vm.dart
@@ -234,9 +234,9 @@ new StaticInvocation( coreTypes.mapUnmodifiable, new Arguments([ - new MapLiteral(new List<MapEntry>.from( + new MapLiteral(new List<MapLiteralEntry>.from( arguments.named.map((NamedExpression arg) { - return new MapEntry( + return new MapLiteralEntry( new SymbolLiteral(arg.name)..fileOffset = arg.fileOffset, arg.value) ..fileOffset = arg.fileOffset;
diff --git a/pkg/vm/lib/transformations/ffi.dart b/pkg/vm/lib/transformations/ffi.dart index b6c00a8..3012c7a 100644 --- a/pkg/vm/lib/transformations/ffi.dart +++ b/pkg/vm/lib/transformations/ffi.dart
@@ -7,7 +7,7 @@ library vm.transformations.ffi; -import 'package:kernel/ast.dart' hide MapEntry; +import 'package:kernel/ast.dart'; import 'package:kernel/class_hierarchy.dart' show ClassHierarchy; import 'package:kernel/core_types.dart'; import 'package:kernel/library_index.dart' show LibraryIndex;
diff --git a/pkg/vm/lib/transformations/ffi_definitions.dart b/pkg/vm/lib/transformations/ffi_definitions.dart index beed450..9225204 100644 --- a/pkg/vm/lib/transformations/ffi_definitions.dart +++ b/pkg/vm/lib/transformations/ffi_definitions.dart
@@ -23,7 +23,7 @@ templateFfiSizeAnnotationDimensions, templateFfiStructGeneric; -import 'package:kernel/ast.dart' hide MapEntry; +import 'package:kernel/ast.dart'; import 'package:kernel/class_hierarchy.dart' show ClassHierarchy; import 'package:kernel/core_types.dart'; import 'package:kernel/library_index.dart' show LibraryIndex;
diff --git a/pkg/vm/lib/transformations/type_flow/summary.dart b/pkg/vm/lib/transformations/type_flow/summary.dart index 20ad897..b8033f9 100644 --- a/pkg/vm/lib/transformations/type_flow/summary.dart +++ b/pkg/vm/lib/transformations/type_flow/summary.dart
@@ -7,7 +7,8 @@ import 'dart:core' hide Type; -import 'package:kernel/ast.dart' hide Statement, StatementVisitor, MapEntry; +import 'package:kernel/ast.dart' + hide Statement, StatementVisitor, MapLiteralEntry; import 'calls.dart'; import 'types.dart';
diff --git a/tools/VERSION b/tools/VERSION index c93e31d..968abde 100644 --- a/tools/VERSION +++ b/tools/VERSION
@@ -27,5 +27,5 @@ MAJOR 2 MINOR 14 PATCH 0 -PRERELEASE 48 +PRERELEASE 49 PRERELEASE_PATCH 0 \ No newline at end of file