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

Unified Diff: lib/runtime/dart/core.js

Issue 1249043006: fix truncate call to use extension method (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: format Created 5 years, 5 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 | « lib/runtime/dart/_native_typed_data.js ('k') | lib/runtime/dart/math.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/runtime/dart/core.js
diff --git a/lib/runtime/dart/core.js b/lib/runtime/dart/core.js
index 4fd5ff51c1a4a307f71c9dd70033df791ade72f5..c075746d0498a9bc584471e7eb46a084885239fd 100644
--- a/lib/runtime/dart/core.js
+++ b/lib/runtime/dart/core.js
@@ -483,7 +483,7 @@ dart_library.library('dart/core', null, /* Imports */[
['~/'](quotient) {
if (quotient == 0)
dart.throw(new IntegerDivisionByZeroException());
- return new Duration._microseconds((dart.notNull(this[_duration]) / dart.notNull(quotient)).truncate());
+ return new Duration._microseconds((dart.notNull(this[_duration]) / dart.notNull(quotient))[dartx.truncate]());
}
['<'](other) {
return dart.notNull(this[_duration]) < dart.notNull(other[_duration]);
@@ -498,19 +498,19 @@ dart_library.library('dart/core', null, /* Imports */[
return dart.notNull(this[_duration]) >= dart.notNull(other[_duration]);
}
get inDays() {
- return (dart.notNull(this[_duration]) / dart.notNull(Duration.MICROSECONDS_PER_DAY)).truncate();
+ return (dart.notNull(this[_duration]) / dart.notNull(Duration.MICROSECONDS_PER_DAY))[dartx.truncate]();
}
get inHours() {
- return (dart.notNull(this[_duration]) / dart.notNull(Duration.MICROSECONDS_PER_HOUR)).truncate();
+ return (dart.notNull(this[_duration]) / dart.notNull(Duration.MICROSECONDS_PER_HOUR))[dartx.truncate]();
}
get inMinutes() {
- return (dart.notNull(this[_duration]) / dart.notNull(Duration.MICROSECONDS_PER_MINUTE)).truncate();
+ return (dart.notNull(this[_duration]) / dart.notNull(Duration.MICROSECONDS_PER_MINUTE))[dartx.truncate]();
}
get inSeconds() {
- return (dart.notNull(this[_duration]) / dart.notNull(Duration.MICROSECONDS_PER_SECOND)).truncate();
+ return (dart.notNull(this[_duration]) / dart.notNull(Duration.MICROSECONDS_PER_SECOND))[dartx.truncate]();
}
get inMilliseconds() {
- return (dart.notNull(this[_duration]) / dart.notNull(Duration.MICROSECONDS_PER_MILLISECOND)).truncate();
+ return (dart.notNull(this[_duration]) / dart.notNull(Duration.MICROSECONDS_PER_MILLISECOND))[dartx.truncate]();
}
get inMicroseconds() {
return this[_duration];
@@ -1604,10 +1604,10 @@ dart_library.library('dart/core', null, /* Imports */[
return new Duration({microseconds: this.elapsedMicroseconds});
}
get elapsedMicroseconds() {
- return (dart.notNull(this.elapsedTicks) * 1000000 / dart.notNull(this.frequency)).truncate();
+ return (dart.notNull(this.elapsedTicks) * 1000000 / dart.notNull(this.frequency))[dartx.truncate]();
}
get elapsedMilliseconds() {
- return (dart.notNull(this.elapsedTicks) * 1000 / dart.notNull(this.frequency)).truncate();
+ return (dart.notNull(this.elapsedTicks) * 1000 / dart.notNull(this.frequency))[dartx.truncate]();
}
get isRunning() {
return this[_start] != null && this[_stop] == null;
« no previous file with comments | « lib/runtime/dart/_native_typed_data.js ('k') | lib/runtime/dart/math.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698