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

Unified Diff: pkg/compiler/lib/src/js_backend/constant_system_javascript.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: Implement the same semantics at compile time and run time. 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 | « pkg/compiler/lib/src/constants/values.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/constant_system_javascript.dart
diff --git a/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart b/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart
index 290d563259dd393b4b5d0bda51b1008d7ca2f710..6c57cf3854807af7e7a0d78f7874c3573999b28b 100644
--- a/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart
@@ -275,7 +275,11 @@ class JavaScriptConstantSystem extends ConstantSystem {
}
// Integer checks don't verify that the number is not -0.0.
asgerf 2016/01/26 14:59:18 Update doc comment please.
- bool isInt(ConstantValue constant) => constant.isInt || constant.isMinusZero;
+ bool isInt(ConstantValue constant) {
+ return constant.isInt || constant.isMinusZero ||
+ constant.isPositiveInfinity ||
+ constant.isNegativeInfinity;
+ }
bool isDouble(ConstantValue constant)
=> constant.isDouble && !constant.isMinusZero;
bool isString(ConstantValue constant) => constant.isString;
« no previous file with comments | « pkg/compiler/lib/src/constants/values.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698