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 (function(global, utils) { | 5 (function(global, utils) { |
6 | 6 |
7 %CheckIsBootstrapping(); | 7 %CheckIsBootstrapping(); |
8 | 8 |
9 // ------------------------------------------------------------------- | 9 // ------------------------------------------------------------------- |
10 // Imports | 10 // Imports |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 } | 99 } |
100 } | 100 } |
101 | 101 |
102 if (end_i <= start_i) { | 102 if (end_i <= start_i) { |
103 return ''; | 103 return ''; |
104 } | 104 } |
105 | 105 |
106 return %_SubString(s, start_i, end_i); | 106 return %_SubString(s, start_i, end_i); |
107 } | 107 } |
108 | 108 |
| 109 // TODO(littledan): Rewrite these four functions as C++ builtins |
109 // ECMA-262, 15.5.4.16 | 110 // ECMA-262, 15.5.4.16 |
110 function StringToLowerCaseJS() { | 111 function StringToLowerCaseJS() { |
111 CHECK_OBJECT_COERCIBLE(this, "String.prototype.toLowerCase"); | 112 CHECK_OBJECT_COERCIBLE(this, "String.prototype.toLowerCase"); |
112 | 113 |
113 return %StringToLowerCase(TO_STRING(this)); | 114 return %StringToLowerCase(TO_STRING(this)); |
114 } | 115 } |
115 | 116 |
116 | 117 |
117 // ECMA-262, 15.5.4.17 | 118 // ECMA-262, 15.5.4.17 |
118 function StringToLocaleLowerCase() { | 119 function StringToLocaleLowerCase() { |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 "bold", StringBold, | 339 "bold", StringBold, |
339 "fixed", StringFixed, | 340 "fixed", StringFixed, |
340 "italics", StringItalics, | 341 "italics", StringItalics, |
341 "small", StringSmall, | 342 "small", StringSmall, |
342 "strike", StringStrike, | 343 "strike", StringStrike, |
343 "sub", StringSub, | 344 "sub", StringSub, |
344 "sup", StringSup | 345 "sup", StringSup |
345 ]); | 346 ]); |
346 | 347 |
347 }) | 348 }) |
OLD | NEW |