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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/universe/function_set.dart

Issue 23353002: Fix receiver refining optimization in the presence of null: any Object method can be called on the … (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 4 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 universe; 5 part of universe;
6 6
7 // TODO(kasperl): This actually holds getters and setters just fine 7 // TODO(kasperl): This actually holds getters and setters just fine
8 // too and stricly they aren't functions. Maybe this needs a better 8 // too and stricly they aren't functions. Maybe this needs a better
9 // name -- something like ElementSet seems a bit too generic. 9 // name -- something like ElementSet seems a bit too generic.
10 class FunctionSet { 10 class FunctionSet {
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 TypeMask computeMask(Compiler compiler) { 213 TypeMask computeMask(Compiler compiler) {
214 if (_mask != null) return _mask; 214 if (_mask != null) return _mask;
215 return _mask = new TypeMask.unionOf(functions 215 return _mask = new TypeMask.unionOf(functions
216 .expand((element) { 216 .expand((element) {
217 ClassElement cls = element.getEnclosingClass(); 217 ClassElement cls = element.getEnclosingClass();
218 return compiler.world.isUsedAsMixin(cls) 218 return compiler.world.isUsedAsMixin(cls)
219 ? ([cls]..addAll(compiler.world.mixinUses[cls])) 219 ? ([cls]..addAll(compiler.world.mixinUses[cls]))
220 : [cls]; 220 : [cls];
221 }) 221 })
222 .map((cls) { 222 .map((cls) {
223 if (compiler.backend.isNullImplementation(cls)) {
224 return const TypeMask.empty();
225 }
223 return compiler.world.hasSubclasses(cls) 226 return compiler.world.hasSubclasses(cls)
224 ? new TypeMask.nonNullSubclass(cls.rawType) 227 ? new TypeMask.nonNullSubclass(cls.rawType)
225 : new TypeMask.nonNullExact(cls.rawType); 228 : new TypeMask.nonNullExact(cls.rawType);
226 }), 229 }),
227 compiler); 230 compiler);
228 } 231 }
229 232
230 FullFunctionSetQuery(functions) : super(functions); 233 FullFunctionSetQuery(functions) : super(functions);
231 } 234 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/types/type_mask.dart ('k') | sdk/lib/_internal/lib/interceptors.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698