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

Side by Side Diff: pkg/compiler/lib/src/closure.dart

Issue 1431513010: Revert "Normalize type masks to use the least upper instantiated subclass/type." (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/type_mask_system.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 library closureToClassMapper; 5 library closureToClassMapper;
6 6
7 import 'common.dart'; 7 import 'common.dart';
8 import 'common/names.dart' show 8 import 'common/names.dart' show
9 Identifiers; 9 Identifiers;
10 import 'common/resolution.dart' show 10 import 'common/resolution.dart' show
(...skipping 980 matching lines...) Expand 10 before | Expand all | Expand 10 after
991 return sb.toString(); 991 return sb.toString();
992 } 992 }
993 993
994 JavaScriptBackend get backend => compiler.backend; 994 JavaScriptBackend get backend => compiler.backend;
995 995
996 ClosureClassMap globalizeClosure(FunctionExpression node, 996 ClosureClassMap globalizeClosure(FunctionExpression node,
997 LocalFunctionElement element) { 997 LocalFunctionElement element) {
998 String closureName = computeClosureName(element); 998 String closureName = computeClosureName(element);
999 ClosureClassElement globalizedElement = new ClosureClassElement( 999 ClosureClassElement globalizedElement = new ClosureClassElement(
1000 node, closureName, compiler, element); 1000 node, closureName, compiler, element);
1001 // Extend [globalizedElement] as an instantiated class in the closed world.
1002 compiler.world.registerClass(
1003 globalizedElement, isDirectlyInstantiated: true);
1004 FunctionElement callElement = 1001 FunctionElement callElement =
1005 new SynthesizedCallMethodElementX(Identifiers.call, 1002 new SynthesizedCallMethodElementX(Identifiers.call,
1006 element, 1003 element,
1007 globalizedElement); 1004 globalizedElement);
1008 backend.maybeMarkClosureAsNeededForReflection( 1005 backend.maybeMarkClosureAsNeededForReflection(
1009 globalizedElement, callElement, element); 1006 globalizedElement, callElement, element);
1010 MemberElement enclosing = element.memberContext; 1007 MemberElement enclosing = element.memberContext;
1011 enclosing.nestedClosures.add(callElement); 1008 enclosing.nestedClosures.add(callElement);
1012 globalizedElement.addMember(callElement, reporter); 1009 globalizedElement.addMember(callElement, reporter);
1013 globalizedElement.computeAllClassMembers(compiler); 1010 globalizedElement.computeAllClassMembers(compiler);
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
1130 1127
1131 String get name => typeVariable.name; 1128 String get name => typeVariable.name;
1132 1129
1133 int get hashCode => typeVariable.hashCode; 1130 int get hashCode => typeVariable.hashCode;
1134 1131
1135 bool operator ==(other) { 1132 bool operator ==(other) {
1136 if (other is! TypeVariableLocal) return false; 1133 if (other is! TypeVariableLocal) return false;
1137 return typeVariable == other.typeVariable; 1134 return typeVariable == other.typeVariable;
1138 } 1135 }
1139 } 1136 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/type_mask_system.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698