OLD | NEW |
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 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1111 | 1111 |
1112 // Set the String function and constructor. | 1112 // Set the String function and constructor. |
1113 %SetCode(GlobalString, StringConstructor); | 1113 %SetCode(GlobalString, StringConstructor); |
1114 %FunctionSetPrototype(GlobalString, new GlobalString()); | 1114 %FunctionSetPrototype(GlobalString, new GlobalString()); |
1115 | 1115 |
1116 // Set up the constructor property on the String prototype object. | 1116 // Set up the constructor property on the String prototype object. |
1117 %AddNamedProperty( | 1117 %AddNamedProperty( |
1118 GlobalString.prototype, "constructor", GlobalString, DONT_ENUM); | 1118 GlobalString.prototype, "constructor", GlobalString, DONT_ENUM); |
1119 | 1119 |
1120 // Set up the non-enumerable functions on the String object. | 1120 // Set up the non-enumerable functions on the String object. |
1121 $installFunctions(GlobalString, DONT_ENUM, [ | 1121 InstallFunctions(GlobalString, DONT_ENUM, [ |
1122 "fromCharCode", StringFromCharCode, | 1122 "fromCharCode", StringFromCharCode, |
1123 "fromCodePoint", StringFromCodePoint, | 1123 "fromCodePoint", StringFromCodePoint, |
1124 "raw", StringRaw | 1124 "raw", StringRaw |
1125 ]); | 1125 ]); |
1126 | 1126 |
1127 // Set up the non-enumerable functions on the String prototype object. | 1127 // Set up the non-enumerable functions on the String prototype object. |
1128 $installFunctions(GlobalString.prototype, DONT_ENUM, [ | 1128 InstallFunctions(GlobalString.prototype, DONT_ENUM, [ |
1129 "valueOf", StringValueOf, | 1129 "valueOf", StringValueOf, |
1130 "toString", StringToString, | 1130 "toString", StringToString, |
1131 "charAt", StringCharAtJS, | 1131 "charAt", StringCharAtJS, |
1132 "charCodeAt", StringCharCodeAtJS, | 1132 "charCodeAt", StringCharCodeAtJS, |
1133 "codePointAt", StringCodePointAt, | 1133 "codePointAt", StringCodePointAt, |
1134 "concat", StringConcat, | 1134 "concat", StringConcat, |
1135 "endsWith", StringEndsWith, | 1135 "endsWith", StringEndsWith, |
1136 "includes", StringIncludes, | 1136 "includes", StringIncludes, |
1137 "indexOf", StringIndexOfJS, | 1137 "indexOf", StringIndexOfJS, |
1138 "lastIndexOf", StringLastIndexOfJS, | 1138 "lastIndexOf", StringLastIndexOfJS, |
(...skipping 29 matching lines...) Expand all Loading... |
1168 "strike", StringStrike, | 1168 "strike", StringStrike, |
1169 "sub", StringSub, | 1169 "sub", StringSub, |
1170 "sup", StringSup | 1170 "sup", StringSup |
1171 ]); | 1171 ]); |
1172 | 1172 |
1173 $stringCharAt = StringCharAtJS; | 1173 $stringCharAt = StringCharAtJS; |
1174 $stringIndexOf = StringIndexOfJS; | 1174 $stringIndexOf = StringIndexOfJS; |
1175 $stringSubstring = StringSubstring; | 1175 $stringSubstring = StringSubstring; |
1176 | 1176 |
1177 })(); | 1177 })(); |
OLD | NEW |