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

Unified Diff: pkg/compiler/lib/src/js_backend/codegen/task.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
« no previous file with comments | « pkg/compiler/lib/src/inferrer/type_graph_nodes.dart ('k') | pkg/compiler/lib/src/ssa/builder.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/codegen/task.dart
diff --git a/pkg/compiler/lib/src/js_backend/codegen/task.dart b/pkg/compiler/lib/src/js_backend/codegen/task.dart
index edc7c55c375cf8cea9ebfadb0acf865055036e99..6ebc0dc8cd4c166f28458941764ab1d786e2ec01 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/task.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/task.dart
@@ -216,9 +216,8 @@ class CpsFunctionCompiler implements FunctionCompiler {
if (type is UnionTypeMask) {
return '[${type.disjointMasks.map(formatTypeMask).join(', ')}]';
} else if (type is FlatTypeMask) {
- if (type.isEmpty) {
- return "null";
- }
+ if (type.isEmpty) return "empty";
+ if (type.isNull) return "null";
String suffix = (type.isExact ? "" : "+") + (type.isNullable ? "?" : "!");
return '${type.base.name}$suffix';
} else if (type is ForwardingTypeMask) {
« no previous file with comments | « pkg/compiler/lib/src/inferrer/type_graph_nodes.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698