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

Unified Diff: runtime/lib/integers.dart

Issue 2789943002: Reland "VM: Handle null-comparisons in the flow graph type propagation" (Closed)
Patch Set: addressed comments Created 3 years, 9 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 | runtime/vm/flow_graph.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/integers.dart
diff --git a/runtime/lib/integers.dart b/runtime/lib/integers.dart
index ff755e9c8dd2f9e65f9ef477f8a71029a62fff34..9af198912a223f71735e3c1418da8a35e79e236d 100644
--- a/runtime/lib/integers.dart
+++ b/runtime/lib/integers.dart
@@ -2,6 +2,10 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+// This marker interface represents 64-bit integers in the compiler for type
+// propagation and range analysis. It is implemented by _Smi and _Mint.
+abstract class _int64 implements int {}
+
abstract class _IntegerImplementation {
// The Dart class _Bigint extending _IntegerImplementation requires a
// default constructor.
@@ -454,7 +458,7 @@ abstract class _IntegerImplementation {
}
}
-class _Smi extends _IntegerImplementation implements int {
+class _Smi extends _IntegerImplementation implements int, _int64 {
factory _Smi._uninstantiable() {
throw new UnsupportedError("_Smi can only be allocated by the VM");
}
@@ -654,7 +658,7 @@ class _Smi extends _IntegerImplementation implements int {
}
// Represents integers that cannot be represented by Smi but fit into 64bits.
-class _Mint extends _IntegerImplementation implements int {
+class _Mint extends _IntegerImplementation implements int, _int64 {
factory _Mint._uninstantiable() {
throw new UnsupportedError("_Mint can only be allocated by the VM");
}
« no previous file with comments | « no previous file | runtime/vm/flow_graph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698