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

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

Issue 13947004: dart2js: Allow 'throw' when inlining (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Nicolas' Code review feedback Created 7 years, 8 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 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 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 onResolutionComplete() => rti.computeClassesNeedingRti(); 1128 onResolutionComplete() => rti.computeClassesNeedingRti();
1129 1129
1130 void registerStringInterpolation(TreeElements elements) { 1130 void registerStringInterpolation(TreeElements elements) {
1131 enqueueInResolution(getStringInterpolationHelper(), elements); 1131 enqueueInResolution(getStringInterpolationHelper(), elements);
1132 } 1132 }
1133 1133
1134 void registerCatchStatement(TreeElements elements) { 1134 void registerCatchStatement(TreeElements elements) {
1135 enqueueInResolution(getExceptionUnwrapper(), elements); 1135 enqueueInResolution(getExceptionUnwrapper(), elements);
1136 } 1136 }
1137 1137
1138 void registerThrow(TreeElements elements) { 1138 void registerWrapException(TreeElements elements) {
1139 enqueueInResolution(getThrowHelper(), elements); 1139 enqueueInResolution(getWrapExceptionHelper(), elements);
1140 }
1141
1142 void registerThrowExpression(TreeElements elements) {
1143 enqueueInResolution(getThrowExpressionHelper(), elements);
1140 } 1144 }
1141 1145
1142 void registerLazyField(TreeElements elements) { 1146 void registerLazyField(TreeElements elements) {
1143 enqueueInResolution(getCyclicThrowHelper(), elements); 1147 enqueueInResolution(getCyclicThrowHelper(), elements);
1144 } 1148 }
1145 1149
1146 void registerTypeLiteral(TreeElements elements) { 1150 void registerTypeLiteral(TreeElements elements) {
1147 enqueueInResolution(getCreateRuntimeType(), elements); 1151 enqueueInResolution(getCreateRuntimeType(), elements);
1148 } 1152 }
1149 1153
(...skipping 515 matching lines...) Expand 10 before | Expand all | Expand 10 after
1665 1669
1666 Element getThrowAbstractClassInstantiationError() { 1670 Element getThrowAbstractClassInstantiationError() {
1667 return compiler.findHelper( 1671 return compiler.findHelper(
1668 const SourceString('throwAbstractClassInstantiationError')); 1672 const SourceString('throwAbstractClassInstantiationError'));
1669 } 1673 }
1670 1674
1671 Element getStringInterpolationHelper() { 1675 Element getStringInterpolationHelper() {
1672 return compiler.findHelper(const SourceString('S')); 1676 return compiler.findHelper(const SourceString('S'));
1673 } 1677 }
1674 1678
1675 Element getThrowHelper() { 1679 Element getWrapExceptionHelper() {
1676 return compiler.findHelper(const SourceString(r'$throw')); 1680 return compiler.findHelper(const SourceString(r'wrapException'));
1681 }
1682
1683 Element getThrowExpressionHelper() {
1684 return compiler.findHelper(const SourceString('throwExpression'));
1677 } 1685 }
1678 1686
1679 Element getClosureConverter() { 1687 Element getClosureConverter() {
1680 return compiler.findHelper(const SourceString('convertDartClosureToJS')); 1688 return compiler.findHelper(const SourceString('convertDartClosureToJS'));
1681 } 1689 }
1682 1690
1683 Element getTraceFromException() { 1691 Element getTraceFromException() {
1684 return compiler.findHelper(const SourceString('getTraceFromException')); 1692 return compiler.findHelper(const SourceString('getTraceFromException'));
1685 } 1693 }
1686 1694
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1757 ClassElement get constListImplementation => jsArrayClass; 1765 ClassElement get constListImplementation => jsArrayClass;
1758 ClassElement get fixedListImplementation => jsFixedArrayClass; 1766 ClassElement get fixedListImplementation => jsFixedArrayClass;
1759 ClassElement get growableListImplementation => jsExtendableArrayClass; 1767 ClassElement get growableListImplementation => jsExtendableArrayClass;
1760 ClassElement get mapImplementation => mapLiteralClass; 1768 ClassElement get mapImplementation => mapLiteralClass;
1761 ClassElement get constMapImplementation => constMapLiteralClass; 1769 ClassElement get constMapImplementation => constMapLiteralClass;
1762 ClassElement get functionImplementation => jsFunctionClass; 1770 ClassElement get functionImplementation => jsFunctionClass;
1763 ClassElement get typeImplementation => typeLiteralClass; 1771 ClassElement get typeImplementation => typeLiteralClass;
1764 ClassElement get boolImplementation => jsBoolClass; 1772 ClassElement get boolImplementation => jsBoolClass;
1765 ClassElement get nullImplementation => jsNullClass; 1773 ClassElement get nullImplementation => jsNullClass;
1766 } 1774 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698