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

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: 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..57d4b3e8072aec3de148248d1690f7dfc1dc90f0 100644
--- a/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
+++ b/sdk/lib/_internal/compiler/implementation/js_backend/backend.dart
@@ -1139,6 +1139,10 @@ class JavaScriptBackend extends Backend {
enqueueInResolution(getThrowHelper(), elements);
}
+ void registerThrowExpression(TreeElements elements) {
+ enqueueInResolution(getThrowExpressionHelper(), elements);
+ }
+
void registerLazyField(TreeElements elements) {
enqueueInResolution(getCyclicThrowHelper(), elements);
}
@@ -1676,6 +1680,10 @@ class JavaScriptBackend extends Backend {
return compiler.findHelper(const SourceString(r'$throw'));
}
+ Element getThrowExpressionHelper() {
+ return compiler.findHelper(const SourceString('throwExpression'));
+ }
+
Element getClosureConverter() {
return compiler.findHelper(const SourceString('convertDartClosureToJS'));
}

Powered by Google App Engine
This is Rietveld 408576698