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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart

Issue 15735003: Use assertSubtype for lists. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add test. Created 7 years, 7 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
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/builder.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 part of js_backend; 5 part of js_backend;
6 6
7 typedef void Recompile(Element element); 7 typedef void Recompile(Element element);
8 8
9 class ReturnInfo { 9 class ReturnInfo {
10 HType returnType; 10 HType returnType;
(...skipping 1671 matching lines...) Expand 10 before | Expand all | Expand 10 after
1682 } else if (Elements.isStringOnlySupertype(element, compiler)) { 1682 } else if (Elements.isStringOnlySupertype(element, compiler)) {
1683 if (nativeCheck) { 1683 if (nativeCheck) {
1684 return typeCast 1684 return typeCast
1685 ? const SourceString("stringSuperNativeTypeCast") 1685 ? const SourceString("stringSuperNativeTypeCast")
1686 : const SourceString('stringSuperNativeTypeCheck'); 1686 : const SourceString('stringSuperNativeTypeCheck');
1687 } else { 1687 } else {
1688 return typeCast 1688 return typeCast
1689 ? const SourceString("stringSuperTypeCast") 1689 ? const SourceString("stringSuperTypeCast")
1690 : const SourceString('stringSuperTypeCheck'); 1690 : const SourceString('stringSuperTypeCheck');
1691 } 1691 }
1692 } else if (element == compiler.listClass || element == jsArrayClass) { 1692 } else if ((element == compiler.listClass || element == jsArrayClass) &&
1693 type.isRaw) {
1693 if (nativeCheckOnly) return null; 1694 if (nativeCheckOnly) return null;
1694 return typeCast 1695 return typeCast
1695 ? const SourceString("listTypeCast") 1696 ? const SourceString("listTypeCast")
1696 : const SourceString('listTypeCheck'); 1697 : const SourceString('listTypeCheck');
1697 } else { 1698 } else {
1698 if (Elements.isListSupertype(element, compiler)) { 1699 if (Elements.isListSupertype(element, compiler)) {
1699 if (nativeCheck) { 1700 if (nativeCheck) {
1700 return typeCast 1701 return typeCast
1701 ? const SourceString("listSuperNativeTypeCast") 1702 ? const SourceString("listSuperNativeTypeCast")
1702 : const SourceString('listSuperNativeTypeCheck'); 1703 : const SourceString('listSuperNativeTypeCheck');
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1865 ClassElement get listImplementation => jsArrayClass; 1866 ClassElement get listImplementation => jsArrayClass;
1866 ClassElement get constListImplementation => jsArrayClass; 1867 ClassElement get constListImplementation => jsArrayClass;
1867 ClassElement get fixedListImplementation => jsFixedArrayClass; 1868 ClassElement get fixedListImplementation => jsFixedArrayClass;
1868 ClassElement get growableListImplementation => jsExtendableArrayClass; 1869 ClassElement get growableListImplementation => jsExtendableArrayClass;
1869 ClassElement get mapImplementation => mapLiteralClass; 1870 ClassElement get mapImplementation => mapLiteralClass;
1870 ClassElement get constMapImplementation => constMapLiteralClass; 1871 ClassElement get constMapImplementation => constMapLiteralClass;
1871 ClassElement get typeImplementation => typeLiteralClass; 1872 ClassElement get typeImplementation => typeLiteralClass;
1872 ClassElement get boolImplementation => jsBoolClass; 1873 ClassElement get boolImplementation => jsBoolClass;
1873 ClassElement get nullImplementation => jsNullClass; 1874 ClassElement get nullImplementation => jsNullClass;
1874 } 1875 }
OLDNEW
« no previous file with comments | « no previous file | sdk/lib/_internal/compiler/implementation/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698