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

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

Issue 2562583003: Some resolution runtime errors are kernel malformedTypeErrors (Closed)
Patch Set: Created 4 years 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/backend_impact.dart
diff --git a/pkg/compiler/lib/src/js_backend/backend_impact.dart b/pkg/compiler/lib/src/js_backend/backend_impact.dart
index 975ce12bc0fb282b501c3ca697fd2f8b331b70ff..cbd3752e8a34d310b532b2ed5d1130b9e310e111 100644
--- a/pkg/compiler/lib/src/js_backend/backend_impact.dart
+++ b/pkg/compiler/lib/src/js_backend/backend_impact.dart
@@ -236,12 +236,21 @@ class BackendImpacts {
BackendImpact _throwRuntimeError;
BackendImpact get throwRuntimeError {
- return _throwRuntimeError ??= new BackendImpact(staticUses: [
- helpers.throwRuntimeError
- ], otherImpacts: [
- // Also register the types of the arguments passed to this method.
- stringValues
- ]);
+ return _throwRuntimeError ??= new BackendImpact(
+ staticUses: compiler.options.useKernel
+ ? [
+ // TODO(sra): Refactor impacts so that we know which of these
+ // are called.
+ helpers.malformedTypeError,
+ helpers.throwRuntimeError,
+ ]
+ : [
+ helpers.throwRuntimeError,
+ ],
+ otherImpacts: [
+ // Also register the types of the arguments passed to this method.
+ stringValues
+ ]);
}
BackendImpact _superNoSuchMethod;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698