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

Side by Side Diff: src/string.js

Issue 1109343004: Wrap v8natives.js into a function. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: alpha sort 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 unified diff | Download patch
« no previous file with comments | « src/regexp.js ('k') | src/string-iterator.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var $stringCharAt; 5 var $stringCharAt;
6 var $stringIndexOf; 6 var $stringIndexOf;
7 var $stringSubstring; 7 var $stringSubstring;
8 8
9 (function() { 9 (function() {
10 10
(...skipping 1105 matching lines...) Expand 10 before | Expand all | Expand 10 after
1116 1116
1117 // Set the String function and constructor. 1117 // Set the String function and constructor.
1118 %SetCode(GlobalString, StringConstructor); 1118 %SetCode(GlobalString, StringConstructor);
1119 %FunctionSetPrototype(GlobalString, new GlobalString()); 1119 %FunctionSetPrototype(GlobalString, new GlobalString());
1120 1120
1121 // Set up the constructor property on the String prototype object. 1121 // Set up the constructor property on the String prototype object.
1122 %AddNamedProperty( 1122 %AddNamedProperty(
1123 GlobalString.prototype, "constructor", GlobalString, DONT_ENUM); 1123 GlobalString.prototype, "constructor", GlobalString, DONT_ENUM);
1124 1124
1125 // Set up the non-enumerable functions on the String object. 1125 // Set up the non-enumerable functions on the String object.
1126 InstallFunctions(GlobalString, DONT_ENUM, [ 1126 $installFunctions(GlobalString, DONT_ENUM, [
1127 "fromCharCode", StringFromCharCode, 1127 "fromCharCode", StringFromCharCode,
1128 "fromCodePoint", StringFromCodePoint, 1128 "fromCodePoint", StringFromCodePoint,
1129 "raw", StringRaw 1129 "raw", StringRaw
1130 ]); 1130 ]);
1131 1131
1132 // Set up the non-enumerable functions on the String prototype object. 1132 // Set up the non-enumerable functions on the String prototype object.
1133 InstallFunctions(GlobalString.prototype, DONT_ENUM, [ 1133 $installFunctions(GlobalString.prototype, DONT_ENUM, [
1134 "valueOf", StringValueOf, 1134 "valueOf", StringValueOf,
1135 "toString", StringToString, 1135 "toString", StringToString,
1136 "charAt", StringCharAtJS, 1136 "charAt", StringCharAtJS,
1137 "charCodeAt", StringCharCodeAtJS, 1137 "charCodeAt", StringCharCodeAtJS,
1138 "codePointAt", StringCodePointAt, 1138 "codePointAt", StringCodePointAt,
1139 "concat", StringConcat, 1139 "concat", StringConcat,
1140 "endsWith", StringEndsWith, 1140 "endsWith", StringEndsWith,
1141 "includes", StringIncludes, 1141 "includes", StringIncludes,
1142 "indexOf", StringIndexOfJS, 1142 "indexOf", StringIndexOfJS,
1143 "lastIndexOf", StringLastIndexOfJS, 1143 "lastIndexOf", StringLastIndexOfJS,
(...skipping 29 matching lines...) Expand all
1173 "strike", StringStrike, 1173 "strike", StringStrike,
1174 "sub", StringSub, 1174 "sub", StringSub,
1175 "sup", StringSup 1175 "sup", StringSup
1176 ]); 1176 ]);
1177 1177
1178 $stringCharAt = StringCharAtJS; 1178 $stringCharAt = StringCharAtJS;
1179 $stringIndexOf = StringIndexOfJS; 1179 $stringIndexOf = StringIndexOfJS;
1180 $stringSubstring = StringSubstring; 1180 $stringSubstring = StringSubstring;
1181 1181
1182 })(); 1182 })();
OLDNEW
« no previous file with comments | « src/regexp.js ('k') | src/string-iterator.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698