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

Unified Diff: pkg/compiler/lib/src/constants/values.dart

Issue 1635053002: dart2js: Match the runtime int is check semantics at compile time. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Incorporate review comments. Created 4 years, 11 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/js_backend/constant_system_javascript.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/constants/values.dart
diff --git a/pkg/compiler/lib/src/constants/values.dart b/pkg/compiler/lib/src/constants/values.dart
index 945aaba89e838c506dc52cca41077f467f436237..fde5cde807a91492704ee808f42a302b546c72f9 100644
--- a/pkg/compiler/lib/src/constants/values.dart
+++ b/pkg/compiler/lib/src/constants/values.dart
@@ -64,6 +64,8 @@ abstract class ConstantValue {
bool get isMinusZero => false;
bool get isZero => false;
bool get isOne => false;
+ bool get isPositiveInfinity => false;
+ bool get isNegativeInfinity => false;
// TODO(johnniwinther): Replace with a 'type' getter.
DartType getType(CoreTypes types);
@@ -279,6 +281,10 @@ class DoubleConstantValue extends NumConstantValue {
bool get isOne => primitiveValue == 1.0;
+ bool get isPositiveInfinity => primitiveValue == double.INFINITY;
+
+ bool get isNegativeInfinity => primitiveValue == -double.INFINITY;
+
DartType getType(CoreTypes types) => types.doubleType;
bool operator ==(var other) {
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/constant_system_javascript.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698