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

Unified Diff: lib/compiler/implementation/js_backend/backend.dart

Issue 10916172: num implements Comparable and Hashable. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/compiler/implementation/elements/elements.dart ('k') | lib/compiler/implementation/lib/js_helper.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/js_backend/backend.dart
===================================================================
--- lib/compiler/implementation/js_backend/backend.dart (revision 12035)
+++ lib/compiler/implementation/js_backend/backend.dart (working copy)
@@ -702,25 +702,25 @@
return const SourceString('functionTypeCheck');
} else if (element == compiler.intClass) {
return const SourceString('intTypeCheck');
- } else if (Elements.isStringSupertype(element, compiler)) {
- if (nativeCheck) {
- return const SourceString('stringSuperNativeTypeCheck');
- } else {
- return const SourceString('stringSuperTypeCheck');
- }
+ } else if (Elements.isNumberOrStringSupertype(element, compiler)) {
+ return nativeCheck
+ ? const SourceString('numberOrStringSuperNativeTypeCheck')
+ : const SourceString('numberOrStringSuperTypeCheck');
+ } else if (Elements.isStringOnlySupertype(element, compiler)) {
+ return nativeCheck
+ ? const SourceString('stringSuperNativeTypeCheck')
+ : const SourceString('stringSuperTypeCheck');
} else if (element === compiler.listClass) {
return const SourceString('listTypeCheck');
} else {
if (Elements.isListSupertype(element, compiler)) {
- if (nativeCheck) {
- return const SourceString('listSuperNativeTypeCheck');
- } else {
- return const SourceString('listSuperTypeCheck');
- }
- } else if (nativeCheck) {
- return const SourceString('callTypeCheck');
+ return nativeCheck
+ ? const SourceString('listSuperNativeTypeCheck')
+ : const SourceString('listSuperTypeCheck');
} else {
- return const SourceString('propertyTypeCheck');
+ return nativeCheck
+ ? const SourceString('callTypeCheck')
+ : const SourceString('propertyTypeCheck');
}
}
}
« no previous file with comments | « lib/compiler/implementation/elements/elements.dart ('k') | lib/compiler/implementation/lib/js_helper.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698