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

Side by Side Diff: pkg/compiler/lib/src/elements/modelx.dart

Issue 723523003: Avoid emmitting is test for Function if superclass already has it. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: spelling fixes. Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 elements.modelx; 5 library elements.modelx;
6 6
7 import 'elements.dart'; 7 import 'elements.dart';
8 import '../constants/expressions.dart'; 8 import '../constants/expressions.dart';
9 import '../helpers/helpers.dart'; // Included for debug helpers. 9 import '../helpers/helpers.dart'; // Included for debug helpers.
10 import '../tree/tree.dart'; 10 import '../tree/tree.dart';
(...skipping 2267 matching lines...) Expand 10 before | Expand all | Expand 10 after
2278 } 2278 }
2279 } 2279 }
2280 2280
2281 forEachMember(fieldFilter); 2281 forEachMember(fieldFilter);
2282 } 2282 }
2283 2283
2284 void forEachBackendMember(void f(Element member)) { 2284 void forEachBackendMember(void f(Element member)) {
2285 backendMembers.forEach(f); 2285 backendMembers.forEach(f);
2286 } 2286 }
2287 2287
2288 bool implementsFunction(Compiler compiler) {
2289 return asInstanceOf(compiler.functionClass) != null || callType != null;
2290 }
2291
2288 bool implementsInterface(ClassElement intrface) { 2292 bool implementsInterface(ClassElement intrface) {
2289 for (DartType implementedInterfaceType in allSupertypes) { 2293 for (DartType implementedInterfaceType in allSupertypes) {
2290 ClassElement implementedInterface = implementedInterfaceType.element; 2294 ClassElement implementedInterface = implementedInterfaceType.element;
2291 if (identical(implementedInterface, intrface)) { 2295 if (identical(implementedInterface, intrface)) {
2292 return true; 2296 return true;
2293 } 2297 }
2294 } 2298 }
2295 return false; 2299 return false;
2296 } 2300 }
2297 2301
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after
2712 AstElement get definingElement; 2716 AstElement get definingElement;
2713 2717
2714 bool get hasResolvedAst => definingElement.hasTreeElements; 2718 bool get hasResolvedAst => definingElement.hasTreeElements;
2715 2719
2716 ResolvedAst get resolvedAst { 2720 ResolvedAst get resolvedAst {
2717 return new ResolvedAst(declaration, 2721 return new ResolvedAst(declaration,
2718 definingElement.node, definingElement.treeElements); 2722 definingElement.node, definingElement.treeElements);
2719 } 2723 }
2720 2724
2721 } 2725 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/elements/elements.dart ('k') | pkg/compiler/lib/src/js_emitter/old_emitter/type_test_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698