Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(658)

Side by Side Diff: pkg/compiler/lib/src/resolution/members.dart

Issue 949733003: Share the JavaScript based LinkedHashMap implementation between constant maps and the LinkedHashMap… (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of resolution; 5 part of resolution;
6 6
7 abstract class TreeElements { 7 abstract class TreeElements {
8 AnalyzableElement get analyzedElement; 8 AnalyzableElement get analyzedElement;
9 Iterable<Node> get superUses; 9 Iterable<Node> get superUses;
10 10
(...skipping 3698 matching lines...) Expand 10 before | Expand all | Expand 10 after
3709 mapType = new InterfaceType(compiler.mapClass, 3709 mapType = new InterfaceType(compiler.mapClass,
3710 [keyTypeArgument, valueTypeArgument]); 3710 [keyTypeArgument, valueTypeArgument]);
3711 } else { 3711 } else {
3712 compiler.mapClass.computeType(compiler); 3712 compiler.mapClass.computeType(compiler);
3713 mapType = compiler.mapClass.rawType; 3713 mapType = compiler.mapClass.rawType;
3714 } 3714 }
3715 if (node.isConst && mapType.containsTypeVariables) { 3715 if (node.isConst && mapType.containsTypeVariables) {
3716 compiler.reportError(arguments, 3716 compiler.reportError(arguments,
3717 MessageKind.TYPE_VARIABLE_IN_CONSTANT); 3717 MessageKind.TYPE_VARIABLE_IN_CONSTANT);
3718 } 3718 }
3719 registry.setType(node, mapType); 3719 registry.registerMapLiteral(node, mapType, node.isConst);
3720 registry.registerInstantiatedType(mapType);
3721 if (node.isConst) {
3722 registry.registerConstantMap();
3723 }
3724 registry.registerRequiredType(mapType, enclosingElement); 3720 registry.registerRequiredType(mapType, enclosingElement);
3725 node.visitChildren(this); 3721 node.visitChildren(this);
3726 if (node.isConst) { 3722 if (node.isConst) {
3727 analyzeConstantDeferred(node); 3723 analyzeConstantDeferred(node);
3728 } 3724 }
3729 3725
3730 sendIsMemberAccess = false; 3726 sendIsMemberAccess = false;
3731 } 3727 }
3732 3728
3733 visitLiteralMapEntry(LiteralMapEntry node) { 3729 visitLiteralMapEntry(LiteralMapEntry node) {
(...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after
5053 } 5049 }
5054 5050
5055 /// The result for the resolution of the `assert` method. 5051 /// The result for the resolution of the `assert` method.
5056 class AssertResult implements ResolutionResult { 5052 class AssertResult implements ResolutionResult {
5057 const AssertResult(); 5053 const AssertResult();
5058 5054
5059 Element get element => null; 5055 Element get element => null;
5060 5056
5061 String toString() => 'AssertResult()'; 5057 String toString() => 'AssertResult()';
5062 } 5058 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698