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

Unified Diff: src/js/string.js

Issue 2038563003: [builtins] Migrate StringFromCodePoint to C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Initialize variable to make compiler happy Created 4 years, 6 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/builtins.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/js/string.js
diff --git a/src/js/string.js b/src/js/string.js
index 33a3e72143ca5020c8a9441d6a9b08f63c581f04..d2eaa3280981fab97df5a9e01d7f11e417887aa2 100644
--- a/src/js/string.js
+++ b/src/js/string.js
@@ -747,33 +747,6 @@ function StringCodePointAt(pos) {
}
-// ES6 Draft 05-22-2014, section 21.1.2.2
-function StringFromCodePoint(_) { // length = 1
- "use strict";
- var code;
- var length = arguments.length;
- var index;
- var result = "";
- for (index = 0; index < length; index++) {
- code = arguments[index];
- if (!%_IsSmi(code)) {
- code = TO_NUMBER(code);
- }
- if (code < 0 || code > 0x10FFFF || code !== TO_INTEGER(code)) {
- throw MakeRangeError(kInvalidCodePoint, code);
- }
- if (code <= 0xFFFF) {
- result += %_StringCharFromCode(code);
- } else {
- code -= 0x10000;
- result += %_StringCharFromCode((code >>> 10) & 0x3FF | 0xD800);
- result += %_StringCharFromCode(code & 0x3FF | 0xDC00);
- }
- }
- return result;
-}
-
-
// -------------------------------------------------------------------
// String methods related to templates
@@ -802,7 +775,6 @@ function StringRaw(callSite) {
// Set up the non-enumerable functions on the String object.
utils.InstallFunctions(GlobalString, DONT_ENUM, [
- "fromCodePoint", StringFromCodePoint,
"raw", StringRaw
]);
« no previous file with comments | « src/builtins.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698