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

Unified Diff: src/date.js

Issue 1144163002: Revert of Use shared container to manage imports/exports. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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 | « src/contexts.h ('k') | src/generator.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/date.js
diff --git a/src/date.js b/src/date.js
index 3adf94d21697026fa1b585fadca059c2162840ac..7b6f539eaa356dd692c4dda3eb96bb67bbef3493 100644
--- a/src/date.js
+++ b/src/date.js
@@ -10,7 +10,7 @@
// -------------------------------------------------------------------
-(function(global, utils) {
+(function(global, shared, exports) {
"use strict";
@@ -20,15 +20,7 @@
// Imports
var GlobalDate = global.Date;
-var InternalArray = utils.InternalArray;
-
-var MathAbs;
-var MathFloor;
-
-utils.Import(function(from) {
- MathAbs = from.MathAbs;
- MathFloor = from.MathFloor;
-});
+var InternalArray = shared.InternalArray;
// -------------------------------------------------------------------
@@ -109,7 +101,7 @@
// is no way that the time can be within range even after UTC
// conversion we return NaN immediately instead of relying on
// TimeClip to do it.
- if (MathAbs(time) > MAX_TIME_BEFORE_UTC) return NAN;
+ if ($abs(time) > MAX_TIME_BEFORE_UTC) return NAN;
return time;
}
@@ -117,7 +109,7 @@
// ECMA 262 - 15.9.1.14
function TimeClip(time) {
if (!$isFinite(time)) return NAN;
- if (MathAbs(time) > MAX_TIME_MS) return NAN;
+ if ($abs(time) > MAX_TIME_MS) return NAN;
return TO_INTEGER(time);
}
@@ -244,8 +236,8 @@
var timezoneOffset = -TIMEZONE_OFFSET(date);
var sign = (timezoneOffset >= 0) ? 1 : -1;
- var hours = MathFloor((sign * timezoneOffset)/60);
- var min = MathFloor((sign * timezoneOffset)%60);
+ var hours = $floor((sign * timezoneOffset)/60);
+ var min = $floor((sign * timezoneOffset)%60);
var gmt = ' GMT' + ((sign == 1) ? '+' : '-') +
TwoDigitString(hours) + TwoDigitString(min);
return gmt + ' (' + timezone + ')';
« no previous file with comments | « src/contexts.h ('k') | src/generator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698