Chromium Code Reviews| 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) { | |
|
kasperl
2012/09/07 13:03:46
Maybe use return ? : in these cases in this file?
ngeoffray
2012/09/07 14:06:36
Done.
| |
| 707 return const SourceString('numberOrStringSuperNativeTypeCheck'); | |
| 708 } else { | |
| 709 return const SourceString('numberOrStringSuperTypeCheck'); | |
| 710 } | |
| 711 } else if (Elements.isStringOnlySupertype(element, compiler)) { | |
| 706 if (nativeCheck) { | 712 if (nativeCheck) { |
| 707 return const SourceString('stringSuperNativeTypeCheck'); | 713 return const SourceString('stringSuperNativeTypeCheck'); |
| 708 } else { | 714 } else { |
| 709 return const SourceString('stringSuperTypeCheck'); | 715 return const SourceString('stringSuperTypeCheck'); |
| 710 } | 716 } |
| 711 } else if (element === compiler.listClass) { | 717 } else if (element === compiler.listClass) { |
| 712 return const SourceString('listTypeCheck'); | 718 return const SourceString('listTypeCheck'); |
| 713 } else { | 719 } else { |
| 714 if (Elements.isListSupertype(element, compiler)) { | 720 if (Elements.isListSupertype(element, compiler)) { |
| 715 if (nativeCheck) { | 721 if (nativeCheck) { |
| 716 return const SourceString('listSuperNativeTypeCheck'); | 722 return const SourceString('listSuperNativeTypeCheck'); |
| 717 } else { | 723 } else { |
| 718 return const SourceString('listSuperTypeCheck'); | 724 return const SourceString('listSuperTypeCheck'); |
| 719 } | 725 } |
| 720 } else if (nativeCheck) { | 726 } else if (nativeCheck) { |
| 721 return const SourceString('callTypeCheck'); | 727 return const SourceString('callTypeCheck'); |
| 722 } else { | 728 } else { |
| 723 return const SourceString('propertyTypeCheck'); | 729 return const SourceString('propertyTypeCheck'); |
| 724 } | 730 } |
| 725 } | 731 } |
| 726 } | 732 } |
| 727 } | 733 } |
| OLD | NEW |