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

Side by Side Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 1020853007: Don't bailout of type inference for simple NSM implementations (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 js_backend; 5 part of js_backend;
6 6
7 const VERBOSE_OPTIMIZER_HINTS = false; 7 const VERBOSE_OPTIMIZER_HINTS = false;
8 8
9 const bool USE_CPS_IR = const bool.fromEnvironment("USE_CPS_IR"); 9 const bool USE_CPS_IR = const bool.fromEnvironment("USE_CPS_IR");
10 10
(...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after
1268 1268
1269 void registerClassUsingVariableExpression(ClassElement cls) { 1269 void registerClassUsingVariableExpression(ClassElement cls) {
1270 rti.classesUsingTypeVariableExpression.add(cls); 1270 rti.classesUsingTypeVariableExpression.add(cls);
1271 } 1271 }
1272 1272
1273 bool classNeedsRti(ClassElement cls) { 1273 bool classNeedsRti(ClassElement cls) {
1274 return rti.classesNeedingRti.contains(cls.declaration) || 1274 return rti.classesNeedingRti.contains(cls.declaration) ||
1275 compiler.enabledRuntimeType; 1275 compiler.enabledRuntimeType;
1276 } 1276 }
1277 1277
1278 bool isDefaultNoSuchMethodImplementation(Element element) { 1278 bool isComplexNoSuchMethod(FunctionElement element) =>
1279 assert(element.name == Compiler.NO_SUCH_METHOD); 1279 noSuchMethodRegistry.isComplex(element);
1280 ClassElement classElement = element.enclosingClass;
1281 return classElement == compiler.objectClass
1282 || classElement == jsInterceptorClass
1283 || classElement == jsNullClass;
1284 }
1285 1280
1286 bool isDefaultEqualityImplementation(Element element) { 1281 bool isDefaultEqualityImplementation(Element element) {
1287 assert(element.name == '=='); 1282 assert(element.name == '==');
1288 ClassElement classElement = element.enclosingClass; 1283 ClassElement classElement = element.enclosingClass;
1289 return classElement == compiler.objectClass 1284 return classElement == compiler.objectClass
1290 || classElement == jsInterceptorClass 1285 || classElement == jsInterceptorClass
1291 || classElement == jsNullClass; 1286 || classElement == jsNullClass;
1292 } 1287 }
1293 1288
1294 bool methodNeedsRti(FunctionElement function) { 1289 bool methodNeedsRti(FunctionElement function) {
(...skipping 1568 matching lines...) Expand 10 before | Expand all | Expand 10 after
2863 } 2858 }
2864 } 2859 }
2865 2860
2866 /// Records that [constant] is used by the element behind [registry]. 2861 /// Records that [constant] is used by the element behind [registry].
2867 class Dependency { 2862 class Dependency {
2868 final ConstantValue constant; 2863 final ConstantValue constant;
2869 final Element annotatedElement; 2864 final Element annotatedElement;
2870 2865
2871 const Dependency(this.constant, this.annotatedElement); 2866 const Dependency(this.constant, this.annotatedElement);
2872 } 2867 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/inferrer/type_graph_nodes.dart ('k') | pkg/compiler/lib/src/js_backend/no_such_method_registry.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698