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

Unified Diff: pkg/compiler/lib/src/js_backend/backend.dart

Issue 1355873003: Throw Error on unreachable code rather than a String. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/type_variable_handler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/backend.dart
diff --git a/pkg/compiler/lib/src/js_backend/backend.dart b/pkg/compiler/lib/src/js_backend/backend.dart
index 4273279bc712c7409c1dbd7845217dc98d7adff7..a8d66e0f3be0bc1e70ab28aeb57735383da14137 100644
--- a/pkg/compiler/lib/src/js_backend/backend.dart
+++ b/pkg/compiler/lib/src/js_backend/backend.dart
@@ -281,6 +281,7 @@ class JavaScriptBackend extends Backend {
Element assertTestMethod;
Element assertThrowMethod;
Element assertHelperMethod;
+ Element assertUnreachableMethod;
Element invokeOnMethod;
ClassElement jsInterceptorClass;
@@ -1197,6 +1198,7 @@ class JavaScriptBackend extends Backend {
assert(traceHelper != null);
enqueueInResolution(traceHelper, registry);
}
+ enqueueInResolution(assertUnreachableMethod, registry);
registerCheckedModeHelpers(registry);
}
@@ -2124,6 +2126,7 @@ class JavaScriptBackend extends Backend {
assertTestMethod = findHelper('assertTest');
assertThrowMethod = findHelper('assertThrow');
assertHelperMethod = findHelper('assertHelper');
+ assertUnreachableMethod = findHelper('assertUnreachable');
typeLiteralClass = findClass('TypeImpl');
constMapLiteralClass = findClass('ConstantMap');
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/type_variable_handler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698