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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
diff --git a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
index a2cffcf2f09c84d36757f28e83471cb10a9e35a2..f3ad005bb4a3d4bf89dbb780f0606550161dd401 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -1135,8 +1135,12 @@ class JavaScriptBackend extends Backend {
enqueueInResolution(getExceptionUnwrapper(), elements);
}
- void registerThrow(TreeElements elements) {
- enqueueInResolution(getThrowHelper(), elements);
+ void registerWrapException(TreeElements elements) {
+ enqueueInResolution(getWrapExceptionHelper(), elements);
+ }
+
+ void registerThrowExpression(TreeElements elements) {
+ enqueueInResolution(getThrowExpressionHelper(), elements);
}
void registerLazyField(TreeElements elements) {
@@ -1672,8 +1676,12 @@ class JavaScriptBackend extends Backend {
return compiler.findHelper(const SourceString('S'));
}
- Element getThrowHelper() {
- return compiler.findHelper(const SourceString(r'$throw'));
+ Element getWrapExceptionHelper() {
+ return compiler.findHelper(const SourceString(r'wrapException'));
+ }
+
+ Element getThrowExpressionHelper() {
+ return compiler.findHelper(const SourceString('throwExpression'));
}
Element getClosureConverter() {

Powered by Google App Engine
This is Rietveld 408576698