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

Unified Diff: src/uri.js

Issue 1323543002: [runtime] Replace %to_string_fun with %_ToString. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@ToStringStub
Patch Set: REBASE. Fixes Created 5 years, 3 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/symbol.js ('k') | src/v8natives.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/uri.js
diff --git a/src/uri.js b/src/uri.js
index bf3270f1d061dc8f63e1f4397a9288ee64f47532..bdb83d14310e2f1a8eef60eb30606376d6fb9871 100644
--- a/src/uri.js
+++ b/src/uri.js
@@ -17,11 +17,6 @@
var GlobalObject = global.Object;
var GlobalArray = global.Array;
var InternalArray = utils.InternalArray;
-var ToString;
-
-utils.Import(function(from) {
- ToString = from.ToString;
-});
// -------------------------------------------------------------------
// Define internal helper functions.
@@ -169,7 +164,7 @@ function URIDecodeOctets(octets, result, index) {
// ECMA-262, section 15.1.3
function Encode(uri, unescape) {
- uri = TO_STRING_INLINE(uri);
+ uri = TO_STRING(uri);
var uriLength = uri.length;
var array = new InternalArray(uriLength);
var index = 0;
@@ -200,7 +195,7 @@ function Encode(uri, unescape) {
// ECMA-262, section 15.1.3
function Decode(uri, reserved) {
- uri = TO_STRING_INLINE(uri);
+ uri = TO_STRING(uri);
var uriLength = uri.length;
var one_byte = %NewString(uriLength, NEW_ONE_BYTE_STRING);
var index = 0;
@@ -278,14 +273,12 @@ function Decode(uri, reserved) {
// Define exported functions.
// ECMA-262 - B.2.1.
-function URIEscapeJS(str) {
- var s = ToString(str);
+function URIEscapeJS(s) {
return %URIEscape(s);
}
// ECMA-262 - B.2.2.
-function URIUnescapeJS(str) {
- var s = ToString(str);
+function URIUnescapeJS(s) {
return %URIUnescape(s);
}
@@ -309,15 +302,13 @@ function URIDecode(uri) {
return false;
};
- var string = ToString(uri);
- return Decode(string, reservedPredicate);
+ return Decode(uri, reservedPredicate);
}
// ECMA-262 - 15.1.3.2.
function URIDecodeComponent(component) {
var reservedPredicate = function(cc) { return false; };
- var string = ToString(component);
- return Decode(string, reservedPredicate);
+ return Decode(component, reservedPredicate);
}
// ECMA-262 - 15.1.3.3.
@@ -343,8 +334,7 @@ function URIEncode(uri) {
return false;
};
- var string = ToString(uri);
- return Encode(string, unescapePredicate);
+ return Encode(uri, unescapePredicate);
}
// ECMA-262 - 15.1.3.4
@@ -364,8 +354,7 @@ function URIEncodeComponent(component) {
return false;
};
- var string = ToString(component);
- return Encode(string, unescapePredicate);
+ return Encode(component, unescapePredicate);
}
// -------------------------------------------------------------------
« no previous file with comments | « src/symbol.js ('k') | src/v8natives.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698