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

Unified Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 1755823003: Replace TypeMask.isEmpty by isEmptyOrNull, use isEmpty when it's really empty. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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: pkg/compiler/lib/src/ssa/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index 85fd58338a7e5e5b627034dbb009549182e4e9ba..fb979aaeab98cbd9be949c15c5a9159847f2f8dd 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -1401,9 +1401,7 @@ class SsaBuilder extends ast.Visitor
// This means that the function always throws an exception.
TypeMask returnType =
compiler.typesTask.getGuaranteedReturnTypeOfElement(element);
- if (returnType != null
- && returnType.isEmpty
- && !returnType.isNullable) {
+ if (returnType != null && returnType.isEmpty) {
isReachable = false;
return false;
}
@@ -1688,8 +1686,8 @@ class SsaBuilder extends ast.Visitor
}
}
if (const bool.fromEnvironment('unreachable-throw') == true) {
- var emptyParameters = parameters.values.where((p) =>
- p.instructionType.isEmpty && !p.instructionType.isNullable);
+ var emptyParameters = parameters.values
+ .where((p) => p.instructionType.isEmpty);
if (emptyParameters.length > 0) {
addComment('${emptyParameters} inferred as [empty]');
pushInvokeStatic(function.body, helpers.assertUnreachableMethod, []);
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/task.dart ('k') | pkg/compiler/lib/src/ssa/interceptor_simplifier.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698