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

Unified Diff: pkg/compiler/lib/src/cps_ir/type_mask_system.dart

Issue 1395333004: dart2js cps_ir: Use JSNumber_methods where possible (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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/cps_ir/type_propagation.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/type_mask_system.dart
diff --git a/pkg/compiler/lib/src/cps_ir/type_mask_system.dart b/pkg/compiler/lib/src/cps_ir/type_mask_system.dart
index ba44ed1c26068069ff6a6f6fa747d90ff988e5c5..2199a52146b651ec8542966781958fab3275d305 100644
--- a/pkg/compiler/lib/src/cps_ir/type_mask_system.dart
+++ b/pkg/compiler/lib/src/cps_ir/type_mask_system.dart
@@ -212,7 +212,7 @@ class TypeMaskSystem {
bool isDefinitelyInt(TypeMask t, {bool allowNull: false}) {
if (!allowNull && t.isNullable) return false;
- return t.satisfies(backend.jsIntClass, classWorld);
+ return t.nonNullable().containsOnlyInt(classWorld);
sra1 2015/10/14 01:16:02 This includes [subtype=int].
asgerf 2015/10/14 08:44:02 Could you do the same for the other number types?
}
bool isDefinitelyUint31(TypeMask t, {bool allowNull: false}) {
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/type_propagation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698