| OLD | NEW |
| 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 typedef void Recompile(Element element); | 5 typedef void Recompile(Element element); |
| 6 | 6 |
| 7 class ReturnInfo { | 7 class ReturnInfo { |
| 8 HType returnType; | 8 HType returnType; |
| 9 List<Element> compiledFunctions; | 9 List<Element> compiledFunctions; |
| 10 | 10 |
| (...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 695 } else if (element == compiler.doubleClass) { | 695 } else if (element == compiler.doubleClass) { |
| 696 return const SourceString('doubleTypeCheck'); | 696 return const SourceString('doubleTypeCheck'); |
| 697 } else if (element == compiler.numClass) { | 697 } else if (element == compiler.numClass) { |
| 698 return const SourceString('numTypeCheck'); | 698 return const SourceString('numTypeCheck'); |
| 699 } else if (element == compiler.boolClass) { | 699 } else if (element == compiler.boolClass) { |
| 700 return const SourceString('boolTypeCheck'); | 700 return const SourceString('boolTypeCheck'); |
| 701 } else if (element == compiler.functionClass || element.isTypedef()) { | 701 } else if (element == compiler.functionClass || element.isTypedef()) { |
| 702 return const SourceString('functionTypeCheck'); | 702 return const SourceString('functionTypeCheck'); |
| 703 } else if (element == compiler.intClass) { | 703 } else if (element == compiler.intClass) { |
| 704 return const SourceString('intTypeCheck'); | 704 return const SourceString('intTypeCheck'); |
| 705 } else if (Elements.isStringSupertype(element, compiler)) { | 705 } else if (Elements.isNumberOrStringSupertype(element, compiler)) { |
| 706 if (nativeCheck) { | 706 return nativeCheck |
| 707 return const SourceString('stringSuperNativeTypeCheck'); | 707 ? const SourceString('numberOrStringSuperNativeTypeCheck') |
| 708 } else { | 708 : const SourceString('numberOrStringSuperTypeCheck'); |
| 709 return const SourceString('stringSuperTypeCheck'); | 709 } else if (Elements.isStringOnlySupertype(element, compiler)) { |
| 710 } | 710 return nativeCheck |
| 711 ? const SourceString('stringSuperNativeTypeCheck') |
| 712 : const SourceString('stringSuperTypeCheck'); |
| 711 } else if (element === compiler.listClass) { | 713 } else if (element === compiler.listClass) { |
| 712 return const SourceString('listTypeCheck'); | 714 return const SourceString('listTypeCheck'); |
| 713 } else { | 715 } else { |
| 714 if (Elements.isListSupertype(element, compiler)) { | 716 if (Elements.isListSupertype(element, compiler)) { |
| 715 if (nativeCheck) { | 717 return nativeCheck |
| 716 return const SourceString('listSuperNativeTypeCheck'); | 718 ? const SourceString('listSuperNativeTypeCheck') |
| 717 } else { | 719 : const SourceString('listSuperTypeCheck'); |
| 718 return const SourceString('listSuperTypeCheck'); | |
| 719 } | |
| 720 } else if (nativeCheck) { | |
| 721 return const SourceString('callTypeCheck'); | |
| 722 } else { | 720 } else { |
| 723 return const SourceString('propertyTypeCheck'); | 721 return nativeCheck |
| 722 ? const SourceString('callTypeCheck') |
| 723 : const SourceString('propertyTypeCheck'); |
| 724 } | 724 } |
| 725 } | 725 } |
| 726 } | 726 } |
| 727 } | 727 } |
| OLD | NEW |