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

Unified Diff: sdk/lib/_internal/compiler/js_lib/js_helper.dart

Issue 1106443003: Optimize DateTime properties (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: rebase Created 5 years, 7 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/ssa/types_propagation.dart ('k') | tests/compiler/dart2js/simple_inferrer_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/js_lib/js_helper.dart
diff --git a/sdk/lib/_internal/compiler/js_lib/js_helper.dart b/sdk/lib/_internal/compiler/js_lib/js_helper.dart
index 1ee4c66743ebb0855765ca842247a82465212a38..448bfe6f87dad7ac0cf9fe7416d5eea2904cbb94 100644
--- a/sdk/lib/_internal/compiler/js_lib/js_helper.dart
+++ b/sdk/lib/_internal/compiler/js_lib/js_helper.dart
@@ -1024,38 +1024,38 @@ class Primitives {
static getMonth(receiver) {
return (receiver.isUtc)
- ? JS('int', r'#.getUTCMonth() + 1', lazyAsJsDate(receiver))
- : JS('int', r'#.getMonth() + 1', lazyAsJsDate(receiver));
+ ? JS('JSUInt31', r'#.getUTCMonth() + 1', lazyAsJsDate(receiver))
+ : JS('JSUInt31', r'#.getMonth() + 1', lazyAsJsDate(receiver));
}
static getDay(receiver) {
return (receiver.isUtc)
- ? JS('int', r'(#.getUTCDate() + 0)', lazyAsJsDate(receiver))
- : JS('int', r'(#.getDate() + 0)', lazyAsJsDate(receiver));
+ ? JS('JSUInt31', r'(#.getUTCDate() + 0)', lazyAsJsDate(receiver))
+ : JS('JSUInt31', r'(#.getDate() + 0)', lazyAsJsDate(receiver));
}
static getHours(receiver) {
return (receiver.isUtc)
- ? JS('int', r'(#.getUTCHours() + 0)', lazyAsJsDate(receiver))
- : JS('int', r'(#.getHours() + 0)', lazyAsJsDate(receiver));
+ ? JS('JSUInt31', r'(#.getUTCHours() + 0)', lazyAsJsDate(receiver))
+ : JS('JSUInt31', r'(#.getHours() + 0)', lazyAsJsDate(receiver));
}
static getMinutes(receiver) {
return (receiver.isUtc)
- ? JS('int', r'(#.getUTCMinutes() + 0)', lazyAsJsDate(receiver))
- : JS('int', r'(#.getMinutes() + 0)', lazyAsJsDate(receiver));
+ ? JS('JSUInt31', r'(#.getUTCMinutes() + 0)', lazyAsJsDate(receiver))
+ : JS('JSUInt31', r'(#.getMinutes() + 0)', lazyAsJsDate(receiver));
}
static getSeconds(receiver) {
return (receiver.isUtc)
- ? JS('int', r'(#.getUTCSeconds() + 0)', lazyAsJsDate(receiver))
- : JS('int', r'(#.getSeconds() + 0)', lazyAsJsDate(receiver));
+ ? JS('JSUInt31', r'(#.getUTCSeconds() + 0)', lazyAsJsDate(receiver))
+ : JS('JSUInt31', r'(#.getSeconds() + 0)', lazyAsJsDate(receiver));
}
static getMilliseconds(receiver) {
return (receiver.isUtc)
- ? JS('int', r'(#.getUTCMilliseconds() + 0)', lazyAsJsDate(receiver))
- : JS('int', r'(#.getMilliseconds() + 0)', lazyAsJsDate(receiver));
+ ? JS('JSUInt31', r'(#.getUTCMilliseconds() + 0)', lazyAsJsDate(receiver))
+ : JS('JSUInt31', r'(#.getMilliseconds() + 0)', lazyAsJsDate(receiver));
}
static getWeekday(receiver) {
« no previous file with comments | « pkg/compiler/lib/src/ssa/types_propagation.dart ('k') | tests/compiler/dart2js/simple_inferrer_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698