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

Unified Diff: src/array.js

Issue 1302533002: Native context: debug.js does not load from js builtins object anymore. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: make importing requirement more explicit Created 5 years, 4 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 | src/arraybuffer.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/array.js
diff --git a/src/array.js b/src/array.js
index cfaa324d18b506fb24ceff19e5f5239fda34c8d4..4520a34e35055da4129e60c7e12f1dc2fe3d2bd1 100644
--- a/src/array.js
+++ b/src/array.js
@@ -19,16 +19,17 @@ var $arrayUnshift;
// -------------------------------------------------------------------
// Imports
+var Delete;
var GlobalArray = global.Array;
var InternalArray = utils.InternalArray;
var InternalPackedArray = utils.InternalPackedArray;
-
-var Delete;
var MathMin;
var ObjectHasOwnProperty;
var ObjectIsFrozen;
var ObjectIsSealed;
var ObjectToString;
+var ToNumber;
+var ToString;
utils.Import(function(from) {
Delete = from.Delete;
@@ -37,6 +38,8 @@ utils.Import(function(from) {
ObjectIsFrozen = from.ObjectIsFrozen;
ObjectIsSealed = from.ObjectIsSealed;
ObjectToString = from.ObjectToString;
+ ToNumber = from.ToNumber;
+ ToString = from.ToString;
});
// -------------------------------------------------------------------
@@ -216,7 +219,7 @@ function ConvertToString(x) {
// Assumes x is a non-string.
if (IS_NUMBER(x)) return %_NumberToString(x);
if (IS_BOOLEAN(x)) return x ? 'true' : 'false';
- return (IS_NULL_OR_UNDEFINED(x)) ? '' : $toString($defaultString(x));
+ return (IS_NULL_OR_UNDEFINED(x)) ? '' : ToString($defaultString(x));
}
@@ -228,7 +231,7 @@ function ConvertToLocaleString(e) {
// must throw a TypeError if ToObject(e).toLocaleString isn't
// callable.
var e_obj = TO_OBJECT(e);
- return $toString(e_obj.toLocaleString());
+ return ToString(e_obj.toLocaleString());
}
}
@@ -914,8 +917,8 @@ function InnerArraySort(length, comparefn) {
if (%_IsSmi(x) && %_IsSmi(y)) {
return %SmiLexicographicCompare(x, y);
}
- x = $toString(x);
- y = $toString(y);
+ x = ToString(x);
+ y = ToString(y);
if (x == y) return 0;
else return x < y ? -1 : 1;
};
« no previous file with comments | « no previous file | src/arraybuffer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698